From 4ae9f1f53172d543a7c8a47d08973e774b2fd082 Mon Sep 17 00:00:00 2001 From: Juan Treminio Date: Thu, 29 Aug 2024 17:48:36 -0500 Subject: [PATCH 01/10] Updating openapi-generator for Python to 7.8.0 --- sdks/python/.editorconfig | 2 +- sdks/python/.gitignore | 1 + sdks/python/.gitlab-ci.yml | 27 +- sdks/python/.openapi-generator-ignore | 3 - sdks/python/.openapi-generator/FILES | 409 - sdks/python/.openapi-generator/VERSION | 1 - sdks/python/.travis.yml | 6 +- sdks/python/LICENSE | 21 - sdks/python/README.md | 264 +- sdks/python/VERSION | 2 +- sdks/python/bin/replace | 42 +- sdks/python/docs/AccountApi.md | 120 +- sdks/python/docs/AccountCreateRequest.md | 13 +- sdks/python/docs/AccountCreateResponse.md | 7 +- sdks/python/docs/AccountGetResponse.md | 5 +- sdks/python/docs/AccountResponse.md | 23 +- sdks/python/docs/AccountResponseQuotas.md | 13 +- sdks/python/docs/AccountResponseUsage.md | 3 +- sdks/python/docs/AccountUpdateRequest.md | 7 +- sdks/python/docs/AccountVerifyRequest.md | 3 +- sdks/python/docs/AccountVerifyResponse.md | 5 +- .../docs/AccountVerifyResponseAccount.md | 3 +- sdks/python/docs/ApiAppApi.md | 177 +- sdks/python/docs/ApiAppCreateRequest.md | 15 +- sdks/python/docs/ApiAppGetResponse.md | 5 +- sdks/python/docs/ApiAppListResponse.md | 7 +- sdks/python/docs/ApiAppResponse.md | 21 +- sdks/python/docs/ApiAppResponseOAuth.md | 9 +- sdks/python/docs/ApiAppResponseOptions.md | 3 +- .../python/docs/ApiAppResponseOwnerAccount.md | 5 +- .../ApiAppResponseWhiteLabelingOptions.md | 29 +- sdks/python/docs/ApiAppUpdateRequest.md | 15 +- sdks/python/docs/BulkSendJobApi.md | 68 +- sdks/python/docs/BulkSendJobGetResponse.md | 9 +- ...BulkSendJobGetResponseSignatureRequests.md | 54 +- sdks/python/docs/BulkSendJobListResponse.md | 7 +- sdks/python/docs/BulkSendJobResponse.md | 9 +- sdks/python/docs/BulkSendJobSendResponse.md | 5 +- sdks/python/docs/EmbeddedApi.md | 61 +- sdks/python/docs/EmbeddedEditUrlRequest.md | 25 +- sdks/python/docs/EmbeddedEditUrlResponse.md | 5 +- .../docs/EmbeddedEditUrlResponseEmbedded.md | 5 +- sdks/python/docs/EmbeddedSignUrlResponse.md | 5 +- .../docs/EmbeddedSignUrlResponseEmbedded.md | 5 +- sdks/python/docs/ErrorResponse.md | 3 +- sdks/python/docs/ErrorResponseError.md | 7 +- sdks/python/docs/EventCallbackRequest.md | 9 +- sdks/python/docs/EventCallbackRequestEvent.md | 9 +- .../docs/EventCallbackRequestEventMetadata.md | 9 +- sdks/python/docs/FaxLineAddUserRequest.md | 7 +- sdks/python/docs/FaxLineApi.md | 179 +- .../docs/FaxLineAreaCodeGetCountryEnum.md | 1 - .../docs/FaxLineAreaCodeGetProvinceEnum.md | 1 - .../python/docs/FaxLineAreaCodeGetResponse.md | 3 +- .../docs/FaxLineAreaCodeGetStateEnum.md | 1 - sdks/python/docs/FaxLineCreateRequest.md | 9 +- sdks/python/docs/FaxLineDeleteRequest.md | 3 +- sdks/python/docs/FaxLineListResponse.md | 7 +- sdks/python/docs/FaxLineRemoveUserRequest.md | 7 +- sdks/python/docs/FaxLineResponse.md | 5 +- sdks/python/docs/FaxLineResponseFaxLine.md | 9 +- sdks/python/docs/FileResponse.md | 5 +- sdks/python/docs/FileResponseDataUri.md | 3 +- sdks/python/docs/ListInfoResponse.md | 9 +- sdks/python/docs/OAuthApi.md | 51 +- sdks/python/docs/OAuthTokenGenerateRequest.md | 11 +- sdks/python/docs/OAuthTokenRefreshRequest.md | 5 +- sdks/python/docs/OAuthTokenResponse.md | 11 +- sdks/python/docs/ReportApi.md | 32 +- sdks/python/docs/ReportCreateRequest.md | 7 +- sdks/python/docs/ReportCreateResponse.md | 5 +- sdks/python/docs/ReportResponse.md | 9 +- sdks/python/docs/SignatureRequestApi.md | 721 +- ...stBulkCreateEmbeddedWithTemplateRequest.md | 53 +- ...atureRequestBulkSendWithTemplateRequest.md | 53 +- .../SignatureRequestCreateEmbeddedRequest.md | 82 +- ...equestCreateEmbeddedWithTemplateRequest.md | 39 +- .../docs/SignatureRequestGetResponse.md | 5 +- .../docs/SignatureRequestListResponse.md | 7 +- .../docs/SignatureRequestRemindRequest.md | 5 +- sdks/python/docs/SignatureRequestResponse.md | 54 +- .../SignatureRequestResponseAttachment.md | 13 +- ...SignatureRequestResponseCustomFieldBase.md | 15 +- ...atureRequestResponseCustomFieldCheckbox.md | 7 +- ...SignatureRequestResponseCustomFieldText.md | 7 +- ...atureRequestResponseCustomFieldTypeEnum.md | 1 - .../docs/SignatureRequestResponseDataBase.md | 11 +- .../SignatureRequestResponseDataTypeEnum.md | 1 - ...gnatureRequestResponseDataValueCheckbox.md | 5 +- ...reRequestResponseDataValueCheckboxMerge.md | 5 +- ...atureRequestResponseDataValueDateSigned.md | 5 +- ...gnatureRequestResponseDataValueDropdown.md | 5 +- ...gnatureRequestResponseDataValueInitials.md | 5 +- .../SignatureRequestResponseDataValueRadio.md | 5 +- ...natureRequestResponseDataValueSignature.md | 5 +- .../SignatureRequestResponseDataValueText.md | 5 +- ...natureRequestResponseDataValueTextMerge.md | 5 +- .../SignatureRequestResponseSignatures.md | 39 +- .../docs/SignatureRequestSendRequest.md | 91 +- ...SignatureRequestSendWithTemplateRequest.md | 48 +- .../docs/SignatureRequestUpdateRequest.md | 15 +- sdks/python/docs/SubAttachment.md | 11 +- sdks/python/docs/SubBulkSignerList.md | 7 +- .../docs/SubBulkSignerListCustomField.md | 5 +- sdks/python/docs/SubCC.md | 5 +- sdks/python/docs/SubCustomField.md | 17 +- sdks/python/docs/SubEditorOptions.md | 5 +- sdks/python/docs/SubFieldOptions.md | 5 +- sdks/python/docs/SubFormFieldGroup.md | 11 +- sdks/python/docs/SubFormFieldRule.md | 9 +- sdks/python/docs/SubFormFieldRuleAction.md | 17 +- sdks/python/docs/SubFormFieldRuleTrigger.md | 42 +- .../docs/SubFormFieldsPerDocumentBase.md | 50 +- .../docs/SubFormFieldsPerDocumentCheckbox.md | 9 +- .../SubFormFieldsPerDocumentCheckboxMerge.md | 5 +- .../SubFormFieldsPerDocumentDateSigned.md | 11 +- .../docs/SubFormFieldsPerDocumentDropdown.md | 15 +- .../docs/SubFormFieldsPerDocumentFontEnum.md | 1 - .../docs/SubFormFieldsPerDocumentHyperlink.md | 15 +- .../docs/SubFormFieldsPerDocumentInitials.md | 5 +- .../docs/SubFormFieldsPerDocumentRadio.md | 9 +- .../docs/SubFormFieldsPerDocumentSignature.md | 5 +- .../docs/SubFormFieldsPerDocumentText.md | 29 +- .../docs/SubFormFieldsPerDocumentTextMerge.md | 11 +- .../docs/SubFormFieldsPerDocumentTypeEnum.md | 1 - sdks/python/docs/SubMergeField.md | 5 +- sdks/python/docs/SubOAuth.md | 5 +- sdks/python/docs/SubOptions.md | 3 +- .../docs/SubSignatureRequestGroupedSigners.md | 9 +- sdks/python/docs/SubSignatureRequestSigner.md | 21 +- .../docs/SubSignatureRequestTemplateSigner.md | 21 +- sdks/python/docs/SubSigningOptions.md | 13 +- sdks/python/docs/SubTeamResponse.md | 5 +- sdks/python/docs/SubTemplateRole.md | 5 +- sdks/python/docs/SubUnclaimedDraftSigner.md | 7 +- .../docs/SubUnclaimedDraftTemplateSigner.md | 7 +- sdks/python/docs/SubWhiteLabelingOptions.md | 31 +- sdks/python/docs/TeamAddMemberRequest.md | 13 +- sdks/python/docs/TeamApi.md | 288 +- sdks/python/docs/TeamCreateRequest.md | 3 +- sdks/python/docs/TeamGetInfoResponse.md | 5 +- sdks/python/docs/TeamGetResponse.md | 5 +- sdks/python/docs/TeamInfoResponse.md | 11 +- sdks/python/docs/TeamInviteResponse.md | 13 +- sdks/python/docs/TeamInvitesResponse.md | 5 +- sdks/python/docs/TeamMemberResponse.md | 7 +- sdks/python/docs/TeamMembersResponse.md | 7 +- sdks/python/docs/TeamParentResponse.md | 7 +- sdks/python/docs/TeamRemoveMemberRequest.md | 19 +- sdks/python/docs/TeamResponse.md | 9 +- sdks/python/docs/TeamSubTeamsResponse.md | 7 +- sdks/python/docs/TeamUpdateRequest.md | 3 +- sdks/python/docs/TemplateAddUserRequest.md | 9 +- sdks/python/docs/TemplateApi.md | 403 +- .../TemplateCreateEmbeddedDraftRequest.md | 76 +- .../TemplateCreateEmbeddedDraftResponse.md | 5 +- ...lateCreateEmbeddedDraftResponseTemplate.md | 11 +- sdks/python/docs/TemplateCreateRequest.md | 59 +- sdks/python/docs/TemplateCreateResponse.md | 5 +- .../docs/TemplateCreateResponseTemplate.md | 5 +- sdks/python/docs/TemplateEditResponse.md | 3 +- sdks/python/docs/TemplateGetResponse.md | 5 +- sdks/python/docs/TemplateListResponse.md | 7 +- sdks/python/docs/TemplateRemoveUserRequest.md | 5 +- sdks/python/docs/TemplateResponse.md | 33 +- sdks/python/docs/TemplateResponseAccount.md | 13 +- .../docs/TemplateResponseAccountQuota.md | 9 +- sdks/python/docs/TemplateResponseCCRole.md | 3 +- sdks/python/docs/TemplateResponseDocument.md | 13 +- ...TemplateResponseDocumentCustomFieldBase.md | 21 +- ...lateResponseDocumentCustomFieldCheckbox.md | 8 +- ...TemplateResponseDocumentCustomFieldText.md | 16 +- .../TemplateResponseDocumentFieldGroup.md | 5 +- .../TemplateResponseDocumentFieldGroupRule.md | 9 +- .../TemplateResponseDocumentFormFieldBase.md | 21 +- ...mplateResponseDocumentFormFieldCheckbox.md | 14 +- ...lateResponseDocumentFormFieldDateSigned.md | 14 +- ...mplateResponseDocumentFormFieldDropdown.md | 14 +- ...plateResponseDocumentFormFieldHyperlink.md | 22 +- ...mplateResponseDocumentFormFieldInitials.md | 14 +- .../TemplateResponseDocumentFormFieldRadio.md | 14 +- ...plateResponseDocumentFormFieldSignature.md | 14 +- .../TemplateResponseDocumentFormFieldText.md | 24 +- ...TemplateResponseDocumentStaticFieldBase.md | 21 +- ...lateResponseDocumentStaticFieldCheckbox.md | 14 +- ...teResponseDocumentStaticFieldDateSigned.md | 14 +- ...lateResponseDocumentStaticFieldDropdown.md | 14 +- ...ateResponseDocumentStaticFieldHyperlink.md | 14 +- ...lateResponseDocumentStaticFieldInitials.md | 14 +- ...emplateResponseDocumentStaticFieldRadio.md | 14 +- ...ateResponseDocumentStaticFieldSignature.md | 14 +- ...TemplateResponseDocumentStaticFieldText.md | 14 +- .../TemplateResponseFieldAvgTextLength.md | 5 +- .../python/docs/TemplateResponseSignerRole.md | 5 +- .../python/docs/TemplateUpdateFilesRequest.md | 17 +- .../docs/TemplateUpdateFilesResponse.md | 3 +- .../TemplateUpdateFilesResponseTemplate.md | 5 +- sdks/python/docs/UnclaimedDraftApi.md | 181 +- .../UnclaimedDraftCreateEmbeddedRequest.md | 105 +- ...dDraftCreateEmbeddedWithTemplateRequest.md | 79 +- .../docs/UnclaimedDraftCreateRequest.md | 74 +- .../docs/UnclaimedDraftCreateResponse.md | 5 +- .../UnclaimedDraftEditAndResendRequest.md | 17 +- sdks/python/docs/UnclaimedDraftResponse.md | 13 +- sdks/python/docs/WarningResponse.md | 5 +- sdks/python/dropbox_sign/__init__.py | 205 +- sdks/python/dropbox_sign/api/__init__.py | 18 +- sdks/python/dropbox_sign/api/account_api.py | 1780 ++-- sdks/python/dropbox_sign/api/api_app_api.py | 2155 +++-- .../dropbox_sign/api/bulk_send_job_api.py | 895 +- sdks/python/dropbox_sign/api/embedded_api.py | 877 +- sdks/python/dropbox_sign/api/fax_line_api.py | 3092 ++++--- sdks/python/dropbox_sign/api/o_auth_api.py | 866 +- sdks/python/dropbox_sign/api/report_api.py | 459 +- .../dropbox_sign/api/signature_request_api.py | 7272 +++++++++++------ sdks/python/dropbox_sign/api/team_api.py | 4261 ++++++---- sdks/python/dropbox_sign/api/template_api.py | 4838 +++++++---- .../dropbox_sign/api/unclaimed_draft_api.py | 1820 +++-- sdks/python/dropbox_sign/api_client.py | 1259 ++- sdks/python/dropbox_sign/api_response.py | 21 + sdks/python/dropbox_sign/apis/__init__.py | 13 - sdks/python/dropbox_sign/configuration.py | 159 +- sdks/python/dropbox_sign/exceptions.py | 100 +- sdks/python/dropbox_sign/model/__init__.py | 5 - .../model/account_create_request.py | 325 - .../model/account_create_response.py | 321 - .../model/account_get_response.py | 306 - .../dropbox_sign/model/account_response.py | 414 - .../model/account_response_quotas.py | 343 - .../model/account_response_usage.py | 283 - .../model/account_update_request.py | 307 - .../model/account_verify_request.py | 289 - .../model/account_verify_response.py | 306 - .../model/account_verify_response_account.py | 283 - .../model/api_app_create_request.py | 381 - .../model/api_app_get_response.py | 306 - .../model/api_app_list_response.py | 321 - .../dropbox_sign/model/api_app_response.py | 408 - .../model/api_app_response_o_auth.py | 319 - .../model/api_app_response_options.py | 283 - .../model/api_app_response_owner_account.py | 295 - ...api_app_response_white_labeling_options.py | 439 - .../model/api_app_update_request.py | 372 - .../model/bulk_send_job_get_response.py | 336 - ...end_job_get_response_signature_requests.py | 638 -- .../model/bulk_send_job_list_response.py | 321 - .../model/bulk_send_job_response.py | 319 - .../model/bulk_send_job_send_response.py | 306 - .../model/embedded_edit_url_request.py | 402 - .../model/embedded_edit_url_response.py | 306 - .../embedded_edit_url_response_embedded.py | 295 - .../model/embedded_sign_url_response.py | 306 - .../embedded_sign_url_response_embedded.py | 295 - .../dropbox_sign/model/error_response.py | 297 - .../model/error_response_error.py | 315 - .../model/event_callback_request.py | 342 - .../model/event_callback_request_event.py | 362 - .../event_callback_request_event_metadata.py | 319 - sdks/python/dropbox_sign/model/fax_line.py | 327 - .../model/fax_line_add_user_request.py | 313 - .../fax_line_area_code_get_country_enum.py | 303 - .../fax_line_area_code_get_province_enum.py | 313 - .../model/fax_line_area_code_get_response.py | 283 - .../fax_line_area_code_get_state_enum.py | 351 - .../model/fax_line_create_request.py | 332 - .../model/fax_line_delete_request.py | 289 - .../model/fax_line_list_response.py | 321 - .../model/fax_line_remove_user_request.py | 313 - .../dropbox_sign/model/fax_line_response.py | 306 - .../model/fax_line_response_fax_line.py | 327 - .../dropbox_sign/model/file_response.py | 295 - .../model/file_response_data_uri.py | 283 - .../dropbox_sign/model/list_info_response.py | 319 - .../model/o_auth_token_generate_request.py | 347 - .../model/o_auth_token_refresh_request.py | 305 - .../model/o_auth_token_response.py | 331 - .../model/report_create_request.py | 325 - .../model/report_create_response.py | 306 - .../dropbox_sign/model/report_response.py | 323 - ...k_create_embedded_with_template_request.py | 460 -- ...request_bulk_send_with_template_request.py | 458 -- ...gnature_request_create_embedded_request.py | 608 -- ...t_create_embedded_with_template_request.py | 489 -- ...signature_request_edit_embedded_request.py | 608 -- ...est_edit_embedded_with_template_request.py | 489 -- .../model/signature_request_edit_request.py | 626 -- ...ture_request_edit_with_template_request.py | 511 -- .../model/signature_request_get_response.py | 306 - .../model/signature_request_list_response.py | 321 - .../model/signature_request_remind_request.py | 301 - .../model/signature_request_response.py | 588 -- .../signature_request_response_attachment.py | 355 - ...ture_request_response_custom_field_base.py | 342 - ..._request_response_custom_field_checkbox.py | 400 - ...ture_request_response_custom_field_text.py | 400 - ...request_response_custom_field_type_enum.py | 302 - .../signature_request_response_data_base.py | 362 - ...gnature_request_response_data_type_enum.py | 309 - ...re_request_response_data_value_checkbox.py | 398 - ...uest_response_data_value_checkbox_merge.py | 398 - ...request_response_data_value_date_signed.py | 398 - ...re_request_response_data_value_dropdown.py | 398 - ...re_request_response_data_value_initials.py | 398 - ...ature_request_response_data_value_radio.py | 398 - ...e_request_response_data_value_signature.py | 398 - ...nature_request_response_data_value_text.py | 398 - ..._request_response_data_value_text_merge.py | 398 - .../signature_request_response_signatures.py | 499 -- .../model/signature_request_send_request.py | 626 -- ...ture_request_send_with_template_request.py | 511 -- .../model/signature_request_update_request.py | 325 - .../dropbox_sign/model/sub_attachment.py | 327 - .../model/sub_bulk_signer_list.py | 306 - .../sub_bulk_signer_list_custom_field.py | 303 - sdks/python/dropbox_sign/model/sub_cc.py | 303 - .../dropbox_sign/model/sub_custom_field.py | 325 - .../dropbox_sign/model/sub_editor_options.py | 295 - .../dropbox_sign/model/sub_field_options.py | 297 - .../model/sub_form_field_group.py | 317 - .../dropbox_sign/model/sub_form_field_rule.py | 351 - .../model/sub_form_field_rule_action.py | 331 - .../model/sub_form_field_rule_trigger.py | 334 - .../sub_form_fields_per_document_base.py | 460 -- .../sub_form_fields_per_document_checkbox.py | 484 -- ...form_fields_per_document_checkbox_merge.py | 460 -- ...ub_form_fields_per_document_date_signed.py | 502 -- .../sub_form_fields_per_document_dropdown.py | 529 -- .../sub_form_fields_per_document_font_enum.py | 316 - .../sub_form_fields_per_document_hyperlink.py | 526 -- .../sub_form_fields_per_document_initials.py | 460 -- .../sub_form_fields_per_document_radio.py | 484 -- .../sub_form_fields_per_document_signature.py | 460 -- .../sub_form_fields_per_document_text.py | 610 -- ...sub_form_fields_per_document_text_merge.py | 502 -- .../sub_form_fields_per_document_type_enum.py | 310 - .../dropbox_sign/model/sub_merge_field.py | 307 - sdks/python/dropbox_sign/model/sub_o_auth.py | 305 - sdks/python/dropbox_sign/model/sub_options.py | 283 - .../sub_signature_request_grouped_signers.py | 323 - .../model/sub_signature_request_signer.py | 359 - .../sub_signature_request_template_signer.py | 361 - .../dropbox_sign/model/sub_signing_options.py | 343 - .../dropbox_sign/model/sub_team_response.py | 295 - .../dropbox_sign/model/sub_template_role.py | 295 - .../model/sub_unclaimed_draft_signer.py | 315 - .../sub_unclaimed_draft_template_signer.py | 317 - .../model/sub_white_labeling_options.py | 455 -- .../model/team_add_member_request.py | 313 - .../dropbox_sign/model/team_create_request.py | 283 - .../model/team_get_info_response.py | 306 - .../dropbox_sign/model/team_get_response.py | 306 - .../dropbox_sign/model/team_info_response.py | 339 - .../model/team_invite_response.py | 343 - .../model/team_invites_response.py | 306 - .../model/team_member_response.py | 307 - .../model/team_members_response.py | 321 - .../model/team_parent_response.py | 295 - .../model/team_remove_member_request.py | 337 - .../dropbox_sign/model/team_response.py | 327 - .../model/team_sub_teams_response.py | 321 - .../dropbox_sign/model/team_update_request.py | 283 - .../model/template_add_user_request.py | 307 - .../template_create_embedded_draft_request.py | 614 -- ...template_create_embedded_draft_response.py | 306 - ...create_embedded_draft_response_template.py | 327 - .../model/template_create_request.py | 529 -- .../model/template_create_response.py | 306 - .../template_create_response_template.py | 283 - .../model/template_edit_response.py | 283 - .../model/template_get_response.py | 306 - .../model/template_list_response.py | 321 - .../model/template_remove_user_request.py | 295 - .../dropbox_sign/model/template_response.py | 474 -- .../model/template_response_account.py | 351 - .../model/template_response_account_quota.py | 319 - .../model/template_response_cc_role.py | 283 - .../model/template_response_custom_field.py | 301 - .../model/template_response_document.py | 360 - ...template_response_document_custom_field.py | 475 -- ...ate_response_document_custom_field_base.py | 400 - ...response_document_custom_field_checkbox.py | 448 - ...ate_response_document_custom_field_text.py | 499 -- .../template_response_document_field_group.py | 303 - ...late_response_document_field_group_rule.py | 295 - .../template_response_document_form_field.py | 459 -- ...plate_response_document_form_field_base.py | 424 - ...e_response_document_form_field_checkbox.py | 448 - ...esponse_document_form_field_date_signed.py | 448 - ...e_response_document_form_field_dropdown.py | 448 - ..._response_document_form_field_hyperlink.py | 499 -- ...e_response_document_form_field_initials.py | 448 - ...late_response_document_form_field_radio.py | 448 - ..._response_document_form_field_signature.py | 448 - ...plate_response_document_form_field_text.py | 524 -- ...template_response_document_static_field.py | 391 - ...ate_response_document_static_field_base.py | 424 - ...response_document_static_field_checkbox.py | 448 - ...ponse_document_static_field_date_signed.py | 448 - ...response_document_static_field_dropdown.py | 448 - ...esponse_document_static_field_hyperlink.py | 448 - ...response_document_static_field_initials.py | 448 - ...te_response_document_static_field_radio.py | 448 - ...esponse_document_static_field_signature.py | 448 - ...ate_response_document_static_field_text.py | 448 - ...template_response_field_avg_text_length.py | 295 - .../template_response_named_form_field.py | 325 - .../model/template_response_signer_role.py | 295 - .../model/template_update_files_request.py | 349 - .../model/template_update_files_response.py | 291 - ...template_update_files_response_template.py | 303 - ...unclaimed_draft_create_embedded_request.py | 755 -- ...t_create_embedded_with_template_request.py | 675 -- .../model/unclaimed_draft_create_request.py | 606 -- .../model/unclaimed_draft_create_response.py | 306 - ...unclaimed_draft_edit_and_resend_request.py | 381 - .../model/unclaimed_draft_response.py | 343 - .../dropbox_sign/model/warning_response.py | 303 - sdks/python/dropbox_sign/model_utils.py | 2038 ----- sdks/python/dropbox_sign/models/__init__.py | 387 +- .../models/account_create_request.py | 124 + .../models/account_create_response.py | 138 + .../models/account_get_response.py | 131 + .../dropbox_sign/models/account_response.py | 173 + .../models/account_response_quotas.py | 160 + .../models/account_response_usage.py | 120 + .../models/account_update_request.py | 126 + .../models/account_verify_request.py | 115 + .../models/account_verify_response.py | 131 + .../models/account_verify_response_account.py | 115 + .../models/api_app_create_request.py | 147 + .../models/api_app_get_response.py | 131 + .../models/api_app_list_response.py | 143 + .../dropbox_sign/models/api_app_response.py | 179 + .../models/api_app_response_o_auth.py | 125 + .../models/api_app_response_options.py | 115 + .../models/api_app_response_owner_account.py | 118 + ...api_app_response_white_labeling_options.py | 154 + .../models/api_app_update_request.py | 147 + .../models/bulk_send_job_get_response.py | 150 + ...end_job_get_response_signature_requests.py | 275 + .../models/bulk_send_job_list_response.py | 143 + .../models/bulk_send_job_response.py | 129 + .../models/bulk_send_job_send_response.py | 131 + .../models/embedded_edit_url_request.py | 156 + .../models/embedded_edit_url_response.py | 131 + .../embedded_edit_url_response_embedded.py | 118 + .../models/embedded_sign_url_response.py | 131 + .../embedded_sign_url_response_embedded.py | 118 + .../dropbox_sign/models/error_response.py | 119 + .../models/error_response_error.py | 121 + .../models/event_callback_request.py | 140 + .../models/event_callback_request_event.py | 135 + .../event_callback_request_event_metadata.py | 144 + .../models/fax_line_add_user_request.py | 121 + .../fax_line_area_code_get_country_enum.py | 39 + .../fax_line_area_code_get_province_enum.py | 49 + .../models/fax_line_area_code_get_response.py | 116 + .../fax_line_area_code_get_state_enum.py | 87 + .../models/fax_line_create_request.py | 131 + .../models/fax_line_delete_request.py | 115 + .../models/fax_line_list_response.py | 138 + .../models/fax_line_remove_user_request.py | 121 + .../dropbox_sign/models/fax_line_response.py | 126 + .../models/fax_line_response_fax_line.py | 133 + .../dropbox_sign/models/file_response.py | 118 + .../models/file_response_data_uri.py | 115 + .../dropbox_sign/models/list_info_response.py | 129 + .../models/o_auth_token_generate_request.py | 127 + .../models/o_auth_token_refresh_request.py | 118 + .../models/o_auth_token_response.py | 132 + .../models/report_create_request.py | 131 + .../models/report_create_response.py | 131 + .../dropbox_sign/models/report_response.py | 136 + ...k_create_embedded_with_template_request.py | 180 + ...request_bulk_send_with_template_request.py | 180 + ...gnature_request_create_embedded_request.py | 264 + ...t_create_embedded_with_template_request.py | 192 + .../models/signature_request_get_response.py | 131 + .../models/signature_request_list_response.py | 143 + .../signature_request_remind_request.py | 118 + .../models/signature_request_response.py | 280 + .../signature_request_response_attachment.py | 140 + ...ture_request_response_custom_field_base.py | 140 + ..._request_response_custom_field_checkbox.py | 127 + ...ture_request_response_custom_field_text.py | 127 + ...request_response_custom_field_type_enum.py | 38 + .../signature_request_response_data_base.py | 161 + ...gnature_request_response_data_type_enum.py | 45 + ...re_request_response_data_value_checkbox.py | 127 + ...uest_response_data_value_checkbox_merge.py | 127 + ...request_response_data_value_date_signed.py | 127 + ...re_request_response_data_value_dropdown.py | 127 + ...re_request_response_data_value_initials.py | 127 + ...ature_request_response_data_value_radio.py | 127 + ...e_request_response_data_value_signature.py | 127 + ...nature_request_response_data_value_text.py | 127 + ..._request_response_data_value_text_merge.py | 127 + .../signature_request_response_signatures.py | 244 + .../models/signature_request_send_request.py | 219 + ...ture_request_send_with_template_request.py | 198 + .../signature_request_update_request.py | 129 + .../dropbox_sign/models/sub_attachment.py | 124 + .../models/sub_bulk_signer_list.py | 136 + .../sub_bulk_signer_list_custom_field.py | 118 + sdks/python/dropbox_sign/models/sub_cc.py | 118 + .../dropbox_sign/models/sub_custom_field.py | 124 + .../dropbox_sign/models/sub_editor_options.py | 118 + .../dropbox_sign/models/sub_field_options.py | 122 + .../models/sub_form_field_group.py | 121 + .../models/sub_form_field_rule.py | 143 + .../models/sub_form_field_rule_action.py | 131 + .../models/sub_form_field_rule_trigger.py | 132 + .../sub_form_fields_per_document_base.py | 181 + .../sub_form_fields_per_document_checkbox.py | 147 + ...form_fields_per_document_checkbox_merge.py | 141 + ...ub_form_fields_per_document_date_signed.py | 157 + .../sub_form_fields_per_document_dropdown.py | 165 + .../sub_form_fields_per_document_font_enum.py | 52 + .../sub_form_fields_per_document_hyperlink.py | 163 + .../sub_form_fields_per_document_initials.py | 141 + .../sub_form_fields_per_document_radio.py | 147 + .../sub_form_fields_per_document_signature.py | 141 + .../sub_form_fields_per_document_text.py | 191 + ...sub_form_fields_per_document_text_merge.py | 157 + .../sub_form_fields_per_document_type_enum.py | 46 + .../dropbox_sign/models/sub_merge_field.py | 125 + sdks/python/dropbox_sign/models/sub_o_auth.py | 130 + .../python/dropbox_sign/models/sub_options.py | 115 + .../sub_signature_request_grouped_signers.py | 135 + .../models/sub_signature_request_signer.py | 146 + .../sub_signature_request_template_signer.py | 141 + .../models/sub_signing_options.py | 134 + .../dropbox_sign/models/sub_team_response.py | 118 + .../dropbox_sign/models/sub_template_role.py | 123 + .../models/sub_unclaimed_draft_signer.py | 126 + .../sub_unclaimed_draft_template_signer.py | 121 + .../models/sub_white_labeling_options.py | 167 + .../models/team_add_member_request.py | 131 + .../models/team_create_request.py | 115 + .../models/team_get_info_response.py | 131 + .../dropbox_sign/models/team_get_response.py | 131 + .../dropbox_sign/models/team_info_response.py | 136 + .../models/team_invite_response.py | 130 + .../models/team_invites_response.py | 136 + .../models/team_member_response.py | 121 + .../models/team_members_response.py | 143 + .../models/team_parent_response.py | 118 + .../models/team_remove_member_request.py | 137 + .../dropbox_sign/models/team_response.py | 142 + .../models/team_sub_teams_response.py | 143 + .../models/team_update_request.py | 115 + .../models/template_add_user_request.py | 121 + .../template_create_embedded_draft_request.py | 253 + ...template_create_embedded_draft_response.py | 131 + ...create_embedded_draft_response_template.py | 133 + .../models/template_create_request.py | 228 + .../models/template_create_response.py | 131 + .../template_create_response_template.py | 115 + .../models/template_edit_response.py | 115 + .../models/template_get_response.py | 131 + .../models/template_list_response.py | 143 + .../models/template_remove_user_request.py | 118 + .../dropbox_sign/models/template_response.py | 246 + .../models/template_response_account.py | 134 + .../models/template_response_account_quota.py | 124 + .../models/template_response_cc_role.py | 115 + .../models/template_response_document.py | 171 + ...ate_response_document_custom_field_base.py | 160 + ...response_document_custom_field_checkbox.py | 144 + ...ate_response_document_custom_field_text.py | 160 + .../template_response_document_field_group.py | 122 + ...late_response_document_field_group_rule.py | 118 + ...plate_response_document_form_field_base.py | 173 + ...e_response_document_form_field_checkbox.py | 139 + ...esponse_document_form_field_date_signed.py | 139 + ...e_response_document_form_field_dropdown.py | 139 + ..._response_document_form_field_hyperlink.py | 155 + ...e_response_document_form_field_initials.py | 139 + ...late_response_document_form_field_radio.py | 139 + ..._response_document_form_field_signature.py | 139 + ...plate_response_document_form_field_text.py | 173 + ...ate_response_document_static_field_base.py | 173 + ...response_document_static_field_checkbox.py | 139 + ...ponse_document_static_field_date_signed.py | 139 + ...response_document_static_field_dropdown.py | 139 + ...esponse_document_static_field_hyperlink.py | 139 + ...response_document_static_field_initials.py | 139 + ...te_response_document_static_field_radio.py | 139 + ...esponse_document_static_field_signature.py | 139 + ...ate_response_document_static_field_text.py | 139 + ...template_response_field_avg_text_length.py | 118 + .../models/template_response_signer_role.py | 118 + .../models/template_update_files_request.py | 133 + .../models/template_update_files_response.py | 119 + ...template_update_files_response_template.py | 127 + ...unclaimed_draft_create_embedded_request.py | 305 + ...t_create_embedded_with_template_request.py | 245 + .../models/unclaimed_draft_create_request.py | 262 + .../models/unclaimed_draft_create_response.py | 131 + ...unclaimed_draft_edit_and_resend_request.py | 140 + .../models/unclaimed_draft_response.py | 150 + .../dropbox_sign/models/warning_response.py | 118 + sdks/python/dropbox_sign/py.typed | 0 sdks/python/dropbox_sign/rest.py | 369 +- sdks/python/git_push.sh | 57 + sdks/python/openapi-config.yaml | 8 +- sdks/python/pyproject.toml | 71 + sdks/python/requirements.txt | 4 +- sdks/python/run-build | 36 +- sdks/python/setup.py | 26 +- sdks/python/templates/README.mustache | 67 +- sdks/python/templates/README_common.mustache | 143 - .../templates/README_onlypackage.mustache | 4 +- sdks/python/templates/__init__api.mustache | 14 +- sdks/python/templates/__init__apis.mustache | 15 +- sdks/python/templates/__init__model.mustache | 16 +- sdks/python/templates/__init__models.mustache | 16 - .../python/templates/__init__package.mustache | 38 +- sdks/python/templates/api.mustache | 589 +- sdks/python/templates/api_client.mustache | 1326 ++- sdks/python/templates/api_doc.mustache | 10 +- .../python/templates/api_doc_example.mustache | 92 +- sdks/python/templates/api_response.mustache | 21 + sdks/python/templates/api_test.mustache | 15 +- sdks/python/templates/asyncio/rest.mustache | 196 +- sdks/python/templates/common_README.mustache | 84 + sdks/python/templates/configuration.mustache | 154 +- sdks/python/templates/exceptions.mustache | 94 +- .../python/templates/github-workflow.mustache | 39 + sdks/python/templates/gitignore.mustache | 1 + sdks/python/templates/gitlab-ci.mustache | 32 +- sdks/python/templates/model.mustache | 90 +- sdks/python/templates/model_anyof.mustache | 182 + sdks/python/templates/model_doc.mustache | 60 +- sdks/python/templates/model_enum.mustache | 36 + sdks/python/templates/model_generic.mustache | 466 ++ sdks/python/templates/model_oneof.mustache | 209 + .../model_templates/classvars.mustache | 201 - .../docstring_allowed.mustache | 4 - .../docstring_init_required_kwargs.mustache | 35 - .../docstring_openapi_validations.mustache | 7 - .../model_templates/invalid_pos_args.mustache | 9 - ...method_from_openapi_data_composed.mustache | 81 - .../method_from_openapi_data_normal.mustache | 17 - .../method_from_openapi_data_shared.mustache | 54 - .../method_from_openapi_data_simple.mustache | 62 - .../method_init_composed.mustache | 95 - .../method_init_normal.mustache | 30 - .../method_init_shared.mustache | 57 - .../method_init_simple.mustache | 66 - .../method_set_attribute.mustache | 51 - .../methods_setattr_getattr_composed.mustache | 103 - .../methods_setattr_getattr_normal.mustache | 37 - .../model_templates/methods_shared.mustache | 34 - .../methods_todict_tostr_eq_shared.mustache | 24 - .../methods_tostr_eq_simple.mustache | 16 - .../model_templates/model_composed.mustache | 100 - .../model_templates/model_normal.mustache | 68 - .../model_templates/model_simple.mustache | 22 - .../model_templates/validations.mustache | 34 - sdks/python/templates/model_test.mustache | 45 +- sdks/python/templates/model_utils.mustache | 1805 ---- sdks/python/templates/partial_api.mustache | 52 + .../templates/partial_api_args.mustache | 18 + sdks/python/templates/partial_header.mustache | 12 +- sdks/python/templates/py.typed.mustache | 0 sdks/python/templates/pyproject.mustache | 82 + .../python_doc_auth_partial.mustache | 19 +- sdks/python/templates/requirements.mustache | 11 +- sdks/python/templates/rest.mustache | 363 +- sdks/python/templates/setup.mustache | 33 +- sdks/python/templates/setup_cfg.mustache | 11 - sdks/python/templates/signing.mustache | 78 +- .../templates/test-requirements.mustache | 16 +- sdks/python/templates/tornado/rest.mustache | 150 +- sdks/python/templates/tox.mustache | 2 +- sdks/python/templates/travis.mustache | 11 +- sdks/python/test-requirements.txt | 4 + 678 files changed, 50182 insertions(+), 94407 deletions(-) delete mode 100644 sdks/python/.openapi-generator/FILES delete mode 100644 sdks/python/.openapi-generator/VERSION delete mode 100644 sdks/python/LICENSE create mode 100644 sdks/python/dropbox_sign/api_response.py delete mode 100644 sdks/python/dropbox_sign/model/__init__.py delete mode 100644 sdks/python/dropbox_sign/model/account_create_request.py delete mode 100644 sdks/python/dropbox_sign/model/account_create_response.py delete mode 100644 sdks/python/dropbox_sign/model/account_get_response.py delete mode 100644 sdks/python/dropbox_sign/model/account_response.py delete mode 100644 sdks/python/dropbox_sign/model/account_response_quotas.py delete mode 100644 sdks/python/dropbox_sign/model/account_response_usage.py delete mode 100644 sdks/python/dropbox_sign/model/account_update_request.py delete mode 100644 sdks/python/dropbox_sign/model/account_verify_request.py delete mode 100644 sdks/python/dropbox_sign/model/account_verify_response.py delete mode 100644 sdks/python/dropbox_sign/model/account_verify_response_account.py delete mode 100644 sdks/python/dropbox_sign/model/api_app_create_request.py delete mode 100644 sdks/python/dropbox_sign/model/api_app_get_response.py delete mode 100644 sdks/python/dropbox_sign/model/api_app_list_response.py delete mode 100644 sdks/python/dropbox_sign/model/api_app_response.py delete mode 100644 sdks/python/dropbox_sign/model/api_app_response_o_auth.py delete mode 100644 sdks/python/dropbox_sign/model/api_app_response_options.py delete mode 100644 sdks/python/dropbox_sign/model/api_app_response_owner_account.py delete mode 100644 sdks/python/dropbox_sign/model/api_app_response_white_labeling_options.py delete mode 100644 sdks/python/dropbox_sign/model/api_app_update_request.py delete mode 100644 sdks/python/dropbox_sign/model/bulk_send_job_get_response.py delete mode 100644 sdks/python/dropbox_sign/model/bulk_send_job_get_response_signature_requests.py delete mode 100644 sdks/python/dropbox_sign/model/bulk_send_job_list_response.py delete mode 100644 sdks/python/dropbox_sign/model/bulk_send_job_response.py delete mode 100644 sdks/python/dropbox_sign/model/bulk_send_job_send_response.py delete mode 100644 sdks/python/dropbox_sign/model/embedded_edit_url_request.py delete mode 100644 sdks/python/dropbox_sign/model/embedded_edit_url_response.py delete mode 100644 sdks/python/dropbox_sign/model/embedded_edit_url_response_embedded.py delete mode 100644 sdks/python/dropbox_sign/model/embedded_sign_url_response.py delete mode 100644 sdks/python/dropbox_sign/model/embedded_sign_url_response_embedded.py delete mode 100644 sdks/python/dropbox_sign/model/error_response.py delete mode 100644 sdks/python/dropbox_sign/model/error_response_error.py delete mode 100644 sdks/python/dropbox_sign/model/event_callback_request.py delete mode 100644 sdks/python/dropbox_sign/model/event_callback_request_event.py delete mode 100644 sdks/python/dropbox_sign/model/event_callback_request_event_metadata.py delete mode 100644 sdks/python/dropbox_sign/model/fax_line.py delete mode 100644 sdks/python/dropbox_sign/model/fax_line_add_user_request.py delete mode 100644 sdks/python/dropbox_sign/model/fax_line_area_code_get_country_enum.py delete mode 100644 sdks/python/dropbox_sign/model/fax_line_area_code_get_province_enum.py delete mode 100644 sdks/python/dropbox_sign/model/fax_line_area_code_get_response.py delete mode 100644 sdks/python/dropbox_sign/model/fax_line_area_code_get_state_enum.py delete mode 100644 sdks/python/dropbox_sign/model/fax_line_create_request.py delete mode 100644 sdks/python/dropbox_sign/model/fax_line_delete_request.py delete mode 100644 sdks/python/dropbox_sign/model/fax_line_list_response.py delete mode 100644 sdks/python/dropbox_sign/model/fax_line_remove_user_request.py delete mode 100644 sdks/python/dropbox_sign/model/fax_line_response.py delete mode 100644 sdks/python/dropbox_sign/model/fax_line_response_fax_line.py delete mode 100644 sdks/python/dropbox_sign/model/file_response.py delete mode 100644 sdks/python/dropbox_sign/model/file_response_data_uri.py delete mode 100644 sdks/python/dropbox_sign/model/list_info_response.py delete mode 100644 sdks/python/dropbox_sign/model/o_auth_token_generate_request.py delete mode 100644 sdks/python/dropbox_sign/model/o_auth_token_refresh_request.py delete mode 100644 sdks/python/dropbox_sign/model/o_auth_token_response.py delete mode 100644 sdks/python/dropbox_sign/model/report_create_request.py delete mode 100644 sdks/python/dropbox_sign/model/report_create_response.py delete mode 100644 sdks/python/dropbox_sign/model/report_response.py delete mode 100644 sdks/python/dropbox_sign/model/signature_request_bulk_create_embedded_with_template_request.py delete mode 100644 sdks/python/dropbox_sign/model/signature_request_bulk_send_with_template_request.py delete mode 100644 sdks/python/dropbox_sign/model/signature_request_create_embedded_request.py delete mode 100644 sdks/python/dropbox_sign/model/signature_request_create_embedded_with_template_request.py delete mode 100644 sdks/python/dropbox_sign/model/signature_request_edit_embedded_request.py delete mode 100644 sdks/python/dropbox_sign/model/signature_request_edit_embedded_with_template_request.py delete mode 100644 sdks/python/dropbox_sign/model/signature_request_edit_request.py delete mode 100644 sdks/python/dropbox_sign/model/signature_request_edit_with_template_request.py delete mode 100644 sdks/python/dropbox_sign/model/signature_request_get_response.py delete mode 100644 sdks/python/dropbox_sign/model/signature_request_list_response.py delete mode 100644 sdks/python/dropbox_sign/model/signature_request_remind_request.py delete mode 100644 sdks/python/dropbox_sign/model/signature_request_response.py delete mode 100644 sdks/python/dropbox_sign/model/signature_request_response_attachment.py delete mode 100644 sdks/python/dropbox_sign/model/signature_request_response_custom_field_base.py delete mode 100644 sdks/python/dropbox_sign/model/signature_request_response_custom_field_checkbox.py delete mode 100644 sdks/python/dropbox_sign/model/signature_request_response_custom_field_text.py delete mode 100644 sdks/python/dropbox_sign/model/signature_request_response_custom_field_type_enum.py delete mode 100644 sdks/python/dropbox_sign/model/signature_request_response_data_base.py delete mode 100644 sdks/python/dropbox_sign/model/signature_request_response_data_type_enum.py delete mode 100644 sdks/python/dropbox_sign/model/signature_request_response_data_value_checkbox.py delete mode 100644 sdks/python/dropbox_sign/model/signature_request_response_data_value_checkbox_merge.py delete mode 100644 sdks/python/dropbox_sign/model/signature_request_response_data_value_date_signed.py delete mode 100644 sdks/python/dropbox_sign/model/signature_request_response_data_value_dropdown.py delete mode 100644 sdks/python/dropbox_sign/model/signature_request_response_data_value_initials.py delete mode 100644 sdks/python/dropbox_sign/model/signature_request_response_data_value_radio.py delete mode 100644 sdks/python/dropbox_sign/model/signature_request_response_data_value_signature.py delete mode 100644 sdks/python/dropbox_sign/model/signature_request_response_data_value_text.py delete mode 100644 sdks/python/dropbox_sign/model/signature_request_response_data_value_text_merge.py delete mode 100644 sdks/python/dropbox_sign/model/signature_request_response_signatures.py delete mode 100644 sdks/python/dropbox_sign/model/signature_request_send_request.py delete mode 100644 sdks/python/dropbox_sign/model/signature_request_send_with_template_request.py delete mode 100644 sdks/python/dropbox_sign/model/signature_request_update_request.py delete mode 100644 sdks/python/dropbox_sign/model/sub_attachment.py delete mode 100644 sdks/python/dropbox_sign/model/sub_bulk_signer_list.py delete mode 100644 sdks/python/dropbox_sign/model/sub_bulk_signer_list_custom_field.py delete mode 100644 sdks/python/dropbox_sign/model/sub_cc.py delete mode 100644 sdks/python/dropbox_sign/model/sub_custom_field.py delete mode 100644 sdks/python/dropbox_sign/model/sub_editor_options.py delete mode 100644 sdks/python/dropbox_sign/model/sub_field_options.py delete mode 100644 sdks/python/dropbox_sign/model/sub_form_field_group.py delete mode 100644 sdks/python/dropbox_sign/model/sub_form_field_rule.py delete mode 100644 sdks/python/dropbox_sign/model/sub_form_field_rule_action.py delete mode 100644 sdks/python/dropbox_sign/model/sub_form_field_rule_trigger.py delete mode 100644 sdks/python/dropbox_sign/model/sub_form_fields_per_document_base.py delete mode 100644 sdks/python/dropbox_sign/model/sub_form_fields_per_document_checkbox.py delete mode 100644 sdks/python/dropbox_sign/model/sub_form_fields_per_document_checkbox_merge.py delete mode 100644 sdks/python/dropbox_sign/model/sub_form_fields_per_document_date_signed.py delete mode 100644 sdks/python/dropbox_sign/model/sub_form_fields_per_document_dropdown.py delete mode 100644 sdks/python/dropbox_sign/model/sub_form_fields_per_document_font_enum.py delete mode 100644 sdks/python/dropbox_sign/model/sub_form_fields_per_document_hyperlink.py delete mode 100644 sdks/python/dropbox_sign/model/sub_form_fields_per_document_initials.py delete mode 100644 sdks/python/dropbox_sign/model/sub_form_fields_per_document_radio.py delete mode 100644 sdks/python/dropbox_sign/model/sub_form_fields_per_document_signature.py delete mode 100644 sdks/python/dropbox_sign/model/sub_form_fields_per_document_text.py delete mode 100644 sdks/python/dropbox_sign/model/sub_form_fields_per_document_text_merge.py delete mode 100644 sdks/python/dropbox_sign/model/sub_form_fields_per_document_type_enum.py delete mode 100644 sdks/python/dropbox_sign/model/sub_merge_field.py delete mode 100644 sdks/python/dropbox_sign/model/sub_o_auth.py delete mode 100644 sdks/python/dropbox_sign/model/sub_options.py delete mode 100644 sdks/python/dropbox_sign/model/sub_signature_request_grouped_signers.py delete mode 100644 sdks/python/dropbox_sign/model/sub_signature_request_signer.py delete mode 100644 sdks/python/dropbox_sign/model/sub_signature_request_template_signer.py delete mode 100644 sdks/python/dropbox_sign/model/sub_signing_options.py delete mode 100644 sdks/python/dropbox_sign/model/sub_team_response.py delete mode 100644 sdks/python/dropbox_sign/model/sub_template_role.py delete mode 100644 sdks/python/dropbox_sign/model/sub_unclaimed_draft_signer.py delete mode 100644 sdks/python/dropbox_sign/model/sub_unclaimed_draft_template_signer.py delete mode 100644 sdks/python/dropbox_sign/model/sub_white_labeling_options.py delete mode 100644 sdks/python/dropbox_sign/model/team_add_member_request.py delete mode 100644 sdks/python/dropbox_sign/model/team_create_request.py delete mode 100644 sdks/python/dropbox_sign/model/team_get_info_response.py delete mode 100644 sdks/python/dropbox_sign/model/team_get_response.py delete mode 100644 sdks/python/dropbox_sign/model/team_info_response.py delete mode 100644 sdks/python/dropbox_sign/model/team_invite_response.py delete mode 100644 sdks/python/dropbox_sign/model/team_invites_response.py delete mode 100644 sdks/python/dropbox_sign/model/team_member_response.py delete mode 100644 sdks/python/dropbox_sign/model/team_members_response.py delete mode 100644 sdks/python/dropbox_sign/model/team_parent_response.py delete mode 100644 sdks/python/dropbox_sign/model/team_remove_member_request.py delete mode 100644 sdks/python/dropbox_sign/model/team_response.py delete mode 100644 sdks/python/dropbox_sign/model/team_sub_teams_response.py delete mode 100644 sdks/python/dropbox_sign/model/team_update_request.py delete mode 100644 sdks/python/dropbox_sign/model/template_add_user_request.py delete mode 100644 sdks/python/dropbox_sign/model/template_create_embedded_draft_request.py delete mode 100644 sdks/python/dropbox_sign/model/template_create_embedded_draft_response.py delete mode 100644 sdks/python/dropbox_sign/model/template_create_embedded_draft_response_template.py delete mode 100644 sdks/python/dropbox_sign/model/template_create_request.py delete mode 100644 sdks/python/dropbox_sign/model/template_create_response.py delete mode 100644 sdks/python/dropbox_sign/model/template_create_response_template.py delete mode 100644 sdks/python/dropbox_sign/model/template_edit_response.py delete mode 100644 sdks/python/dropbox_sign/model/template_get_response.py delete mode 100644 sdks/python/dropbox_sign/model/template_list_response.py delete mode 100644 sdks/python/dropbox_sign/model/template_remove_user_request.py delete mode 100644 sdks/python/dropbox_sign/model/template_response.py delete mode 100644 sdks/python/dropbox_sign/model/template_response_account.py delete mode 100644 sdks/python/dropbox_sign/model/template_response_account_quota.py delete mode 100644 sdks/python/dropbox_sign/model/template_response_cc_role.py delete mode 100644 sdks/python/dropbox_sign/model/template_response_custom_field.py delete mode 100644 sdks/python/dropbox_sign/model/template_response_document.py delete mode 100644 sdks/python/dropbox_sign/model/template_response_document_custom_field.py delete mode 100644 sdks/python/dropbox_sign/model/template_response_document_custom_field_base.py delete mode 100644 sdks/python/dropbox_sign/model/template_response_document_custom_field_checkbox.py delete mode 100644 sdks/python/dropbox_sign/model/template_response_document_custom_field_text.py delete mode 100644 sdks/python/dropbox_sign/model/template_response_document_field_group.py delete mode 100644 sdks/python/dropbox_sign/model/template_response_document_field_group_rule.py delete mode 100644 sdks/python/dropbox_sign/model/template_response_document_form_field.py delete mode 100644 sdks/python/dropbox_sign/model/template_response_document_form_field_base.py delete mode 100644 sdks/python/dropbox_sign/model/template_response_document_form_field_checkbox.py delete mode 100644 sdks/python/dropbox_sign/model/template_response_document_form_field_date_signed.py delete mode 100644 sdks/python/dropbox_sign/model/template_response_document_form_field_dropdown.py delete mode 100644 sdks/python/dropbox_sign/model/template_response_document_form_field_hyperlink.py delete mode 100644 sdks/python/dropbox_sign/model/template_response_document_form_field_initials.py delete mode 100644 sdks/python/dropbox_sign/model/template_response_document_form_field_radio.py delete mode 100644 sdks/python/dropbox_sign/model/template_response_document_form_field_signature.py delete mode 100644 sdks/python/dropbox_sign/model/template_response_document_form_field_text.py delete mode 100644 sdks/python/dropbox_sign/model/template_response_document_static_field.py delete mode 100644 sdks/python/dropbox_sign/model/template_response_document_static_field_base.py delete mode 100644 sdks/python/dropbox_sign/model/template_response_document_static_field_checkbox.py delete mode 100644 sdks/python/dropbox_sign/model/template_response_document_static_field_date_signed.py delete mode 100644 sdks/python/dropbox_sign/model/template_response_document_static_field_dropdown.py delete mode 100644 sdks/python/dropbox_sign/model/template_response_document_static_field_hyperlink.py delete mode 100644 sdks/python/dropbox_sign/model/template_response_document_static_field_initials.py delete mode 100644 sdks/python/dropbox_sign/model/template_response_document_static_field_radio.py delete mode 100644 sdks/python/dropbox_sign/model/template_response_document_static_field_signature.py delete mode 100644 sdks/python/dropbox_sign/model/template_response_document_static_field_text.py delete mode 100644 sdks/python/dropbox_sign/model/template_response_field_avg_text_length.py delete mode 100644 sdks/python/dropbox_sign/model/template_response_named_form_field.py delete mode 100644 sdks/python/dropbox_sign/model/template_response_signer_role.py delete mode 100644 sdks/python/dropbox_sign/model/template_update_files_request.py delete mode 100644 sdks/python/dropbox_sign/model/template_update_files_response.py delete mode 100644 sdks/python/dropbox_sign/model/template_update_files_response_template.py delete mode 100644 sdks/python/dropbox_sign/model/unclaimed_draft_create_embedded_request.py delete mode 100644 sdks/python/dropbox_sign/model/unclaimed_draft_create_embedded_with_template_request.py delete mode 100644 sdks/python/dropbox_sign/model/unclaimed_draft_create_request.py delete mode 100644 sdks/python/dropbox_sign/model/unclaimed_draft_create_response.py delete mode 100644 sdks/python/dropbox_sign/model/unclaimed_draft_edit_and_resend_request.py delete mode 100644 sdks/python/dropbox_sign/model/unclaimed_draft_response.py delete mode 100644 sdks/python/dropbox_sign/model/warning_response.py delete mode 100644 sdks/python/dropbox_sign/model_utils.py create mode 100644 sdks/python/dropbox_sign/models/account_create_request.py create mode 100644 sdks/python/dropbox_sign/models/account_create_response.py create mode 100644 sdks/python/dropbox_sign/models/account_get_response.py create mode 100644 sdks/python/dropbox_sign/models/account_response.py create mode 100644 sdks/python/dropbox_sign/models/account_response_quotas.py create mode 100644 sdks/python/dropbox_sign/models/account_response_usage.py create mode 100644 sdks/python/dropbox_sign/models/account_update_request.py create mode 100644 sdks/python/dropbox_sign/models/account_verify_request.py create mode 100644 sdks/python/dropbox_sign/models/account_verify_response.py create mode 100644 sdks/python/dropbox_sign/models/account_verify_response_account.py create mode 100644 sdks/python/dropbox_sign/models/api_app_create_request.py create mode 100644 sdks/python/dropbox_sign/models/api_app_get_response.py create mode 100644 sdks/python/dropbox_sign/models/api_app_list_response.py create mode 100644 sdks/python/dropbox_sign/models/api_app_response.py create mode 100644 sdks/python/dropbox_sign/models/api_app_response_o_auth.py create mode 100644 sdks/python/dropbox_sign/models/api_app_response_options.py create mode 100644 sdks/python/dropbox_sign/models/api_app_response_owner_account.py create mode 100644 sdks/python/dropbox_sign/models/api_app_response_white_labeling_options.py create mode 100644 sdks/python/dropbox_sign/models/api_app_update_request.py create mode 100644 sdks/python/dropbox_sign/models/bulk_send_job_get_response.py create mode 100644 sdks/python/dropbox_sign/models/bulk_send_job_get_response_signature_requests.py create mode 100644 sdks/python/dropbox_sign/models/bulk_send_job_list_response.py create mode 100644 sdks/python/dropbox_sign/models/bulk_send_job_response.py create mode 100644 sdks/python/dropbox_sign/models/bulk_send_job_send_response.py create mode 100644 sdks/python/dropbox_sign/models/embedded_edit_url_request.py create mode 100644 sdks/python/dropbox_sign/models/embedded_edit_url_response.py create mode 100644 sdks/python/dropbox_sign/models/embedded_edit_url_response_embedded.py create mode 100644 sdks/python/dropbox_sign/models/embedded_sign_url_response.py create mode 100644 sdks/python/dropbox_sign/models/embedded_sign_url_response_embedded.py create mode 100644 sdks/python/dropbox_sign/models/error_response.py create mode 100644 sdks/python/dropbox_sign/models/error_response_error.py create mode 100644 sdks/python/dropbox_sign/models/event_callback_request.py create mode 100644 sdks/python/dropbox_sign/models/event_callback_request_event.py create mode 100644 sdks/python/dropbox_sign/models/event_callback_request_event_metadata.py create mode 100644 sdks/python/dropbox_sign/models/fax_line_add_user_request.py create mode 100644 sdks/python/dropbox_sign/models/fax_line_area_code_get_country_enum.py create mode 100644 sdks/python/dropbox_sign/models/fax_line_area_code_get_province_enum.py create mode 100644 sdks/python/dropbox_sign/models/fax_line_area_code_get_response.py create mode 100644 sdks/python/dropbox_sign/models/fax_line_area_code_get_state_enum.py create mode 100644 sdks/python/dropbox_sign/models/fax_line_create_request.py create mode 100644 sdks/python/dropbox_sign/models/fax_line_delete_request.py create mode 100644 sdks/python/dropbox_sign/models/fax_line_list_response.py create mode 100644 sdks/python/dropbox_sign/models/fax_line_remove_user_request.py create mode 100644 sdks/python/dropbox_sign/models/fax_line_response.py create mode 100644 sdks/python/dropbox_sign/models/fax_line_response_fax_line.py create mode 100644 sdks/python/dropbox_sign/models/file_response.py create mode 100644 sdks/python/dropbox_sign/models/file_response_data_uri.py create mode 100644 sdks/python/dropbox_sign/models/list_info_response.py create mode 100644 sdks/python/dropbox_sign/models/o_auth_token_generate_request.py create mode 100644 sdks/python/dropbox_sign/models/o_auth_token_refresh_request.py create mode 100644 sdks/python/dropbox_sign/models/o_auth_token_response.py create mode 100644 sdks/python/dropbox_sign/models/report_create_request.py create mode 100644 sdks/python/dropbox_sign/models/report_create_response.py create mode 100644 sdks/python/dropbox_sign/models/report_response.py create mode 100644 sdks/python/dropbox_sign/models/signature_request_bulk_create_embedded_with_template_request.py create mode 100644 sdks/python/dropbox_sign/models/signature_request_bulk_send_with_template_request.py create mode 100644 sdks/python/dropbox_sign/models/signature_request_create_embedded_request.py create mode 100644 sdks/python/dropbox_sign/models/signature_request_create_embedded_with_template_request.py create mode 100644 sdks/python/dropbox_sign/models/signature_request_get_response.py create mode 100644 sdks/python/dropbox_sign/models/signature_request_list_response.py create mode 100644 sdks/python/dropbox_sign/models/signature_request_remind_request.py create mode 100644 sdks/python/dropbox_sign/models/signature_request_response.py create mode 100644 sdks/python/dropbox_sign/models/signature_request_response_attachment.py create mode 100644 sdks/python/dropbox_sign/models/signature_request_response_custom_field_base.py create mode 100644 sdks/python/dropbox_sign/models/signature_request_response_custom_field_checkbox.py create mode 100644 sdks/python/dropbox_sign/models/signature_request_response_custom_field_text.py create mode 100644 sdks/python/dropbox_sign/models/signature_request_response_custom_field_type_enum.py create mode 100644 sdks/python/dropbox_sign/models/signature_request_response_data_base.py create mode 100644 sdks/python/dropbox_sign/models/signature_request_response_data_type_enum.py create mode 100644 sdks/python/dropbox_sign/models/signature_request_response_data_value_checkbox.py create mode 100644 sdks/python/dropbox_sign/models/signature_request_response_data_value_checkbox_merge.py create mode 100644 sdks/python/dropbox_sign/models/signature_request_response_data_value_date_signed.py create mode 100644 sdks/python/dropbox_sign/models/signature_request_response_data_value_dropdown.py create mode 100644 sdks/python/dropbox_sign/models/signature_request_response_data_value_initials.py create mode 100644 sdks/python/dropbox_sign/models/signature_request_response_data_value_radio.py create mode 100644 sdks/python/dropbox_sign/models/signature_request_response_data_value_signature.py create mode 100644 sdks/python/dropbox_sign/models/signature_request_response_data_value_text.py create mode 100644 sdks/python/dropbox_sign/models/signature_request_response_data_value_text_merge.py create mode 100644 sdks/python/dropbox_sign/models/signature_request_response_signatures.py create mode 100644 sdks/python/dropbox_sign/models/signature_request_send_request.py create mode 100644 sdks/python/dropbox_sign/models/signature_request_send_with_template_request.py create mode 100644 sdks/python/dropbox_sign/models/signature_request_update_request.py create mode 100644 sdks/python/dropbox_sign/models/sub_attachment.py create mode 100644 sdks/python/dropbox_sign/models/sub_bulk_signer_list.py create mode 100644 sdks/python/dropbox_sign/models/sub_bulk_signer_list_custom_field.py create mode 100644 sdks/python/dropbox_sign/models/sub_cc.py create mode 100644 sdks/python/dropbox_sign/models/sub_custom_field.py create mode 100644 sdks/python/dropbox_sign/models/sub_editor_options.py create mode 100644 sdks/python/dropbox_sign/models/sub_field_options.py create mode 100644 sdks/python/dropbox_sign/models/sub_form_field_group.py create mode 100644 sdks/python/dropbox_sign/models/sub_form_field_rule.py create mode 100644 sdks/python/dropbox_sign/models/sub_form_field_rule_action.py create mode 100644 sdks/python/dropbox_sign/models/sub_form_field_rule_trigger.py create mode 100644 sdks/python/dropbox_sign/models/sub_form_fields_per_document_base.py create mode 100644 sdks/python/dropbox_sign/models/sub_form_fields_per_document_checkbox.py create mode 100644 sdks/python/dropbox_sign/models/sub_form_fields_per_document_checkbox_merge.py create mode 100644 sdks/python/dropbox_sign/models/sub_form_fields_per_document_date_signed.py create mode 100644 sdks/python/dropbox_sign/models/sub_form_fields_per_document_dropdown.py create mode 100644 sdks/python/dropbox_sign/models/sub_form_fields_per_document_font_enum.py create mode 100644 sdks/python/dropbox_sign/models/sub_form_fields_per_document_hyperlink.py create mode 100644 sdks/python/dropbox_sign/models/sub_form_fields_per_document_initials.py create mode 100644 sdks/python/dropbox_sign/models/sub_form_fields_per_document_radio.py create mode 100644 sdks/python/dropbox_sign/models/sub_form_fields_per_document_signature.py create mode 100644 sdks/python/dropbox_sign/models/sub_form_fields_per_document_text.py create mode 100644 sdks/python/dropbox_sign/models/sub_form_fields_per_document_text_merge.py create mode 100644 sdks/python/dropbox_sign/models/sub_form_fields_per_document_type_enum.py create mode 100644 sdks/python/dropbox_sign/models/sub_merge_field.py create mode 100644 sdks/python/dropbox_sign/models/sub_o_auth.py create mode 100644 sdks/python/dropbox_sign/models/sub_options.py create mode 100644 sdks/python/dropbox_sign/models/sub_signature_request_grouped_signers.py create mode 100644 sdks/python/dropbox_sign/models/sub_signature_request_signer.py create mode 100644 sdks/python/dropbox_sign/models/sub_signature_request_template_signer.py create mode 100644 sdks/python/dropbox_sign/models/sub_signing_options.py create mode 100644 sdks/python/dropbox_sign/models/sub_team_response.py create mode 100644 sdks/python/dropbox_sign/models/sub_template_role.py create mode 100644 sdks/python/dropbox_sign/models/sub_unclaimed_draft_signer.py create mode 100644 sdks/python/dropbox_sign/models/sub_unclaimed_draft_template_signer.py create mode 100644 sdks/python/dropbox_sign/models/sub_white_labeling_options.py create mode 100644 sdks/python/dropbox_sign/models/team_add_member_request.py create mode 100644 sdks/python/dropbox_sign/models/team_create_request.py create mode 100644 sdks/python/dropbox_sign/models/team_get_info_response.py create mode 100644 sdks/python/dropbox_sign/models/team_get_response.py create mode 100644 sdks/python/dropbox_sign/models/team_info_response.py create mode 100644 sdks/python/dropbox_sign/models/team_invite_response.py create mode 100644 sdks/python/dropbox_sign/models/team_invites_response.py create mode 100644 sdks/python/dropbox_sign/models/team_member_response.py create mode 100644 sdks/python/dropbox_sign/models/team_members_response.py create mode 100644 sdks/python/dropbox_sign/models/team_parent_response.py create mode 100644 sdks/python/dropbox_sign/models/team_remove_member_request.py create mode 100644 sdks/python/dropbox_sign/models/team_response.py create mode 100644 sdks/python/dropbox_sign/models/team_sub_teams_response.py create mode 100644 sdks/python/dropbox_sign/models/team_update_request.py create mode 100644 sdks/python/dropbox_sign/models/template_add_user_request.py create mode 100644 sdks/python/dropbox_sign/models/template_create_embedded_draft_request.py create mode 100644 sdks/python/dropbox_sign/models/template_create_embedded_draft_response.py create mode 100644 sdks/python/dropbox_sign/models/template_create_embedded_draft_response_template.py create mode 100644 sdks/python/dropbox_sign/models/template_create_request.py create mode 100644 sdks/python/dropbox_sign/models/template_create_response.py create mode 100644 sdks/python/dropbox_sign/models/template_create_response_template.py create mode 100644 sdks/python/dropbox_sign/models/template_edit_response.py create mode 100644 sdks/python/dropbox_sign/models/template_get_response.py create mode 100644 sdks/python/dropbox_sign/models/template_list_response.py create mode 100644 sdks/python/dropbox_sign/models/template_remove_user_request.py create mode 100644 sdks/python/dropbox_sign/models/template_response.py create mode 100644 sdks/python/dropbox_sign/models/template_response_account.py create mode 100644 sdks/python/dropbox_sign/models/template_response_account_quota.py create mode 100644 sdks/python/dropbox_sign/models/template_response_cc_role.py create mode 100644 sdks/python/dropbox_sign/models/template_response_document.py create mode 100644 sdks/python/dropbox_sign/models/template_response_document_custom_field_base.py create mode 100644 sdks/python/dropbox_sign/models/template_response_document_custom_field_checkbox.py create mode 100644 sdks/python/dropbox_sign/models/template_response_document_custom_field_text.py create mode 100644 sdks/python/dropbox_sign/models/template_response_document_field_group.py create mode 100644 sdks/python/dropbox_sign/models/template_response_document_field_group_rule.py create mode 100644 sdks/python/dropbox_sign/models/template_response_document_form_field_base.py create mode 100644 sdks/python/dropbox_sign/models/template_response_document_form_field_checkbox.py create mode 100644 sdks/python/dropbox_sign/models/template_response_document_form_field_date_signed.py create mode 100644 sdks/python/dropbox_sign/models/template_response_document_form_field_dropdown.py create mode 100644 sdks/python/dropbox_sign/models/template_response_document_form_field_hyperlink.py create mode 100644 sdks/python/dropbox_sign/models/template_response_document_form_field_initials.py create mode 100644 sdks/python/dropbox_sign/models/template_response_document_form_field_radio.py create mode 100644 sdks/python/dropbox_sign/models/template_response_document_form_field_signature.py create mode 100644 sdks/python/dropbox_sign/models/template_response_document_form_field_text.py create mode 100644 sdks/python/dropbox_sign/models/template_response_document_static_field_base.py create mode 100644 sdks/python/dropbox_sign/models/template_response_document_static_field_checkbox.py create mode 100644 sdks/python/dropbox_sign/models/template_response_document_static_field_date_signed.py create mode 100644 sdks/python/dropbox_sign/models/template_response_document_static_field_dropdown.py create mode 100644 sdks/python/dropbox_sign/models/template_response_document_static_field_hyperlink.py create mode 100644 sdks/python/dropbox_sign/models/template_response_document_static_field_initials.py create mode 100644 sdks/python/dropbox_sign/models/template_response_document_static_field_radio.py create mode 100644 sdks/python/dropbox_sign/models/template_response_document_static_field_signature.py create mode 100644 sdks/python/dropbox_sign/models/template_response_document_static_field_text.py create mode 100644 sdks/python/dropbox_sign/models/template_response_field_avg_text_length.py create mode 100644 sdks/python/dropbox_sign/models/template_response_signer_role.py create mode 100644 sdks/python/dropbox_sign/models/template_update_files_request.py create mode 100644 sdks/python/dropbox_sign/models/template_update_files_response.py create mode 100644 sdks/python/dropbox_sign/models/template_update_files_response_template.py create mode 100644 sdks/python/dropbox_sign/models/unclaimed_draft_create_embedded_request.py create mode 100644 sdks/python/dropbox_sign/models/unclaimed_draft_create_embedded_with_template_request.py create mode 100644 sdks/python/dropbox_sign/models/unclaimed_draft_create_request.py create mode 100644 sdks/python/dropbox_sign/models/unclaimed_draft_create_response.py create mode 100644 sdks/python/dropbox_sign/models/unclaimed_draft_edit_and_resend_request.py create mode 100644 sdks/python/dropbox_sign/models/unclaimed_draft_response.py create mode 100644 sdks/python/dropbox_sign/models/warning_response.py create mode 100644 sdks/python/dropbox_sign/py.typed create mode 100644 sdks/python/git_push.sh create mode 100644 sdks/python/pyproject.toml delete mode 100644 sdks/python/templates/README_common.mustache delete mode 100644 sdks/python/templates/__init__models.mustache create mode 100644 sdks/python/templates/api_response.mustache create mode 100644 sdks/python/templates/common_README.mustache create mode 100644 sdks/python/templates/github-workflow.mustache create mode 100644 sdks/python/templates/model_anyof.mustache create mode 100644 sdks/python/templates/model_enum.mustache create mode 100644 sdks/python/templates/model_generic.mustache create mode 100644 sdks/python/templates/model_oneof.mustache delete mode 100644 sdks/python/templates/model_templates/classvars.mustache delete mode 100644 sdks/python/templates/model_templates/docstring_allowed.mustache delete mode 100644 sdks/python/templates/model_templates/docstring_init_required_kwargs.mustache delete mode 100644 sdks/python/templates/model_templates/docstring_openapi_validations.mustache delete mode 100644 sdks/python/templates/model_templates/invalid_pos_args.mustache delete mode 100644 sdks/python/templates/model_templates/method_from_openapi_data_composed.mustache delete mode 100644 sdks/python/templates/model_templates/method_from_openapi_data_normal.mustache delete mode 100644 sdks/python/templates/model_templates/method_from_openapi_data_shared.mustache delete mode 100644 sdks/python/templates/model_templates/method_from_openapi_data_simple.mustache delete mode 100644 sdks/python/templates/model_templates/method_init_composed.mustache delete mode 100644 sdks/python/templates/model_templates/method_init_normal.mustache delete mode 100644 sdks/python/templates/model_templates/method_init_shared.mustache delete mode 100644 sdks/python/templates/model_templates/method_init_simple.mustache delete mode 100644 sdks/python/templates/model_templates/method_set_attribute.mustache delete mode 100644 sdks/python/templates/model_templates/methods_setattr_getattr_composed.mustache delete mode 100644 sdks/python/templates/model_templates/methods_setattr_getattr_normal.mustache delete mode 100644 sdks/python/templates/model_templates/methods_shared.mustache delete mode 100644 sdks/python/templates/model_templates/methods_todict_tostr_eq_shared.mustache delete mode 100644 sdks/python/templates/model_templates/methods_tostr_eq_simple.mustache delete mode 100644 sdks/python/templates/model_templates/model_composed.mustache delete mode 100644 sdks/python/templates/model_templates/model_normal.mustache delete mode 100644 sdks/python/templates/model_templates/model_simple.mustache delete mode 100644 sdks/python/templates/model_templates/validations.mustache delete mode 100644 sdks/python/templates/model_utils.mustache create mode 100644 sdks/python/templates/partial_api.mustache create mode 100644 sdks/python/templates/partial_api_args.mustache create mode 100644 sdks/python/templates/py.typed.mustache create mode 100644 sdks/python/templates/pyproject.mustache diff --git a/sdks/python/.editorconfig b/sdks/python/.editorconfig index b6637bec8..9eda130bc 100644 --- a/sdks/python/.editorconfig +++ b/sdks/python/.editorconfig @@ -2,4 +2,4 @@ indent_style = space indent_size = 2 [*.py] -indent_size = 4 \ No newline at end of file +indent_size = 4 diff --git a/sdks/python/.gitignore b/sdks/python/.gitignore index 491b7085b..25f66e000 100644 --- a/sdks/python/.gitignore +++ b/sdks/python/.gitignore @@ -65,4 +65,5 @@ target/ #Ipython Notebook .ipynb_checkpoints +.openapi-generator /vendor diff --git a/sdks/python/.gitlab-ci.yml b/sdks/python/.gitlab-ci.yml index 237ec2230..e038c25db 100644 --- a/sdks/python/.gitlab-ci.yml +++ b/sdks/python/.gitlab-ci.yml @@ -1,24 +1,31 @@ +# NOTE: This file is auto generated by OpenAPI Generator. +# URL: https://openapi-generator.tech +# # ref: https://docs.gitlab.com/ee/ci/README.html +# ref: https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Python.gitlab-ci.yml stages: - test -.tests: +.pytest: stage: test script: - pip install -r requirements.txt - pip install -r test-requirements.txt - pytest --cov=dropbox_sign -test-3.6: - extends: .tests - image: python:3.6-alpine -test-3.7: - extends: .tests +pytest-3.7: + extends: .pytest image: python:3.7-alpine -test-3.8: - extends: .tests +pytest-3.8: + extends: .pytest image: python:3.8-alpine -test-3.9: - extends: .tests +pytest-3.9: + extends: .pytest image: python:3.9-alpine +pytest-3.10: + extends: .pytest + image: python:3.10-alpine +pytest-3.11: + extends: .pytest + image: python:3.11-alpine diff --git a/sdks/python/.openapi-generator-ignore b/sdks/python/.openapi-generator-ignore index 600ecaaa8..7484ee590 100644 --- a/sdks/python/.openapi-generator-ignore +++ b/sdks/python/.openapi-generator-ignore @@ -21,6 +21,3 @@ #docs/*.md # Then explicitly reverse the ignore rule for a single file: #!docs/README.md -git_push.sh -docs/*AllOf* -**/model/*all_of* diff --git a/sdks/python/.openapi-generator/FILES b/sdks/python/.openapi-generator/FILES deleted file mode 100644 index 8dc4861d9..000000000 --- a/sdks/python/.openapi-generator/FILES +++ /dev/null @@ -1,409 +0,0 @@ -.gitignore -.gitlab-ci.yml -.travis.yml -README.md -VERSION -docs/AccountApi.md -docs/AccountCreateRequest.md -docs/AccountCreateResponse.md -docs/AccountGetResponse.md -docs/AccountResponse.md -docs/AccountResponseQuotas.md -docs/AccountResponseUsage.md -docs/AccountUpdateRequest.md -docs/AccountVerifyRequest.md -docs/AccountVerifyResponse.md -docs/AccountVerifyResponseAccount.md -docs/ApiAppApi.md -docs/ApiAppCreateRequest.md -docs/ApiAppGetResponse.md -docs/ApiAppListResponse.md -docs/ApiAppResponse.md -docs/ApiAppResponseOAuth.md -docs/ApiAppResponseOptions.md -docs/ApiAppResponseOwnerAccount.md -docs/ApiAppResponseWhiteLabelingOptions.md -docs/ApiAppUpdateRequest.md -docs/BulkSendJobApi.md -docs/BulkSendJobGetResponse.md -docs/BulkSendJobGetResponseSignatureRequests.md -docs/BulkSendJobListResponse.md -docs/BulkSendJobResponse.md -docs/BulkSendJobSendResponse.md -docs/EmbeddedApi.md -docs/EmbeddedEditUrlRequest.md -docs/EmbeddedEditUrlResponse.md -docs/EmbeddedEditUrlResponseEmbedded.md -docs/EmbeddedSignUrlResponse.md -docs/EmbeddedSignUrlResponseEmbedded.md -docs/ErrorResponse.md -docs/ErrorResponseError.md -docs/EventCallbackRequest.md -docs/EventCallbackRequestEvent.md -docs/EventCallbackRequestEventMetadata.md -docs/FaxLineAddUserRequest.md -docs/FaxLineApi.md -docs/FaxLineAreaCodeGetCountryEnum.md -docs/FaxLineAreaCodeGetProvinceEnum.md -docs/FaxLineAreaCodeGetResponse.md -docs/FaxLineAreaCodeGetStateEnum.md -docs/FaxLineCreateRequest.md -docs/FaxLineDeleteRequest.md -docs/FaxLineListResponse.md -docs/FaxLineRemoveUserRequest.md -docs/FaxLineResponse.md -docs/FaxLineResponseFaxLine.md -docs/FileResponse.md -docs/FileResponseDataUri.md -docs/ListInfoResponse.md -docs/OAuthApi.md -docs/OAuthTokenGenerateRequest.md -docs/OAuthTokenRefreshRequest.md -docs/OAuthTokenResponse.md -docs/ReportApi.md -docs/ReportCreateRequest.md -docs/ReportCreateResponse.md -docs/ReportResponse.md -docs/SignatureRequestApi.md -docs/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md -docs/SignatureRequestBulkSendWithTemplateRequest.md -docs/SignatureRequestCreateEmbeddedRequest.md -docs/SignatureRequestCreateEmbeddedWithTemplateRequest.md -docs/SignatureRequestGetResponse.md -docs/SignatureRequestListResponse.md -docs/SignatureRequestRemindRequest.md -docs/SignatureRequestResponse.md -docs/SignatureRequestResponseAttachment.md -docs/SignatureRequestResponseCustomFieldBase.md -docs/SignatureRequestResponseCustomFieldCheckbox.md -docs/SignatureRequestResponseCustomFieldText.md -docs/SignatureRequestResponseCustomFieldTypeEnum.md -docs/SignatureRequestResponseDataBase.md -docs/SignatureRequestResponseDataTypeEnum.md -docs/SignatureRequestResponseDataValueCheckbox.md -docs/SignatureRequestResponseDataValueCheckboxMerge.md -docs/SignatureRequestResponseDataValueDateSigned.md -docs/SignatureRequestResponseDataValueDropdown.md -docs/SignatureRequestResponseDataValueInitials.md -docs/SignatureRequestResponseDataValueRadio.md -docs/SignatureRequestResponseDataValueSignature.md -docs/SignatureRequestResponseDataValueText.md -docs/SignatureRequestResponseDataValueTextMerge.md -docs/SignatureRequestResponseSignatures.md -docs/SignatureRequestSendRequest.md -docs/SignatureRequestSendWithTemplateRequest.md -docs/SignatureRequestUpdateRequest.md -docs/SubAttachment.md -docs/SubBulkSignerList.md -docs/SubBulkSignerListCustomField.md -docs/SubCC.md -docs/SubCustomField.md -docs/SubEditorOptions.md -docs/SubFieldOptions.md -docs/SubFormFieldGroup.md -docs/SubFormFieldRule.md -docs/SubFormFieldRuleAction.md -docs/SubFormFieldRuleTrigger.md -docs/SubFormFieldsPerDocumentBase.md -docs/SubFormFieldsPerDocumentCheckbox.md -docs/SubFormFieldsPerDocumentCheckboxMerge.md -docs/SubFormFieldsPerDocumentDateSigned.md -docs/SubFormFieldsPerDocumentDropdown.md -docs/SubFormFieldsPerDocumentFontEnum.md -docs/SubFormFieldsPerDocumentHyperlink.md -docs/SubFormFieldsPerDocumentInitials.md -docs/SubFormFieldsPerDocumentRadio.md -docs/SubFormFieldsPerDocumentSignature.md -docs/SubFormFieldsPerDocumentText.md -docs/SubFormFieldsPerDocumentTextMerge.md -docs/SubFormFieldsPerDocumentTypeEnum.md -docs/SubMergeField.md -docs/SubOAuth.md -docs/SubOptions.md -docs/SubSignatureRequestGroupedSigners.md -docs/SubSignatureRequestSigner.md -docs/SubSignatureRequestTemplateSigner.md -docs/SubSigningOptions.md -docs/SubTeamResponse.md -docs/SubTemplateRole.md -docs/SubUnclaimedDraftSigner.md -docs/SubUnclaimedDraftTemplateSigner.md -docs/SubWhiteLabelingOptions.md -docs/TeamAddMemberRequest.md -docs/TeamApi.md -docs/TeamCreateRequest.md -docs/TeamGetInfoResponse.md -docs/TeamGetResponse.md -docs/TeamInfoResponse.md -docs/TeamInviteResponse.md -docs/TeamInvitesResponse.md -docs/TeamMemberResponse.md -docs/TeamMembersResponse.md -docs/TeamParentResponse.md -docs/TeamRemoveMemberRequest.md -docs/TeamResponse.md -docs/TeamSubTeamsResponse.md -docs/TeamUpdateRequest.md -docs/TemplateAddUserRequest.md -docs/TemplateApi.md -docs/TemplateCreateEmbeddedDraftRequest.md -docs/TemplateCreateEmbeddedDraftResponse.md -docs/TemplateCreateEmbeddedDraftResponseTemplate.md -docs/TemplateCreateRequest.md -docs/TemplateCreateResponse.md -docs/TemplateCreateResponseTemplate.md -docs/TemplateEditResponse.md -docs/TemplateGetResponse.md -docs/TemplateListResponse.md -docs/TemplateRemoveUserRequest.md -docs/TemplateResponse.md -docs/TemplateResponseAccount.md -docs/TemplateResponseAccountQuota.md -docs/TemplateResponseCCRole.md -docs/TemplateResponseDocument.md -docs/TemplateResponseDocumentCustomFieldBase.md -docs/TemplateResponseDocumentCustomFieldCheckbox.md -docs/TemplateResponseDocumentCustomFieldText.md -docs/TemplateResponseDocumentFieldGroup.md -docs/TemplateResponseDocumentFieldGroupRule.md -docs/TemplateResponseDocumentFormFieldBase.md -docs/TemplateResponseDocumentFormFieldCheckbox.md -docs/TemplateResponseDocumentFormFieldDateSigned.md -docs/TemplateResponseDocumentFormFieldDropdown.md -docs/TemplateResponseDocumentFormFieldHyperlink.md -docs/TemplateResponseDocumentFormFieldInitials.md -docs/TemplateResponseDocumentFormFieldRadio.md -docs/TemplateResponseDocumentFormFieldSignature.md -docs/TemplateResponseDocumentFormFieldText.md -docs/TemplateResponseDocumentStaticFieldBase.md -docs/TemplateResponseDocumentStaticFieldCheckbox.md -docs/TemplateResponseDocumentStaticFieldDateSigned.md -docs/TemplateResponseDocumentStaticFieldDropdown.md -docs/TemplateResponseDocumentStaticFieldHyperlink.md -docs/TemplateResponseDocumentStaticFieldInitials.md -docs/TemplateResponseDocumentStaticFieldRadio.md -docs/TemplateResponseDocumentStaticFieldSignature.md -docs/TemplateResponseDocumentStaticFieldText.md -docs/TemplateResponseFieldAvgTextLength.md -docs/TemplateResponseSignerRole.md -docs/TemplateUpdateFilesRequest.md -docs/TemplateUpdateFilesResponse.md -docs/TemplateUpdateFilesResponseTemplate.md -docs/UnclaimedDraftApi.md -docs/UnclaimedDraftCreateEmbeddedRequest.md -docs/UnclaimedDraftCreateEmbeddedWithTemplateRequest.md -docs/UnclaimedDraftCreateRequest.md -docs/UnclaimedDraftCreateResponse.md -docs/UnclaimedDraftEditAndResendRequest.md -docs/UnclaimedDraftResponse.md -docs/WarningResponse.md -dropbox_sign/__init__.py -dropbox_sign/api/__init__.py -dropbox_sign/api/account_api.py -dropbox_sign/api/api_app_api.py -dropbox_sign/api/bulk_send_job_api.py -dropbox_sign/api/embedded_api.py -dropbox_sign/api/fax_line_api.py -dropbox_sign/api/o_auth_api.py -dropbox_sign/api/report_api.py -dropbox_sign/api/signature_request_api.py -dropbox_sign/api/team_api.py -dropbox_sign/api/template_api.py -dropbox_sign/api/unclaimed_draft_api.py -dropbox_sign/api_client.py -dropbox_sign/apis/__init__.py -dropbox_sign/configuration.py -dropbox_sign/event_callback_helper.py -dropbox_sign/exceptions.py -dropbox_sign/model/__init__.py -dropbox_sign/model/account_create_request.py -dropbox_sign/model/account_create_response.py -dropbox_sign/model/account_get_response.py -dropbox_sign/model/account_response.py -dropbox_sign/model/account_response_quotas.py -dropbox_sign/model/account_response_usage.py -dropbox_sign/model/account_update_request.py -dropbox_sign/model/account_verify_request.py -dropbox_sign/model/account_verify_response.py -dropbox_sign/model/account_verify_response_account.py -dropbox_sign/model/api_app_create_request.py -dropbox_sign/model/api_app_get_response.py -dropbox_sign/model/api_app_list_response.py -dropbox_sign/model/api_app_response.py -dropbox_sign/model/api_app_response_o_auth.py -dropbox_sign/model/api_app_response_options.py -dropbox_sign/model/api_app_response_owner_account.py -dropbox_sign/model/api_app_response_white_labeling_options.py -dropbox_sign/model/api_app_update_request.py -dropbox_sign/model/bulk_send_job_get_response.py -dropbox_sign/model/bulk_send_job_get_response_signature_requests.py -dropbox_sign/model/bulk_send_job_list_response.py -dropbox_sign/model/bulk_send_job_response.py -dropbox_sign/model/bulk_send_job_send_response.py -dropbox_sign/model/embedded_edit_url_request.py -dropbox_sign/model/embedded_edit_url_response.py -dropbox_sign/model/embedded_edit_url_response_embedded.py -dropbox_sign/model/embedded_sign_url_response.py -dropbox_sign/model/embedded_sign_url_response_embedded.py -dropbox_sign/model/error_response.py -dropbox_sign/model/error_response_error.py -dropbox_sign/model/event_callback_request.py -dropbox_sign/model/event_callback_request_event.py -dropbox_sign/model/event_callback_request_event_metadata.py -dropbox_sign/model/fax_line_add_user_request.py -dropbox_sign/model/fax_line_area_code_get_country_enum.py -dropbox_sign/model/fax_line_area_code_get_province_enum.py -dropbox_sign/model/fax_line_area_code_get_response.py -dropbox_sign/model/fax_line_area_code_get_state_enum.py -dropbox_sign/model/fax_line_create_request.py -dropbox_sign/model/fax_line_delete_request.py -dropbox_sign/model/fax_line_list_response.py -dropbox_sign/model/fax_line_remove_user_request.py -dropbox_sign/model/fax_line_response.py -dropbox_sign/model/fax_line_response_fax_line.py -dropbox_sign/model/file_response.py -dropbox_sign/model/file_response_data_uri.py -dropbox_sign/model/list_info_response.py -dropbox_sign/model/o_auth_token_generate_request.py -dropbox_sign/model/o_auth_token_refresh_request.py -dropbox_sign/model/o_auth_token_response.py -dropbox_sign/model/report_create_request.py -dropbox_sign/model/report_create_response.py -dropbox_sign/model/report_response.py -dropbox_sign/model/signature_request_bulk_create_embedded_with_template_request.py -dropbox_sign/model/signature_request_bulk_send_with_template_request.py -dropbox_sign/model/signature_request_create_embedded_request.py -dropbox_sign/model/signature_request_create_embedded_with_template_request.py -dropbox_sign/model/signature_request_get_response.py -dropbox_sign/model/signature_request_list_response.py -dropbox_sign/model/signature_request_remind_request.py -dropbox_sign/model/signature_request_response.py -dropbox_sign/model/signature_request_response_attachment.py -dropbox_sign/model/signature_request_response_custom_field_base.py -dropbox_sign/model/signature_request_response_custom_field_checkbox.py -dropbox_sign/model/signature_request_response_custom_field_text.py -dropbox_sign/model/signature_request_response_custom_field_type_enum.py -dropbox_sign/model/signature_request_response_data_base.py -dropbox_sign/model/signature_request_response_data_type_enum.py -dropbox_sign/model/signature_request_response_data_value_checkbox.py -dropbox_sign/model/signature_request_response_data_value_checkbox_merge.py -dropbox_sign/model/signature_request_response_data_value_date_signed.py -dropbox_sign/model/signature_request_response_data_value_dropdown.py -dropbox_sign/model/signature_request_response_data_value_initials.py -dropbox_sign/model/signature_request_response_data_value_radio.py -dropbox_sign/model/signature_request_response_data_value_signature.py -dropbox_sign/model/signature_request_response_data_value_text.py -dropbox_sign/model/signature_request_response_data_value_text_merge.py -dropbox_sign/model/signature_request_response_signatures.py -dropbox_sign/model/signature_request_send_request.py -dropbox_sign/model/signature_request_send_with_template_request.py -dropbox_sign/model/signature_request_update_request.py -dropbox_sign/model/sub_attachment.py -dropbox_sign/model/sub_bulk_signer_list.py -dropbox_sign/model/sub_bulk_signer_list_custom_field.py -dropbox_sign/model/sub_cc.py -dropbox_sign/model/sub_custom_field.py -dropbox_sign/model/sub_editor_options.py -dropbox_sign/model/sub_field_options.py -dropbox_sign/model/sub_form_field_group.py -dropbox_sign/model/sub_form_field_rule.py -dropbox_sign/model/sub_form_field_rule_action.py -dropbox_sign/model/sub_form_field_rule_trigger.py -dropbox_sign/model/sub_form_fields_per_document_base.py -dropbox_sign/model/sub_form_fields_per_document_checkbox.py -dropbox_sign/model/sub_form_fields_per_document_checkbox_merge.py -dropbox_sign/model/sub_form_fields_per_document_date_signed.py -dropbox_sign/model/sub_form_fields_per_document_dropdown.py -dropbox_sign/model/sub_form_fields_per_document_font_enum.py -dropbox_sign/model/sub_form_fields_per_document_hyperlink.py -dropbox_sign/model/sub_form_fields_per_document_initials.py -dropbox_sign/model/sub_form_fields_per_document_radio.py -dropbox_sign/model/sub_form_fields_per_document_signature.py -dropbox_sign/model/sub_form_fields_per_document_text.py -dropbox_sign/model/sub_form_fields_per_document_text_merge.py -dropbox_sign/model/sub_form_fields_per_document_type_enum.py -dropbox_sign/model/sub_merge_field.py -dropbox_sign/model/sub_o_auth.py -dropbox_sign/model/sub_options.py -dropbox_sign/model/sub_signature_request_grouped_signers.py -dropbox_sign/model/sub_signature_request_signer.py -dropbox_sign/model/sub_signature_request_template_signer.py -dropbox_sign/model/sub_signing_options.py -dropbox_sign/model/sub_team_response.py -dropbox_sign/model/sub_template_role.py -dropbox_sign/model/sub_unclaimed_draft_signer.py -dropbox_sign/model/sub_unclaimed_draft_template_signer.py -dropbox_sign/model/sub_white_labeling_options.py -dropbox_sign/model/team_add_member_request.py -dropbox_sign/model/team_create_request.py -dropbox_sign/model/team_get_info_response.py -dropbox_sign/model/team_get_response.py -dropbox_sign/model/team_info_response.py -dropbox_sign/model/team_invite_response.py -dropbox_sign/model/team_invites_response.py -dropbox_sign/model/team_member_response.py -dropbox_sign/model/team_members_response.py -dropbox_sign/model/team_parent_response.py -dropbox_sign/model/team_remove_member_request.py -dropbox_sign/model/team_response.py -dropbox_sign/model/team_sub_teams_response.py -dropbox_sign/model/team_update_request.py -dropbox_sign/model/template_add_user_request.py -dropbox_sign/model/template_create_embedded_draft_request.py -dropbox_sign/model/template_create_embedded_draft_response.py -dropbox_sign/model/template_create_embedded_draft_response_template.py -dropbox_sign/model/template_create_request.py -dropbox_sign/model/template_create_response.py -dropbox_sign/model/template_create_response_template.py -dropbox_sign/model/template_edit_response.py -dropbox_sign/model/template_get_response.py -dropbox_sign/model/template_list_response.py -dropbox_sign/model/template_remove_user_request.py -dropbox_sign/model/template_response.py -dropbox_sign/model/template_response_account.py -dropbox_sign/model/template_response_account_quota.py -dropbox_sign/model/template_response_cc_role.py -dropbox_sign/model/template_response_document.py -dropbox_sign/model/template_response_document_custom_field_base.py -dropbox_sign/model/template_response_document_custom_field_checkbox.py -dropbox_sign/model/template_response_document_custom_field_text.py -dropbox_sign/model/template_response_document_field_group.py -dropbox_sign/model/template_response_document_field_group_rule.py -dropbox_sign/model/template_response_document_form_field_base.py -dropbox_sign/model/template_response_document_form_field_checkbox.py -dropbox_sign/model/template_response_document_form_field_date_signed.py -dropbox_sign/model/template_response_document_form_field_dropdown.py -dropbox_sign/model/template_response_document_form_field_hyperlink.py -dropbox_sign/model/template_response_document_form_field_initials.py -dropbox_sign/model/template_response_document_form_field_radio.py -dropbox_sign/model/template_response_document_form_field_signature.py -dropbox_sign/model/template_response_document_form_field_text.py -dropbox_sign/model/template_response_document_static_field_base.py -dropbox_sign/model/template_response_document_static_field_checkbox.py -dropbox_sign/model/template_response_document_static_field_date_signed.py -dropbox_sign/model/template_response_document_static_field_dropdown.py -dropbox_sign/model/template_response_document_static_field_hyperlink.py -dropbox_sign/model/template_response_document_static_field_initials.py -dropbox_sign/model/template_response_document_static_field_radio.py -dropbox_sign/model/template_response_document_static_field_signature.py -dropbox_sign/model/template_response_document_static_field_text.py -dropbox_sign/model/template_response_field_avg_text_length.py -dropbox_sign/model/template_response_signer_role.py -dropbox_sign/model/template_update_files_request.py -dropbox_sign/model/template_update_files_response.py -dropbox_sign/model/template_update_files_response_template.py -dropbox_sign/model/unclaimed_draft_create_embedded_request.py -dropbox_sign/model/unclaimed_draft_create_embedded_with_template_request.py -dropbox_sign/model/unclaimed_draft_create_request.py -dropbox_sign/model/unclaimed_draft_create_response.py -dropbox_sign/model/unclaimed_draft_edit_and_resend_request.py -dropbox_sign/model/unclaimed_draft_response.py -dropbox_sign/model/warning_response.py -dropbox_sign/model_utils.py -dropbox_sign/models/__init__.py -dropbox_sign/rest.py -requirements.txt -setup.cfg -setup.py -test-requirements.txt -tox.ini diff --git a/sdks/python/.openapi-generator/VERSION b/sdks/python/.openapi-generator/VERSION deleted file mode 100644 index e230c8396..000000000 --- a/sdks/python/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -5.3.0 \ No newline at end of file diff --git a/sdks/python/.travis.yml b/sdks/python/.travis.yml index c40c84527..6b47ff20f 100644 --- a/sdks/python/.travis.yml +++ b/sdks/python/.travis.yml @@ -1,10 +1,14 @@ # ref: https://docs.travis-ci.com/user/languages/python language: python python: - - "3.6" - "3.7" - "3.8" - "3.9" + - "3.10" + - "3.11" + # uncomment the following if needed + #- "3.11-dev" # 3.11 development branch + #- "nightly" # nightly build # command to install dependencies install: - "pip install -r requirements.txt" diff --git a/sdks/python/LICENSE b/sdks/python/LICENSE deleted file mode 100644 index 4025343d0..000000000 --- a/sdks/python/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (C) 2023 dropbox.com - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/sdks/python/README.md b/sdks/python/README.md index 1cd2512b5..791d4e7a2 100644 --- a/sdks/python/README.md +++ b/sdks/python/README.md @@ -1,173 +1,169 @@ # dropbox-sign Dropbox Sign v3 API -## Migrating from legacy SDK - -This SDK is generated from our officially maintained [OpenAPI spec](https://github.com/hellosign/hellosign-openapi/blob/main/openapi.yaml). -We've made important updates that introduce new functionality and create feature parity between the Dropbox Sign API and the SDK. -However, some of these changes are considered "breaking" in the sense that they'll require you to update your existing code in order to continue using the SDK. -Please refer to this [migration guide](https://developers.hellosign.com/docs/sdks/python/migration-guide/) for more information. - -## Contributing - -This repo is no longer accepting new issues or Pull Requests. All issues or -Pull Requests *must* be opened against the -[hellosign/hellosign-openapi](https://github.com/hellosign/hellosign-openapi) repo! - -### Changes to the SDK code - -You must make SDK code changes in the mustache file within the `templates` -directory that corresponds to the file you want updated. - -We use [OpenAPI Generator](https://openapi-generator.tech/) to automatically -generate this SDK from the OAS, using the template files. - -### Building - -You must have `docker` (or `podman` linked to `docker`) installed. Highly -recommended to use -[rootless docker](https://docs.docker.com/engine/security/rootless/). +This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -Run the following and everything is done for you: +- API version: 3.0.0 +- Package version: 2.0-dev +- Generator version: 7.8.0 +- Build package: org.openapitools.codegen.languages.PythonClientCodegen -```shell -./run-build -``` +## Requirements. -*Attention*: Any changes you have made to the SDK code that you have not made -to the OAS file and/or the mustache template files _will be lost_ when you run -this command. +Python 3.7+ ## Installation & Usage +### pip install -### Requirements. - -Python >=3.7 - -### pip +If the python package is hosted on a repository, you can install directly using: -Install using `pip`: +```sh +pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git +``` +(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) -```shell -python3 -m pip install dropbox-sign==1.5-dev +Then import the package: +```python +import dropbox_sign ``` -Alternatively: +### Setuptools -```shell -pip install git+https://github.com/hellosign/dropbox-sign-python.git +Install via [Setuptools](http://pypi.python.org/pypi/setuptools). + +```sh +python setup.py install --user ``` +(or `sudo python setup.py install` to install the package for all users) Then import the package: ```python import dropbox_sign ``` +### Tests + +Execute `pytest` to run the tests. + ## Getting Started Please follow the [installation procedure](#installation--usage) and then run the following: - ```python + +import dropbox_sign +from dropbox_sign.rest import ApiException from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +# Defining the host is optional and defaults to https://api.hellosign.com/v3 +# See configuration.py for a list of all supported configuration parameters. +configuration = dropbox_sign.Configuration( + host = "https://api.hellosign.com/v3" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", +# Configure HTTP basic authorization: api_key +configuration = dropbox_sign.Configuration( + username = os.environ["USERNAME"], + password = os.environ["PASSWORD"] +) - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", +# Configure Bearer authorization (JWT): oauth2 +configuration = dropbox_sign.Configuration( + access_token = os.environ["BEARER_TOKEN"] ) -with ApiClient(configuration) as api_client: - account_api = apis.AccountApi(api_client) - data = models.AccountCreateRequest( - email_address="newuser@dropboxsign.com", - ) +# Enter a context with an instance of the API client +with dropbox_sign.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dropbox_sign.AccountApi(api_client) + account_create_request = dropbox_sign.AccountCreateRequest() # AccountCreateRequest | try: - response = account_api.account_create(data) - pprint(response) + # Create Account + api_response = api_instance.account_create(account_create_request) + print("The response of AccountApi->account_create:\n") + pprint(api_response) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print("Exception when calling AccountApi->account_create: %s\n" % e) ``` - ## Documentation for API Endpoints All URIs are relative to *https://api.hellosign.com/v3* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -|```AccountApi``` | [```account_create```](docs/AccountApi.md#account_create) | ```POST /account/create``` | Create Account| -```AccountApi``` | [```account_get```](docs/AccountApi.md#account_get) | ```GET /account``` | Get Account| -```AccountApi``` | [```account_update```](docs/AccountApi.md#account_update) | ```PUT /account``` | Update Account| -```AccountApi``` | [```account_verify```](docs/AccountApi.md#account_verify) | ```POST /account/verify``` | Verify Account| -|```ApiAppApi``` | [```api_app_create```](docs/ApiAppApi.md#api_app_create) | ```POST /api_app``` | Create API App| -```ApiAppApi``` | [```api_app_delete```](docs/ApiAppApi.md#api_app_delete) | ```DELETE /api_app/{client_id}``` | Delete API App| -```ApiAppApi``` | [```api_app_get```](docs/ApiAppApi.md#api_app_get) | ```GET /api_app/{client_id}``` | Get API App| -```ApiAppApi``` | [```api_app_list```](docs/ApiAppApi.md#api_app_list) | ```GET /api_app/list``` | List API Apps| -```ApiAppApi``` | [```api_app_update```](docs/ApiAppApi.md#api_app_update) | ```PUT /api_app/{client_id}``` | Update API App| -|```BulkSendJobApi``` | [```bulk_send_job_get```](docs/BulkSendJobApi.md#bulk_send_job_get) | ```GET /bulk_send_job/{bulk_send_job_id}``` | Get Bulk Send Job| -```BulkSendJobApi``` | [```bulk_send_job_list```](docs/BulkSendJobApi.md#bulk_send_job_list) | ```GET /bulk_send_job/list``` | List Bulk Send Jobs| -|```EmbeddedApi``` | [```embedded_edit_url```](docs/EmbeddedApi.md#embedded_edit_url) | ```POST /embedded/edit_url/{template_id}``` | Get Embedded Template Edit URL| -```EmbeddedApi``` | [```embedded_sign_url```](docs/EmbeddedApi.md#embedded_sign_url) | ```GET /embedded/sign_url/{signature_id}``` | Get Embedded Sign URL| -|```FaxLineApi``` | [```fax_line_add_user```](docs/FaxLineApi.md#fax_line_add_user) | ```PUT /fax_line/add_user``` | Add Fax Line User| -```FaxLineApi``` | [```fax_line_area_code_get```](docs/FaxLineApi.md#fax_line_area_code_get) | ```GET /fax_line/area_codes``` | Get Available Fax Line Area Codes| -```FaxLineApi``` | [```fax_line_create```](docs/FaxLineApi.md#fax_line_create) | ```POST /fax_line/create``` | Purchase Fax Line| -```FaxLineApi``` | [```fax_line_delete```](docs/FaxLineApi.md#fax_line_delete) | ```DELETE /fax_line``` | Delete Fax Line| -```FaxLineApi``` | [```fax_line_get```](docs/FaxLineApi.md#fax_line_get) | ```GET /fax_line``` | Get Fax Line| -```FaxLineApi``` | [```fax_line_list```](docs/FaxLineApi.md#fax_line_list) | ```GET /fax_line/list``` | List Fax Lines| -```FaxLineApi``` | [```fax_line_remove_user```](docs/FaxLineApi.md#fax_line_remove_user) | ```PUT /fax_line/remove_user``` | Remove Fax Line Access| -|```OAuthApi``` | [```oauth_token_generate```](docs/OAuthApi.md#oauth_token_generate) | ```POST /oauth/token``` | OAuth Token Generate| -```OAuthApi``` | [```oauth_token_refresh```](docs/OAuthApi.md#oauth_token_refresh) | ```POST /oauth/token?refresh``` | OAuth Token Refresh| -|```ReportApi``` | [```report_create```](docs/ReportApi.md#report_create) | ```POST /report/create``` | Create Report| -|```SignatureRequestApi``` | [```signature_request_bulk_create_embedded_with_template```](docs/SignatureRequestApi.md#signature_request_bulk_create_embedded_with_template) | ```POST /signature_request/bulk_create_embedded_with_template``` | Embedded Bulk Send with Template| -```SignatureRequestApi``` | [```signature_request_bulk_send_with_template```](docs/SignatureRequestApi.md#signature_request_bulk_send_with_template) | ```POST /signature_request/bulk_send_with_template``` | Bulk Send with Template| -```SignatureRequestApi``` | [```signature_request_cancel```](docs/SignatureRequestApi.md#signature_request_cancel) | ```POST /signature_request/cancel/{signature_request_id}``` | Cancel Incomplete Signature Request| -```SignatureRequestApi``` | [```signature_request_create_embedded```](docs/SignatureRequestApi.md#signature_request_create_embedded) | ```POST /signature_request/create_embedded``` | Create Embedded Signature Request| -```SignatureRequestApi``` | [```signature_request_create_embedded_with_template```](docs/SignatureRequestApi.md#signature_request_create_embedded_with_template) | ```POST /signature_request/create_embedded_with_template``` | Create Embedded Signature Request with Template| -```SignatureRequestApi``` | [```signature_request_files```](docs/SignatureRequestApi.md#signature_request_files) | ```GET /signature_request/files/{signature_request_id}``` | Download Files| -```SignatureRequestApi``` | [```signature_request_files_as_data_uri```](docs/SignatureRequestApi.md#signature_request_files_as_data_uri) | ```GET /signature_request/files_as_data_uri/{signature_request_id}``` | Download Files as Data Uri| -```SignatureRequestApi``` | [```signature_request_files_as_file_url```](docs/SignatureRequestApi.md#signature_request_files_as_file_url) | ```GET /signature_request/files_as_file_url/{signature_request_id}``` | Download Files as File Url| -```SignatureRequestApi``` | [```signature_request_get```](docs/SignatureRequestApi.md#signature_request_get) | ```GET /signature_request/{signature_request_id}``` | Get Signature Request| -```SignatureRequestApi``` | [```signature_request_list```](docs/SignatureRequestApi.md#signature_request_list) | ```GET /signature_request/list``` | List Signature Requests| -```SignatureRequestApi``` | [```signature_request_release_hold```](docs/SignatureRequestApi.md#signature_request_release_hold) | ```POST /signature_request/release_hold/{signature_request_id}``` | Release On-Hold Signature Request| -```SignatureRequestApi``` | [```signature_request_remind```](docs/SignatureRequestApi.md#signature_request_remind) | ```POST /signature_request/remind/{signature_request_id}``` | Send Request Reminder| -```SignatureRequestApi``` | [```signature_request_remove```](docs/SignatureRequestApi.md#signature_request_remove) | ```POST /signature_request/remove/{signature_request_id}``` | Remove Signature Request Access| -```SignatureRequestApi``` | [```signature_request_send```](docs/SignatureRequestApi.md#signature_request_send) | ```POST /signature_request/send``` | Send Signature Request| -```SignatureRequestApi``` | [```signature_request_send_with_template```](docs/SignatureRequestApi.md#signature_request_send_with_template) | ```POST /signature_request/send_with_template``` | Send with Template| -```SignatureRequestApi``` | [```signature_request_update```](docs/SignatureRequestApi.md#signature_request_update) | ```POST /signature_request/update/{signature_request_id}``` | Update Signature Request| -|```TeamApi``` | [```team_add_member```](docs/TeamApi.md#team_add_member) | ```PUT /team/add_member``` | Add User to Team| -```TeamApi``` | [```team_create```](docs/TeamApi.md#team_create) | ```POST /team/create``` | Create Team| -```TeamApi``` | [```team_delete```](docs/TeamApi.md#team_delete) | ```DELETE /team/destroy``` | Delete Team| -```TeamApi``` | [```team_get```](docs/TeamApi.md#team_get) | ```GET /team``` | Get Team| -```TeamApi``` | [```team_info```](docs/TeamApi.md#team_info) | ```GET /team/info``` | Get Team Info| -```TeamApi``` | [```team_invites```](docs/TeamApi.md#team_invites) | ```GET /team/invites``` | List Team Invites| -```TeamApi``` | [```team_members```](docs/TeamApi.md#team_members) | ```GET /team/members/{team_id}``` | List Team Members| -```TeamApi``` | [```team_remove_member```](docs/TeamApi.md#team_remove_member) | ```POST /team/remove_member``` | Remove User from Team| -```TeamApi``` | [```team_sub_teams```](docs/TeamApi.md#team_sub_teams) | ```GET /team/sub_teams/{team_id}``` | List Sub Teams| -```TeamApi``` | [```team_update```](docs/TeamApi.md#team_update) | ```PUT /team``` | Update Team| -|```TemplateApi``` | [```template_add_user```](docs/TemplateApi.md#template_add_user) | ```POST /template/add_user/{template_id}``` | Add User to Template| -```TemplateApi``` | [```template_create```](docs/TemplateApi.md#template_create) | ```POST /template/create``` | Create Template| -```TemplateApi``` | [```template_create_embedded_draft```](docs/TemplateApi.md#template_create_embedded_draft) | ```POST /template/create_embedded_draft``` | Create Embedded Template Draft| -```TemplateApi``` | [```template_delete```](docs/TemplateApi.md#template_delete) | ```POST /template/delete/{template_id}``` | Delete Template| -```TemplateApi``` | [```template_files```](docs/TemplateApi.md#template_files) | ```GET /template/files/{template_id}``` | Get Template Files| -```TemplateApi``` | [```template_files_as_data_uri```](docs/TemplateApi.md#template_files_as_data_uri) | ```GET /template/files_as_data_uri/{template_id}``` | Get Template Files as Data Uri| -```TemplateApi``` | [```template_files_as_file_url```](docs/TemplateApi.md#template_files_as_file_url) | ```GET /template/files_as_file_url/{template_id}``` | Get Template Files as File Url| -```TemplateApi``` | [```template_get```](docs/TemplateApi.md#template_get) | ```GET /template/{template_id}``` | Get Template| -```TemplateApi``` | [```template_list```](docs/TemplateApi.md#template_list) | ```GET /template/list``` | List Templates| -```TemplateApi``` | [```template_remove_user```](docs/TemplateApi.md#template_remove_user) | ```POST /template/remove_user/{template_id}``` | Remove User from Template| -```TemplateApi``` | [```template_update_files```](docs/TemplateApi.md#template_update_files) | ```POST /template/update_files/{template_id}``` | Update Template Files| -|```UnclaimedDraftApi``` | [```unclaimed_draft_create```](docs/UnclaimedDraftApi.md#unclaimed_draft_create) | ```POST /unclaimed_draft/create``` | Create Unclaimed Draft| -```UnclaimedDraftApi``` | [```unclaimed_draft_create_embedded```](docs/UnclaimedDraftApi.md#unclaimed_draft_create_embedded) | ```POST /unclaimed_draft/create_embedded``` | Create Embedded Unclaimed Draft| -```UnclaimedDraftApi``` | [```unclaimed_draft_create_embedded_with_template```](docs/UnclaimedDraftApi.md#unclaimed_draft_create_embedded_with_template) | ```POST /unclaimed_draft/create_embedded_with_template``` | Create Embedded Unclaimed Draft with Template| -```UnclaimedDraftApi``` | [```unclaimed_draft_edit_and_resend```](docs/UnclaimedDraftApi.md#unclaimed_draft_edit_and_resend) | ```POST /unclaimed_draft/edit_and_resend/{signature_request_id}``` | Edit and Resend Unclaimed Draft| +*AccountApi* | [**account_create**](docs/AccountApi.md#account_create) | **POST** /account/create | Create Account +*AccountApi* | [**account_get**](docs/AccountApi.md#account_get) | **GET** /account | Get Account +*AccountApi* | [**account_update**](docs/AccountApi.md#account_update) | **PUT** /account | Update Account +*AccountApi* | [**account_verify**](docs/AccountApi.md#account_verify) | **POST** /account/verify | Verify Account +*ApiAppApi* | [**api_app_create**](docs/ApiAppApi.md#api_app_create) | **POST** /api_app | Create API App +*ApiAppApi* | [**api_app_delete**](docs/ApiAppApi.md#api_app_delete) | **DELETE** /api_app/{client_id} | Delete API App +*ApiAppApi* | [**api_app_get**](docs/ApiAppApi.md#api_app_get) | **GET** /api_app/{client_id} | Get API App +*ApiAppApi* | [**api_app_list**](docs/ApiAppApi.md#api_app_list) | **GET** /api_app/list | List API Apps +*ApiAppApi* | [**api_app_update**](docs/ApiAppApi.md#api_app_update) | **PUT** /api_app/{client_id} | Update API App +*BulkSendJobApi* | [**bulk_send_job_get**](docs/BulkSendJobApi.md#bulk_send_job_get) | **GET** /bulk_send_job/{bulk_send_job_id} | Get Bulk Send Job +*BulkSendJobApi* | [**bulk_send_job_list**](docs/BulkSendJobApi.md#bulk_send_job_list) | **GET** /bulk_send_job/list | List Bulk Send Jobs +*EmbeddedApi* | [**embedded_edit_url**](docs/EmbeddedApi.md#embedded_edit_url) | **POST** /embedded/edit_url/{template_id} | Get Embedded Template Edit URL +*EmbeddedApi* | [**embedded_sign_url**](docs/EmbeddedApi.md#embedded_sign_url) | **GET** /embedded/sign_url/{signature_id} | Get Embedded Sign URL +*FaxLineApi* | [**fax_line_add_user**](docs/FaxLineApi.md#fax_line_add_user) | **PUT** /fax_line/add_user | Add Fax Line User +*FaxLineApi* | [**fax_line_area_code_get**](docs/FaxLineApi.md#fax_line_area_code_get) | **GET** /fax_line/area_codes | Get Available Fax Line Area Codes +*FaxLineApi* | [**fax_line_create**](docs/FaxLineApi.md#fax_line_create) | **POST** /fax_line/create | Purchase Fax Line +*FaxLineApi* | [**fax_line_delete**](docs/FaxLineApi.md#fax_line_delete) | **DELETE** /fax_line | Delete Fax Line +*FaxLineApi* | [**fax_line_get**](docs/FaxLineApi.md#fax_line_get) | **GET** /fax_line | Get Fax Line +*FaxLineApi* | [**fax_line_list**](docs/FaxLineApi.md#fax_line_list) | **GET** /fax_line/list | List Fax Lines +*FaxLineApi* | [**fax_line_remove_user**](docs/FaxLineApi.md#fax_line_remove_user) | **PUT** /fax_line/remove_user | Remove Fax Line Access +*OAuthApi* | [**oauth_token_generate**](docs/OAuthApi.md#oauth_token_generate) | **POST** /oauth/token | OAuth Token Generate +*OAuthApi* | [**oauth_token_refresh**](docs/OAuthApi.md#oauth_token_refresh) | **POST** /oauth/token?refresh | OAuth Token Refresh +*ReportApi* | [**report_create**](docs/ReportApi.md#report_create) | **POST** /report/create | Create Report +*SignatureRequestApi* | [**signature_request_bulk_create_embedded_with_template**](docs/SignatureRequestApi.md#signature_request_bulk_create_embedded_with_template) | **POST** /signature_request/bulk_create_embedded_with_template | Embedded Bulk Send with Template +*SignatureRequestApi* | [**signature_request_bulk_send_with_template**](docs/SignatureRequestApi.md#signature_request_bulk_send_with_template) | **POST** /signature_request/bulk_send_with_template | Bulk Send with Template +*SignatureRequestApi* | [**signature_request_cancel**](docs/SignatureRequestApi.md#signature_request_cancel) | **POST** /signature_request/cancel/{signature_request_id} | Cancel Incomplete Signature Request +*SignatureRequestApi* | [**signature_request_create_embedded**](docs/SignatureRequestApi.md#signature_request_create_embedded) | **POST** /signature_request/create_embedded | Create Embedded Signature Request +*SignatureRequestApi* | [**signature_request_create_embedded_with_template**](docs/SignatureRequestApi.md#signature_request_create_embedded_with_template) | **POST** /signature_request/create_embedded_with_template | Create Embedded Signature Request with Template +*SignatureRequestApi* | [**signature_request_files**](docs/SignatureRequestApi.md#signature_request_files) | **GET** /signature_request/files/{signature_request_id} | Download Files +*SignatureRequestApi* | [**signature_request_files_as_data_uri**](docs/SignatureRequestApi.md#signature_request_files_as_data_uri) | **GET** /signature_request/files_as_data_uri/{signature_request_id} | Download Files as Data Uri +*SignatureRequestApi* | [**signature_request_files_as_file_url**](docs/SignatureRequestApi.md#signature_request_files_as_file_url) | **GET** /signature_request/files_as_file_url/{signature_request_id} | Download Files as File Url +*SignatureRequestApi* | [**signature_request_get**](docs/SignatureRequestApi.md#signature_request_get) | **GET** /signature_request/{signature_request_id} | Get Signature Request +*SignatureRequestApi* | [**signature_request_list**](docs/SignatureRequestApi.md#signature_request_list) | **GET** /signature_request/list | List Signature Requests +*SignatureRequestApi* | [**signature_request_release_hold**](docs/SignatureRequestApi.md#signature_request_release_hold) | **POST** /signature_request/release_hold/{signature_request_id} | Release On-Hold Signature Request +*SignatureRequestApi* | [**signature_request_remind**](docs/SignatureRequestApi.md#signature_request_remind) | **POST** /signature_request/remind/{signature_request_id} | Send Request Reminder +*SignatureRequestApi* | [**signature_request_remove**](docs/SignatureRequestApi.md#signature_request_remove) | **POST** /signature_request/remove/{signature_request_id} | Remove Signature Request Access +*SignatureRequestApi* | [**signature_request_send**](docs/SignatureRequestApi.md#signature_request_send) | **POST** /signature_request/send | Send Signature Request +*SignatureRequestApi* | [**signature_request_send_with_template**](docs/SignatureRequestApi.md#signature_request_send_with_template) | **POST** /signature_request/send_with_template | Send with Template +*SignatureRequestApi* | [**signature_request_update**](docs/SignatureRequestApi.md#signature_request_update) | **POST** /signature_request/update/{signature_request_id} | Update Signature Request +*TeamApi* | [**team_add_member**](docs/TeamApi.md#team_add_member) | **PUT** /team/add_member | Add User to Team +*TeamApi* | [**team_create**](docs/TeamApi.md#team_create) | **POST** /team/create | Create Team +*TeamApi* | [**team_delete**](docs/TeamApi.md#team_delete) | **DELETE** /team/destroy | Delete Team +*TeamApi* | [**team_get**](docs/TeamApi.md#team_get) | **GET** /team | Get Team +*TeamApi* | [**team_info**](docs/TeamApi.md#team_info) | **GET** /team/info | Get Team Info +*TeamApi* | [**team_invites**](docs/TeamApi.md#team_invites) | **GET** /team/invites | List Team Invites +*TeamApi* | [**team_members**](docs/TeamApi.md#team_members) | **GET** /team/members/{team_id} | List Team Members +*TeamApi* | [**team_remove_member**](docs/TeamApi.md#team_remove_member) | **POST** /team/remove_member | Remove User from Team +*TeamApi* | [**team_sub_teams**](docs/TeamApi.md#team_sub_teams) | **GET** /team/sub_teams/{team_id} | List Sub Teams +*TeamApi* | [**team_update**](docs/TeamApi.md#team_update) | **PUT** /team | Update Team +*TemplateApi* | [**template_add_user**](docs/TemplateApi.md#template_add_user) | **POST** /template/add_user/{template_id} | Add User to Template +*TemplateApi* | [**template_create**](docs/TemplateApi.md#template_create) | **POST** /template/create | Create Template +*TemplateApi* | [**template_create_embedded_draft**](docs/TemplateApi.md#template_create_embedded_draft) | **POST** /template/create_embedded_draft | Create Embedded Template Draft +*TemplateApi* | [**template_delete**](docs/TemplateApi.md#template_delete) | **POST** /template/delete/{template_id} | Delete Template +*TemplateApi* | [**template_files**](docs/TemplateApi.md#template_files) | **GET** /template/files/{template_id} | Get Template Files +*TemplateApi* | [**template_files_as_data_uri**](docs/TemplateApi.md#template_files_as_data_uri) | **GET** /template/files_as_data_uri/{template_id} | Get Template Files as Data Uri +*TemplateApi* | [**template_files_as_file_url**](docs/TemplateApi.md#template_files_as_file_url) | **GET** /template/files_as_file_url/{template_id} | Get Template Files as File Url +*TemplateApi* | [**template_get**](docs/TemplateApi.md#template_get) | **GET** /template/{template_id} | Get Template +*TemplateApi* | [**template_list**](docs/TemplateApi.md#template_list) | **GET** /template/list | List Templates +*TemplateApi* | [**template_remove_user**](docs/TemplateApi.md#template_remove_user) | **POST** /template/remove_user/{template_id} | Remove User from Template +*TemplateApi* | [**template_update_files**](docs/TemplateApi.md#template_update_files) | **POST** /template/update_files/{template_id} | Update Template Files +*UnclaimedDraftApi* | [**unclaimed_draft_create**](docs/UnclaimedDraftApi.md#unclaimed_draft_create) | **POST** /unclaimed_draft/create | Create Unclaimed Draft +*UnclaimedDraftApi* | [**unclaimed_draft_create_embedded**](docs/UnclaimedDraftApi.md#unclaimed_draft_create_embedded) | **POST** /unclaimed_draft/create_embedded | Create Embedded Unclaimed Draft +*UnclaimedDraftApi* | [**unclaimed_draft_create_embedded_with_template**](docs/UnclaimedDraftApi.md#unclaimed_draft_create_embedded_with_template) | **POST** /unclaimed_draft/create_embedded_with_template | Create Embedded Unclaimed Draft with Template +*UnclaimedDraftApi* | [**unclaimed_draft_edit_and_resend**](docs/UnclaimedDraftApi.md#unclaimed_draft_edit_and_resend) | **POST** /unclaimed_draft/edit_and_resend/{signature_request_id} | Edit and Resend Unclaimed Draft ## Documentation For Models @@ -251,7 +247,6 @@ Class | Method | HTTP request | Description - [SignatureRequestResponseDataValueText](docs/SignatureRequestResponseDataValueText.md) - [SignatureRequestResponseDataValueTextMerge](docs/SignatureRequestResponseDataValueTextMerge.md) - [SignatureRequestResponseSignatures](docs/SignatureRequestResponseSignatures.md) - - [SignatureRequestSendRequest](docs/SignatureRequestSendRequest.md) - [SignatureRequestSendWithTemplateRequest](docs/SignatureRequestSendWithTemplateRequest.md) - [SignatureRequestUpdateRequest](docs/SignatureRequestUpdateRequest.md) - [SubAttachment](docs/SubAttachment.md) @@ -357,15 +352,18 @@ Class | Method | HTTP request | Description - [WarningResponse](docs/WarningResponse.md) + ## Documentation For Authorization -## api_key +Authentication schemes defined for the API: + +### api_key - **Type**: HTTP basic authentication - -## oauth2 + +### oauth2 - **Type**: Bearer authentication (JWT) @@ -375,11 +373,3 @@ Class | Method | HTTP request | Description apisupport@hellosign.com -## About this package - -This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - -- API version: 3.0.0 -- Package version: 1.5-dev -- Build package: org.openapitools.codegen.languages.PythonClientCodegen - diff --git a/sdks/python/VERSION b/sdks/python/VERSION index 6f3dd2f48..c3bb52e88 100644 --- a/sdks/python/VERSION +++ b/sdks/python/VERSION @@ -1 +1 @@ -1.5-dev +2.0-dev diff --git a/sdks/python/bin/replace b/sdks/python/bin/replace index c5886eb11..592c6028c 100755 --- a/sdks/python/bin/replace +++ b/sdks/python/bin/replace @@ -9,8 +9,6 @@ rep () { SEARCH_STRING=$1 REPLACE_STRING=$2 SCAN_DIRS=( \ - "docs" \ - "dropbox_sign/model" \ "dropbox_sign/models" \ ) @@ -24,42 +22,6 @@ rep () { done } -perl -pi -e 's/(.*)AllOf.md\)\n//g' "${ROOT_DIR}/README.md" +rep 'Union\[StrictBytes, StrictStr\]' 'Union[StrictBytes, StrictStr, io.IOBase]' -rep '([^\\r\n]+?)from (.*)_all_of import (.*)\n' '' -rep 'from (.*)_all_of import (.*)\n' '' -rep "\s+globals\(\)\['[a-zA-Z]+AllOf(.*)\n" '' - -# def bulk_send_job_id(self) -> str, none_type: -# def bulk_send_job_id(self) -> Optional[str]: -rep 'def ([a-zA-Z_]+)\(self\) -> (.*), none_type:' 'def $1(self) -> Optional[$2]:' - -# def bulk_send_job_id(self, value: str, none_type): -# def bulk_send_job_id(self, value: Optional[str]): -rep 'def ([a-zA-Z_]+)\(self, value: (.*), none_type\):' 'def $1(self, value: Optional[$2]):' - -# def bulk_send_jobs(self) -> [BulkSendJobResponse]: -# def bulk_send_jobs(self) -> List[BulkSendJobResponse]: -rep 'def ([a-zA-Z_]+)\(self\) -> \[(.*)\]:' 'def $1(self) -> List[$2]:' - -# def bulk_send_jobs(self, value: [BulkSendJobResponse]): -# def bulk_send_jobs(self, value: List[BulkSendJobResponse]): -rep 'def ([a-zA-Z_]+)\(self, value: \[(.*)\]\):' 'def $1(self, value: List[$2]):' - -# def template_ids(self) -> Optional[[str]]: -# def template_ids(self) -> Optional[List[str]]: -rep 'def ([a-zA-Z_]+)\(self\) -> ([a-zA-Z]+)\[\[(.*)\]\]:' 'def $1(self) -> $2\[List[$3]]:' - -# def template_ids(self, value: Optional[[str]]): -# def template_ids(self, value: Optional[List[str]]): -rep 'def ([a-zA-Z_]+)\(self, value: ([a-zA-Z]+)\[\[(.*)\]\]\):' 'def $1(self, value: $2\[List[$3]]):' - -# def metadata(self) -> {str: (bool, date, datetime, dict, float, int, list, str, none_type)}: -# def metadata(self) -> Dict[str, Union[bool, date, datetime, dict, float, int, list, str, none_type]]: -rep 'def ([a-zA-Z_]+)\(self\) -> \{([a-zA-Z]+): \((.*)\)\}:' 'def $1(self) -> Dict[$2, Union[$3]]:' - -# def metadata(self, value: {str: (bool, date, datetime, dict, float, int, list, str, none_type)}): -# def metadata(self, value: Dict[str, Union[bool, date, datetime, dict, float, int, list, str, none_type]]): -rep 'def ([a-zA-Z_]+)\(self\, value: \{([a-zA-Z]+): \((.*)\)\}\):' 'def $1(self, value: Dict[$2, Union[$3]]):' - -printf "\n" \ No newline at end of file +printf "\n" diff --git a/sdks/python/docs/AccountApi.md b/sdks/python/docs/AccountApi.md index 0ba88eabc..28e096f05 100644 --- a/sdks/python/docs/AccountApi.md +++ b/sdks/python/docs/AccountApi.md @@ -23,34 +23,9 @@ Creates a new Dropbox Sign Account that is associated with the specified `email_ * Bearer (JWT) Authentication (oauth2): ```python -from pprint import pprint - -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", -) - -with ApiClient(configuration) as api_client: - account_api = apis.AccountApi(api_client) - - data = models.AccountCreateRequest( - email_address="newuser@dropboxsign.com", - ) - - try: - response = account_api.account_create(data) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) - +REPLACE_ME_WITH_EXAMPLE_FOR__account_create_Python_CODE +``` ``` - ### Parameters | Name | Type | Description | Notes | @@ -70,7 +45,6 @@ with ApiClient(configuration) as api_client: - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -93,36 +67,15 @@ Returns the properties and settings of your Account. * Bearer (JWT) Authentication (oauth2): ```python -from pprint import pprint - -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", -) - -with ApiClient(configuration) as api_client: - account_api = apis.AccountApi(api_client) - - try: - response = account_api.account_get(email_address="jack@example.com") - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) - +REPLACE_ME_WITH_EXAMPLE_FOR__account_get_Python_CODE +``` ``` - ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| `account_id` | **str** | `account_id` or `email_address` is required. If both are provided, the account id prevails. The ID of the Account. | [optional] | -| `email_address` | **str** | `account_id` or `email_address` is required, If both are provided, the account id prevails. The email address of the Account. | [optional] | +| `account_id` | **str** | `account_id` or `email_address` is required. If both are provided, the account id prevails. The ID of the Account. | [optional] | +| `email_address` | **str** | `account_id` or `email_address` is required, If both are provided, the account id prevails. The email address of the Account. | [optional] | ### Return type @@ -137,7 +90,6 @@ with ApiClient(configuration) as api_client: - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -160,34 +112,9 @@ Updates the properties and settings of your Account. Currently only allows for u * Bearer (JWT) Authentication (oauth2): ```python -from pprint import pprint - -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", -) - -with ApiClient(configuration) as api_client: - account_api = apis.AccountApi(api_client) - - data = models.AccountUpdateRequest( - callback_url="https://www.example.com/callback", - ) - - try: - response = account_api.account_update(data) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) - +REPLACE_ME_WITH_EXAMPLE_FOR__account_update_Python_CODE +``` ``` - ### Parameters | Name | Type | Description | Notes | @@ -207,7 +134,6 @@ with ApiClient(configuration) as api_client: - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -230,34 +156,9 @@ Verifies whether an Dropbox Sign Account exists for the given email address. * Bearer (JWT) Authentication (oauth2): ```python -from pprint import pprint - -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", -) - -with ApiClient(configuration) as api_client: - account_api = apis.AccountApi(api_client) - - data = models.AccountVerifyRequest( - email_address="some_user@dropboxsign.com", - ) - - try: - response = account_api.account_verify(data) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) - +REPLACE_ME_WITH_EXAMPLE_FOR__account_verify_Python_CODE +``` ``` - ### Parameters | Name | Type | Description | Notes | @@ -277,7 +178,6 @@ with ApiClient(configuration) as api_client: - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | diff --git a/sdks/python/docs/AccountCreateRequest.md b/sdks/python/docs/AccountCreateRequest.md index 6801084e8..5d5631c45 100644 --- a/sdks/python/docs/AccountCreateRequest.md +++ b/sdks/python/docs/AccountCreateRequest.md @@ -5,11 +5,14 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `email_address`*_required_ | ```str``` | The email address which will be associated with the new Account. | | -| `client_id` | ```str``` | Used when creating a new account with OAuth authorization.

See [OAuth 2.0 Authorization](https://app.hellosign.com/api/oauthWalkthrough#OAuthAuthorization) | | -| `client_secret` | ```str``` | Used when creating a new account with OAuth authorization.

See [OAuth 2.0 Authorization](https://app.hellosign.com/api/oauthWalkthrough#OAuthAuthorization) | | -| `locale` | ```str``` | 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. | | +| `email_address`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The email address which will be associated with the new Account. REPLACE_ME_WITH_DESCRIPTION_END | | +| `client_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Used when creating a new account with OAuth authorization. -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) +See [OAuth 2.0 Authorization](https://app.hellosign.com/api/oauthWalkthrough#OAuthAuthorization) REPLACE_ME_WITH_DESCRIPTION_END | | +| `client_secret` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Used when creating a new account with OAuth authorization. + +See [OAuth 2.0 Authorization](https://app.hellosign.com/api/oauthWalkthrough#OAuthAuthorization) REPLACE_ME_WITH_DESCRIPTION_END | | +| `locale` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/AccountCreateResponse.md b/sdks/python/docs/AccountCreateResponse.md index fa9be5221..3bd969b08 100644 --- a/sdks/python/docs/AccountCreateResponse.md +++ b/sdks/python/docs/AccountCreateResponse.md @@ -5,10 +5,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `account` | [```AccountResponse```](AccountResponse.md) | | | -| `oauth_data` | [```OAuthTokenResponse```](OAuthTokenResponse.md) | | | -| `warnings` | [```[WarningResponse]```](WarningResponse.md) | A list of warnings. | | +| `account` | [```AccountResponse```](AccountResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `oauth_data` | [```OAuthTokenResponse```](OAuthTokenResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN A list of warnings. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/AccountGetResponse.md b/sdks/python/docs/AccountGetResponse.md index 1cc7ef497..c4dfdfa26 100644 --- a/sdks/python/docs/AccountGetResponse.md +++ b/sdks/python/docs/AccountGetResponse.md @@ -5,9 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `account` | [```AccountResponse```](AccountResponse.md) | | | -| `warnings` | [```[WarningResponse]```](WarningResponse.md) | A list of warnings. | | +| `account` | [```AccountResponse```](AccountResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN A list of warnings. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/AccountResponse.md b/sdks/python/docs/AccountResponse.md index f44286e88..327736f59 100644 --- a/sdks/python/docs/AccountResponse.md +++ b/sdks/python/docs/AccountResponse.md @@ -5,18 +5,17 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `account_id` | ```str``` | The ID of the Account | | -| `email_address` | ```str``` | The email address associated with the Account. | | -| `is_locked` | ```bool``` | Returns `true` if the user has been locked out of their account by a team admin. | | -| `is_paid_hs` | ```bool``` | Returns `true` if the user has a paid Dropbox Sign account. | | -| `is_paid_hf` | ```bool``` | Returns `true` if the user has a paid HelloFax account. | | -| `quotas` | [```AccountResponseQuotas```](AccountResponseQuotas.md) | | | -| `callback_url` | ```str, none_type``` | The URL that Dropbox Sign events will `POST` to. | | -| `role_code` | ```str, none_type``` | The membership role for the team. | | -| `team_id` | ```str, none_type``` | The id of the team account belongs to. | | -| `locale` | ```str, none_type``` | 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` | [```AccountResponseUsage```](AccountResponseUsage.md) | | | +| `account_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The ID of the Account REPLACE_ME_WITH_DESCRIPTION_END | | +| `email_address` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The email address associated with the Account. REPLACE_ME_WITH_DESCRIPTION_END | | +| `is_locked` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Returns `true` if the user has been locked out of their account by a team admin. REPLACE_ME_WITH_DESCRIPTION_END | | +| `is_paid_hs` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Returns `true` if the user has a paid Dropbox Sign account. REPLACE_ME_WITH_DESCRIPTION_END | | +| `is_paid_hf` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Returns `true` if the user has a paid HelloFax account. REPLACE_ME_WITH_DESCRIPTION_END | | +| `quotas` | [```AccountResponseQuotas```](AccountResponseQuotas.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `callback_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The URL that Dropbox Sign events will `POST` to. REPLACE_ME_WITH_DESCRIPTION_END | | +| `role_code` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The membership role for the team. REPLACE_ME_WITH_DESCRIPTION_END | | +| `team_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The id of the team account belongs to. REPLACE_ME_WITH_DESCRIPTION_END | | +| `locale` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `usage` | [```AccountResponseUsage```](AccountResponseUsage.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/AccountResponseQuotas.md b/sdks/python/docs/AccountResponseQuotas.md index 4d63611c6..8df9d628f 100644 --- a/sdks/python/docs/AccountResponseQuotas.md +++ b/sdks/python/docs/AccountResponseQuotas.md @@ -5,13 +5,12 @@ Details concerning remaining monthly quotas. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `api_signature_requests_left` | ```int, none_type``` | API signature requests remaining. | | -| `documents_left` | ```int, none_type``` | Signature requests remaining. | | -| `templates_total` | ```int, none_type``` | Total API templates allowed. | | -| `templates_left` | ```int, none_type``` | API templates remaining. | | -| `sms_verifications_left` | ```int, none_type``` | SMS verifications remaining. | | -| `num_fax_pages_left` | ```int, none_type``` | Number of fax pages left | | +| `api_signature_requests_left` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN API signature requests remaining. REPLACE_ME_WITH_DESCRIPTION_END | | +| `documents_left` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Signature requests remaining. REPLACE_ME_WITH_DESCRIPTION_END | | +| `templates_total` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Total API templates allowed. REPLACE_ME_WITH_DESCRIPTION_END | | +| `templates_left` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN API templates remaining. REPLACE_ME_WITH_DESCRIPTION_END | | +| `sms_verifications_left` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN SMS verifications remaining. REPLACE_ME_WITH_DESCRIPTION_END | | +| `num_fax_pages_left` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Number of fax pages left REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/AccountResponseUsage.md b/sdks/python/docs/AccountResponseUsage.md index 941021974..ee678547c 100644 --- a/sdks/python/docs/AccountResponseUsage.md +++ b/sdks/python/docs/AccountResponseUsage.md @@ -5,8 +5,7 @@ Details concerning monthly usage ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `fax_pages_sent` | ```int, none_type``` | Number of fax pages sent | | +| `fax_pages_sent` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Number of fax pages sent REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/AccountUpdateRequest.md b/sdks/python/docs/AccountUpdateRequest.md index bdf95c139..87f98cb40 100644 --- a/sdks/python/docs/AccountUpdateRequest.md +++ b/sdks/python/docs/AccountUpdateRequest.md @@ -5,10 +5,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `account_id` | ```str, none_type``` | The ID of the Account | | -| `callback_url` | ```str``` | The URL that Dropbox Sign should POST events to. | | -| `locale` | ```str``` | 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. | | +| `account_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The ID of the Account REPLACE_ME_WITH_DESCRIPTION_END | | +| `callback_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The URL that Dropbox Sign should POST events to. REPLACE_ME_WITH_DESCRIPTION_END | | +| `locale` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/AccountVerifyRequest.md b/sdks/python/docs/AccountVerifyRequest.md index 477b47f9a..4e10f4627 100644 --- a/sdks/python/docs/AccountVerifyRequest.md +++ b/sdks/python/docs/AccountVerifyRequest.md @@ -5,8 +5,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `email_address`*_required_ | ```str``` | Email address to run the verification for. | | +| `email_address`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Email address to run the verification for. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/AccountVerifyResponse.md b/sdks/python/docs/AccountVerifyResponse.md index dc5261b7e..2fa0d81d6 100644 --- a/sdks/python/docs/AccountVerifyResponse.md +++ b/sdks/python/docs/AccountVerifyResponse.md @@ -5,9 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `account` | [```AccountVerifyResponseAccount```](AccountVerifyResponseAccount.md) | | | -| `warnings` | [```[WarningResponse]```](WarningResponse.md) | A list of warnings. | | +| `account` | [```AccountVerifyResponseAccount```](AccountVerifyResponseAccount.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN A list of warnings. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/AccountVerifyResponseAccount.md b/sdks/python/docs/AccountVerifyResponseAccount.md index b2f7d7142..bc636007d 100644 --- a/sdks/python/docs/AccountVerifyResponseAccount.md +++ b/sdks/python/docs/AccountVerifyResponseAccount.md @@ -5,8 +5,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `email_address` | ```str``` | The email address associated with the Account. | | +| `email_address` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The email address associated with the Account. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/ApiAppApi.md b/sdks/python/docs/ApiAppApi.md index 153830bcc..208038d8f 100644 --- a/sdks/python/docs/ApiAppApi.md +++ b/sdks/python/docs/ApiAppApi.md @@ -24,50 +24,9 @@ Creates a new API App. * Bearer (JWT) Authentication (oauth2): ```python -from pprint import pprint - -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", -) - -with ApiClient(configuration) as api_client: - api_app_api = apis.ApiAppApi(api_client) - - oauth = models.SubOAuth( - callback_url="https://example.com/oauth", - scopes=["basic_account_info" "request_signature"], - ) - - white_labeling_options = models.SubWhiteLabelingOptions( - primary_button_color="#00b3e6", - primary_button_text_color="#ffffff", - ) - - custom_logo_file = open('./CustomLogoFile.png', 'rb') - - data = models.ApiAppCreateRequest( - name="My Production App", - domains=["example.com"], - oauth=oauth, - white_labeling_options=white_labeling_options, - custom_logo_file=custom_logo_file, - ) - - try: - response = api_app_api.api_app_create(data) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) - +REPLACE_ME_WITH_EXAMPLE_FOR__api_app_create_Python_CODE +``` ``` - ### Parameters | Name | Type | Description | Notes | @@ -87,7 +46,6 @@ with ApiClient(configuration) as api_client: - **Content-Type**: application/json, multipart/form-data - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -110,29 +68,9 @@ 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 - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", - - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", -) - -with ApiClient(configuration) as api_client: - api_app_api = apis.ApiAppApi(api_client) - - client_id = "0dd3b823a682527788c4e40cb7b6f7e9" - - try: - api_app_api.api_app_delete(client_id) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) - +REPLACE_ME_WITH_EXAMPLE_FOR__api_app_delete_Python_CODE +``` ``` - ### Parameters | Name | Type | Description | Notes | @@ -152,7 +90,6 @@ void (empty response body) - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -175,32 +112,9 @@ Returns an object with information about an API App. * Bearer (JWT) Authentication (oauth2): ```python -from pprint import pprint - -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", -) - -with ApiClient(configuration) as api_client: - api_app_api = apis.ApiAppApi(api_client) - - client_id = "0dd3b823a682527788c4e40cb7b6f7e9" - - try: - response = api_app_api.api_app_get(client_id) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) - +REPLACE_ME_WITH_EXAMPLE_FOR__api_app_get_Python_CODE +``` ``` - ### Parameters | Name | Type | Description | Notes | @@ -220,7 +134,6 @@ with ApiClient(configuration) as api_client: - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -243,42 +156,15 @@ Returns a list of API Apps that are accessible by you. If you are on a team with * Bearer (JWT) Authentication (oauth2): ```python -from pprint import pprint - -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", -) - -with ApiClient(configuration) as api_client: - api_app_api = apis.ApiAppApi(api_client) - - page = 1 - page_size = 2 - - try: - response = api_app_api.api_app_list( - page=page, - page_size=page_size, - ) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) - +REPLACE_ME_WITH_EXAMPLE_FOR__api_app_list_Python_CODE +``` ``` - ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| `page` | **int** | Which page number of the API App List to return. Defaults to `1`. | [optional][default to 1] | -| `page_size` | **int** | Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. | [optional][default to 20] | +| `page` | **int** | Which page number of the API App List to return. Defaults to `1`. | [optional][default to 1] | +| `page_size` | **int** | Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. | [optional][default to 20] | ### Return type @@ -293,7 +179,6 @@ with ApiClient(configuration) as api_client: - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -316,46 +201,9 @@ Updates an existing API App. Can only be invoked for apps you own. Only the fiel * Bearer (JWT) Authentication (oauth2): ```python -from pprint import pprint - -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", -) - -with ApiClient(configuration) as api_client: - api_app_api = apis.ApiAppApi(api_client) - - white_labeling_options = models.SubWhiteLabelingOptions( - primary_button_color="#00b3e6", - primary_button_text_color="#ffffff", - ) - - custom_logo_file = open('./CustomLogoFile.png', 'rb') - - data = models.ApiAppUpdateRequest( - name="New Name", - callback_url="http://example.com/dropboxsign", - white_labeling_options=white_labeling_options, - custom_logo_file=custom_logo_file, - ) - - client_id = "0dd3b823a682527788c4e40cb7b6f7e9" - - try: - response = api_app_api.api_app_update(client_id, data) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) - +REPLACE_ME_WITH_EXAMPLE_FOR__api_app_update_Python_CODE +``` ``` - ### Parameters | Name | Type | Description | Notes | @@ -376,7 +224,6 @@ with ApiClient(configuration) as api_client: - **Content-Type**: application/json, multipart/form-data - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | diff --git a/sdks/python/docs/ApiAppCreateRequest.md b/sdks/python/docs/ApiAppCreateRequest.md index c416485ab..e1fde1ee1 100644 --- a/sdks/python/docs/ApiAppCreateRequest.md +++ b/sdks/python/docs/ApiAppCreateRequest.md @@ -5,14 +5,13 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `domains`*_required_ | ```[str]``` | The domain names the ApiApp will be associated with. | | -| `name`*_required_ | ```str``` | The name you want to assign to the ApiApp. | | -| `callback_url` | ```str``` | The URL at which the ApiApp should receive event callbacks. | | -| `custom_logo_file` | ```file_type``` | An image file to use as a custom logo in embedded contexts. (Only applies to some API plans) | | -| `oauth` | [```SubOAuth```](SubOAuth.md) | | | -| `options` | [```SubOptions```](SubOptions.md) | | | -| `white_labeling_options` | [```SubWhiteLabelingOptions```](SubWhiteLabelingOptions.md) | | | +| `domains`*_required_ | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The domain names the ApiApp will be associated with. REPLACE_ME_WITH_DESCRIPTION_END | | +| `name`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The name you want to assign to the ApiApp. REPLACE_ME_WITH_DESCRIPTION_END | | +| `callback_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The URL at which the ApiApp should receive event callbacks. REPLACE_ME_WITH_DESCRIPTION_END | | +| `custom_logo_file` | ```io.IOBase``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN An image file to use as a custom logo in embedded contexts. (Only applies to some API plans) REPLACE_ME_WITH_DESCRIPTION_END | | +| `oauth` | [```SubOAuth```](SubOAuth.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `options` | [```SubOptions```](SubOptions.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `white_labeling_options` | [```SubWhiteLabelingOptions```](SubWhiteLabelingOptions.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/ApiAppGetResponse.md b/sdks/python/docs/ApiAppGetResponse.md index 2cb2aaff1..c4f5f820b 100644 --- a/sdks/python/docs/ApiAppGetResponse.md +++ b/sdks/python/docs/ApiAppGetResponse.md @@ -5,9 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `api_app` | [```ApiAppResponse```](ApiAppResponse.md) | | | -| `warnings` | [```[WarningResponse]```](WarningResponse.md) | A list of warnings. | | +| `api_app` | [```ApiAppResponse```](ApiAppResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN A list of warnings. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/ApiAppListResponse.md b/sdks/python/docs/ApiAppListResponse.md index 404f3d0a1..303af5dd1 100644 --- a/sdks/python/docs/ApiAppListResponse.md +++ b/sdks/python/docs/ApiAppListResponse.md @@ -5,10 +5,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `api_apps` | [```[ApiAppResponse]```](ApiAppResponse.md) | Contains information about API Apps. | | -| `list_info` | [```ListInfoResponse```](ListInfoResponse.md) | | | -| `warnings` | [```[WarningResponse]```](WarningResponse.md) | A list of warnings. | | +| `api_apps` | [```List[ApiAppResponse]```](ApiAppResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN Contains information about API Apps. REPLACE_ME_WITH_DESCRIPTION_END | | +| `list_info` | [```ListInfoResponse```](ListInfoResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN A list of warnings. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/ApiAppResponse.md b/sdks/python/docs/ApiAppResponse.md index 997438c06..f743acea6 100644 --- a/sdks/python/docs/ApiAppResponse.md +++ b/sdks/python/docs/ApiAppResponse.md @@ -5,17 +5,16 @@ Contains information about an API App. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `callback_url` | ```str, none_type``` | The app's callback URL (for events) | | -| `client_id` | ```str``` | The app's client id | | -| `created_at` | ```int``` | The time that the app was created | | -| `domains` | ```[str]``` | The domain name(s) associated with the app | | -| `name` | ```str``` | The name of the app | | -| `is_approved` | ```bool``` | Boolean to indicate if the app has been approved | | -| `oauth` | [```ApiAppResponseOAuth```](ApiAppResponseOAuth.md) | | | -| `options` | [```ApiAppResponseOptions```](ApiAppResponseOptions.md) | | | -| `owner_account` | [```ApiAppResponseOwnerAccount```](ApiAppResponseOwnerAccount.md) | | | -| `white_labeling_options` | [```ApiAppResponseWhiteLabelingOptions```](ApiAppResponseWhiteLabelingOptions.md) | | | +| `callback_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The app's callback URL (for events) REPLACE_ME_WITH_DESCRIPTION_END | | +| `client_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The app's client id REPLACE_ME_WITH_DESCRIPTION_END | | +| `created_at` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The time that the app was created REPLACE_ME_WITH_DESCRIPTION_END | | +| `domains` | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The domain name(s) associated with the app REPLACE_ME_WITH_DESCRIPTION_END | | +| `name` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The name of the app REPLACE_ME_WITH_DESCRIPTION_END | | +| `is_approved` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Boolean to indicate if the app has been approved REPLACE_ME_WITH_DESCRIPTION_END | | +| `oauth` | [```ApiAppResponseOAuth```](ApiAppResponseOAuth.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `options` | [```ApiAppResponseOptions```](ApiAppResponseOptions.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `owner_account` | [```ApiAppResponseOwnerAccount```](ApiAppResponseOwnerAccount.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `white_labeling_options` | [```ApiAppResponseWhiteLabelingOptions```](ApiAppResponseWhiteLabelingOptions.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/ApiAppResponseOAuth.md b/sdks/python/docs/ApiAppResponseOAuth.md index 4c3826de1..a2d7eb5c0 100644 --- a/sdks/python/docs/ApiAppResponseOAuth.md +++ b/sdks/python/docs/ApiAppResponseOAuth.md @@ -5,11 +5,10 @@ An object describing the app's OAuth properties, or null if OAuth is not con ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `callback_url` | ```str``` | The app's OAuth callback URL. | | -| `secret` | ```str``` | The app's OAuth secret, or null if the app does not belong to user. | | -| `scopes` | ```[str]``` | Array of OAuth scopes used by the app. | | -| `charges_users` | ```bool``` | Boolean indicating whether the app owner or the account granting permission is billed for OAuth requests. | | +| `callback_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The app's OAuth callback URL. REPLACE_ME_WITH_DESCRIPTION_END | | +| `secret` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The app's OAuth secret, or null if the app does not belong to user. REPLACE_ME_WITH_DESCRIPTION_END | | +| `scopes` | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Array of OAuth scopes used by the app. REPLACE_ME_WITH_DESCRIPTION_END | | +| `charges_users` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Boolean indicating whether the app owner or the account granting permission is billed for OAuth requests. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/ApiAppResponseOptions.md b/sdks/python/docs/ApiAppResponseOptions.md index a96d6de0b..310b0b043 100644 --- a/sdks/python/docs/ApiAppResponseOptions.md +++ b/sdks/python/docs/ApiAppResponseOptions.md @@ -5,8 +5,7 @@ An object with options that override account settings. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `can_insert_everywhere` | ```bool``` | Boolean denoting if signers can "Insert Everywhere" in one click while signing a document | | +| `can_insert_everywhere` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Boolean denoting if signers can "Insert Everywhere" in one click while signing a document REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/ApiAppResponseOwnerAccount.md b/sdks/python/docs/ApiAppResponseOwnerAccount.md index b1cd337a1..d1489fb24 100644 --- a/sdks/python/docs/ApiAppResponseOwnerAccount.md +++ b/sdks/python/docs/ApiAppResponseOwnerAccount.md @@ -5,9 +5,8 @@ An object describing the app's owner ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `account_id` | ```str``` | The owner account's ID | | -| `email_address` | ```str``` | The owner account's email address | | +| `account_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The owner account's ID REPLACE_ME_WITH_DESCRIPTION_END | | +| `email_address` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The owner account's email address REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/ApiAppResponseWhiteLabelingOptions.md b/sdks/python/docs/ApiAppResponseWhiteLabelingOptions.md index ae742c2e9..aedcbe8d5 100644 --- a/sdks/python/docs/ApiAppResponseWhiteLabelingOptions.md +++ b/sdks/python/docs/ApiAppResponseWhiteLabelingOptions.md @@ -5,21 +5,20 @@ An object with options to customize the app's signer page ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `header_background_color` | ```str``` | | | -| `legal_version` | ```str``` | | | -| `link_color` | ```str``` | | | -| `page_background_color` | ```str``` | | | -| `primary_button_color` | ```str``` | | | -| `primary_button_color_hover` | ```str``` | | | -| `primary_button_text_color` | ```str``` | | | -| `primary_button_text_color_hover` | ```str``` | | | -| `secondary_button_color` | ```str``` | | | -| `secondary_button_color_hover` | ```str``` | | | -| `secondary_button_text_color` | ```str``` | | | -| `secondary_button_text_color_hover` | ```str``` | | | -| `text_color1` | ```str``` | | | -| `text_color2` | ```str``` | | | +| `header_background_color` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `legal_version` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `link_color` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `page_background_color` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `primary_button_color` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `primary_button_color_hover` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `primary_button_text_color` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `primary_button_text_color_hover` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `secondary_button_color` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `secondary_button_color_hover` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `secondary_button_text_color` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `secondary_button_text_color_hover` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `text_color1` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `text_color2` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/ApiAppUpdateRequest.md b/sdks/python/docs/ApiAppUpdateRequest.md index 87cb951a2..6da6c39fd 100644 --- a/sdks/python/docs/ApiAppUpdateRequest.md +++ b/sdks/python/docs/ApiAppUpdateRequest.md @@ -5,14 +5,13 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `callback_url` | ```str``` | The URL at which the API App should receive event callbacks. | | -| `custom_logo_file` | ```file_type``` | An image file to use as a custom logo in embedded contexts. (Only applies to some API plans) | | -| `domains` | ```[str]``` | The domain names the ApiApp will be associated with. | | -| `name` | ```str``` | The name you want to assign to the ApiApp. | | -| `oauth` | [```SubOAuth```](SubOAuth.md) | | | -| `options` | [```SubOptions```](SubOptions.md) | | | -| `white_labeling_options` | [```SubWhiteLabelingOptions```](SubWhiteLabelingOptions.md) | | | +| `callback_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The URL at which the API App should receive event callbacks. REPLACE_ME_WITH_DESCRIPTION_END | | +| `custom_logo_file` | ```io.IOBase``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN An image file to use as a custom logo in embedded contexts. (Only applies to some API plans) REPLACE_ME_WITH_DESCRIPTION_END | | +| `domains` | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The domain names the ApiApp will be associated with. REPLACE_ME_WITH_DESCRIPTION_END | | +| `name` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The name you want to assign to the ApiApp. REPLACE_ME_WITH_DESCRIPTION_END | | +| `oauth` | [```SubOAuth```](SubOAuth.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `options` | [```SubOptions```](SubOptions.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `white_labeling_options` | [```SubWhiteLabelingOptions```](SubWhiteLabelingOptions.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/BulkSendJobApi.md b/sdks/python/docs/BulkSendJobApi.md index 8261fc114..b7bb9ce17 100644 --- a/sdks/python/docs/BulkSendJobApi.md +++ b/sdks/python/docs/BulkSendJobApi.md @@ -21,39 +21,16 @@ Returns the status of the BulkSendJob and its SignatureRequests specified by the * Bearer (JWT) Authentication (oauth2): ```python -from pprint import pprint - -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", -) - -with ApiClient(configuration) as api_client: - bulk_send_job_api = apis.BulkSendJobApi(api_client) - - bulk_send_job_id = "6e683bc0369ba3d5b6f43c2c22a8031dbf6bd174" - - try: - response = bulk_send_job_api.bulk_send_job_get(bulk_send_job_id) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) - +REPLACE_ME_WITH_EXAMPLE_FOR__bulk_send_job_get_Python_CODE +``` ``` - ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | `bulk_send_job_id` | **str** | The id of the BulkSendJob to retrieve. | | -| `page` | **int** | Which page number of the BulkSendJob list to return. Defaults to `1`. | [optional][default to 1] | -| `page_size` | **int** | Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. | [optional][default to 20] | +| `page` | **int** | Which page number of the BulkSendJob list to return. Defaults to `1`. | [optional][default to 1] | +| `page_size` | **int** | Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. | [optional][default to 20] | ### Return type @@ -68,7 +45,6 @@ with ApiClient(configuration) as api_client: - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -91,42 +67,15 @@ Returns a list of BulkSendJob that you can access. * Bearer (JWT) Authentication (oauth2): ```python -from pprint import pprint - -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", -) - -with ApiClient(configuration) as api_client: - bulk_send_job_api = apis.BulkSendJobApi(api_client) - - page = 1 - page_size = 20 - - try: - response = bulk_send_job_api.bulk_send_job_list( - page=page, - page_size=page_size, - ) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) - +REPLACE_ME_WITH_EXAMPLE_FOR__bulk_send_job_list_Python_CODE +``` ``` - ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| `page` | **int** | Which page number of the BulkSendJob List to return. Defaults to `1`. | [optional][default to 1] | -| `page_size` | **int** | Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. | [optional][default to 20] | +| `page` | **int** | Which page number of the BulkSendJob List to return. Defaults to `1`. | [optional][default to 1] | +| `page_size` | **int** | Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. | [optional][default to 20] | ### Return type @@ -141,7 +90,6 @@ with ApiClient(configuration) as api_client: - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | diff --git a/sdks/python/docs/BulkSendJobGetResponse.md b/sdks/python/docs/BulkSendJobGetResponse.md index 768a59569..adf3db231 100644 --- a/sdks/python/docs/BulkSendJobGetResponse.md +++ b/sdks/python/docs/BulkSendJobGetResponse.md @@ -5,11 +5,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `bulk_send_job` | [```BulkSendJobResponse```](BulkSendJobResponse.md) | | | -| `list_info` | [```ListInfoResponse```](ListInfoResponse.md) | | | -| `signature_requests` | [```[BulkSendJobGetResponseSignatureRequests]```](BulkSendJobGetResponseSignatureRequests.md) | Contains information about the Signature Requests sent in bulk. | | -| `warnings` | [```[WarningResponse]```](WarningResponse.md) | A list of warnings. | | +| `bulk_send_job` | [```BulkSendJobResponse```](BulkSendJobResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `list_info` | [```ListInfoResponse```](ListInfoResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `signature_requests` | [```List[BulkSendJobGetResponseSignatureRequests]```](BulkSendJobGetResponseSignatureRequests.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN Contains information about the Signature Requests sent in bulk. REPLACE_ME_WITH_DESCRIPTION_END | | +| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN A list of warnings. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/BulkSendJobGetResponseSignatureRequests.md b/sdks/python/docs/BulkSendJobGetResponseSignatureRequests.md index ba65e5452..1385b1a88 100644 --- a/sdks/python/docs/BulkSendJobGetResponseSignatureRequests.md +++ b/sdks/python/docs/BulkSendJobGetResponseSignatureRequests.md @@ -5,32 +5,34 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `test_mode` | ```bool, none_type``` | Whether this is a test signature request. Test requests have no legal value. Defaults to `false`. | [default to False] | -| `signature_request_id` | ```str``` | The id of the SignatureRequest. | | -| `requester_email_address` | ```str``` | The email address of the initiator of the SignatureRequest. | | -| `title` | ```str``` | The title the specified Account uses for the SignatureRequest. | | -| `original_title` | ```str``` | Default Label for account. | | -| `subject` | ```str, none_type``` | The subject in the email that was initially sent to the signers. | | -| `message` | ```str, none_type``` | The custom message in the email that was initially sent to the signers. | | -| `metadata` | [```{str: (bool, date, datetime, dict, float, int, list, str, none_type)}```](.md) | The metadata attached to the signature request. | | -| `created_at` | ```int``` | Time the signature request was created. | | -| `expires_at` | ```int``` | 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` | ```bool``` | Whether or not the SignatureRequest has been fully executed by all signers. | | -| `is_declined` | ```bool``` | Whether or not the SignatureRequest has been declined by a signer. | | -| `has_error` | ```bool``` | Whether or not an error occurred (either during the creation of the SignatureRequest or during one of the signings). | | -| `files_url` | ```str``` | The URL where a copy of the request's documents can be downloaded. | | -| `signing_url` | ```str, none_type``` | 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` | ```str``` | The URL where the requester and the signers can view the current status of the SignatureRequest. | | -| `cc_email_addresses` | ```[str]``` | 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` | ```str, none_type``` | The URL you want the signer redirected to after they successfully sign. | | -| `final_copy_uri` | ```str, none_type``` | The path where the completed document can be downloaded | | -| `template_ids` | ```[str], none_type``` | Templates IDs used in this SignatureRequest (if any). | | -| `custom_fields` | [```[SignatureRequestResponseCustomFieldBase], none_type```](SignatureRequestResponseCustomFieldBase.md) | An array of Custom Field objects containing the name and type of each custom field.

* Text Field uses `SignatureRequestResponseCustomFieldText`
* Checkbox Field uses `SignatureRequestResponseCustomFieldCheckbox` | | -| `attachments` | [```[SignatureRequestResponseAttachment], none_type```](SignatureRequestResponseAttachment.md) | Signer attachments. | | -| `response_data` | [```[SignatureRequestResponseDataBase], none_type```](SignatureRequestResponseDataBase.md) | An array of form field objects containing the name, value, and type of each textbox or checkmark field filled in by the signers. | | -| `signatures` | [```[SignatureRequestResponseSignatures]```](SignatureRequestResponseSignatures.md) | An array of signature objects, 1 for each signer. | | -| `bulk_send_job_id` | ```str``` | The id of the BulkSendJob. | | +| `test_mode` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Whether this is a test signature request. Test requests have no legal value. Defaults to `false`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `signature_request_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The id of the SignatureRequest. REPLACE_ME_WITH_DESCRIPTION_END | | +| `requester_email_address` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The email address of the initiator of the SignatureRequest. REPLACE_ME_WITH_DESCRIPTION_END | | +| `title` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The title the specified Account uses for the SignatureRequest. REPLACE_ME_WITH_DESCRIPTION_END | | +| `original_title` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Default Label for account. REPLACE_ME_WITH_DESCRIPTION_END | | +| `subject` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The subject in the email that was initially sent to the signers. REPLACE_ME_WITH_DESCRIPTION_END | | +| `message` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The custom message in the email that was initially sent to the signers. REPLACE_ME_WITH_DESCRIPTION_END | | +| `metadata` | ```object``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The metadata attached to the signature request. REPLACE_ME_WITH_DESCRIPTION_END | | +| `created_at` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Time the signature request was created. REPLACE_ME_WITH_DESCRIPTION_END | | +| `expires_at` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `is_complete` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Whether or not the SignatureRequest has been fully executed by all signers. REPLACE_ME_WITH_DESCRIPTION_END | | +| `is_declined` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Whether or not the SignatureRequest has been declined by a signer. REPLACE_ME_WITH_DESCRIPTION_END | | +| `has_error` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Whether or not an error occurred (either during the creation of the SignatureRequest or during one of the signings). REPLACE_ME_WITH_DESCRIPTION_END | | +| `files_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The URL where a copy of the request's documents can be downloaded. REPLACE_ME_WITH_DESCRIPTION_END | | +| `signing_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `details_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The URL where the requester and the signers can view the current status of the SignatureRequest. REPLACE_ME_WITH_DESCRIPTION_END | | +| `cc_email_addresses` | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `signing_redirect_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The URL you want the signer redirected to after they successfully sign. REPLACE_ME_WITH_DESCRIPTION_END | | +| `final_copy_uri` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The path where the completed document can be downloaded REPLACE_ME_WITH_DESCRIPTION_END | | +| `template_ids` | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Templates IDs used in this SignatureRequest (if any). REPLACE_ME_WITH_DESCRIPTION_END | | +| `custom_fields` | [```List[SignatureRequestResponseCustomFieldBase]```](SignatureRequestResponseCustomFieldBase.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN An array of Custom Field objects containing the name and type of each custom field. -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) +* Text Field uses `SignatureRequestResponseCustomFieldText` +* Checkbox Field uses `SignatureRequestResponseCustomFieldCheckbox` REPLACE_ME_WITH_DESCRIPTION_END | | +| `attachments` | [```List[SignatureRequestResponseAttachment]```](SignatureRequestResponseAttachment.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN Signer attachments. REPLACE_ME_WITH_DESCRIPTION_END | | +| `response_data` | [```List[SignatureRequestResponseDataBase]```](SignatureRequestResponseDataBase.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN An array of form field objects containing the name, value, and type of each textbox or checkmark field filled in by the signers. REPLACE_ME_WITH_DESCRIPTION_END | | +| `signatures` | [```List[SignatureRequestResponseSignatures]```](SignatureRequestResponseSignatures.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN An array of signature objects, 1 for each signer. REPLACE_ME_WITH_DESCRIPTION_END | | +| `bulk_send_job_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The id of the BulkSendJob. REPLACE_ME_WITH_DESCRIPTION_END | | +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/BulkSendJobListResponse.md b/sdks/python/docs/BulkSendJobListResponse.md index b86184543..edf262218 100644 --- a/sdks/python/docs/BulkSendJobListResponse.md +++ b/sdks/python/docs/BulkSendJobListResponse.md @@ -5,10 +5,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `bulk_send_jobs` | [```[BulkSendJobResponse]```](BulkSendJobResponse.md) | Contains a list of BulkSendJobs that the API caller has access to. | | -| `list_info` | [```ListInfoResponse```](ListInfoResponse.md) | | | -| `warnings` | [```[WarningResponse]```](WarningResponse.md) | A list of warnings. | | +| `bulk_send_jobs` | [```List[BulkSendJobResponse]```](BulkSendJobResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN Contains a list of BulkSendJobs that the API caller has access to. REPLACE_ME_WITH_DESCRIPTION_END | | +| `list_info` | [```ListInfoResponse```](ListInfoResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN A list of warnings. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/BulkSendJobResponse.md b/sdks/python/docs/BulkSendJobResponse.md index 2ec321e73..d922a8bf4 100644 --- a/sdks/python/docs/BulkSendJobResponse.md +++ b/sdks/python/docs/BulkSendJobResponse.md @@ -5,11 +5,10 @@ Contains information about the BulkSendJob such as when it was created and how m ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `bulk_send_job_id` | ```str, none_type``` | The id of the BulkSendJob. | | -| `total` | ```int``` | The total amount of Signature Requests queued for sending. | | -| `is_creator` | ```bool``` | True if you are the owner of this BulkSendJob, false if it's been shared with you by a team member. | | -| `created_at` | ```int``` | Time that the BulkSendJob was created. | | +| `bulk_send_job_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The id of the BulkSendJob. REPLACE_ME_WITH_DESCRIPTION_END | | +| `total` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The total amount of Signature Requests queued for sending. REPLACE_ME_WITH_DESCRIPTION_END | | +| `is_creator` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN True if you are the owner of this BulkSendJob, false if it's been shared with you by a team member. REPLACE_ME_WITH_DESCRIPTION_END | | +| `created_at` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Time that the BulkSendJob was created. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/BulkSendJobSendResponse.md b/sdks/python/docs/BulkSendJobSendResponse.md index fe59dabb1..a2f3f8a63 100644 --- a/sdks/python/docs/BulkSendJobSendResponse.md +++ b/sdks/python/docs/BulkSendJobSendResponse.md @@ -5,9 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `bulk_send_job` | [```BulkSendJobResponse```](BulkSendJobResponse.md) | | | -| `warnings` | [```[WarningResponse]```](WarningResponse.md) | A list of warnings. | | +| `bulk_send_job` | [```BulkSendJobResponse```](BulkSendJobResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN A list of warnings. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/EmbeddedApi.md b/sdks/python/docs/EmbeddedApi.md index cd283f8e9..337b5fb9f 100644 --- a/sdks/python/docs/EmbeddedApi.md +++ b/sdks/python/docs/EmbeddedApi.md @@ -21,37 +21,9 @@ Retrieves an embedded object containing a template url that can be opened in an * Bearer (JWT) Authentication (oauth2): ```python -from pprint import pprint - -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", -) - -with ApiClient(configuration) as api_client: - embedded_api = apis.EmbeddedApi(api_client) - - data = models.EmbeddedEditUrlRequest( - cc_roles=[""], - merge_fields=[], - ) - - template_id = "5de8179668f2033afac48da1868d0093bf133266" - - try: - response = embedded_api.embedded_edit_url(template_id, data) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) - +REPLACE_ME_WITH_EXAMPLE_FOR__embedded_edit_url_Python_CODE +``` ``` - ### Parameters | Name | Type | Description | Notes | @@ -72,7 +44,6 @@ with ApiClient(configuration) as api_client: - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -95,32 +66,9 @@ Retrieves an embedded object containing a signature url that can be opened in an * Bearer (JWT) Authentication (oauth2): ```python -from pprint import pprint - -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", -) - -with ApiClient(configuration) as api_client: - embedded_api = apis.EmbeddedApi(api_client) - - signature_id = "50e3542f738adfa7ddd4cbd4c00d2a8ab6e4194b" - - try: - response = embedded_api.embedded_sign_url(signature_id) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) - +REPLACE_ME_WITH_EXAMPLE_FOR__embedded_sign_url_Python_CODE +``` ``` - ### Parameters | Name | Type | Description | Notes | @@ -140,7 +88,6 @@ with ApiClient(configuration) as api_client: - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | diff --git a/sdks/python/docs/EmbeddedEditUrlRequest.md b/sdks/python/docs/EmbeddedEditUrlRequest.md index 454c90ea3..9dd8bbf9d 100644 --- a/sdks/python/docs/EmbeddedEditUrlRequest.md +++ b/sdks/python/docs/EmbeddedEditUrlRequest.md @@ -5,17 +5,20 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `allow_edit_ccs` | ```bool``` | This allows the requester to enable/disable to add or change CC roles when editing the template. | [default to False] | -| `cc_roles` | ```[str]``` | 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` | [```SubEditorOptions```](SubEditorOptions.md) | | | -| `force_signer_roles` | ```bool``` | Provide users the ability to review/edit the template signer roles. | [default to False] | -| `force_subject_message` | ```bool``` | Provide users the ability to review/edit the template subject and message. | [default to False] | -| `merge_fields` | [```[SubMergeField]```](SubMergeField.md) | 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` | ```bool``` | 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). | [default to False] | -| `show_preview` | ```bool``` | This allows the requester to enable the editor/preview experience. | [default to False] | -| `show_progress_stepper` | ```bool``` | When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. | [default to True] | -| `test_mode` | ```bool``` | Whether this is a test, locked templates will only be available for editing if this is set to `true`. Defaults to `false`. | [default to False] | +| `allow_edit_ccs` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN This allows the requester to enable/disable to add or change CC roles when editing the template. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `cc_roles` | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `editor_options` | [```SubEditorOptions```](SubEditorOptions.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `force_signer_roles` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Provide users the ability to review/edit the template signer roles. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `force_subject_message` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Provide users the ability to review/edit the template subject and message. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `merge_fields` | [```List[SubMergeField]```](SubMergeField.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) +Remove all merge fields on the template by passing an empty array `[]`. REPLACE_ME_WITH_DESCRIPTION_END | | +| `preview_only` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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). REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `show_preview` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN This allows the requester to enable the editor/preview experience. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `show_progress_stepper` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. REPLACE_ME_WITH_DESCRIPTION_END | [default to True] | +| `test_mode` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Whether this is a test, locked templates will only be available for editing if this is set to `true`. Defaults to `false`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/EmbeddedEditUrlResponse.md b/sdks/python/docs/EmbeddedEditUrlResponse.md index 6a71db633..13d551570 100644 --- a/sdks/python/docs/EmbeddedEditUrlResponse.md +++ b/sdks/python/docs/EmbeddedEditUrlResponse.md @@ -5,9 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `embedded` | [```EmbeddedEditUrlResponseEmbedded```](EmbeddedEditUrlResponseEmbedded.md) | | | -| `warnings` | [```[WarningResponse]```](WarningResponse.md) | A list of warnings. | | +| `embedded` | [```EmbeddedEditUrlResponseEmbedded```](EmbeddedEditUrlResponseEmbedded.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN A list of warnings. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/EmbeddedEditUrlResponseEmbedded.md b/sdks/python/docs/EmbeddedEditUrlResponseEmbedded.md index f5e819aa7..be6313a2d 100644 --- a/sdks/python/docs/EmbeddedEditUrlResponseEmbedded.md +++ b/sdks/python/docs/EmbeddedEditUrlResponseEmbedded.md @@ -5,9 +5,8 @@ An embedded template object. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `edit_url` | ```str``` | A template url that can be opened in an iFrame. | | -| `expires_at` | ```int``` | The specific time that the the `edit_url` link expires, in epoch. | | +| `edit_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN A template url that can be opened in an iFrame. REPLACE_ME_WITH_DESCRIPTION_END | | +| `expires_at` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The specific time that the the `edit_url` link expires, in epoch. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/EmbeddedSignUrlResponse.md b/sdks/python/docs/EmbeddedSignUrlResponse.md index c6952cc14..0d21e9ee1 100644 --- a/sdks/python/docs/EmbeddedSignUrlResponse.md +++ b/sdks/python/docs/EmbeddedSignUrlResponse.md @@ -5,9 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `embedded` | [```EmbeddedSignUrlResponseEmbedded```](EmbeddedSignUrlResponseEmbedded.md) | | | -| `warnings` | [```[WarningResponse]```](WarningResponse.md) | A list of warnings. | | +| `embedded` | [```EmbeddedSignUrlResponseEmbedded```](EmbeddedSignUrlResponseEmbedded.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN A list of warnings. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/EmbeddedSignUrlResponseEmbedded.md b/sdks/python/docs/EmbeddedSignUrlResponseEmbedded.md index bf6fdbdae..134106f63 100644 --- a/sdks/python/docs/EmbeddedSignUrlResponseEmbedded.md +++ b/sdks/python/docs/EmbeddedSignUrlResponseEmbedded.md @@ -5,9 +5,8 @@ An object that contains necessary information to set up embedded signing. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `sign_url` | ```str``` | A signature url that can be opened in an iFrame. | | -| `expires_at` | ```int``` | The specific time that the the `sign_url` link expires, in epoch. | | +| `sign_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN A signature url that can be opened in an iFrame. REPLACE_ME_WITH_DESCRIPTION_END | | +| `expires_at` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The specific time that the the `sign_url` link expires, in epoch. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/ErrorResponse.md b/sdks/python/docs/ErrorResponse.md index 2f15b49a0..2d83e0395 100644 --- a/sdks/python/docs/ErrorResponse.md +++ b/sdks/python/docs/ErrorResponse.md @@ -5,8 +5,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `error`*_required_ | [```ErrorResponseError```](ErrorResponseError.md) | | | +| `error`*_required_ | [```ErrorResponseError```](ErrorResponseError.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/ErrorResponseError.md b/sdks/python/docs/ErrorResponseError.md index f6052d69f..223b65a0a 100644 --- a/sdks/python/docs/ErrorResponseError.md +++ b/sdks/python/docs/ErrorResponseError.md @@ -5,10 +5,9 @@ Contains information about an error that occurred. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `error_msg`*_required_ | ```str``` | Message describing an error. | | -| `error_name`*_required_ | ```str``` | Name of the error. | | -| `error_path` | ```str``` | Path at which an error occurred. | | +| `error_msg`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Message describing an error. REPLACE_ME_WITH_DESCRIPTION_END | | +| `error_name`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Name of the error. REPLACE_ME_WITH_DESCRIPTION_END | | +| `error_path` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Path at which an error occurred. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/EventCallbackRequest.md b/sdks/python/docs/EventCallbackRequest.md index dd9655bf1..30a3bf363 100644 --- a/sdks/python/docs/EventCallbackRequest.md +++ b/sdks/python/docs/EventCallbackRequest.md @@ -5,11 +5,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `event`*_required_ | [```EventCallbackRequestEvent```](EventCallbackRequestEvent.md) | | | -| `account` | [```AccountResponse```](AccountResponse.md) | | | -| `signature_request` | [```SignatureRequestResponse```](SignatureRequestResponse.md) | | | -| `template` | [```TemplateResponse```](TemplateResponse.md) | | | +| `event`*_required_ | [```EventCallbackRequestEvent```](EventCallbackRequestEvent.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `account` | [```AccountResponse```](AccountResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `signature_request` | [```SignatureRequestResponse```](SignatureRequestResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `template` | [```TemplateResponse```](TemplateResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/EventCallbackRequestEvent.md b/sdks/python/docs/EventCallbackRequestEvent.md index 2675bbf3c..c66e35d29 100644 --- a/sdks/python/docs/EventCallbackRequestEvent.md +++ b/sdks/python/docs/EventCallbackRequestEvent.md @@ -5,11 +5,10 @@ Basic information about the event that occurred. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `event_time`*_required_ | ```str``` | Time the event was created (using Unix time). | | -| `event_type`*_required_ | ```str``` | Type of callback event that was triggered. | | -| `event_hash`*_required_ | ```str``` | Generated hash used to verify source of event data. | | -| `event_metadata` | [```EventCallbackRequestEventMetadata```](EventCallbackRequestEventMetadata.md) | | | +| `event_time`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Time the event was created (using Unix time). REPLACE_ME_WITH_DESCRIPTION_END | | +| `event_type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Type of callback event that was triggered. REPLACE_ME_WITH_DESCRIPTION_END | | +| `event_hash`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Generated hash used to verify source of event data. REPLACE_ME_WITH_DESCRIPTION_END | | +| `event_metadata` | [```EventCallbackRequestEventMetadata```](EventCallbackRequestEventMetadata.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/EventCallbackRequestEventMetadata.md b/sdks/python/docs/EventCallbackRequestEventMetadata.md index dc1fecc80..76eecb15c 100644 --- a/sdks/python/docs/EventCallbackRequestEventMetadata.md +++ b/sdks/python/docs/EventCallbackRequestEventMetadata.md @@ -5,11 +5,10 @@ Specific metadata about the event. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `related_signature_id` | ```str, none_type``` | Signature ID for a specific signer. Applicable to `signature_request_signed` and `signature_request_viewed` events. | | -| `reported_for_account_id` | ```str, none_type``` | Account ID the event was reported for. | | -| `reported_for_app_id` | ```str, none_type``` | App ID the event was reported for. | | -| `event_message` | ```str, none_type``` | Message about a declined or failed (due to error) signature flow. | | +| `related_signature_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Signature ID for a specific signer. Applicable to `signature_request_signed` and `signature_request_viewed` events. REPLACE_ME_WITH_DESCRIPTION_END | | +| `reported_for_account_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Account ID the event was reported for. REPLACE_ME_WITH_DESCRIPTION_END | | +| `reported_for_app_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN App ID the event was reported for. REPLACE_ME_WITH_DESCRIPTION_END | | +| `event_message` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Message about a declined or failed (due to error) signature flow. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/FaxLineAddUserRequest.md b/sdks/python/docs/FaxLineAddUserRequest.md index 53cee4e69..e49c8a970 100644 --- a/sdks/python/docs/FaxLineAddUserRequest.md +++ b/sdks/python/docs/FaxLineAddUserRequest.md @@ -5,10 +5,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `number`*_required_ | ```str``` | The Fax Line number. | | -| `account_id` | ```str``` | Account ID | | -| `email_address` | ```str``` | Email address | | +| `number`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The Fax Line number. REPLACE_ME_WITH_DESCRIPTION_END | | +| `account_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Account ID REPLACE_ME_WITH_DESCRIPTION_END | | +| `email_address` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Email address REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/FaxLineApi.md b/sdks/python/docs/FaxLineApi.md index 5c6f20a4e..a05c47a2d 100644 --- a/sdks/python/docs/FaxLineApi.md +++ b/sdks/python/docs/FaxLineApi.md @@ -25,32 +25,9 @@ Grants a user access to the specified Fax Line. * Basic Authentication (api_key): ```python -from pprint import pprint - -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", -) - -with ApiClient(configuration) as api_client: - fax_line_api = apis.FaxLineApi(api_client) - - data = models.FaxLineAddUserRequest( - number="[FAX_NUMBER]", - email_address="member@dropboxsign.com", - ) - - try: - response = fax_line_api.fax_line_add_user(data) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) - +REPLACE_ME_WITH_EXAMPLE_FOR__fax_line_add_user_Python_CODE +``` ``` - ### Parameters | Name | Type | Description | Notes | @@ -70,7 +47,6 @@ with ApiClient(configuration) as api_client: - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -92,27 +68,9 @@ Returns a response with the area codes available for a given state/provice and c * Basic Authentication (api_key): ```python -from pprint import pprint - -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", -) - -with ApiClient(configuration) as api_client: - fax_line_api = apis.FaxLineApi(api_client) - - try: - response = fax_line_api.fax_line_area_code_get("US", "CA") - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) - +REPLACE_ME_WITH_EXAMPLE_FOR__fax_line_area_code_get_Python_CODE +``` ``` - ### Parameters | Name | Type | Description | Notes | @@ -135,7 +93,6 @@ with ApiClient(configuration) as api_client: - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -157,32 +114,9 @@ Purchases a new Fax Line. * Basic Authentication (api_key): ```python -from pprint import pprint - -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", -) - -with ApiClient(configuration) as api_client: - fax_line_api = apis.FaxLineApi(api_client) - - data = models.FaxLineCreateRequest( - area_code=209, - country="US", - ) - - try: - response = fax_line_api.fax_line_create(data) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) - +REPLACE_ME_WITH_EXAMPLE_FOR__fax_line_create_Python_CODE +``` ``` - ### Parameters | Name | Type | Description | Notes | @@ -202,7 +136,6 @@ with ApiClient(configuration) as api_client: - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -224,30 +157,9 @@ Deletes the specified Fax Line from the subscription. * Basic Authentication (api_key): ```python -from pprint import pprint - -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", -) - -with ApiClient(configuration) as api_client: - fax_line_api = apis.FaxLineApi(api_client) - - data = models.FaxLineDeleteRequest( - number="[FAX_NUMBER]", - ) - - try: - fax_line_api.fax_line_delete(data) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) - +REPLACE_ME_WITH_EXAMPLE_FOR__fax_line_delete_Python_CODE +``` ``` - ### Parameters | Name | Type | Description | Notes | @@ -267,7 +179,6 @@ void (empty response body) - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -289,27 +200,9 @@ Returns the properties and settings of a Fax Line. * Basic Authentication (api_key): ```python -from pprint import pprint - -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", -) - -with ApiClient(configuration) as api_client: - fax_line_api = apis.FaxLineApi(api_client) - - try: - response = fax_line_api.fax_line_get("[FAX_NUMBER]") - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) - +REPLACE_ME_WITH_EXAMPLE_FOR__fax_line_get_Python_CODE +``` ``` - ### Parameters | Name | Type | Description | Notes | @@ -329,7 +222,6 @@ with ApiClient(configuration) as api_client: - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -351,27 +243,9 @@ Returns the properties and settings of multiple Fax Lines. * Basic Authentication (api_key): ```python -from pprint import pprint - -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", -) - -with ApiClient(configuration) as api_client: - fax_line_api = apis.FaxLineApi(api_client) - - try: - response = fax_line_api.fax_line_list() - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) - +REPLACE_ME_WITH_EXAMPLE_FOR__fax_line_list_Python_CODE +``` ``` - ### Parameters | Name | Type | Description | Notes | @@ -394,7 +268,6 @@ with ApiClient(configuration) as api_client: - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -416,32 +289,9 @@ Removes a user's access to the specified Fax Line. * Basic Authentication (api_key): ```python -from pprint import pprint - -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", -) - -with ApiClient(configuration) as api_client: - fax_line_api = apis.FaxLineApi(api_client) - - data = models.FaxLineRemoveUserRequest( - number="[FAX_NUMBER]", - email_address="member@dropboxsign.com", - ) - - try: - response = fax_line_api.fax_line_remove_user(data) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) - +REPLACE_ME_WITH_EXAMPLE_FOR__fax_line_remove_user_Python_CODE +``` ``` - ### Parameters | Name | Type | Description | Notes | @@ -461,7 +311,6 @@ with ApiClient(configuration) as api_client: - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | diff --git a/sdks/python/docs/FaxLineAreaCodeGetCountryEnum.md b/sdks/python/docs/FaxLineAreaCodeGetCountryEnum.md index 3bb66b2db..6ad763ece 100644 --- a/sdks/python/docs/FaxLineAreaCodeGetCountryEnum.md +++ b/sdks/python/docs/FaxLineAreaCodeGetCountryEnum.md @@ -8,4 +8,3 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/FaxLineAreaCodeGetProvinceEnum.md b/sdks/python/docs/FaxLineAreaCodeGetProvinceEnum.md index a5d0565be..71e241199 100644 --- a/sdks/python/docs/FaxLineAreaCodeGetProvinceEnum.md +++ b/sdks/python/docs/FaxLineAreaCodeGetProvinceEnum.md @@ -8,4 +8,3 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/FaxLineAreaCodeGetResponse.md b/sdks/python/docs/FaxLineAreaCodeGetResponse.md index e46fcc0ba..f881053ae 100644 --- a/sdks/python/docs/FaxLineAreaCodeGetResponse.md +++ b/sdks/python/docs/FaxLineAreaCodeGetResponse.md @@ -5,8 +5,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `area_codes` | ```[int]``` | | | +| `area_codes` | ```List[int]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/FaxLineAreaCodeGetStateEnum.md b/sdks/python/docs/FaxLineAreaCodeGetStateEnum.md index 36b555f0d..d62ba3abc 100644 --- a/sdks/python/docs/FaxLineAreaCodeGetStateEnum.md +++ b/sdks/python/docs/FaxLineAreaCodeGetStateEnum.md @@ -8,4 +8,3 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/FaxLineCreateRequest.md b/sdks/python/docs/FaxLineCreateRequest.md index 50f318c5b..aab4ff06c 100644 --- a/sdks/python/docs/FaxLineCreateRequest.md +++ b/sdks/python/docs/FaxLineCreateRequest.md @@ -5,11 +5,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `area_code`*_required_ | ```int``` | Area code | | -| `country`*_required_ | ```str``` | Country | | -| `city` | ```str``` | City | | -| `account_id` | ```str``` | Account ID | | +| `area_code`*_required_ | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Area code REPLACE_ME_WITH_DESCRIPTION_END | | +| `country`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Country REPLACE_ME_WITH_DESCRIPTION_END | | +| `city` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN City REPLACE_ME_WITH_DESCRIPTION_END | | +| `account_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Account ID REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/FaxLineDeleteRequest.md b/sdks/python/docs/FaxLineDeleteRequest.md index 3dbaec9ec..bf5c5bf38 100644 --- a/sdks/python/docs/FaxLineDeleteRequest.md +++ b/sdks/python/docs/FaxLineDeleteRequest.md @@ -5,8 +5,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `number`*_required_ | ```str``` | The Fax Line number. | | +| `number`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The Fax Line number. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/FaxLineListResponse.md b/sdks/python/docs/FaxLineListResponse.md index b3ad6fe32..78b1bfc60 100644 --- a/sdks/python/docs/FaxLineListResponse.md +++ b/sdks/python/docs/FaxLineListResponse.md @@ -5,10 +5,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `list_info` | [```ListInfoResponse```](ListInfoResponse.md) | | | -| `fax_lines` | [```[FaxLineResponseFaxLine]```](FaxLineResponseFaxLine.md) | | | -| `warnings` | [```WarningResponse```](WarningResponse.md) | | | +| `list_info` | [```ListInfoResponse```](ListInfoResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `fax_lines` | [```List[FaxLineResponseFaxLine]```](FaxLineResponseFaxLine.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `warnings` | [```WarningResponse```](WarningResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/FaxLineRemoveUserRequest.md b/sdks/python/docs/FaxLineRemoveUserRequest.md index 353510868..c69532c76 100644 --- a/sdks/python/docs/FaxLineRemoveUserRequest.md +++ b/sdks/python/docs/FaxLineRemoveUserRequest.md @@ -5,10 +5,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `number`*_required_ | ```str``` | The Fax Line number. | | -| `account_id` | ```str``` | Account ID | | -| `email_address` | ```str``` | Email address | | +| `number`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The Fax Line number. REPLACE_ME_WITH_DESCRIPTION_END | | +| `account_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Account ID REPLACE_ME_WITH_DESCRIPTION_END | | +| `email_address` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Email address REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/FaxLineResponse.md b/sdks/python/docs/FaxLineResponse.md index fdc65102e..ef0874ca9 100644 --- a/sdks/python/docs/FaxLineResponse.md +++ b/sdks/python/docs/FaxLineResponse.md @@ -5,9 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `fax_line` | [```FaxLineResponseFaxLine```](FaxLineResponseFaxLine.md) | | | -| `warnings` | [```WarningResponse```](WarningResponse.md) | | | +| `fax_line` | [```FaxLineResponseFaxLine```](FaxLineResponseFaxLine.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `warnings` | [```WarningResponse```](WarningResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/FaxLineResponseFaxLine.md b/sdks/python/docs/FaxLineResponseFaxLine.md index 6c06de280..b3d76c7c0 100644 --- a/sdks/python/docs/FaxLineResponseFaxLine.md +++ b/sdks/python/docs/FaxLineResponseFaxLine.md @@ -5,11 +5,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `number` | ```str``` | Number | | -| `created_at` | ```int``` | Created at | | -| `updated_at` | ```int``` | Updated at | | -| `accounts` | [```[AccountResponse]```](AccountResponse.md) | | | +| `number` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Number REPLACE_ME_WITH_DESCRIPTION_END | | +| `created_at` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Created at REPLACE_ME_WITH_DESCRIPTION_END | | +| `updated_at` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Updated at REPLACE_ME_WITH_DESCRIPTION_END | | +| `accounts` | [```List[AccountResponse]```](AccountResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/FileResponse.md b/sdks/python/docs/FileResponse.md index c15596412..24158f94e 100644 --- a/sdks/python/docs/FileResponse.md +++ b/sdks/python/docs/FileResponse.md @@ -5,9 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `file_url` | ```str``` | URL to the file. | | -| `expires_at` | ```int``` | When the link expires. | | +| `file_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN URL to the file. REPLACE_ME_WITH_DESCRIPTION_END | | +| `expires_at` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN When the link expires. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/FileResponseDataUri.md b/sdks/python/docs/FileResponseDataUri.md index 4ba4524cf..921e877b5 100644 --- a/sdks/python/docs/FileResponseDataUri.md +++ b/sdks/python/docs/FileResponseDataUri.md @@ -5,8 +5,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `data_uri` | ```str``` | File as base64 encoded string. | | +| `data_uri` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN File as base64 encoded string. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/ListInfoResponse.md b/sdks/python/docs/ListInfoResponse.md index 6be140f3b..63b99b7ee 100644 --- a/sdks/python/docs/ListInfoResponse.md +++ b/sdks/python/docs/ListInfoResponse.md @@ -5,11 +5,10 @@ Contains pagination information about the data returned. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `num_pages` | ```int``` | Total number of pages available. | | -| `num_results` | ```int, none_type``` | Total number of objects available. | | -| `page` | ```int``` | Number of the page being returned. | | -| `page_size` | ```int``` | Objects returned per page. | | +| `num_pages` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Total number of pages available. REPLACE_ME_WITH_DESCRIPTION_END | | +| `num_results` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Total number of objects available. REPLACE_ME_WITH_DESCRIPTION_END | | +| `page` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Number of the page being returned. REPLACE_ME_WITH_DESCRIPTION_END | | +| `page_size` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Objects returned per page. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/OAuthApi.md b/sdks/python/docs/OAuthApi.md index f02abe866..994bb00af 100644 --- a/sdks/python/docs/OAuthApi.md +++ b/sdks/python/docs/OAuthApi.md @@ -19,31 +19,9 @@ 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 - -configuration = Configuration() - -with ApiClient(configuration) as api_client: - api = apis.OAuthApi(api_client) - - data = models.OAuthTokenGenerateRequest( - state="900e06e2", - code="1b0d28d90c86c141", - client_id="cc91c61d00f8bb2ece1428035716b", - client_secret="1d14434088507ffa390e6f5528465", - ) - - try: - response = oauth_api.oauth_token_generate(data) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) - +REPLACE_ME_WITH_EXAMPLE_FOR__oauth_token_generate_Python_CODE +``` ``` - ### Parameters | Name | Type | Description | Notes | @@ -63,7 +41,6 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -83,28 +60,9 @@ 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 - -configuration = Configuration() - -with ApiClient(configuration) as api_client: - api = apis.OAuthApi(api_client) - - data = models.OAuthTokenRefreshRequest( - refresh_token="hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3", - ) - - try: - response = oauth_api.oauth_token_refresh(data) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) - +REPLACE_ME_WITH_EXAMPLE_FOR__oauth_token_refresh_Python_CODE +``` ``` - ### Parameters | Name | Type | Description | Notes | @@ -124,7 +82,6 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | diff --git a/sdks/python/docs/OAuthTokenGenerateRequest.md b/sdks/python/docs/OAuthTokenGenerateRequest.md index bd6c69e7e..21a5cc4a0 100644 --- a/sdks/python/docs/OAuthTokenGenerateRequest.md +++ b/sdks/python/docs/OAuthTokenGenerateRequest.md @@ -5,12 +5,11 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `client_id`*_required_ | ```str``` | The client id of the app requesting authorization. | | -| `client_secret`*_required_ | ```str``` | The secret token of your app. | | -| `code`*_required_ | ```str``` | The code passed to your callback when the user granted access. | | -| `grant_type`*_required_ | ```str``` | When generating a new token use `authorization_code`. | [default to "authorization_code"] | -| `state`*_required_ | ```str``` | Same as the state you specified earlier. | | +| `client_id`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The client id of the app requesting authorization. REPLACE_ME_WITH_DESCRIPTION_END | | +| `client_secret`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The secret token of your app. REPLACE_ME_WITH_DESCRIPTION_END | | +| `code`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The code passed to your callback when the user granted access. REPLACE_ME_WITH_DESCRIPTION_END | | +| `grant_type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN When generating a new token use `authorization_code`. REPLACE_ME_WITH_DESCRIPTION_END | [default to 'authorization_code'] | +| `state`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Same as the state you specified earlier. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/OAuthTokenRefreshRequest.md b/sdks/python/docs/OAuthTokenRefreshRequest.md index 792117aab..df66b0276 100644 --- a/sdks/python/docs/OAuthTokenRefreshRequest.md +++ b/sdks/python/docs/OAuthTokenRefreshRequest.md @@ -5,9 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `grant_type`*_required_ | ```str``` | When refreshing an existing token use `refresh_token`. | [default to "refresh_token"] | -| `refresh_token`*_required_ | ```str``` | The token provided when you got the expired access token. | | +| `grant_type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN When refreshing an existing token use `refresh_token`. REPLACE_ME_WITH_DESCRIPTION_END | [default to 'refresh_token'] | +| `refresh_token`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The token provided when you got the expired access token. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/OAuthTokenResponse.md b/sdks/python/docs/OAuthTokenResponse.md index d4713fbec..b80d15d1f 100644 --- a/sdks/python/docs/OAuthTokenResponse.md +++ b/sdks/python/docs/OAuthTokenResponse.md @@ -5,12 +5,11 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `access_token` | ```str``` | | | -| `token_type` | ```str``` | | | -| `refresh_token` | ```str``` | | | -| `expires_in` | ```int``` | Number of seconds until the `access_token` expires. Uses epoch time. | | -| `state` | ```str, none_type``` | | | +| `access_token` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `token_type` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `refresh_token` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `expires_in` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Number of seconds until the `access_token` expires. Uses epoch time. REPLACE_ME_WITH_DESCRIPTION_END | | +| `state` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/ReportApi.md b/sdks/python/docs/ReportApi.md index fb246462f..d2e7d3707 100644 --- a/sdks/python/docs/ReportApi.md +++ b/sdks/python/docs/ReportApi.md @@ -19,36 +19,9 @@ Request the creation of one or more report(s). When the report(s) have been gen * Basic Authentication (api_key): ```python -from pprint import pprint - -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", -) - -with ApiClient(configuration) as api_client: - report_api = apis.ReportApi(api_client) - - data = models.ReportCreateRequest( - start_date="09/01/2020", - end_date="09/01/2020", - report_type=["user_activity" "document_status"], - ) - - try: - response = report_api.report_create(data) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) - +REPLACE_ME_WITH_EXAMPLE_FOR__report_create_Python_CODE +``` ``` - ### Parameters | Name | Type | Description | Notes | @@ -68,7 +41,6 @@ with ApiClient(configuration) as api_client: - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | diff --git a/sdks/python/docs/ReportCreateRequest.md b/sdks/python/docs/ReportCreateRequest.md index 56105d062..405668b23 100644 --- a/sdks/python/docs/ReportCreateRequest.md +++ b/sdks/python/docs/ReportCreateRequest.md @@ -5,10 +5,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `end_date`*_required_ | ```str``` | The (inclusive) end date for the report data in `MM/DD/YYYY` format. | | -| `report_type`*_required_ | ```[str]``` | 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`*_required_ | ```str``` | The (inclusive) start date for the report data in `MM/DD/YYYY` format. | | +| `end_date`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The (inclusive) end date for the report data in `MM/DD/YYYY` format. REPLACE_ME_WITH_DESCRIPTION_END | | +| `report_type`*_required_ | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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). REPLACE_ME_WITH_DESCRIPTION_END | | +| `start_date`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The (inclusive) start date for the report data in `MM/DD/YYYY` format. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/ReportCreateResponse.md b/sdks/python/docs/ReportCreateResponse.md index fbc387eed..b3d92790c 100644 --- a/sdks/python/docs/ReportCreateResponse.md +++ b/sdks/python/docs/ReportCreateResponse.md @@ -5,9 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `report` | [```ReportResponse```](ReportResponse.md) | | | -| `warnings` | [```[WarningResponse]```](WarningResponse.md) | A list of warnings. | | +| `report` | [```ReportResponse```](ReportResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN A list of warnings. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/ReportResponse.md b/sdks/python/docs/ReportResponse.md index baeb76509..15a93931c 100644 --- a/sdks/python/docs/ReportResponse.md +++ b/sdks/python/docs/ReportResponse.md @@ -5,11 +5,10 @@ Contains information about the report request. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `success` | ```str``` | A message indicating the requested operation's success | | -| `start_date` | ```str``` | The (inclusive) start date for the report data in MM/DD/YYYY format. | | -| `end_date` | ```str``` | The (inclusive) end date for the report data in MM/DD/YYYY format. | | -| `report_type` | ```[str]``` | 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). | | +| `success` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN A message indicating the requested operation's success REPLACE_ME_WITH_DESCRIPTION_END | | +| `start_date` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The (inclusive) start date for the report data in MM/DD/YYYY format. REPLACE_ME_WITH_DESCRIPTION_END | | +| `end_date` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The (inclusive) end date for the report data in MM/DD/YYYY format. REPLACE_ME_WITH_DESCRIPTION_END | | +| `report_type` | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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). REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/SignatureRequestApi.md b/sdks/python/docs/SignatureRequestApi.md index fb10d73d6..db98ff7f9 100644 --- a/sdks/python/docs/SignatureRequestApi.md +++ b/sdks/python/docs/SignatureRequestApi.md @@ -34,79 +34,9 @@ Creates BulkSendJob which sends up to 250 SignatureRequests in bulk based off of * Basic Authentication (api_key): ```python -from pprint import pprint - -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", -) - -with ApiClient(configuration) as api_client: - signature_request_api = apis.SignatureRequestApi(api_client) - - signer_list_1_signer = models.SubSignatureRequestTemplateSigner( - role="Client", - name="George", - email_address="george@example.com", - pin="d79a3td", - ) - - signer_list_1_custom_fields = models.SubBulkSignerListCustomField( - name="company", - value="ABC Corp", - ) - - signer_list_1 = models.SubBulkSignerList( - signers=[signer_list_1_signer], - custom_fields=[signer_list_1_custom_fields], - ) - - signer_list_2_signer = models.SubSignatureRequestTemplateSigner( - role="Client", - name="Mary", - email_address="mary@example.com", - pin="gd9as5b", - ) - - signer_list_2_custom_fields = models.SubBulkSignerListCustomField( - name="company", - value="123 LLC", - ) - - signer_list_2 = models.SubBulkSignerList( - signers=[signer_list_2_signer], - custom_fields=[signer_list_2_custom_fields], - ) - - cc_1 = models.SubCC( - role="Accounting", - email_address="accounting@example.com", - ) - - data = models.SignatureRequestBulkCreateEmbeddedWithTemplateRequest( - client_id="1a659d9ad95bccd307ecad78d72192f8", - template_ids=["c26b8a16784a872da37ea946b9ddec7c1e11dff6"], - subject="Purchase Order", - message="Glad we could come to an agreement.", - signer_list=[signer_list_1, signer_list_2], - ccs=[cc_1], - test_mode=True, - ) - - try: - 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) - +REPLACE_ME_WITH_EXAMPLE_FOR__signature_request_bulk_create_embedded_with_template_Python_CODE +``` ``` - ### Parameters | Name | Type | Description | Notes | @@ -126,7 +56,6 @@ with ApiClient(configuration) as api_client: - **Content-Type**: application/json, multipart/form-data - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -149,78 +78,9 @@ Creates BulkSendJob which sends up to 250 SignatureRequests in bulk based off of * Bearer (JWT) Authentication (oauth2): ```python -from pprint import pprint - -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", -) - -with ApiClient(configuration) as api_client: - signature_request_api = apis.SignatureRequestApi(api_client) - - signer_list_1_signer = models.SubSignatureRequestTemplateSigner( - role="Client", - name="George", - email_address="george@example.com", - pin="d79a3td", - ) - - signer_list_1_custom_fields = models.SubBulkSignerListCustomField( - name="company", - value="ABC Corp", - ) - - signer_list_1 = models.SubBulkSignerList( - signers=[signer_list_1_signer], - custom_fields=[signer_list_1_custom_fields], - ) - - signer_list_2_signer = models.SubSignatureRequestTemplateSigner( - role="Client", - name="Mary", - email_address="mary@example.com", - pin="gd9as5b", - ) - - signer_list_2_custom_fields = models.SubBulkSignerListCustomField( - name="company", - value="123 LLC", - ) - - signer_list_2 = models.SubBulkSignerList( - signers=[signer_list_2_signer], - custom_fields=[signer_list_2_custom_fields], - ) - - cc_1 = models.SubCC( - role="Accounting", - email_address="accounting@example.com", - ) - - data = models.SignatureRequestBulkSendWithTemplateRequest( - template_ids=["c26b8a16784a872da37ea946b9ddec7c1e11dff6"], - subject="Purchase Order", - message="Glad we could come to an agreement.", - signer_list=[signer_list_1, signer_list_2], - ccs=[cc_1], - test_mode=True, - ) - - try: - response = signature_request_api.signature_request_bulk_send_with_template(data) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) - +REPLACE_ME_WITH_EXAMPLE_FOR__signature_request_bulk_send_with_template_Python_CODE +``` ``` - ### Parameters | Name | Type | Description | Notes | @@ -240,7 +100,6 @@ with ApiClient(configuration) as api_client: - **Content-Type**: application/json, multipart/form-data - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -263,29 +122,9 @@ Cancels an incomplete signature request. This action is **not reversible**. The * Bearer (JWT) Authentication (oauth2): ```python -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", -) - -with ApiClient(configuration) as api_client: - signature_request_api = apis.SignatureRequestApi(api_client) - - signature_request_id = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f" - - try: - signature_request_api.signature_request_cancel(signature_request_id) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) - +REPLACE_ME_WITH_EXAMPLE_FOR__signature_request_cancel_Python_CODE +``` ``` - ### Parameters | Name | Type | Description | Notes | @@ -305,7 +144,6 @@ void (empty response body) - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -328,62 +166,9 @@ Creates a new SignatureRequest with the submitted documents to be signed in an e * Bearer (JWT) Authentication (oauth2): ```python -from pprint import pprint - -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", -) - -with ApiClient(configuration) as api_client: - signature_request_api = apis.SignatureRequestApi(api_client) - - signer_1 = models.SubSignatureRequestSigner( - email_address="jack@example.com", - name="Jack", - order=0, - ) - - signer_2 = models.SubSignatureRequestSigner( - email_address="jill@example.com", - name="Jill", - order=1, - ) - - signing_options = models.SubSigningOptions( - draw=True, - type=True, - upload=True, - phone=True, - default_type="draw", - ) - - data = models.SignatureRequestCreateEmbeddedRequest( - client_id="ec64a202072370a737edf4a0eb7f4437", - title="NDA with Acme Co.", - subject="The NDA we talked about", - message="Please sign this NDA and then we can discuss more. Let me know if you have any questions.", - signers=[signer_1, signer_2], - cc_email_addresses=["lawyer1@dropboxsign.com", "lawyer2@dropboxsign.com"], - files=[open("example_signature_request.pdf", "rb")], - signing_options=signing_options, - test_mode=True, - ) - - try: - response = signature_request_api.signature_request_create_embedded(data) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) - +REPLACE_ME_WITH_EXAMPLE_FOR__signature_request_create_embedded_Python_CODE +``` ``` - ### Parameters | Name | Type | Description | Notes | @@ -403,7 +188,6 @@ with ApiClient(configuration) as api_client: - **Content-Type**: application/json, multipart/form-data - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -426,54 +210,9 @@ Creates a new SignatureRequest based on the given Template(s) to be signed in an * Bearer (JWT) Authentication (oauth2): ```python -from pprint import pprint - -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", -) - -with ApiClient(configuration) as api_client: - signature_request_api = apis.SignatureRequestApi(api_client) - - signer_1 = models.SubSignatureRequestTemplateSigner( - role="Client", - email_address="jack@example.com", - name="Jack", - ) - - signing_options = models.SubSigningOptions( - draw=True, - type=True, - upload=True, - phone=True, - default_type="draw", - ) - - data = models.SignatureRequestCreateEmbeddedWithTemplateRequest( - client_id="ec64a202072370a737edf4a0eb7f4437", - template_ids=["c26b8a16784a872da37ea946b9ddec7c1e11dff6"], - subject="Purchase Order", - message="Glad we could come to an agreement.", - signers=[signer_1], - signing_options=signing_options, - test_mode=True, - ) - - try: - 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) - +REPLACE_ME_WITH_EXAMPLE_FOR__signature_request_create_embedded_with_template_Python_CODE +``` ``` - ### Parameters | Name | Type | Description | Notes | @@ -493,7 +232,6 @@ with ApiClient(configuration) as api_client: - **Content-Type**: application/json, multipart/form-data - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -504,7 +242,7 @@ with ApiClient(configuration) as api_client: [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # ```signature_request_files``` -> ```file_type signature_request_files(signature_request_id)``` +> ```io.IOBase signature_request_files(signature_request_id)``` Download Files @@ -516,42 +254,19 @@ Obtain a copy of the current documents specified by the `signature_request_id` p * Bearer (JWT) Authentication (oauth2): ```python -from pprint import pprint - -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", -) - -with ApiClient(configuration) as api_client: - signature_request_api = apis.SignatureRequestApi(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()) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) - +REPLACE_ME_WITH_EXAMPLE_FOR__signature_request_files_Python_CODE +``` ``` - ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | `signature_request_id` | **str** | The id of the SignatureRequest to retrieve. | | -| `file_type` | **str** | Set to `pdf` for a single merged document or `zip` for a collection of individual documents. | [optional][default to "pdf"] | +| `file_type` | **str** | Set to `pdf` for a single merged document or `zip` for a collection of individual documents. | [optional][default to pdf] | ### Return type -**file_type** +**io.IOBase** ### Authorization @@ -562,7 +277,6 @@ with ApiClient(configuration) as api_client: - **Content-Type**: Not defined - **Accept**: application/pdf, application/zip, application/json - ### HTTP response details | Status code | Description | Response headers | @@ -585,32 +299,9 @@ Obtain a copy of the current documents specified by the `signature_request_id` p * Bearer (JWT) Authentication (oauth2): ```python -from pprint import pprint - -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", -) - -with ApiClient(configuration) as api_client: - signature_request_api = apis.SignatureRequestApi(api_client) - - signature_request_id = "fa5c8a0b0f492d768749333ad6fcc214c111e967" - - try: - 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) - +REPLACE_ME_WITH_EXAMPLE_FOR__signature_request_files_as_data_uri_Python_CODE +``` ``` - ### Parameters | Name | Type | Description | Notes | @@ -630,7 +321,6 @@ with ApiClient(configuration) as api_client: - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -653,38 +343,15 @@ Obtain a copy of the current documents specified by the `signature_request_id` p * Bearer (JWT) Authentication (oauth2): ```python -from pprint import pprint - -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", -) - -with ApiClient(configuration) as api_client: - signature_request_api = apis.SignatureRequestApi(api_client) - - signature_request_id = "fa5c8a0b0f492d768749333ad6fcc214c111e967" - - try: - 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) - +REPLACE_ME_WITH_EXAMPLE_FOR__signature_request_files_as_file_url_Python_CODE +``` ``` - ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | `signature_request_id` | **str** | The id of the SignatureRequest to retrieve. | | -| `force_download` | **int** | 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. | [optional][default to 1] | +| `force_download` | **int** | 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. | [optional][default to 1] | ### Return type @@ -699,7 +366,6 @@ with ApiClient(configuration) as api_client: - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -722,32 +388,9 @@ Returns the status of the SignatureRequest specified by the `signature_request_i * Bearer (JWT) Authentication (oauth2): ```python -from pprint import pprint - -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", -) - -with ApiClient(configuration) as api_client: - signature_request_api = apis.SignatureRequestApi(api_client) - - signature_request_id = "fa5c8a0b0f492d768749333ad6fcc214c111e967" - - try: - response = signature_request_api.signature_request_get(signature_request_id) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) - +REPLACE_ME_WITH_EXAMPLE_FOR__signature_request_get_Python_CODE +``` ``` - ### Parameters | Name | Type | Description | Notes | @@ -767,7 +410,6 @@ with ApiClient(configuration) as api_client: - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -790,43 +432,16 @@ Returns a list of SignatureRequests that you can access. This includes Signature * Bearer (JWT) Authentication (oauth2): ```python -from pprint import pprint - -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", -) - -with ApiClient(configuration) as api_client: - signature_request_api = apis.SignatureRequestApi(api_client) - - account_id = None - page = 1 - - try: - response = signature_request_api.signature_request_list( - account_id=account_id, - page=page, - ) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) - +REPLACE_ME_WITH_EXAMPLE_FOR__signature_request_list_Python_CODE +``` ``` - ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| `account_id` | **str** | Which account to return SignatureRequests for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. | [optional] | -| `page` | **int** | Which page number of the SignatureRequest List to return. Defaults to `1`. | [optional][default to 1] | -| `page_size` | **int** | Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. | [optional][default to 20] | +| `account_id` | **str** | Which account to return SignatureRequests for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. | [optional] | +| `page` | **int** | Which page number of the SignatureRequest List to return. Defaults to `1`. | [optional][default to 1] | +| `page_size` | **int** | Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. | [optional][default to 20] | | `query` | **str** | String that includes search terms and/or fields to be used to filter the SignatureRequest objects. | [optional] | ### Return type @@ -842,7 +457,6 @@ with ApiClient(configuration) as api_client: - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -865,32 +479,9 @@ Releases a held SignatureRequest that was claimed and prepared from an [Unclaime * Bearer (JWT) Authentication (oauth2): ```python -from pprint import pprint - -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", -) - -with ApiClient(configuration) as api_client: - signature_request_api = apis.SignatureRequestApi(api_client) - - signature_request_id = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f" - - try: - 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) - +REPLACE_ME_WITH_EXAMPLE_FOR__signature_request_release_hold_Python_CODE +``` ``` - ### Parameters | Name | Type | Description | Notes | @@ -910,7 +501,6 @@ with ApiClient(configuration) as api_client: - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -933,36 +523,9 @@ Sends an email to the signer reminding them to sign the signature request. You c * Bearer (JWT) Authentication (oauth2): ```python -from pprint import pprint - -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", -) - -with ApiClient(configuration) as api_client: - signature_request_api = apis.SignatureRequestApi(api_client) - - data = models.SignatureRequestRemindRequest( - email_address="john@example.com", - ) - - signature_request_id = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f" - - try: - 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) - +REPLACE_ME_WITH_EXAMPLE_FOR__signature_request_remind_Python_CODE +``` ``` - ### Parameters | Name | Type | Description | Notes | @@ -983,7 +546,6 @@ with ApiClient(configuration) as api_client: - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -1005,29 +567,9 @@ 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 - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", - - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", -) - -with ApiClient(configuration) as api_client: - signature_request_api = apis.SignatureRequestApi(api_client) - - signature_request_id = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f" - - try: - signature_request_api.signature_request_remove(signature_request_id) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) - +REPLACE_ME_WITH_EXAMPLE_FOR__signature_request_remove_Python_CODE +``` ``` - ### Parameters | Name | Type | Description | Notes | @@ -1047,7 +589,6 @@ void (empty response body) - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -1058,7 +599,7 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # ```signature_request_send``` -> ```SignatureRequestGetResponse signature_request_send(signature_request_send_request)``` +> ```SignatureRequestGetResponse signature_request_send()``` Send Signature Request @@ -1070,78 +611,39 @@ Creates and sends a new SignatureRequest with the submitted documents. If `form_ * Bearer (JWT) Authentication (oauth2): ```python -from pprint import pprint - -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", -) - -with ApiClient(configuration) as api_client: - signature_request_api = apis.SignatureRequestApi(api_client) - - signer_1 = models.SubSignatureRequestSigner( - email_address="jack@example.com", - name="Jack", - order=0, - ) - - signer_2 = models.SubSignatureRequestSigner( - email_address="jill@example.com", - name="Jill", - order=1, - ) - - signing_options = models.SubSigningOptions( - draw=True, - type=True, - upload=True, - phone=True, - default_type="draw", - ) - - field_options = models.SubFieldOptions( - date_format="DD - MM - YYYY", - ) - - data = models.SignatureRequestSendRequest( - title="NDA with Acme Co.", - subject="The NDA we talked about", - message="Please sign this NDA and then we can discuss more. Let me know if you have any questions.", - signers=[signer_1, signer_2], - cc_email_addresses=[ - "lawyer1@dropboxsign.com", - "lawyer2@dropboxsign.com", - ], - files=[open("example_signature_request.pdf", "rb")], - metadata={ - "custom_id": 1234, - "custom_text": "NDA #9", - }, - signing_options=signing_options, - field_options=field_options, - test_mode=True, - ) - - try: - response = signature_request_api.signature_request_send(data) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) - +REPLACE_ME_WITH_EXAMPLE_FOR__signature_request_send_Python_CODE +``` ``` - ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| `signature_request_send_request` | [**SignatureRequestSendRequest**](SignatureRequestSendRequest.md) | | | +| `files` | **List[io.IOBase]** | Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. | [optional] | +| `file_urls` | [**List[str]**](str.md) | 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. | [optional] | +| `signers` | [**List[SubSignatureRequestSigner]**](SubSignatureRequestSigner.md) | Add Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. | [optional] | +| `grouped_signers` | [**List[SubSignatureRequestGroupedSigners]**](SubSignatureRequestGroupedSigners.md) | Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. | [optional] | +| `allow_decline` | **bool** | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [optional][default to False] | +| `allow_reassign` | **bool** | 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. | [optional][default to False] | +| `attachments` | [**List[SubAttachment]**](SubAttachment.md) | A list describing the attachments | [optional] | +| `cc_email_addresses` | [**List[str]**](str.md) | The email addresses that should be CCed. | [optional] | +| `client_id` | **str** | 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. | [optional] | +| `custom_fields` | [**List[SubCustomField]**](SubCustomField.md) | 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. | [optional] | +| `field_options` | [**SubFieldOptions**](SubFieldOptions.md) | | [optional] | +| `form_field_groups` | [**List[SubFormFieldGroup]**](SubFormFieldGroup.md) | 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`. | [optional] | +| `form_field_rules` | [**List[SubFormFieldRule]**](SubFormFieldRule.md) | Conditional Logic rules for fields defined in `form_fields_per_document`. | [optional] | +| `form_fields_per_document` | [**List[SubFormFieldsPerDocumentBase]**](SubFormFieldsPerDocumentBase.md) | 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` | [optional] | +| `hide_text_tags` | **bool** | 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. | [optional][default to False] | +| `is_qualified_signature` | **bool** | 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.<br> **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. | [optional][default to False] | +| `is_eid` | **bool** | 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.<br> **NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. | [optional][default to False] | +| `message` | **str** | The custom message in the email that will be sent to the signers. | [optional] | +| `metadata` | [**Dict[str, object]**](Dict.md) | 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. | [optional] | +| `signing_options` | [**SubSigningOptions**](SubSigningOptions.md) | | [optional] | +| `signing_redirect_url` | **str** | The URL you want signers redirected to after they successfully sign. | [optional] | +| `subject` | **str** | The subject in the email that will be sent to the signers. | [optional] | +| `test_mode` | **bool** | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [optional][default to False] | +| `title` | **str** | The title you want to assign to the SignatureRequest. | [optional] | +| `use_text_tags` | **bool** | 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`. | [optional][default to False] | +| `expires_at` | **int** | 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. | [optional] | ### Return type @@ -1153,10 +655,9 @@ with ApiClient(configuration) as api_client: ### HTTP request headers - - **Content-Type**: application/json, multipart/form-data + - **Content-Type**: multipart/form-data - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -1179,67 +680,9 @@ Creates and sends a new SignatureRequest based off of the Template(s) specified * Bearer (JWT) Authentication (oauth2): ```python -from pprint import pprint - -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", -) - -with ApiClient(configuration) as api_client: - signature_request_api = apis.SignatureRequestApi(api_client) - - signer_1 = models.SubSignatureRequestTemplateSigner( - role="Client", - email_address="george@example.com", - name="George", - ) - - cc_1 = models.SubCC( - role="Accounting", - email_address="accounting@example.com", - ) - - custom_field_1 = models.SubCustomField( - name="Cost", - value="$20,000", - editor="Client", - required=True, - ) - - signing_options = models.SubSigningOptions( - draw=True, - type=True, - upload=True, - phone=False, - default_type="draw", - ) - - data = models.SignatureRequestSendWithTemplateRequest( - template_ids=["c26b8a16784a872da37ea946b9ddec7c1e11dff6"], - subject="Purchase Order", - message="Glad we could come to an agreement.", - signers=[signer_1], - ccs=[cc_1], - custom_fields=[custom_field_1], - signing_options=signing_options, - test_mode=True, - ) - - try: - response = signature_request_api.signature_request_send_with_template(data) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) - +REPLACE_ME_WITH_EXAMPLE_FOR__signature_request_send_with_template_Python_CODE +``` ``` - ### Parameters | Name | Type | Description | Notes | @@ -1259,7 +702,6 @@ with ApiClient(configuration) as api_client: - **Content-Type**: application/json, multipart/form-data - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -1282,37 +724,9 @@ Updates the email address and/or the name for a given signer on a signature requ * Bearer (JWT) Authentication (oauth2): ```python -from pprint import pprint - -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", -) - -with ApiClient(configuration) as api_client: - signature_request_api = apis.SignatureRequestApi(api_client) - - data = models.SignatureRequestUpdateRequest( - email_address = "john@example.com", - signature_id = "78caf2a1d01cd39cea2bc1cbb340dac3", - ) - - signature_request_id = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f" - - try: - 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) - +REPLACE_ME_WITH_EXAMPLE_FOR__signature_request_update_Python_CODE +``` ``` - ### Parameters | Name | Type | Description | Notes | @@ -1333,7 +747,6 @@ with ApiClient(configuration) as api_client: - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | diff --git a/sdks/python/docs/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md b/sdks/python/docs/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md index 0eda7b475..d0a3532d8 100644 --- a/sdks/python/docs/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md +++ b/sdks/python/docs/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md @@ -5,20 +5,45 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `template_ids`*_required_ | ```[str]``` | Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. | | -| `client_id`*_required_ | ```str``` | Client id of the app you're using to create this embedded signature request. Used for security purposes. | | -| `signer_file` | ```file_type``` | `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` | [```[SubBulkSignerList]```](SubBulkSignerList.md) | `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` | ```bool``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [default to False] | -| `ccs` | [```[SubCC]```](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | | -| `custom_fields` | [```[SubCustomField]```](SubCustomField.md) | 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` | ```str``` | The custom message in the email that will be sent to the signers. | | -| `metadata` | ```{str: (bool, date, datetime, dict, float, int, list, str, none_type)}``` | 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` | ```str``` | The URL you want signers redirected to after they successfully sign. | | -| `subject` | ```str``` | The subject in the email that will be sent to the signers. | | -| `test_mode` | ```bool``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [default to False] | -| `title` | ```str``` | The title you want to assign to the SignatureRequest. | | +| `template_ids`*_required_ | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. REPLACE_ME_WITH_DESCRIPTION_END | | +| `client_id`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Client id of the app you're using to create this embedded signature request. Used for security purposes. REPLACE_ME_WITH_DESCRIPTION_END | | +| `signer_file` | ```io.IOBase``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN `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: -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) +- `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 +``` REPLACE_ME_WITH_DESCRIPTION_END | | +| `signer_list` | [```List[SubBulkSignerList]```](SubBulkSignerList.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN `signer_list` is an array defining values and options for signer fields. Required unless a `signer_file` is used, you may not use both. REPLACE_ME_WITH_DESCRIPTION_END | | +| `allow_decline` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Allows signers to decline to sign a document if `true`. Defaults to `false`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `ccs` | [```List[SubCC]```](SubCC.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN Add CC email recipients. Required when a CC role exists for the Template. REPLACE_ME_WITH_DESCRIPTION_END | | +| `custom_fields` | [```List[SubCustomField]```](SubCustomField.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `message` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The custom message in the email that will be sent to the signers. REPLACE_ME_WITH_DESCRIPTION_END | | +| `metadata` | ```Dict[str, object]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `signing_redirect_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The URL you want signers redirected to after they successfully sign. REPLACE_ME_WITH_DESCRIPTION_END | | +| `subject` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The subject in the email that will be sent to the signers. REPLACE_ME_WITH_DESCRIPTION_END | | +| `test_mode` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `title` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The title you want to assign to the SignatureRequest. REPLACE_ME_WITH_DESCRIPTION_END | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SignatureRequestBulkSendWithTemplateRequest.md b/sdks/python/docs/SignatureRequestBulkSendWithTemplateRequest.md index 64a38a765..b30c0ddbc 100644 --- a/sdks/python/docs/SignatureRequestBulkSendWithTemplateRequest.md +++ b/sdks/python/docs/SignatureRequestBulkSendWithTemplateRequest.md @@ -5,20 +5,45 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `template_ids`*_required_ | ```[str]``` | Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. | | -| `signer_file` | ```file_type``` | `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` | [```[SubBulkSignerList]```](SubBulkSignerList.md) | `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` | ```bool``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [default to False] | -| `ccs` | [```[SubCC]```](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | | -| `client_id` | ```str``` | 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` | [```[SubCustomField]```](SubCustomField.md) | 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` | ```str``` | The custom message in the email that will be sent to the signers. | | -| `metadata` | ```{str: (bool, date, datetime, dict, float, int, list, str, none_type)}``` | 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` | ```str``` | The URL you want signers redirected to after they successfully sign. | | -| `subject` | ```str``` | The subject in the email that will be sent to the signers. | | -| `test_mode` | ```bool``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [default to False] | -| `title` | ```str``` | The title you want to assign to the SignatureRequest. | | +| `template_ids`*_required_ | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. REPLACE_ME_WITH_DESCRIPTION_END | | +| `signer_file` | ```io.IOBase``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN `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: -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) +- `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 +``` REPLACE_ME_WITH_DESCRIPTION_END | | +| `signer_list` | [```List[SubBulkSignerList]```](SubBulkSignerList.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN `signer_list` is an array defining values and options for signer fields. Required unless a `signer_file` is used, you may not use both. REPLACE_ME_WITH_DESCRIPTION_END | | +| `allow_decline` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Allows signers to decline to sign a document if `true`. Defaults to `false`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `ccs` | [```List[SubCC]```](SubCC.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN Add CC email recipients. Required when a CC role exists for the Template. REPLACE_ME_WITH_DESCRIPTION_END | | +| `client_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `custom_fields` | [```List[SubCustomField]```](SubCustomField.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `message` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The custom message in the email that will be sent to the signers. REPLACE_ME_WITH_DESCRIPTION_END | | +| `metadata` | ```Dict[str, object]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `signing_redirect_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The URL you want signers redirected to after they successfully sign. REPLACE_ME_WITH_DESCRIPTION_END | | +| `subject` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The subject in the email that will be sent to the signers. REPLACE_ME_WITH_DESCRIPTION_END | | +| `test_mode` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `title` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The title you want to assign to the SignatureRequest. REPLACE_ME_WITH_DESCRIPTION_END | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SignatureRequestCreateEmbeddedRequest.md b/sdks/python/docs/SignatureRequestCreateEmbeddedRequest.md index a1ba83ff7..e567f6787 100644 --- a/sdks/python/docs/SignatureRequestCreateEmbeddedRequest.md +++ b/sdks/python/docs/SignatureRequestCreateEmbeddedRequest.md @@ -5,31 +5,63 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `client_id`*_required_ | ```str``` | Client id of the app you're using to create this embedded signature request. Used for security purposes. | | -| `files` | ```[file_type]``` | 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` | ```[str]``` | 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` | [```[SubSignatureRequestSigner]```](SubSignatureRequestSigner.md) | Add Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | | -| `grouped_signers` | [```[SubSignatureRequestGroupedSigners]```](SubSignatureRequestGroupedSigners.md) | Add Grouped Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | | -| `allow_decline` | ```bool``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [default to False] | -| `allow_reassign` | ```bool``` | Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`.

**NOTE:** Only available for Premium plan. | [default to False] | -| `attachments` | [```[SubAttachment]```](SubAttachment.md) | A list describing the attachments | | -| `cc_email_addresses` | ```[str]``` | The email addresses that should be CCed. | | -| `custom_fields` | [```[SubCustomField]```](SubCustomField.md) | 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` | [```SubFieldOptions```](SubFieldOptions.md) | | | -| `form_field_groups` | [```[SubFormFieldGroup]```](SubFormFieldGroup.md) | 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` | [```[SubFormFieldRule]```](SubFormFieldRule.md) | Conditional Logic rules for fields defined in `form_fields_per_document`. | | -| `form_fields_per_document` | [```[SubFormFieldsPerDocumentBase]```](SubFormFieldsPerDocumentBase.md) | 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` | ```bool``` | 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. | [default to False] | -| `message` | ```str``` | The custom message in the email that will be sent to the signers. | | -| `metadata` | ```{str: (bool, date, datetime, dict, float, int, list, str, none_type)}``` | 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` | [```SubSigningOptions```](SubSigningOptions.md) | | | -| `subject` | ```str``` | The subject in the email that will be sent to the signers. | | -| `test_mode` | ```bool``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [default to False] | -| `title` | ```str``` | The title you want to assign to the SignatureRequest. | | -| `use_text_tags` | ```bool``` | 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`. | [default to False] | -| `populate_auto_fill_fields` | ```bool``` | 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. | [default to False] | -| `expires_at` | ```int, none_type``` | 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. | | +| `client_id`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Client id of the app you're using to create this embedded signature request. Used for security purposes. REPLACE_ME_WITH_DESCRIPTION_END | | +| `files` | ```List[io.IOBase]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Use `files[]` to indicate the uploaded file(s) to send for signature. -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) +This endpoint requires either **files** or **file_urls[]**, but not both. REPLACE_ME_WITH_DESCRIPTION_END | | +| `file_urls` | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `signers` | [```List[SubSignatureRequestSigner]```](SubSignatureRequestSigner.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN Add Signers to your Signature Request. + +This endpoint requires either **signers** or **grouped_signers**, but not both. REPLACE_ME_WITH_DESCRIPTION_END | | +| `grouped_signers` | [```List[SubSignatureRequestGroupedSigners]```](SubSignatureRequestGroupedSigners.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN Add Grouped Signers to your Signature Request. + +This endpoint requires either **signers** or **grouped_signers**, but not both. REPLACE_ME_WITH_DESCRIPTION_END | | +| `allow_decline` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Allows signers to decline to sign a document if `true`. Defaults to `false`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `allow_reassign` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. + +**NOTE:** Only available for Premium plan. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `attachments` | [```List[SubAttachment]```](SubAttachment.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN A list describing the attachments REPLACE_ME_WITH_DESCRIPTION_END | | +| `cc_email_addresses` | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The email addresses that should be CCed. REPLACE_ME_WITH_DESCRIPTION_END | | +| `custom_fields` | [```List[SubCustomField]```](SubCustomField.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `field_options` | [```SubFieldOptions```](SubFieldOptions.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `form_field_groups` | [```List[SubFormFieldGroup]```](SubFormFieldGroup.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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`. REPLACE_ME_WITH_DESCRIPTION_END | | +| `form_field_rules` | [```List[SubFormFieldRule]```](SubFormFieldRule.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN Conditional Logic rules for fields defined in `form_fields_per_document`. REPLACE_ME_WITH_DESCRIPTION_END | | +| `form_fields_per_document` | [```List[SubFormFieldsPerDocumentBase]```](SubFormFieldsPerDocumentBase.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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` REPLACE_ME_WITH_DESCRIPTION_END | | +| `hide_text_tags` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `message` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The custom message in the email that will be sent to the signers. REPLACE_ME_WITH_DESCRIPTION_END | | +| `metadata` | ```Dict[str, object]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `signing_options` | [```SubSigningOptions```](SubSigningOptions.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `subject` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The subject in the email that will be sent to the signers. REPLACE_ME_WITH_DESCRIPTION_END | | +| `test_mode` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `title` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The title you want to assign to the SignatureRequest. REPLACE_ME_WITH_DESCRIPTION_END | | +| `use_text_tags` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `populate_auto_fill_fields` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `expires_at` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SignatureRequestCreateEmbeddedWithTemplateRequest.md b/sdks/python/docs/SignatureRequestCreateEmbeddedWithTemplateRequest.md index 51435be6c..713138540 100644 --- a/sdks/python/docs/SignatureRequestCreateEmbeddedWithTemplateRequest.md +++ b/sdks/python/docs/SignatureRequestCreateEmbeddedWithTemplateRequest.md @@ -5,22 +5,29 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `template_ids`*_required_ | ```[str]``` | Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. | | -| `client_id`*_required_ | ```str``` | Client id of the app you're using to create this embedded signature request. Used for security purposes. | | -| `signers`*_required_ | [```[SubSignatureRequestTemplateSigner]```](SubSignatureRequestTemplateSigner.md) | Add Signers to your Templated-based Signature Request. | | -| `allow_decline` | ```bool``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [default to False] | -| `ccs` | [```[SubCC]```](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | | -| `custom_fields` | [```[SubCustomField]```](SubCustomField.md) | An array defining values and options for custom fields. Required when a custom field exists in the Template. | | -| `files` | ```[file_type]``` | 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` | ```[str]``` | 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` | ```str``` | The custom message in the email that will be sent to the signers. | | -| `metadata` | ```{str: (bool, date, datetime, dict, float, int, list, str, none_type)}``` | 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` | [```SubSigningOptions```](SubSigningOptions.md) | | | -| `subject` | ```str``` | The subject in the email that will be sent to the signers. | | -| `test_mode` | ```bool``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [default to False] | -| `title` | ```str``` | The title you want to assign to the SignatureRequest. | | -| `populate_auto_fill_fields` | ```bool``` | 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. | [default to False] | +| `template_ids`*_required_ | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. REPLACE_ME_WITH_DESCRIPTION_END | | +| `client_id`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Client id of the app you're using to create this embedded signature request. Used for security purposes. REPLACE_ME_WITH_DESCRIPTION_END | | +| `signers`*_required_ | [```List[SubSignatureRequestTemplateSigner]```](SubSignatureRequestTemplateSigner.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN Add Signers to your Templated-based Signature Request. REPLACE_ME_WITH_DESCRIPTION_END | | +| `allow_decline` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Allows signers to decline to sign a document if `true`. Defaults to `false`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `ccs` | [```List[SubCC]```](SubCC.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN Add CC email recipients. Required when a CC role exists for the Template. REPLACE_ME_WITH_DESCRIPTION_END | | +| `custom_fields` | [```List[SubCustomField]```](SubCustomField.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN An array defining values and options for custom fields. Required when a custom field exists in the Template. REPLACE_ME_WITH_DESCRIPTION_END | | +| `files` | ```List[io.IOBase]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Use `files[]` to indicate the uploaded file(s) to send for signature. -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) +This endpoint requires either **files** or **file_urls[]**, but not both. REPLACE_ME_WITH_DESCRIPTION_END | | +| `file_urls` | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `message` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The custom message in the email that will be sent to the signers. REPLACE_ME_WITH_DESCRIPTION_END | | +| `metadata` | ```Dict[str, object]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `signing_options` | [```SubSigningOptions```](SubSigningOptions.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `subject` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The subject in the email that will be sent to the signers. REPLACE_ME_WITH_DESCRIPTION_END | | +| `test_mode` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `title` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The title you want to assign to the SignatureRequest. REPLACE_ME_WITH_DESCRIPTION_END | | +| `populate_auto_fill_fields` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SignatureRequestGetResponse.md b/sdks/python/docs/SignatureRequestGetResponse.md index f6ca41882..e875b19ca 100644 --- a/sdks/python/docs/SignatureRequestGetResponse.md +++ b/sdks/python/docs/SignatureRequestGetResponse.md @@ -5,9 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `signature_request` | [```SignatureRequestResponse```](SignatureRequestResponse.md) | | | -| `warnings` | [```[WarningResponse]```](WarningResponse.md) | A list of warnings. | | +| `signature_request` | [```SignatureRequestResponse```](SignatureRequestResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN A list of warnings. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/SignatureRequestListResponse.md b/sdks/python/docs/SignatureRequestListResponse.md index 6f7f4692f..d3c147281 100644 --- a/sdks/python/docs/SignatureRequestListResponse.md +++ b/sdks/python/docs/SignatureRequestListResponse.md @@ -5,10 +5,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `signature_requests` | [```[SignatureRequestResponse]```](SignatureRequestResponse.md) | Contains information about signature requests. | | -| `list_info` | [```ListInfoResponse```](ListInfoResponse.md) | | | -| `warnings` | [```[WarningResponse]```](WarningResponse.md) | A list of warnings. | | +| `signature_requests` | [```List[SignatureRequestResponse]```](SignatureRequestResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN Contains information about signature requests. REPLACE_ME_WITH_DESCRIPTION_END | | +| `list_info` | [```ListInfoResponse```](ListInfoResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN A list of warnings. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/SignatureRequestRemindRequest.md b/sdks/python/docs/SignatureRequestRemindRequest.md index eebce01ce..0a9765769 100644 --- a/sdks/python/docs/SignatureRequestRemindRequest.md +++ b/sdks/python/docs/SignatureRequestRemindRequest.md @@ -5,9 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `email_address`*_required_ | ```str``` | The email address of the signer to send a reminder to. | | -| `name` | ```str``` | The name of the signer to send a reminder to. Include if two or more signers share an email address. | | +| `email_address`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The email address of the signer to send a reminder to. REPLACE_ME_WITH_DESCRIPTION_END | | +| `name` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The name of the signer to send a reminder to. Include if two or more signers share an email address. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/SignatureRequestResponse.md b/sdks/python/docs/SignatureRequestResponse.md index 5a6594532..63099c2c5 100644 --- a/sdks/python/docs/SignatureRequestResponse.md +++ b/sdks/python/docs/SignatureRequestResponse.md @@ -5,32 +5,34 @@ Contains information about a signature request. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `test_mode` | ```bool, none_type``` | Whether this is a test signature request. Test requests have no legal value. Defaults to `false`. | [default to False] | -| `signature_request_id` | ```str``` | The id of the SignatureRequest. | | -| `requester_email_address` | ```str``` | The email address of the initiator of the SignatureRequest. | | -| `title` | ```str``` | The title the specified Account uses for the SignatureRequest. | | -| `original_title` | ```str``` | Default Label for account. | | -| `subject` | ```str, none_type``` | The subject in the email that was initially sent to the signers. | | -| `message` | ```str, none_type``` | The custom message in the email that was initially sent to the signers. | | -| `metadata` | [```{str: (bool, date, datetime, dict, float, int, list, str, none_type)}```](.md) | The metadata attached to the signature request. | | -| `created_at` | ```int``` | Time the signature request was created. | | -| `expires_at` | ```int``` | 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` | ```bool``` | Whether or not the SignatureRequest has been fully executed by all signers. | | -| `is_declined` | ```bool``` | Whether or not the SignatureRequest has been declined by a signer. | | -| `has_error` | ```bool``` | Whether or not an error occurred (either during the creation of the SignatureRequest or during one of the signings). | | -| `files_url` | ```str``` | The URL where a copy of the request's documents can be downloaded. | | -| `signing_url` | ```str, none_type``` | 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` | ```str``` | The URL where the requester and the signers can view the current status of the SignatureRequest. | | -| `cc_email_addresses` | ```[str]``` | 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` | ```str, none_type``` | The URL you want the signer redirected to after they successfully sign. | | -| `final_copy_uri` | ```str, none_type``` | The path where the completed document can be downloaded | | -| `template_ids` | ```[str], none_type``` | Templates IDs used in this SignatureRequest (if any). | | -| `custom_fields` | [```[SignatureRequestResponseCustomFieldBase], none_type```](SignatureRequestResponseCustomFieldBase.md) | An array of Custom Field objects containing the name and type of each custom field.

* Text Field uses `SignatureRequestResponseCustomFieldText`
* Checkbox Field uses `SignatureRequestResponseCustomFieldCheckbox` | | -| `attachments` | [```[SignatureRequestResponseAttachment], none_type```](SignatureRequestResponseAttachment.md) | Signer attachments. | | -| `response_data` | [```[SignatureRequestResponseDataBase], none_type```](SignatureRequestResponseDataBase.md) | An array of form field objects containing the name, value, and type of each textbox or checkmark field filled in by the signers. | | -| `signatures` | [```[SignatureRequestResponseSignatures]```](SignatureRequestResponseSignatures.md) | An array of signature objects, 1 for each signer. | | -| `bulk_send_job_id` | ```str, none_type``` | The ID of the Bulk Send job which sent the signature request, if applicable. | | +| `test_mode` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Whether this is a test signature request. Test requests have no legal value. Defaults to `false`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `signature_request_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The id of the SignatureRequest. REPLACE_ME_WITH_DESCRIPTION_END | | +| `requester_email_address` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The email address of the initiator of the SignatureRequest. REPLACE_ME_WITH_DESCRIPTION_END | | +| `title` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The title the specified Account uses for the SignatureRequest. REPLACE_ME_WITH_DESCRIPTION_END | | +| `original_title` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Default Label for account. REPLACE_ME_WITH_DESCRIPTION_END | | +| `subject` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The subject in the email that was initially sent to the signers. REPLACE_ME_WITH_DESCRIPTION_END | | +| `message` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The custom message in the email that was initially sent to the signers. REPLACE_ME_WITH_DESCRIPTION_END | | +| `metadata` | ```object``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The metadata attached to the signature request. REPLACE_ME_WITH_DESCRIPTION_END | | +| `created_at` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Time the signature request was created. REPLACE_ME_WITH_DESCRIPTION_END | | +| `expires_at` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `is_complete` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Whether or not the SignatureRequest has been fully executed by all signers. REPLACE_ME_WITH_DESCRIPTION_END | | +| `is_declined` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Whether or not the SignatureRequest has been declined by a signer. REPLACE_ME_WITH_DESCRIPTION_END | | +| `has_error` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Whether or not an error occurred (either during the creation of the SignatureRequest or during one of the signings). REPLACE_ME_WITH_DESCRIPTION_END | | +| `files_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The URL where a copy of the request's documents can be downloaded. REPLACE_ME_WITH_DESCRIPTION_END | | +| `signing_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `details_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The URL where the requester and the signers can view the current status of the SignatureRequest. REPLACE_ME_WITH_DESCRIPTION_END | | +| `cc_email_addresses` | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `signing_redirect_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The URL you want the signer redirected to after they successfully sign. REPLACE_ME_WITH_DESCRIPTION_END | | +| `final_copy_uri` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The path where the completed document can be downloaded REPLACE_ME_WITH_DESCRIPTION_END | | +| `template_ids` | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Templates IDs used in this SignatureRequest (if any). REPLACE_ME_WITH_DESCRIPTION_END | | +| `custom_fields` | [```List[SignatureRequestResponseCustomFieldBase]```](SignatureRequestResponseCustomFieldBase.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN An array of Custom Field objects containing the name and type of each custom field. -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) +* Text Field uses `SignatureRequestResponseCustomFieldText` +* Checkbox Field uses `SignatureRequestResponseCustomFieldCheckbox` REPLACE_ME_WITH_DESCRIPTION_END | | +| `attachments` | [```List[SignatureRequestResponseAttachment]```](SignatureRequestResponseAttachment.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN Signer attachments. REPLACE_ME_WITH_DESCRIPTION_END | | +| `response_data` | [```List[SignatureRequestResponseDataBase]```](SignatureRequestResponseDataBase.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN An array of form field objects containing the name, value, and type of each textbox or checkmark field filled in by the signers. REPLACE_ME_WITH_DESCRIPTION_END | | +| `signatures` | [```List[SignatureRequestResponseSignatures]```](SignatureRequestResponseSignatures.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN An array of signature objects, 1 for each signer. REPLACE_ME_WITH_DESCRIPTION_END | | +| `bulk_send_job_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The ID of the Bulk Send job which sent the signature request, if applicable. REPLACE_ME_WITH_DESCRIPTION_END | | +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SignatureRequestResponseAttachment.md b/sdks/python/docs/SignatureRequestResponseAttachment.md index 974b17a02..269135d89 100644 --- a/sdks/python/docs/SignatureRequestResponseAttachment.md +++ b/sdks/python/docs/SignatureRequestResponseAttachment.md @@ -5,13 +5,12 @@ Signer attachments. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `id`*_required_ | ```str``` | The unique ID for this attachment. | | -| `signer`*_required_ | ```str``` | The Signer this attachment is assigned to. | | -| `name`*_required_ | ```str``` | The name of this attachment. | | -| `required`*_required_ | ```bool``` | A boolean value denoting if this attachment is required. | | -| `instructions` | ```str, none_type``` | Instructions for Signer. | | -| `uploaded_at` | ```int, none_type``` | Timestamp when attachment was uploaded by Signer. | | +| `id`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The unique ID for this attachment. REPLACE_ME_WITH_DESCRIPTION_END | | +| `signer`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The Signer this attachment is assigned to. REPLACE_ME_WITH_DESCRIPTION_END | | +| `name`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The name of this attachment. REPLACE_ME_WITH_DESCRIPTION_END | | +| `required`*_required_ | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN A boolean value denoting if this attachment is required. REPLACE_ME_WITH_DESCRIPTION_END | | +| `instructions` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Instructions for Signer. REPLACE_ME_WITH_DESCRIPTION_END | | +| `uploaded_at` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Timestamp when attachment was uploaded by Signer. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/SignatureRequestResponseCustomFieldBase.md b/sdks/python/docs/SignatureRequestResponseCustomFieldBase.md index 915e6f6ed..e8a0d0d78 100644 --- a/sdks/python/docs/SignatureRequestResponseCustomFieldBase.md +++ b/sdks/python/docs/SignatureRequestResponseCustomFieldBase.md @@ -2,18 +2,17 @@ An array of Custom Field objects containing the name and type of each custom field. -* Text Field uses `SignatureRequestResponseCustomFieldText` -* Checkbox Field uses `SignatureRequestResponseCustomFieldCheckbox` +* Text Field uses `SignatureRequestResponseCustomFieldText` +* Checkbox Field uses `SignatureRequestResponseCustomFieldCheckbox` ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | The type of this Custom Field. Only 'text' and 'checkbox' are currently supported. | | -| `name`*_required_ | ```str``` | The name of the Custom Field. | | -| `required` | ```bool``` | A boolean value denoting if this field is required. | | -| `api_id` | ```str``` | The unique ID for this field. | | -| `editor` | ```str``` | The name of the Role that is able to edit this field. | | +| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The type of this Custom Field. Only 'text' and 'checkbox' are currently supported. REPLACE_ME_WITH_DESCRIPTION_END | | +| `name`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The name of the Custom Field. REPLACE_ME_WITH_DESCRIPTION_END | | +| `required` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN A boolean value denoting if this field is required. REPLACE_ME_WITH_DESCRIPTION_END | | +| `api_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The unique ID for this field. REPLACE_ME_WITH_DESCRIPTION_END | | +| `editor` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The name of the Role that is able to edit this field. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/SignatureRequestResponseCustomFieldCheckbox.md b/sdks/python/docs/SignatureRequestResponseCustomFieldCheckbox.md index 6eb81404d..049548127 100644 --- a/sdks/python/docs/SignatureRequestResponseCustomFieldCheckbox.md +++ b/sdks/python/docs/SignatureRequestResponseCustomFieldCheckbox.md @@ -1,13 +1,12 @@ # SignatureRequestResponseCustomFieldCheckbox -This class extends `SignatureRequestResponseCustomFieldBase`. +This class extends `SignatureRequestResponseCustomFieldBase`. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | The type of this Custom Field. Only 'text' and 'checkbox' are currently supported. | [default to "checkbox"] | -| `value` | ```bool``` | A true/false for checkbox fields | | +| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The type of this Custom Field. Only 'text' and 'checkbox' are currently supported. REPLACE_ME_WITH_DESCRIPTION_END | [default to 'checkbox'] | +| `value` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN A true/false for checkbox fields REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/SignatureRequestResponseCustomFieldText.md b/sdks/python/docs/SignatureRequestResponseCustomFieldText.md index c0726b3e5..a7eb596a8 100644 --- a/sdks/python/docs/SignatureRequestResponseCustomFieldText.md +++ b/sdks/python/docs/SignatureRequestResponseCustomFieldText.md @@ -1,13 +1,12 @@ # SignatureRequestResponseCustomFieldText -This class extends `SignatureRequestResponseCustomFieldBase`. +This class extends `SignatureRequestResponseCustomFieldBase`. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | The type of this Custom Field. Only 'text' and 'checkbox' are currently supported. | [default to "text"] | -| `value` | ```str``` | A text string for text fields | | +| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The type of this Custom Field. Only 'text' and 'checkbox' are currently supported. REPLACE_ME_WITH_DESCRIPTION_END | [default to 'text'] | +| `value` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN A text string for text fields REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/SignatureRequestResponseCustomFieldTypeEnum.md b/sdks/python/docs/SignatureRequestResponseCustomFieldTypeEnum.md index 644955bf8..debe8e40c 100644 --- a/sdks/python/docs/SignatureRequestResponseCustomFieldTypeEnum.md +++ b/sdks/python/docs/SignatureRequestResponseCustomFieldTypeEnum.md @@ -8,4 +8,3 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/SignatureRequestResponseDataBase.md b/sdks/python/docs/SignatureRequestResponseDataBase.md index e4bf79185..89ded3a50 100644 --- a/sdks/python/docs/SignatureRequestResponseDataBase.md +++ b/sdks/python/docs/SignatureRequestResponseDataBase.md @@ -5,12 +5,11 @@ An array of form field objects containing the name, value, and type of each text ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `api_id` | ```str``` | The unique ID for this field. | | -| `signature_id` | ```str``` | The ID of the signature to which this response is linked. | | -| `name` | ```str``` | The name of the form field. | | -| `required` | ```bool``` | A boolean value denoting if this field is required. | | -| `type` | ```str``` | | | +| `api_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The unique ID for this field. REPLACE_ME_WITH_DESCRIPTION_END | | +| `signature_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The ID of the signature to which this response is linked. REPLACE_ME_WITH_DESCRIPTION_END | | +| `name` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The name of the form field. REPLACE_ME_WITH_DESCRIPTION_END | | +| `required` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN A boolean value denoting if this field is required. REPLACE_ME_WITH_DESCRIPTION_END | | +| `type` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/SignatureRequestResponseDataTypeEnum.md b/sdks/python/docs/SignatureRequestResponseDataTypeEnum.md index af254fec0..102414ea4 100644 --- a/sdks/python/docs/SignatureRequestResponseDataTypeEnum.md +++ b/sdks/python/docs/SignatureRequestResponseDataTypeEnum.md @@ -8,4 +8,3 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/SignatureRequestResponseDataValueCheckbox.md b/sdks/python/docs/SignatureRequestResponseDataValueCheckbox.md index fcd019c94..6868b875e 100644 --- a/sdks/python/docs/SignatureRequestResponseDataValueCheckbox.md +++ b/sdks/python/docs/SignatureRequestResponseDataValueCheckbox.md @@ -5,9 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type` | ```str``` | A yes/no checkbox | [default to "checkbox"] | -| `value` | ```bool``` | The value of the form field. | | +| `type` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN A yes/no checkbox REPLACE_ME_WITH_DESCRIPTION_END | [default to 'checkbox'] | +| `value` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The value of the form field. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/SignatureRequestResponseDataValueCheckboxMerge.md b/sdks/python/docs/SignatureRequestResponseDataValueCheckboxMerge.md index 81c9ff8e2..21bde4ee1 100644 --- a/sdks/python/docs/SignatureRequestResponseDataValueCheckboxMerge.md +++ b/sdks/python/docs/SignatureRequestResponseDataValueCheckboxMerge.md @@ -5,9 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type` | ```str``` | A checkbox field that has default value set by the api | [default to "checkbox-merge"] | -| `value` | ```str``` | The value of the form field. | | +| `type` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN A checkbox field that has default value set by the api REPLACE_ME_WITH_DESCRIPTION_END | [default to 'checkbox-merge'] | +| `value` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The value of the form field. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/SignatureRequestResponseDataValueDateSigned.md b/sdks/python/docs/SignatureRequestResponseDataValueDateSigned.md index 31493c86d..32f2df435 100644 --- a/sdks/python/docs/SignatureRequestResponseDataValueDateSigned.md +++ b/sdks/python/docs/SignatureRequestResponseDataValueDateSigned.md @@ -5,9 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type` | ```str``` | A date | [default to "date_signed"] | -| `value` | ```str``` | The value of the form field. | | +| `type` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN A date REPLACE_ME_WITH_DESCRIPTION_END | [default to 'date_signed'] | +| `value` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The value of the form field. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/SignatureRequestResponseDataValueDropdown.md b/sdks/python/docs/SignatureRequestResponseDataValueDropdown.md index 52858147d..fdf509586 100644 --- a/sdks/python/docs/SignatureRequestResponseDataValueDropdown.md +++ b/sdks/python/docs/SignatureRequestResponseDataValueDropdown.md @@ -5,9 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type` | ```str``` | An input field for dropdowns | [default to "dropdown"] | -| `value` | ```str``` | The value of the form field. | | +| `type` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN An input field for dropdowns REPLACE_ME_WITH_DESCRIPTION_END | [default to 'dropdown'] | +| `value` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The value of the form field. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/SignatureRequestResponseDataValueInitials.md b/sdks/python/docs/SignatureRequestResponseDataValueInitials.md index a4104d649..01dd78c41 100644 --- a/sdks/python/docs/SignatureRequestResponseDataValueInitials.md +++ b/sdks/python/docs/SignatureRequestResponseDataValueInitials.md @@ -5,9 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type` | ```str``` | An input field for initials | [default to "initials"] | -| `value` | ```str``` | The value of the form field. | | +| `type` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN An input field for initials REPLACE_ME_WITH_DESCRIPTION_END | [default to 'initials'] | +| `value` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The value of the form field. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/SignatureRequestResponseDataValueRadio.md b/sdks/python/docs/SignatureRequestResponseDataValueRadio.md index f9771954a..0d292ba77 100644 --- a/sdks/python/docs/SignatureRequestResponseDataValueRadio.md +++ b/sdks/python/docs/SignatureRequestResponseDataValueRadio.md @@ -5,9 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type` | ```str``` | An input field for radios | [default to "radio"] | -| `value` | ```bool``` | The value of the form field. | | +| `type` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN An input field for radios REPLACE_ME_WITH_DESCRIPTION_END | [default to 'radio'] | +| `value` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The value of the form field. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/SignatureRequestResponseDataValueSignature.md b/sdks/python/docs/SignatureRequestResponseDataValueSignature.md index 78362ff2a..454863dda 100644 --- a/sdks/python/docs/SignatureRequestResponseDataValueSignature.md +++ b/sdks/python/docs/SignatureRequestResponseDataValueSignature.md @@ -5,9 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type` | ```str``` | A signature input field | [default to "signature"] | -| `value` | ```str``` | The value of the form field. | | +| `type` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN A signature input field REPLACE_ME_WITH_DESCRIPTION_END | [default to 'signature'] | +| `value` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The value of the form field. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/SignatureRequestResponseDataValueText.md b/sdks/python/docs/SignatureRequestResponseDataValueText.md index 57bf6e63b..44853f16c 100644 --- a/sdks/python/docs/SignatureRequestResponseDataValueText.md +++ b/sdks/python/docs/SignatureRequestResponseDataValueText.md @@ -5,9 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type` | ```str``` | A text input field | [default to "text"] | -| `value` | ```str``` | The value of the form field. | | +| `type` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN A text input field REPLACE_ME_WITH_DESCRIPTION_END | [default to 'text'] | +| `value` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The value of the form field. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/SignatureRequestResponseDataValueTextMerge.md b/sdks/python/docs/SignatureRequestResponseDataValueTextMerge.md index 4a785d010..ac277b55a 100644 --- a/sdks/python/docs/SignatureRequestResponseDataValueTextMerge.md +++ b/sdks/python/docs/SignatureRequestResponseDataValueTextMerge.md @@ -5,9 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type` | ```str``` | A text field that has default text set by the api | [default to "text-merge"] | -| `value` | ```str``` | The value of the form field. | | +| `type` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN A text field that has default text set by the api REPLACE_ME_WITH_DESCRIPTION_END | [default to 'text-merge'] | +| `value` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The value of the form field. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/SignatureRequestResponseSignatures.md b/sdks/python/docs/SignatureRequestResponseSignatures.md index e4b2ea246..b3fbb7886 100644 --- a/sdks/python/docs/SignatureRequestResponseSignatures.md +++ b/sdks/python/docs/SignatureRequestResponseSignatures.md @@ -5,26 +5,25 @@ An array of signature objects, 1 for each signer. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `signature_id` | ```str``` | Signature identifier. | | -| `signer_group_guid` | ```str, none_type``` | Signer Group GUID | | -| `signer_email_address` | ```str``` | The email address of the signer. | | -| `signer_name` | ```str, none_type``` | The name of the signer. | | -| `signer_role` | ```str, none_type``` | The role of the signer. | | -| `order` | ```int, none_type``` | If signer order is assigned this is the 0-based index for this signer. | | -| `status_code` | ```str``` | The current status of the signature. eg: awaiting_signature, signed, declined. | | -| `decline_reason` | ```str, none_type``` | The reason provided by the signer for declining the request. | | -| `signed_at` | ```int, none_type``` | Time that the document was signed or null. | | -| `last_viewed_at` | ```int, none_type``` | The time that the document was last viewed by this signer or null. | | -| `last_reminded_at` | ```int, none_type``` | The time the last reminder email was sent to the signer or null. | | -| `has_pin` | ```bool``` | Boolean to indicate whether this signature requires a PIN to access. | | -| `has_sms_auth` | ```bool, none_type``` | Boolean to indicate whether this signature has SMS authentication enabled. | | -| `has_sms_delivery` | ```bool, none_type``` | Boolean to indicate whether this signature has SMS delivery enabled. | | -| `sms_phone_number` | ```str, none_type``` | The SMS phone number used for authentication or signature request delivery. | | -| `reassigned_by` | ```str, none_type``` | Email address of original signer who reassigned to this signer. | | -| `reassignment_reason` | ```str, none_type``` | Reason provided by original signer who reassigned to this signer. | | -| `reassigned_from` | ```str, none_type``` | Previous signature identifier. | | -| `error` | ```str, none_type``` | Error message pertaining to this signer, or null. | | +| `signature_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Signature identifier. REPLACE_ME_WITH_DESCRIPTION_END | | +| `signer_group_guid` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Signer Group GUID REPLACE_ME_WITH_DESCRIPTION_END | | +| `signer_email_address` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The email address of the signer. REPLACE_ME_WITH_DESCRIPTION_END | | +| `signer_name` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The name of the signer. REPLACE_ME_WITH_DESCRIPTION_END | | +| `signer_role` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The role of the signer. REPLACE_ME_WITH_DESCRIPTION_END | | +| `order` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN If signer order is assigned this is the 0-based index for this signer. REPLACE_ME_WITH_DESCRIPTION_END | | +| `status_code` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The current status of the signature. eg: awaiting_signature, signed, declined. REPLACE_ME_WITH_DESCRIPTION_END | | +| `decline_reason` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The reason provided by the signer for declining the request. REPLACE_ME_WITH_DESCRIPTION_END | | +| `signed_at` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Time that the document was signed or null. REPLACE_ME_WITH_DESCRIPTION_END | | +| `last_viewed_at` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The time that the document was last viewed by this signer or null. REPLACE_ME_WITH_DESCRIPTION_END | | +| `last_reminded_at` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The time the last reminder email was sent to the signer or null. REPLACE_ME_WITH_DESCRIPTION_END | | +| `has_pin` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Boolean to indicate whether this signature requires a PIN to access. REPLACE_ME_WITH_DESCRIPTION_END | | +| `has_sms_auth` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Boolean to indicate whether this signature has SMS authentication enabled. REPLACE_ME_WITH_DESCRIPTION_END | | +| `has_sms_delivery` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Boolean to indicate whether this signature has SMS delivery enabled. REPLACE_ME_WITH_DESCRIPTION_END | | +| `sms_phone_number` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The SMS phone number used for authentication or signature request delivery. REPLACE_ME_WITH_DESCRIPTION_END | | +| `reassigned_by` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Email address of original signer who reassigned to this signer. REPLACE_ME_WITH_DESCRIPTION_END | | +| `reassignment_reason` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Reason provided by original signer who reassigned to this signer. REPLACE_ME_WITH_DESCRIPTION_END | | +| `reassigned_from` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Previous signature identifier. REPLACE_ME_WITH_DESCRIPTION_END | | +| `error` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Error message pertaining to this signer, or null. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/SignatureRequestSendRequest.md b/sdks/python/docs/SignatureRequestSendRequest.md index db84b7480..84cd5daa5 100644 --- a/sdks/python/docs/SignatureRequestSendRequest.md +++ b/sdks/python/docs/SignatureRequestSendRequest.md @@ -5,33 +5,70 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `files` | ```[file_type]``` | 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` | ```[str]``` | 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` | [```[SubSignatureRequestSigner]```](SubSignatureRequestSigner.md) | Add Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | | -| `grouped_signers` | [```[SubSignatureRequestGroupedSigners]```](SubSignatureRequestGroupedSigners.md) | Add Grouped Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | | -| `allow_decline` | ```bool``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [default to False] | -| `allow_reassign` | ```bool``` | 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. | [default to False] | -| `attachments` | [```[SubAttachment]```](SubAttachment.md) | A list describing the attachments | | -| `cc_email_addresses` | ```[str]``` | The email addresses that should be CCed. | | -| `client_id` | ```str``` | 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` | [```[SubCustomField]```](SubCustomField.md) | 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` | [```SubFieldOptions```](SubFieldOptions.md) | | | -| `form_field_groups` | [```[SubFormFieldGroup]```](SubFormFieldGroup.md) | 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` | [```[SubFormFieldRule]```](SubFormFieldRule.md) | Conditional Logic rules for fields defined in `form_fields_per_document`. | | -| `form_fields_per_document` | [```[SubFormFieldsPerDocumentBase]```](SubFormFieldsPerDocumentBase.md) | 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` | ```bool``` | 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. | [default to False] | -| `is_qualified_signature` | ```bool``` | 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.<br>
**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. | [default to False] | -| `is_eid` | ```bool``` | 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.<br>
**NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. | [default to False] | -| `message` | ```str``` | The custom message in the email that will be sent to the signers. | | -| `metadata` | ```{str: (bool, date, datetime, dict, float, int, list, str, none_type)}``` | 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` | [```SubSigningOptions```](SubSigningOptions.md) | | | -| `signing_redirect_url` | ```str``` | The URL you want signers redirected to after they successfully sign. | | -| `subject` | ```str``` | The subject in the email that will be sent to the signers. | | -| `test_mode` | ```bool``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [default to False] | -| `title` | ```str``` | The title you want to assign to the SignatureRequest. | | -| `use_text_tags` | ```bool``` | 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`. | [default to False] | -| `expires_at` | ```int, none_type``` | 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. | | +| `files` | ```List[bytearray]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Use `files[]` to indicate the uploaded file(s) to send for signature. -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) +This endpoint requires either **files** or **file_urls[]**, but not both. REPLACE_ME_WITH_DESCRIPTION_END | | +| `file_urls` | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `signers` | [```List[SubSignatureRequestSigner]```](SubSignatureRequestSigner.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN Add Signers to your Signature Request. + +This endpoint requires either **signers** or **grouped_signers**, but not both. REPLACE_ME_WITH_DESCRIPTION_END | | +| `grouped_signers` | [```List[SubSignatureRequestGroupedSigners]```](SubSignatureRequestGroupedSigners.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN Add Grouped Signers to your Signature Request. + +This endpoint requires either **signers** or **grouped_signers**, but not both. REPLACE_ME_WITH_DESCRIPTION_END | | +| `allow_decline` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Allows signers to decline to sign a document if `true`. Defaults to `false`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `allow_reassign` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `attachments` | [```List[SubAttachment]```](SubAttachment.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN A list describing the attachments REPLACE_ME_WITH_DESCRIPTION_END | | +| `cc_email_addresses` | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The email addresses that should be CCed. REPLACE_ME_WITH_DESCRIPTION_END | | +| `client_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `custom_fields` | [```List[SubCustomField]```](SubCustomField.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `field_options` | [```SubFieldOptions```](SubFieldOptions.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `form_field_groups` | [```List[SubFormFieldGroup]```](SubFormFieldGroup.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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`. REPLACE_ME_WITH_DESCRIPTION_END | | +| `form_field_rules` | [```List[SubFormFieldRule]```](SubFormFieldRule.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN Conditional Logic rules for fields defined in `form_fields_per_document`. REPLACE_ME_WITH_DESCRIPTION_END | | +| `form_fields_per_document` | [```List[SubFormFieldsPerDocumentBase]```](SubFormFieldsPerDocumentBase.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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` REPLACE_ME_WITH_DESCRIPTION_END | | +| `hide_text_tags` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `is_qualified_signature` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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.<br> +**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. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `is_eid` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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.<br> +**NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `message` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The custom message in the email that will be sent to the signers. REPLACE_ME_WITH_DESCRIPTION_END | | +| `metadata` | ```Dict[str, object]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `signing_options` | [```SubSigningOptions```](SubSigningOptions.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `signing_redirect_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The URL you want signers redirected to after they successfully sign. REPLACE_ME_WITH_DESCRIPTION_END | | +| `subject` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The subject in the email that will be sent to the signers. REPLACE_ME_WITH_DESCRIPTION_END | | +| `test_mode` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `title` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The title you want to assign to the SignatureRequest. REPLACE_ME_WITH_DESCRIPTION_END | | +| `use_text_tags` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `expires_at` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SignatureRequestSendWithTemplateRequest.md b/sdks/python/docs/SignatureRequestSendWithTemplateRequest.md index e392361a7..186fc5171 100644 --- a/sdks/python/docs/SignatureRequestSendWithTemplateRequest.md +++ b/sdks/python/docs/SignatureRequestSendWithTemplateRequest.md @@ -5,24 +5,36 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `template_ids`*_required_ | ```[str]``` | Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. | | -| `signers`*_required_ | [```[SubSignatureRequestTemplateSigner]```](SubSignatureRequestTemplateSigner.md) | Add Signers to your Templated-based Signature Request. | | -| `allow_decline` | ```bool``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [default to False] | -| `ccs` | [```[SubCC]```](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | | -| `client_id` | ```str``` | 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` | [```[SubCustomField]```](SubCustomField.md) | An array defining values and options for custom fields. Required when a custom field exists in the Template. | | -| `files` | ```[file_type]``` | 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` | ```[str]``` | 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` | ```bool``` | 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.<br>
**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. | [default to False] | -| `is_eid` | ```bool``` | 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.<br>
**NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. | [default to False] | -| `message` | ```str``` | The custom message in the email that will be sent to the signers. | | -| `metadata` | ```{str: (bool, date, datetime, dict, float, int, list, str, none_type)}``` | 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` | [```SubSigningOptions```](SubSigningOptions.md) | | | -| `signing_redirect_url` | ```str``` | The URL you want signers redirected to after they successfully sign. | | -| `subject` | ```str``` | The subject in the email that will be sent to the signers. | | -| `test_mode` | ```bool``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [default to False] | -| `title` | ```str``` | The title you want to assign to the SignatureRequest. | | +| `template_ids`*_required_ | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. REPLACE_ME_WITH_DESCRIPTION_END | | +| `signers`*_required_ | [```List[SubSignatureRequestTemplateSigner]```](SubSignatureRequestTemplateSigner.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN Add Signers to your Templated-based Signature Request. REPLACE_ME_WITH_DESCRIPTION_END | | +| `allow_decline` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Allows signers to decline to sign a document if `true`. Defaults to `false`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `ccs` | [```List[SubCC]```](SubCC.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN Add CC email recipients. Required when a CC role exists for the Template. REPLACE_ME_WITH_DESCRIPTION_END | | +| `client_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Client id of the app to associate with the signature request. Used to apply the branding and callback url defined for the app. REPLACE_ME_WITH_DESCRIPTION_END | | +| `custom_fields` | [```List[SubCustomField]```](SubCustomField.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN An array defining values and options for custom fields. Required when a custom field exists in the Template. REPLACE_ME_WITH_DESCRIPTION_END | | +| `files` | ```List[io.IOBase]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Use `files[]` to indicate the uploaded file(s) to send for signature. -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) +This endpoint requires either **files** or **file_urls[]**, but not both. REPLACE_ME_WITH_DESCRIPTION_END | | +| `file_urls` | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `is_qualified_signature` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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.<br> +**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. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `is_eid` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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.<br> +**NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `message` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The custom message in the email that will be sent to the signers. REPLACE_ME_WITH_DESCRIPTION_END | | +| `metadata` | ```Dict[str, object]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `signing_options` | [```SubSigningOptions```](SubSigningOptions.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `signing_redirect_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The URL you want signers redirected to after they successfully sign. REPLACE_ME_WITH_DESCRIPTION_END | | +| `subject` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The subject in the email that will be sent to the signers. REPLACE_ME_WITH_DESCRIPTION_END | | +| `test_mode` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `title` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The title you want to assign to the SignatureRequest. REPLACE_ME_WITH_DESCRIPTION_END | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SignatureRequestUpdateRequest.md b/sdks/python/docs/SignatureRequestUpdateRequest.md index 501be5ef6..8b78075ad 100644 --- a/sdks/python/docs/SignatureRequestUpdateRequest.md +++ b/sdks/python/docs/SignatureRequestUpdateRequest.md @@ -5,11 +5,16 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `signature_id`*_required_ | ```str``` | The signature ID for the recipient. | | -| `email_address` | ```str``` | The new email address for the recipient.

This will generate a new `signature_id` value.

**NOTE:** Optional if `name` is provided. | | -| `name` | ```str``` | The new name for the recipient.

**NOTE:** Optional if `email_address` is provided. | | -| `expires_at` | ```int, none_type``` | 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. | | +| `signature_id`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The signature ID for the recipient. REPLACE_ME_WITH_DESCRIPTION_END | | +| `email_address` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The new email address for the recipient. -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) +This will generate a new `signature_id` value. + +**NOTE:** Optional if `name` is provided. REPLACE_ME_WITH_DESCRIPTION_END | | +| `name` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The new name for the recipient. +**NOTE:** Optional if `email_address` is provided. REPLACE_ME_WITH_DESCRIPTION_END | | +| `expires_at` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SubAttachment.md b/sdks/python/docs/SubAttachment.md index a8172758e..2b22c8220 100644 --- a/sdks/python/docs/SubAttachment.md +++ b/sdks/python/docs/SubAttachment.md @@ -5,11 +5,12 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `name`*_required_ | ```str``` | The name of attachment. | | -| `signer_index`*_required_ | ```int``` | The signer's index in the `signers` parameter (0-based indexing).

**NOTE:** Only one signer can be assigned per attachment. | | -| `instructions` | ```str``` | The instructions for uploading the attachment. | | -| `required` | ```bool``` | Determines if the attachment must be uploaded. | [default to False] | +| `name`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The name of attachment. REPLACE_ME_WITH_DESCRIPTION_END | | +| `signer_index`*_required_ | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The signer's index in the `signers` parameter (0-based indexing). -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) +**NOTE:** Only one signer can be assigned per attachment. REPLACE_ME_WITH_DESCRIPTION_END | | +| `instructions` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The instructions for uploading the attachment. REPLACE_ME_WITH_DESCRIPTION_END | | +| `required` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Determines if the attachment must be uploaded. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SubBulkSignerList.md b/sdks/python/docs/SubBulkSignerList.md index d6ad39df4..2a8ab14d7 100644 --- a/sdks/python/docs/SubBulkSignerList.md +++ b/sdks/python/docs/SubBulkSignerList.md @@ -5,9 +5,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `custom_fields` | [```[SubBulkSignerListCustomField]```](SubBulkSignerListCustomField.md) | An array of custom field values. | | -| `signers` | [```[SubSignatureRequestTemplateSigner]```](SubSignatureRequestTemplateSigner.md) | 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. | | +| `custom_fields` | [```List[SubBulkSignerListCustomField]```](SubBulkSignerListCustomField.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN An array of custom field values. REPLACE_ME_WITH_DESCRIPTION_END | | +| `signers` | [```List[SubSignatureRequestTemplateSigner]```](SubSignatureRequestTemplateSigner.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN Add Signers to your Templated-based Signature Request. Allows the requester to specify editor options when a preparing a document. -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) +Currently only templates with a single role are supported. All signers must have the same `role` value. REPLACE_ME_WITH_DESCRIPTION_END | | +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SubBulkSignerListCustomField.md b/sdks/python/docs/SubBulkSignerListCustomField.md index 160180c2a..172ad25f8 100644 --- a/sdks/python/docs/SubBulkSignerListCustomField.md +++ b/sdks/python/docs/SubBulkSignerListCustomField.md @@ -5,9 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `name`*_required_ | ```str``` | The name of the custom field. Must be the field's `name` or `api_id`. | | -| `value`*_required_ | ```str``` | The value of the custom field. | | +| `name`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The name of the custom field. Must be the field's `name` or `api_id`. REPLACE_ME_WITH_DESCRIPTION_END | | +| `value`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The value of the custom field. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/SubCC.md b/sdks/python/docs/SubCC.md index 7caebd33b..4438c62cd 100644 --- a/sdks/python/docs/SubCC.md +++ b/sdks/python/docs/SubCC.md @@ -5,9 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `role`*_required_ | ```str``` | Must match an existing CC role in chosen Template(s). Multiple CC recipients cannot share the same CC role. | | -| `email_address`*_required_ | ```str``` | The email address of the CC recipient. | | +| `role`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Must match an existing CC role in chosen Template(s). Multiple CC recipients cannot share the same CC role. REPLACE_ME_WITH_DESCRIPTION_END | | +| `email_address`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The email address of the CC recipient. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/SubCustomField.md b/sdks/python/docs/SubCustomField.md index bd7fea5b3..fba208c82 100644 --- a/sdks/python/docs/SubCustomField.md +++ b/sdks/python/docs/SubCustomField.md @@ -1,19 +1,20 @@ # SubCustomField -When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. +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. +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. +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. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `name`*_required_ | ```str``` | 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` | ```str``` | 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` | ```bool``` | 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`. | [default to False] | -| `value` | ```str``` | The string that resolves (aka "pre-fills") to the merge field on the final document(s) used for signing. | | +| `name`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `editor` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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`. -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) +**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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `required` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `value` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The string that resolves (aka "pre-fills") to the merge field on the final document(s) used for signing. REPLACE_ME_WITH_DESCRIPTION_END | | +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SubEditorOptions.md b/sdks/python/docs/SubEditorOptions.md index 81e617bfa..dfbe309e2 100644 --- a/sdks/python/docs/SubEditorOptions.md +++ b/sdks/python/docs/SubEditorOptions.md @@ -5,9 +5,8 @@ This allows the requester to specify editor options when a preparing a document ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `allow_edit_signers` | ```bool``` | Allows requesters to edit the list of signers | [default to False] | -| `allow_edit_documents` | ```bool``` | Allows requesters to edit documents, including delete and add | [default to False] | +| `allow_edit_signers` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Allows requesters to edit the list of signers REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `allow_edit_documents` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Allows requesters to edit documents, including delete and add REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/SubFieldOptions.md b/sdks/python/docs/SubFieldOptions.md index 48bedb1f4..1fcbf95c1 100644 --- a/sdks/python/docs/SubFieldOptions.md +++ b/sdks/python/docs/SubFieldOptions.md @@ -5,8 +5,9 @@ This allows the requester to specify field options for a signature request. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `date_format`*_required_ | ```str``` | Allows requester to specify the date format (see list of allowed [formats](/api/reference/constants/#date-formats))

**NOTE:** Only available for Premium and higher. | | +| `date_format`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Allows requester to specify the date format (see list of allowed [formats](/api/reference/constants/#date-formats)) -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) +**NOTE:** Only available for Premium and higher. REPLACE_ME_WITH_DESCRIPTION_END | | +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SubFormFieldGroup.md b/sdks/python/docs/SubFormFieldGroup.md index 4e9f630e3..59871263f 100644 --- a/sdks/python/docs/SubFormFieldGroup.md +++ b/sdks/python/docs/SubFormFieldGroup.md @@ -5,10 +5,13 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `group_id`*_required_ | ```str``` | ID of group. Use this to reference a specific group from the `group` value in `form_fields_per_document`. | | -| `group_label`*_required_ | ```str``` | Name of the group | | -| `requirement`*_required_ | ```str``` | 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_id`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN ID of group. Use this to reference a specific group from the `group` value in `form_fields_per_document`. REPLACE_ME_WITH_DESCRIPTION_END | | +| `group_label`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Name of the group REPLACE_ME_WITH_DESCRIPTION_END | | +| `requirement`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Examples: `require_0-1` `require_1` `require_1-ormore` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) +- 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. REPLACE_ME_WITH_DESCRIPTION_END | | +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SubFormFieldRule.md b/sdks/python/docs/SubFormFieldRule.md index 36887a152..0a355dd9a 100644 --- a/sdks/python/docs/SubFormFieldRule.md +++ b/sdks/python/docs/SubFormFieldRule.md @@ -5,11 +5,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `id`*_required_ | ```str``` | Must be unique across all defined rules. | | -| `trigger_operator`*_required_ | ```str``` | Currently only `AND` is supported. Support for `OR` is being worked on. | [default to "AND"] | -| `triggers`*_required_ | [```[SubFormFieldRuleTrigger]```](SubFormFieldRuleTrigger.md) | An array of trigger definitions, the "if this" part of "**if this**, then that". Currently only a single trigger per rule is allowed. | | -| `actions`*_required_ | [```[SubFormFieldRuleAction]```](SubFormFieldRuleAction.md) | 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. | | +| `id`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Must be unique across all defined rules. REPLACE_ME_WITH_DESCRIPTION_END | | +| `trigger_operator`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Currently only `AND` is supported. Support for `OR` is being worked on. REPLACE_ME_WITH_DESCRIPTION_END | [default to 'AND'] | +| `triggers`*_required_ | [```List[SubFormFieldRuleTrigger]```](SubFormFieldRuleTrigger.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN An array of trigger definitions, the "if this" part of "**if this**, then that". Currently only a single trigger per rule is allowed. REPLACE_ME_WITH_DESCRIPTION_END | | +| `actions`*_required_ | [```List[SubFormFieldRuleAction]```](SubFormFieldRuleAction.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/SubFormFieldRuleAction.md b/sdks/python/docs/SubFormFieldRuleAction.md index 5c53f585a..65f6c2b96 100644 --- a/sdks/python/docs/SubFormFieldRuleAction.md +++ b/sdks/python/docs/SubFormFieldRuleAction.md @@ -5,11 +5,18 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `hidden`*_required_ | ```bool``` | `true` to hide the target field when rule is satisfied, otherwise `false`. | | -| `type`*_required_ | ```str``` | | | -| `field_id` | ```str``` | **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` | ```str``` | **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. | | +| `hidden`*_required_ | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN `true` to hide the target field when rule is satisfied, otherwise `false`. REPLACE_ME_WITH_DESCRIPTION_END | | +| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `field_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN **field_id** or **group_id** is required, but not both. -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) +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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `group_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN **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. REPLACE_ME_WITH_DESCRIPTION_END | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SubFormFieldRuleTrigger.md b/sdks/python/docs/SubFormFieldRuleTrigger.md index f1b38ac61..74dacdb8b 100644 --- a/sdks/python/docs/SubFormFieldRuleTrigger.md +++ b/sdks/python/docs/SubFormFieldRuleTrigger.md @@ -5,11 +5,43 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `id`*_required_ | ```str``` | 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`*_required_ | ```str``` | 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` | ```str``` | **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` | ```[str]``` | **values** or **value** is required, but not both.

The values to match against **operator** when it is one of the following:

- `any` - `none` | | +| `id`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `operator`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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 REPLACE_ME_WITH_DESCRIPTION_END | | +| `value` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN **value** or **values** is required, but not both. -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) +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` REPLACE_ME_WITH_DESCRIPTION_END | | +| `values` | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN **values** or **value** is required, but not both. +The values to match against **operator** when it is one of the following: + +- `any` +- `none` REPLACE_ME_WITH_DESCRIPTION_END | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SubFormFieldsPerDocumentBase.md b/sdks/python/docs/SubFormFieldsPerDocumentBase.md index 2d3d9e8a4..06c8acb8e 100644 --- a/sdks/python/docs/SubFormFieldsPerDocumentBase.md +++ b/sdks/python/docs/SubFormFieldsPerDocumentBase.md @@ -4,32 +4,38 @@ The fields that should appear on the document, expressed as an array of objects. **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` +* 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` ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `document_index`*_required_ | ```int``` | Represents the integer index of the `file` or `file_url` document the field should be attached to. | | -| `api_id`*_required_ | ```str``` | An identifier for the field that is unique across all documents in the request. | | -| `height`*_required_ | ```int``` | Size of the field in pixels. | | -| `required`*_required_ | ```bool``` | Whether this field is required. | | -| `signer`*_required_ | ```str``` | 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`*_required_ | ```str``` | | | -| `width`*_required_ | ```int``` | Size of the field in pixels. | | -| `x`*_required_ | ```int``` | Location coordinates of the field in pixels. | | -| `y`*_required_ | ```int``` | Location coordinates of the field in pixels. | | -| `name` | ```str``` | Display name for the field. | | -| `page` | ```int, none_type``` | 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. | | +| `document_index`*_required_ | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Represents the integer index of the `file` or `file_url` document the field should be attached to. REPLACE_ME_WITH_DESCRIPTION_END | | +| `api_id`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN An identifier for the field that is unique across all documents in the request. REPLACE_ME_WITH_DESCRIPTION_END | | +| `height`*_required_ | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Size of the field in pixels. REPLACE_ME_WITH_DESCRIPTION_END | | +| `required`*_required_ | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Whether this field is required. REPLACE_ME_WITH_DESCRIPTION_END | | +| `signer`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Signer index identified by the offset in the signers parameter (0-based indexing), indicating which signer should fill out the field. -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) +**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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `width`*_required_ | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Size of the field in pixels. REPLACE_ME_WITH_DESCRIPTION_END | | +| `x`*_required_ | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Location coordinates of the field in pixels. REPLACE_ME_WITH_DESCRIPTION_END | | +| `y`*_required_ | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Location coordinates of the field in pixels. REPLACE_ME_WITH_DESCRIPTION_END | | +| `name` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Display name for the field. REPLACE_ME_WITH_DESCRIPTION_END | | +| `page` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SubFormFieldsPerDocumentCheckbox.md b/sdks/python/docs/SubFormFieldsPerDocumentCheckbox.md index 19da7d7e1..c308151ac 100644 --- a/sdks/python/docs/SubFormFieldsPerDocumentCheckbox.md +++ b/sdks/python/docs/SubFormFieldsPerDocumentCheckbox.md @@ -1,14 +1,13 @@ # SubFormFieldsPerDocumentCheckbox -This class extends `SubFormFieldsPerDocumentBase`. +This class extends `SubFormFieldsPerDocumentBase`. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | A yes/no checkbox. Use the `SubFormFieldsPerDocumentCheckbox` class. | [default to "checkbox"] | -| `is_checked`*_required_ | ```bool``` | `true` for checking the checkbox field by default, otherwise `false`. | | -| `group` | ```str``` | String referencing group defined in `form_field_groups` parameter. | | +| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN A yes/no checkbox. Use the `SubFormFieldsPerDocumentCheckbox` class. REPLACE_ME_WITH_DESCRIPTION_END | [default to 'checkbox'] | +| `is_checked`*_required_ | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN `true` for checking the checkbox field by default, otherwise `false`. REPLACE_ME_WITH_DESCRIPTION_END | | +| `group` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN String referencing group defined in `form_field_groups` parameter. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/SubFormFieldsPerDocumentCheckboxMerge.md b/sdks/python/docs/SubFormFieldsPerDocumentCheckboxMerge.md index 12331977d..e80f4bc63 100644 --- a/sdks/python/docs/SubFormFieldsPerDocumentCheckboxMerge.md +++ b/sdks/python/docs/SubFormFieldsPerDocumentCheckboxMerge.md @@ -1,12 +1,11 @@ # SubFormFieldsPerDocumentCheckboxMerge -This class extends `SubFormFieldsPerDocumentBase`. +This class extends `SubFormFieldsPerDocumentBase`. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | A checkbox field that has default value set using pre-filled data. Use the `SubFormFieldsPerDocumentCheckboxMerge` class. | [default to "checkbox-merge"] | +| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN A checkbox field that has default value set using pre-filled data. Use the `SubFormFieldsPerDocumentCheckboxMerge` class. REPLACE_ME_WITH_DESCRIPTION_END | [default to 'checkbox-merge'] | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/SubFormFieldsPerDocumentDateSigned.md b/sdks/python/docs/SubFormFieldsPerDocumentDateSigned.md index d13f5b073..1bef7ed69 100644 --- a/sdks/python/docs/SubFormFieldsPerDocumentDateSigned.md +++ b/sdks/python/docs/SubFormFieldsPerDocumentDateSigned.md @@ -1,14 +1,15 @@ # SubFormFieldsPerDocumentDateSigned -This class extends `SubFormFieldsPerDocumentBase`. +This class extends `SubFormFieldsPerDocumentBase`. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | A date. Use the `SubFormFieldsPerDocumentDateSigned` class. | [default to "date_signed"] | -| `font_family` | ```str``` | Font family for the field. | | -| `font_size` | ```int``` | 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. | [default to 12] | +| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN A date. Use the `SubFormFieldsPerDocumentDateSigned` class. REPLACE_ME_WITH_DESCRIPTION_END | [default to 'date_signed'] | +| `font_family` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Font family for the field. REPLACE_ME_WITH_DESCRIPTION_END | | +| `font_size` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The initial px font size for the field contents. Can be any integer value between `7` and `49`. -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) +**NOTE:** Font size may be reduced during processing in order to fit the contents within the dimensions of the field. REPLACE_ME_WITH_DESCRIPTION_END | [default to 12] | +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SubFormFieldsPerDocumentDropdown.md b/sdks/python/docs/SubFormFieldsPerDocumentDropdown.md index ea838bc00..001cdb731 100644 --- a/sdks/python/docs/SubFormFieldsPerDocumentDropdown.md +++ b/sdks/python/docs/SubFormFieldsPerDocumentDropdown.md @@ -1,16 +1,17 @@ # SubFormFieldsPerDocumentDropdown -This class extends `SubFormFieldsPerDocumentBase`. +This class extends `SubFormFieldsPerDocumentBase`. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | An input field for dropdowns. Use the `SubFormFieldsPerDocumentDropdown` class. | [default to "dropdown"] | -| `options`*_required_ | ```[str]``` | Array of string values representing dropdown values. | | -| `content` | ```str``` | Selected value in `options` array. Value must exist in array. | | -| `font_family` | ```str``` | Font family for the field. | | -| `font_size` | ```int``` | 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. | [default to 12] | +| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN An input field for dropdowns. Use the `SubFormFieldsPerDocumentDropdown` class. REPLACE_ME_WITH_DESCRIPTION_END | [default to 'dropdown'] | +| `options`*_required_ | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Array of string values representing dropdown values. REPLACE_ME_WITH_DESCRIPTION_END | | +| `content` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Selected value in `options` array. Value must exist in array. REPLACE_ME_WITH_DESCRIPTION_END | | +| `font_family` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Font family for the field. REPLACE_ME_WITH_DESCRIPTION_END | | +| `font_size` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The initial px font size for the field contents. Can be any integer value between `7` and `49`. -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) +**NOTE:** Font size may be reduced during processing in order to fit the contents within the dimensions of the field. REPLACE_ME_WITH_DESCRIPTION_END | [default to 12] | +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SubFormFieldsPerDocumentFontEnum.md b/sdks/python/docs/SubFormFieldsPerDocumentFontEnum.md index a92e3e2f3..30e438940 100644 --- a/sdks/python/docs/SubFormFieldsPerDocumentFontEnum.md +++ b/sdks/python/docs/SubFormFieldsPerDocumentFontEnum.md @@ -8,4 +8,3 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/SubFormFieldsPerDocumentHyperlink.md b/sdks/python/docs/SubFormFieldsPerDocumentHyperlink.md index b2029aea5..1ee39d389 100644 --- a/sdks/python/docs/SubFormFieldsPerDocumentHyperlink.md +++ b/sdks/python/docs/SubFormFieldsPerDocumentHyperlink.md @@ -1,16 +1,17 @@ # SubFormFieldsPerDocumentHyperlink -This class extends `SubFormFieldsPerDocumentBase`. +This class extends `SubFormFieldsPerDocumentBase`. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | A hyperlink field. Use the `SubFormFieldsPerDocumentHyperlink` class. | [default to "hyperlink"] | -| `content`*_required_ | ```str``` | Link Text. | | -| `content_url`*_required_ | ```str``` | Link URL. | | -| `font_family` | ```str``` | Font family for the field. | | -| `font_size` | ```int``` | 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. | [default to 12] | +| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN A hyperlink field. Use the `SubFormFieldsPerDocumentHyperlink` class. REPLACE_ME_WITH_DESCRIPTION_END | [default to 'hyperlink'] | +| `content`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Link Text. REPLACE_ME_WITH_DESCRIPTION_END | | +| `content_url`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Link URL. REPLACE_ME_WITH_DESCRIPTION_END | | +| `font_family` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Font family for the field. REPLACE_ME_WITH_DESCRIPTION_END | | +| `font_size` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The initial px font size for the field contents. Can be any integer value between `7` and `49`. -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) +**NOTE:** Font size may be reduced during processing in order to fit the contents within the dimensions of the field. REPLACE_ME_WITH_DESCRIPTION_END | [default to 12] | +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SubFormFieldsPerDocumentInitials.md b/sdks/python/docs/SubFormFieldsPerDocumentInitials.md index c416bc28a..a9edae28c 100644 --- a/sdks/python/docs/SubFormFieldsPerDocumentInitials.md +++ b/sdks/python/docs/SubFormFieldsPerDocumentInitials.md @@ -1,12 +1,11 @@ # SubFormFieldsPerDocumentInitials -This class extends `SubFormFieldsPerDocumentBase`. +This class extends `SubFormFieldsPerDocumentBase`. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | An input field for initials. Use the `SubFormFieldsPerDocumentInitials` class. | [default to "initials"] | +| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN An input field for initials. Use the `SubFormFieldsPerDocumentInitials` class. REPLACE_ME_WITH_DESCRIPTION_END | [default to 'initials'] | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/SubFormFieldsPerDocumentRadio.md b/sdks/python/docs/SubFormFieldsPerDocumentRadio.md index a8259b4d1..268b127dd 100644 --- a/sdks/python/docs/SubFormFieldsPerDocumentRadio.md +++ b/sdks/python/docs/SubFormFieldsPerDocumentRadio.md @@ -1,14 +1,13 @@ # SubFormFieldsPerDocumentRadio -This class extends `SubFormFieldsPerDocumentBase`. +This class extends `SubFormFieldsPerDocumentBase`. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | An input field for radios. Use the `SubFormFieldsPerDocumentRadio` class. | [default to "radio"] | -| `group`*_required_ | ```str``` | String referencing group defined in `form_field_groups` parameter. | | -| `is_checked`*_required_ | ```bool``` | `true` for checking the radio field by default, otherwise `false`. Only one radio field per group can be `true`. | | +| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN An input field for radios. Use the `SubFormFieldsPerDocumentRadio` class. REPLACE_ME_WITH_DESCRIPTION_END | [default to 'radio'] | +| `group`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN String referencing group defined in `form_field_groups` parameter. REPLACE_ME_WITH_DESCRIPTION_END | | +| `is_checked`*_required_ | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN `true` for checking the radio field by default, otherwise `false`. Only one radio field per group can be `true`. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/SubFormFieldsPerDocumentSignature.md b/sdks/python/docs/SubFormFieldsPerDocumentSignature.md index 61578e6f0..b6f57234d 100644 --- a/sdks/python/docs/SubFormFieldsPerDocumentSignature.md +++ b/sdks/python/docs/SubFormFieldsPerDocumentSignature.md @@ -1,12 +1,11 @@ # SubFormFieldsPerDocumentSignature -This class extends `SubFormFieldsPerDocumentBase`. +This class extends `SubFormFieldsPerDocumentBase`. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | A signature input field. Use the `SubFormFieldsPerDocumentSignature` class. | [default to "signature"] | +| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN A signature input field. Use the `SubFormFieldsPerDocumentSignature` class. REPLACE_ME_WITH_DESCRIPTION_END | [default to 'signature'] | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/SubFormFieldsPerDocumentText.md b/sdks/python/docs/SubFormFieldsPerDocumentText.md index 607671930..9acf7cf9a 100644 --- a/sdks/python/docs/SubFormFieldsPerDocumentText.md +++ b/sdks/python/docs/SubFormFieldsPerDocumentText.md @@ -1,22 +1,25 @@ # SubFormFieldsPerDocumentText -This class extends `SubFormFieldsPerDocumentBase`. +This class extends `SubFormFieldsPerDocumentBase`. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | A text input field. Use the `SubFormFieldsPerDocumentText` class. | [default to "text"] | -| `placeholder` | ```str``` | Placeholder value for text field. | | -| `auto_fill_type` | ```str``` | 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` | ```str``` | Link two or more text fields. Enter data into one linked text field, which automatically fill all other linked text fields. | | -| `masked` | ```bool``` | 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` | ```str``` | 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` | ```str``` | | | -| `validation_custom_regex_format_label` | ```str``` | | | -| `content` | ```str``` | Content of a `me_now` text field | | -| `font_family` | ```str``` | Font family for the field. | | -| `font_size` | ```int``` | 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. | [default to 12] | +| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN A text input field. Use the `SubFormFieldsPerDocumentText` class. REPLACE_ME_WITH_DESCRIPTION_END | [default to 'text'] | +| `placeholder` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Placeholder value for text field. REPLACE_ME_WITH_DESCRIPTION_END | | +| `auto_fill_type` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `link_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Link two or more text fields. Enter data into one linked text field, which automatically fill all other linked text fields. REPLACE_ME_WITH_DESCRIPTION_END | | +| `masked` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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`. REPLACE_ME_WITH_DESCRIPTION_END | | +| `validation_type` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) +**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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `validation_custom_regex` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `validation_custom_regex_format_label` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `content` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Content of a `me_now` text field REPLACE_ME_WITH_DESCRIPTION_END | | +| `font_family` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Font family for the field. REPLACE_ME_WITH_DESCRIPTION_END | | +| `font_size` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | [default to 12] | +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SubFormFieldsPerDocumentTextMerge.md b/sdks/python/docs/SubFormFieldsPerDocumentTextMerge.md index d56e086f4..91cc6202c 100644 --- a/sdks/python/docs/SubFormFieldsPerDocumentTextMerge.md +++ b/sdks/python/docs/SubFormFieldsPerDocumentTextMerge.md @@ -1,14 +1,15 @@ # SubFormFieldsPerDocumentTextMerge -This class extends `SubFormFieldsPerDocumentBase`. +This class extends `SubFormFieldsPerDocumentBase`. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | A text field that has default text set using pre-filled data. Use the `SubFormFieldsPerDocumentTextMerge` class. | [default to "text-merge"] | -| `font_family` | ```str``` | Font family for the field. | | -| `font_size` | ```int``` | 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. | [default to 12] | +| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN A text field that has default text set using pre-filled data. Use the `SubFormFieldsPerDocumentTextMerge` class. REPLACE_ME_WITH_DESCRIPTION_END | [default to 'text-merge'] | +| `font_family` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Font family for the field. REPLACE_ME_WITH_DESCRIPTION_END | | +| `font_size` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The initial px font size for the field contents. Can be any integer value between `7` and `49`. -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) +**NOTE:** Font size may be reduced during processing in order to fit the contents within the dimensions of the field. REPLACE_ME_WITH_DESCRIPTION_END | [default to 12] | +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SubFormFieldsPerDocumentTypeEnum.md b/sdks/python/docs/SubFormFieldsPerDocumentTypeEnum.md index 37bac7dd0..e2f8ca561 100644 --- a/sdks/python/docs/SubFormFieldsPerDocumentTypeEnum.md +++ b/sdks/python/docs/SubFormFieldsPerDocumentTypeEnum.md @@ -8,4 +8,3 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/SubMergeField.md b/sdks/python/docs/SubMergeField.md index be4dfd7cf..00360ded4 100644 --- a/sdks/python/docs/SubMergeField.md +++ b/sdks/python/docs/SubMergeField.md @@ -5,9 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `name`*_required_ | ```str``` | The name of the merge field. Must be unique. | | -| `type`*_required_ | ```str``` | The type of merge field. | | +| `name`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The name of the merge field. Must be unique. REPLACE_ME_WITH_DESCRIPTION_END | | +| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The type of merge field. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/SubOAuth.md b/sdks/python/docs/SubOAuth.md index 589654016..fdba6b98d 100644 --- a/sdks/python/docs/SubOAuth.md +++ b/sdks/python/docs/SubOAuth.md @@ -5,9 +5,8 @@ OAuth related parameters. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `callback_url` | ```str``` | The callback URL to be used for OAuth flows. (Required if `oauth[scopes]` is provided) | | -| `scopes` | ```[str]``` | A list of [OAuth scopes](/api/reference/tag/OAuth) to be granted to the app. (Required if `oauth[callback_url]` is provided). | | +| `callback_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The callback URL to be used for OAuth flows. (Required if `oauth[scopes]` is provided) REPLACE_ME_WITH_DESCRIPTION_END | | +| `scopes` | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN A list of [OAuth scopes](/api/reference/tag/OAuth) to be granted to the app. (Required if `oauth[callback_url]` is provided). REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/SubOptions.md b/sdks/python/docs/SubOptions.md index 871dc60b6..1a898fbaf 100644 --- a/sdks/python/docs/SubOptions.md +++ b/sdks/python/docs/SubOptions.md @@ -5,8 +5,7 @@ Additional options supported by API App. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `can_insert_everywhere` | ```bool``` | Determines if signers can use "Insert Everywhere" when signing a document. | [default to False] | +| `can_insert_everywhere` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Determines if signers can use "Insert Everywhere" when signing a document. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/SubSignatureRequestGroupedSigners.md b/sdks/python/docs/SubSignatureRequestGroupedSigners.md index d90b636f3..d407e2b87 100644 --- a/sdks/python/docs/SubSignatureRequestGroupedSigners.md +++ b/sdks/python/docs/SubSignatureRequestGroupedSigners.md @@ -5,10 +5,11 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `group`*_required_ | ```str``` | The name of the group. | | -| `signers`*_required_ | [```[SubSignatureRequestSigner]```](SubSignatureRequestSigner.md) | 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` | ```int, none_type``` | The order the group is required to sign in. Use this instead of Signer-level `order`. | | +| `group`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The name of the group. REPLACE_ME_WITH_DESCRIPTION_END | | +| `signers`*_required_ | [```List[SubSignatureRequestSigner]```](SubSignatureRequestSigner.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN Signers belonging to this Group. -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) +**NOTE:** Only `name`, `email_address`, and `pin` are available to Grouped Signers. We will ignore all other properties, even though they are listed below. REPLACE_ME_WITH_DESCRIPTION_END | | +| `order` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The order the group is required to sign in. Use this instead of Signer-level `order`. REPLACE_ME_WITH_DESCRIPTION_END | | +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SubSignatureRequestSigner.md b/sdks/python/docs/SubSignatureRequestSigner.md index 7a295c115..40d236d4e 100644 --- a/sdks/python/docs/SubSignatureRequestSigner.md +++ b/sdks/python/docs/SubSignatureRequestSigner.md @@ -5,13 +5,20 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `name`*_required_ | ```str``` | The name of the signer. | | -| `email_address`*_required_ | ```str``` | The email address of the signer. | | -| `order` | ```int, none_type``` | The order the signer is required to sign in. | | -| `pin` | ```str``` | The 4- to 12-character access code that will secure this signer's signature page. | | -| `sms_phone_number` | ```str``` | 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` | ```str``` | 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). | | +| `name`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The name of the signer. REPLACE_ME_WITH_DESCRIPTION_END | | +| `email_address`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The email address of the signer. REPLACE_ME_WITH_DESCRIPTION_END | | +| `order` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The order the signer is required to sign in. REPLACE_ME_WITH_DESCRIPTION_END | | +| `pin` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The 4- to 12-character access code that will secure this signer's signature page. REPLACE_ME_WITH_DESCRIPTION_END | | +| `sms_phone_number` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN An E.164 formatted phone number. -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) +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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `sms_phone_number_type` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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). REPLACE_ME_WITH_DESCRIPTION_END | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SubSignatureRequestTemplateSigner.md b/sdks/python/docs/SubSignatureRequestTemplateSigner.md index 392204b1c..f9bf97d19 100644 --- a/sdks/python/docs/SubSignatureRequestTemplateSigner.md +++ b/sdks/python/docs/SubSignatureRequestTemplateSigner.md @@ -5,13 +5,20 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `role`*_required_ | ```str``` | Must match an existing role in chosen Template(s). It's case-sensitive. | | -| `name`*_required_ | ```str``` | The name of the signer. | | -| `email_address`*_required_ | ```str``` | The email address of the signer. | | -| `pin` | ```str``` | The 4- to 12-character access code that will secure this signer's signature page. | | -| `sms_phone_number` | ```str``` | 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` | ```str``` | 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). | | +| `role`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Must match an existing role in chosen Template(s). It's case-sensitive. REPLACE_ME_WITH_DESCRIPTION_END | | +| `name`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The name of the signer. REPLACE_ME_WITH_DESCRIPTION_END | | +| `email_address`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The email address of the signer. REPLACE_ME_WITH_DESCRIPTION_END | | +| `pin` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The 4- to 12-character access code that will secure this signer's signature page. REPLACE_ME_WITH_DESCRIPTION_END | | +| `sms_phone_number` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN An E.164 formatted phone number. -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) +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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `sms_phone_number_type` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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). REPLACE_ME_WITH_DESCRIPTION_END | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SubSigningOptions.md b/sdks/python/docs/SubSigningOptions.md index 9584478ec..3249ca650 100644 --- a/sdks/python/docs/SubSigningOptions.md +++ b/sdks/python/docs/SubSigningOptions.md @@ -2,17 +2,16 @@ 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. +**NOTE:** If `signing_options` are not defined in the request, the allowed types will default to those specified in the account settings. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `default_type`*_required_ | ```str``` | The default type shown (limited to the listed types) | | -| `draw` | ```bool``` | Allows drawing the signature | [default to False] | -| `phone` | ```bool``` | Allows using a smartphone to email the signature | [default to False] | -| `type` | ```bool``` | Allows typing the signature | [default to False] | -| `upload` | ```bool``` | Allows uploading the signature | [default to False] | +| `default_type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The default type shown (limited to the listed types) REPLACE_ME_WITH_DESCRIPTION_END | | +| `draw` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Allows drawing the signature REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `phone` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Allows using a smartphone to email the signature REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `type` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Allows typing the signature REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `upload` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Allows uploading the signature REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/SubTeamResponse.md b/sdks/python/docs/SubTeamResponse.md index 750829a35..fed8bcf6d 100644 --- a/sdks/python/docs/SubTeamResponse.md +++ b/sdks/python/docs/SubTeamResponse.md @@ -5,9 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `team_id` | ```str``` | The id of a team | | -| `name` | ```str``` | The name of a team | | +| `team_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The id of a team REPLACE_ME_WITH_DESCRIPTION_END | | +| `name` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The name of a team REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/SubTemplateRole.md b/sdks/python/docs/SubTemplateRole.md index 4d98e08cd..9581ea4b6 100644 --- a/sdks/python/docs/SubTemplateRole.md +++ b/sdks/python/docs/SubTemplateRole.md @@ -5,9 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `name` | ```str``` | The role name of the signer that will be displayed when the template is used to create a signature request. | | -| `order` | ```int, none_type``` | The order in which this signer role is required to sign. | | +| `name` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The role name of the signer that will be displayed when the template is used to create a signature request. REPLACE_ME_WITH_DESCRIPTION_END | | +| `order` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The order in which this signer role is required to sign. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/SubUnclaimedDraftSigner.md b/sdks/python/docs/SubUnclaimedDraftSigner.md index 0ebb34ab3..a9a297654 100644 --- a/sdks/python/docs/SubUnclaimedDraftSigner.md +++ b/sdks/python/docs/SubUnclaimedDraftSigner.md @@ -5,10 +5,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `email_address`*_required_ | ```str``` | The email address of the signer. | | -| `name`*_required_ | ```str``` | The name of the signer. | | -| `order` | ```int, none_type``` | The order the signer is required to sign in. | | +| `email_address`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The email address of the signer. REPLACE_ME_WITH_DESCRIPTION_END | | +| `name`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The name of the signer. REPLACE_ME_WITH_DESCRIPTION_END | | +| `order` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The order the signer is required to sign in. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/SubUnclaimedDraftTemplateSigner.md b/sdks/python/docs/SubUnclaimedDraftTemplateSigner.md index 80634e817..b8d32f76f 100644 --- a/sdks/python/docs/SubUnclaimedDraftTemplateSigner.md +++ b/sdks/python/docs/SubUnclaimedDraftTemplateSigner.md @@ -5,10 +5,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `role`*_required_ | ```str``` | Must match an existing role in chosen Template(s). | | -| `name`*_required_ | ```str``` | The name of the signer filling the role of `role`. | | -| `email_address`*_required_ | ```str``` | The email address of the signer filling the role of `role`. | | +| `role`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Must match an existing role in chosen Template(s). REPLACE_ME_WITH_DESCRIPTION_END | | +| `name`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The name of the signer filling the role of `role`. REPLACE_ME_WITH_DESCRIPTION_END | | +| `email_address`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The email address of the signer filling the role of `role`. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/SubWhiteLabelingOptions.md b/sdks/python/docs/SubWhiteLabelingOptions.md index bbf774879..d10deba9c 100644 --- a/sdks/python/docs/SubWhiteLabelingOptions.md +++ b/sdks/python/docs/SubWhiteLabelingOptions.md @@ -7,22 +7,21 @@ Take a look at our [white labeling guide](https://developers.hellosign.com/api/r ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `header_background_color` | ```str``` | | [default to "#1A1A1A"] | -| `legal_version` | ```str``` | | [default to "terms1"] | -| `link_color` | ```str``` | | [default to "#00B3E6"] | -| `page_background_color` | ```str``` | | [default to "#F7F8F9"] | -| `primary_button_color` | ```str``` | | [default to "#00B3E6"] | -| `primary_button_color_hover` | ```str``` | | [default to "#00B3E6"] | -| `primary_button_text_color` | ```str``` | | [default to "#FFFFFF"] | -| `primary_button_text_color_hover` | ```str``` | | [default to "#FFFFFF"] | -| `secondary_button_color` | ```str``` | | [default to "#FFFFFF"] | -| `secondary_button_color_hover` | ```str``` | | [default to "#FFFFFF"] | -| `secondary_button_text_color` | ```str``` | | [default to "#00B3E6"] | -| `secondary_button_text_color_hover` | ```str``` | | [default to "#00B3E6"] | -| `text_color1` | ```str``` | | [default to "#808080"] | -| `text_color2` | ```str``` | | [default to "#FFFFFF"] | -| `reset_to_default` | ```bool``` | Resets white labeling options to defaults. Only useful when updating an API App. | | +| `header_background_color` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | [default to '#1A1A1A'] | +| `legal_version` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | [default to 'terms1'] | +| `link_color` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | [default to '#00B3E6'] | +| `page_background_color` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | [default to '#F7F8F9'] | +| `primary_button_color` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | [default to '#00B3E6'] | +| `primary_button_color_hover` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | [default to '#00B3E6'] | +| `primary_button_text_color` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | [default to '#FFFFFF'] | +| `primary_button_text_color_hover` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | [default to '#FFFFFF'] | +| `secondary_button_color` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | [default to '#FFFFFF'] | +| `secondary_button_color_hover` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | [default to '#FFFFFF'] | +| `secondary_button_text_color` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | [default to '#00B3E6'] | +| `secondary_button_text_color_hover` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | [default to '#00B3E6'] | +| `text_color1` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | [default to '#808080'] | +| `text_color2` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | [default to '#FFFFFF'] | +| `reset_to_default` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Resets white labeling options to defaults. Only useful when updating an API App. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/TeamAddMemberRequest.md b/sdks/python/docs/TeamAddMemberRequest.md index a40c8b178..af42ff6c6 100644 --- a/sdks/python/docs/TeamAddMemberRequest.md +++ b/sdks/python/docs/TeamAddMemberRequest.md @@ -5,10 +5,15 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `account_id` | ```str``` | `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` | ```str``` | `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` | ```str``` | A role member will take in a new Team.

**NOTE:** This parameter is used only if `team_id` is provided. | | +| `account_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN `account_id` or `email_address` is required. If both are provided, the account id prevails. -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) +Account id of the user to invite to your Team. REPLACE_ME_WITH_DESCRIPTION_END | | +| `email_address` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN `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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `role` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN A role member will take in a new Team. +**NOTE:** This parameter is used only if `team_id` is provided. REPLACE_ME_WITH_DESCRIPTION_END | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TeamApi.md b/sdks/python/docs/TeamApi.md index da3664e6a..11e6a2d9c 100644 --- a/sdks/python/docs/TeamApi.md +++ b/sdks/python/docs/TeamApi.md @@ -29,34 +29,9 @@ Invites a user (specified using the `email_address` parameter) to your Team. If * Bearer (JWT) Authentication (oauth2): ```python -from pprint import pprint - -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", -) - -with ApiClient(configuration) as api_client: - team_api = apis.TeamApi(api_client) - - data = models.TeamAddMemberRequest( - email_address="george@example.com", - ) - - try: - response = team_api.team_add_member(data) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) - +REPLACE_ME_WITH_EXAMPLE_FOR__team_add_member_Python_CODE +``` ``` - ### Parameters | Name | Type | Description | Notes | @@ -77,7 +52,6 @@ with ApiClient(configuration) as api_client: - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -100,34 +74,9 @@ Creates a new Team and makes you a member. You must not currently belong to a Te * Bearer (JWT) Authentication (oauth2): ```python -from pprint import pprint - -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", -) - -with ApiClient(configuration) as api_client: - team_api = apis.TeamApi(api_client) - - data = models.TeamCreateRequest( - name="New Team Name", - ) - - try: - response = team_api.team_create(data) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) - +REPLACE_ME_WITH_EXAMPLE_FOR__team_create_Python_CODE +``` ``` - ### Parameters | Name | Type | Description | Notes | @@ -147,7 +96,6 @@ with ApiClient(configuration) as api_client: - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -170,27 +118,9 @@ 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 - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", - - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", -) - -with ApiClient(configuration) as api_client: - team_api = apis.TeamApi(api_client) - - try: - team_api.team_delete() - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) - +REPLACE_ME_WITH_EXAMPLE_FOR__team_delete_Python_CODE +``` ``` - ### Parameters This endpoint does not need any parameter. @@ -208,7 +138,6 @@ void (empty response body) - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -231,30 +160,9 @@ Returns information about your Team as well as a list of its members. If you do * Bearer (JWT) Authentication (oauth2): ```python -from pprint import pprint - -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", -) - -with ApiClient(configuration) as api_client: - team_api = apis.TeamApi(api_client) - - try: - response = team_api.team_get() - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) - +REPLACE_ME_WITH_EXAMPLE_FOR__team_get_Python_CODE +``` ``` - ### Parameters This endpoint does not need any parameter. @@ -272,7 +180,6 @@ This endpoint does not need any parameter. - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -295,30 +202,9 @@ Provides information about a team. * Bearer (JWT) Authentication (oauth2): ```python -from pprint import pprint - -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", -) - -with ApiClient(configuration) as api_client: - team_api = apis.TeamApi(api_client) - - try: - response = team_api.team_info() - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) - +REPLACE_ME_WITH_EXAMPLE_FOR__team_info_Python_CODE +``` ``` - ### Parameters | Name | Type | Description | Notes | @@ -338,7 +224,6 @@ with ApiClient(configuration) as api_client: - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -361,32 +246,9 @@ Provides a list of team invites (and their roles). * Bearer (JWT) Authentication (oauth2): ```python -from pprint import pprint - -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", -) - -with ApiClient(configuration) as api_client: - team_api = apis.TeamApi(api_client) - - email_address = "user@dropboxsign.com" - - try: - response = team_api.team_invites(email_address=email_address) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) - +REPLACE_ME_WITH_EXAMPLE_FOR__team_invites_Python_CODE +``` ``` - ### Parameters | Name | Type | Description | Notes | @@ -406,7 +268,6 @@ with ApiClient(configuration) as api_client: - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -429,39 +290,16 @@ Provides a paginated list of members (and their roles) that belong to a given te * Bearer (JWT) Authentication (oauth2): ```python -from pprint import pprint - -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", -) - -with ApiClient(configuration) as api_client: - team_api = apis.TeamApi(api_client) - - team_id = "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c" - - try: - response = team_api.team_members(team_id) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) - +REPLACE_ME_WITH_EXAMPLE_FOR__team_members_Python_CODE +``` ``` - ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | `team_id` | **str** | The id of the team that a member list is being requested from. | | -| `page` | **int** | Which page number of the team member list to return. Defaults to `1`. | [optional][default to 1] | -| `page_size` | **int** | Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. | [optional][default to 20] | +| `page` | **int** | Which page number of the team member list to return. Defaults to `1`. | [optional][default to 1] | +| `page_size` | **int** | Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. | [optional][default to 20] | ### Return type @@ -476,7 +314,6 @@ with ApiClient(configuration) as api_client: - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -499,35 +336,9 @@ Removes the provided user Account from your Team. If the Account had an outstand * Bearer (JWT) Authentication (oauth2): ```python -from pprint import pprint - -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", -) - -with ApiClient(configuration) as api_client: - team_api = apis.TeamApi(api_client) - - data = models.TeamRemoveMemberRequest( - email_address="teammate@dropboxsign.com", - new_owner_email_address="new_teammate@dropboxsign.com", - ) - - try: - response = team_api.team_remove_member(data) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) - +REPLACE_ME_WITH_EXAMPLE_FOR__team_remove_member_Python_CODE +``` ``` - ### Parameters | Name | Type | Description | Notes | @@ -547,7 +358,6 @@ with ApiClient(configuration) as api_client: - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -570,39 +380,16 @@ Provides a paginated list of sub teams that belong to a given team. * Bearer (JWT) Authentication (oauth2): ```python -from pprint import pprint - -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", -) - -with ApiClient(configuration) as api_client: - team_api = apis.TeamApi(api_client) - - team_id = "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c" - - try: - response = team_api.team_sub_teams(team_id) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) - +REPLACE_ME_WITH_EXAMPLE_FOR__team_sub_teams_Python_CODE +``` ``` - ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | `team_id` | **str** | The id of the parent Team. | | -| `page` | **int** | Which page number of the SubTeam List to return. Defaults to `1`. | [optional][default to 1] | -| `page_size` | **int** | Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. | [optional][default to 20] | +| `page` | **int** | Which page number of the SubTeam List to return. Defaults to `1`. | [optional][default to 1] | +| `page_size` | **int** | Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. | [optional][default to 20] | ### Return type @@ -617,7 +404,6 @@ with ApiClient(configuration) as api_client: - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -640,34 +426,9 @@ Updates the name of your Team. * Bearer (JWT) Authentication (oauth2): ```python -from pprint import pprint - -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", -) - -with ApiClient(configuration) as api_client: - team_api = apis.TeamApi(api_client) - - data = models.TeamUpdateRequest( - name="New Team Name", - ) - - try: - response = team_api.team_update(data) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) - +REPLACE_ME_WITH_EXAMPLE_FOR__team_update_Python_CODE +``` ``` - ### Parameters | Name | Type | Description | Notes | @@ -687,7 +448,6 @@ with ApiClient(configuration) as api_client: - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | diff --git a/sdks/python/docs/TeamCreateRequest.md b/sdks/python/docs/TeamCreateRequest.md index 9d238b41b..1e87974a8 100644 --- a/sdks/python/docs/TeamCreateRequest.md +++ b/sdks/python/docs/TeamCreateRequest.md @@ -5,8 +5,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `name` | ```str``` | The name of your Team. | [default to "Untitled Team"] | +| `name` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The name of your Team. REPLACE_ME_WITH_DESCRIPTION_END | [default to 'Untitled Team'] | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/TeamGetInfoResponse.md b/sdks/python/docs/TeamGetInfoResponse.md index a9b6ef222..cc8679639 100644 --- a/sdks/python/docs/TeamGetInfoResponse.md +++ b/sdks/python/docs/TeamGetInfoResponse.md @@ -5,9 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `team` | [```TeamInfoResponse```](TeamInfoResponse.md) | | | -| `warnings` | [```[WarningResponse]```](WarningResponse.md) | A list of warnings. | | +| `team` | [```TeamInfoResponse```](TeamInfoResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN A list of warnings. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/TeamGetResponse.md b/sdks/python/docs/TeamGetResponse.md index a99404f1d..098434f90 100644 --- a/sdks/python/docs/TeamGetResponse.md +++ b/sdks/python/docs/TeamGetResponse.md @@ -5,9 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `team` | [```TeamResponse```](TeamResponse.md) | | | -| `warnings` | [```[WarningResponse]```](WarningResponse.md) | A list of warnings. | | +| `team` | [```TeamResponse```](TeamResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN A list of warnings. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/TeamInfoResponse.md b/sdks/python/docs/TeamInfoResponse.md index ee8991007..c14ad369e 100644 --- a/sdks/python/docs/TeamInfoResponse.md +++ b/sdks/python/docs/TeamInfoResponse.md @@ -5,12 +5,11 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `team_id` | ```str``` | The id of a team | | -| `team_parent` | [```TeamParentResponse```](TeamParentResponse.md) | | | -| `name` | ```str``` | The name of a team | | -| `num_members` | ```int``` | Number of members within a team | | -| `num_sub_teams` | ```int``` | Number of sub teams within a team | | +| `team_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The id of a team REPLACE_ME_WITH_DESCRIPTION_END | | +| `team_parent` | [```TeamParentResponse```](TeamParentResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `name` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The name of a team REPLACE_ME_WITH_DESCRIPTION_END | | +| `num_members` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Number of members within a team REPLACE_ME_WITH_DESCRIPTION_END | | +| `num_sub_teams` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Number of sub teams within a team REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/TeamInviteResponse.md b/sdks/python/docs/TeamInviteResponse.md index 24b95e3f3..50d597072 100644 --- a/sdks/python/docs/TeamInviteResponse.md +++ b/sdks/python/docs/TeamInviteResponse.md @@ -5,13 +5,12 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `email_address` | ```str``` | Email address of the user invited to this team. | | -| `team_id` | ```str``` | Id of the team. | | -| `role` | ```str``` | Role of the user invited to this team. | | -| `sent_at` | ```int``` | Timestamp when the invitation was sent. | | -| `redeemed_at` | ```int``` | Timestamp when the invitation was redeemed. | | -| `expires_at` | ```int``` | Timestamp when the invitation is expiring. | | +| `email_address` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Email address of the user invited to this team. REPLACE_ME_WITH_DESCRIPTION_END | | +| `team_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Id of the team. REPLACE_ME_WITH_DESCRIPTION_END | | +| `role` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Role of the user invited to this team. REPLACE_ME_WITH_DESCRIPTION_END | | +| `sent_at` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Timestamp when the invitation was sent. REPLACE_ME_WITH_DESCRIPTION_END | | +| `redeemed_at` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Timestamp when the invitation was redeemed. REPLACE_ME_WITH_DESCRIPTION_END | | +| `expires_at` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Timestamp when the invitation is expiring. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/TeamInvitesResponse.md b/sdks/python/docs/TeamInvitesResponse.md index 78b4d80c0..32b3a76b6 100644 --- a/sdks/python/docs/TeamInvitesResponse.md +++ b/sdks/python/docs/TeamInvitesResponse.md @@ -5,9 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `team_invites` | [```[TeamInviteResponse]```](TeamInviteResponse.md) | Contains a list of team invites and their roles. | | -| `warnings` | [```[WarningResponse]```](WarningResponse.md) | | | +| `team_invites` | [```List[TeamInviteResponse]```](TeamInviteResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN Contains a list of team invites and their roles. REPLACE_ME_WITH_DESCRIPTION_END | | +| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/TeamMemberResponse.md b/sdks/python/docs/TeamMemberResponse.md index 64fea4347..f7fc45dc9 100644 --- a/sdks/python/docs/TeamMemberResponse.md +++ b/sdks/python/docs/TeamMemberResponse.md @@ -5,10 +5,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `account_id` | ```str``` | Account id of the team member. | | -| `email_address` | ```str``` | Email address of the team member. | | -| `role` | ```str``` | The specific role a member has on the team. | | +| `account_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Account id of the team member. REPLACE_ME_WITH_DESCRIPTION_END | | +| `email_address` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Email address of the team member. REPLACE_ME_WITH_DESCRIPTION_END | | +| `role` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The specific role a member has on the team. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/TeamMembersResponse.md b/sdks/python/docs/TeamMembersResponse.md index 7d44711eb..5719b0e49 100644 --- a/sdks/python/docs/TeamMembersResponse.md +++ b/sdks/python/docs/TeamMembersResponse.md @@ -5,10 +5,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `team_members` | [```[TeamMemberResponse]```](TeamMemberResponse.md) | Contains a list of team members and their roles for a specific team. | | -| `list_info` | [```ListInfoResponse```](ListInfoResponse.md) | | | -| `warnings` | [```[WarningResponse]```](WarningResponse.md) | | | +| `team_members` | [```List[TeamMemberResponse]```](TeamMemberResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN Contains a list of team members and their roles for a specific team. REPLACE_ME_WITH_DESCRIPTION_END | | +| `list_info` | [```ListInfoResponse```](ListInfoResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/TeamParentResponse.md b/sdks/python/docs/TeamParentResponse.md index ba3f06dd2..4be31a608 100644 --- a/sdks/python/docs/TeamParentResponse.md +++ b/sdks/python/docs/TeamParentResponse.md @@ -1,13 +1,12 @@ # TeamParentResponse -Information about the parent team if a team has one, set to `null` otherwise. +Information about the parent team if a team has one, set to `null` otherwise. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `team_id` | ```str``` | The id of a team | | -| `name` | ```str``` | The name of a team | | +| `team_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The id of a team REPLACE_ME_WITH_DESCRIPTION_END | | +| `name` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The name of a team REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/TeamRemoveMemberRequest.md b/sdks/python/docs/TeamRemoveMemberRequest.md index 8369af840..3e5bcb866 100644 --- a/sdks/python/docs/TeamRemoveMemberRequest.md +++ b/sdks/python/docs/TeamRemoveMemberRequest.md @@ -5,12 +5,19 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `account_id` | ```str``` | **account_id** or **email_address** is required. If both are provided, the account id prevails.

Account id to remove from your Team. | | -| `email_address` | ```str``` | **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` | ```str``` | 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` | ```str``` | Id of the new Team. | | -| `new_role` | ```str``` | A new role member will take in a new Team.

**NOTE:** This parameter is used only if `new_team_id` is provided. | | +| `account_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN **account_id** or **email_address** is required. If both are provided, the account id prevails. -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) +Account id to remove from your Team. REPLACE_ME_WITH_DESCRIPTION_END | | +| `email_address` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN **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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `new_owner_email_address` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `new_team_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Id of the new Team. REPLACE_ME_WITH_DESCRIPTION_END | | +| `new_role` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN A new role member will take in a new Team. +**NOTE:** This parameter is used only if `new_team_id` is provided. REPLACE_ME_WITH_DESCRIPTION_END | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TeamResponse.md b/sdks/python/docs/TeamResponse.md index b3f41be03..b7c09dfac 100644 --- a/sdks/python/docs/TeamResponse.md +++ b/sdks/python/docs/TeamResponse.md @@ -5,11 +5,10 @@ Contains information about your team and its members ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `name` | ```str``` | The name of your Team | | -| `accounts` | [```[AccountResponse]```](AccountResponse.md) | | | -| `invited_accounts` | [```[AccountResponse]```](AccountResponse.md) | 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` | ```[str]``` | A list of email addresses that have an outstanding invitation to join your Team and do not yet have a Dropbox Sign account. | | +| `name` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The name of your Team REPLACE_ME_WITH_DESCRIPTION_END | | +| `accounts` | [```List[AccountResponse]```](AccountResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `invited_accounts` | [```List[AccountResponse]```](AccountResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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`. REPLACE_ME_WITH_DESCRIPTION_END | | +| `invited_emails` | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN A list of email addresses that have an outstanding invitation to join your Team and do not yet have a Dropbox Sign account. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/TeamSubTeamsResponse.md b/sdks/python/docs/TeamSubTeamsResponse.md index 1b7f9f89f..c2193cca8 100644 --- a/sdks/python/docs/TeamSubTeamsResponse.md +++ b/sdks/python/docs/TeamSubTeamsResponse.md @@ -5,10 +5,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `sub_teams` | [```[SubTeamResponse]```](SubTeamResponse.md) | Contains a list with sub teams. | | -| `list_info` | [```ListInfoResponse```](ListInfoResponse.md) | | | -| `warnings` | [```[WarningResponse]```](WarningResponse.md) | | | +| `sub_teams` | [```List[SubTeamResponse]```](SubTeamResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN Contains a list with sub teams. REPLACE_ME_WITH_DESCRIPTION_END | | +| `list_info` | [```ListInfoResponse```](ListInfoResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/TeamUpdateRequest.md b/sdks/python/docs/TeamUpdateRequest.md index d99b6a5ec..441a2f110 100644 --- a/sdks/python/docs/TeamUpdateRequest.md +++ b/sdks/python/docs/TeamUpdateRequest.md @@ -5,8 +5,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `name` | ```str``` | The name of your Team. | | +| `name` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The name of your Team. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/TemplateAddUserRequest.md b/sdks/python/docs/TemplateAddUserRequest.md index 08a2ac117..99ec8dc37 100644 --- a/sdks/python/docs/TemplateAddUserRequest.md +++ b/sdks/python/docs/TemplateAddUserRequest.md @@ -5,10 +5,11 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `account_id` | ```str``` | The id of the Account to give access to the Template.
**NOTE:** The account id prevails if email address is also provided. | | -| `email_address` | ```str``` | The email address of the Account to give access to the Template.
**NOTE:** The account id prevails if it is also provided. | | -| `skip_notification` | ```bool``` | If set to `true`, the user does not receive an email notification when a template has been shared with them. Defaults to `false`. | [default to False] | +| `account_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The id of the Account to give access to the Template. +**NOTE:** The account id prevails if email address is also provided. REPLACE_ME_WITH_DESCRIPTION_END | | +| `email_address` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The email address of the Account to give access to the Template. +**NOTE:** The account id prevails if it is also provided. REPLACE_ME_WITH_DESCRIPTION_END | | +| `skip_notification` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN If set to `true`, the user does not receive an email notification when a template has been shared with them. Defaults to `false`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/TemplateApi.md b/sdks/python/docs/TemplateApi.md index 15c878aa7..6e5250ac9 100644 --- a/sdks/python/docs/TemplateApi.md +++ b/sdks/python/docs/TemplateApi.md @@ -30,36 +30,9 @@ Gives the specified Account access to the specified Template. The specified Acco * Bearer (JWT) Authentication (oauth2): ```python -from pprint import pprint - -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", -) - -with ApiClient(configuration) as api_client: - template_api = apis.TemplateApi(api_client) - - data = models.TemplateAddUserRequest( - email_address="george@dropboxsign.com", - ) - - template_id = "f57db65d3f933b5316d398057a36176831451a35" - - try: - response = template_api.template_add_user(template_id, data) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) - +REPLACE_ME_WITH_EXAMPLE_FOR__template_add_user_Python_CODE +``` ``` - ### Parameters | Name | Type | Description | Notes | @@ -80,7 +53,6 @@ with ApiClient(configuration) as api_client: - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -103,67 +75,9 @@ Creates a template that can then be used. * Bearer (JWT) Authentication (oauth2): ```python -from pprint import pprint - -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", -) - -with ApiClient(configuration) as api_client: - template_api = apis.TemplateApi(api_client) - - role_1 = models.SubTemplateRole( - name="Client", - order=0, - ) - - role_2 = models.SubTemplateRole( - name="Witness", - order=1, - ) - - merge_field_1 = models.SubMergeField( - name="Full Name", - type="text", - ) - - merge_field_2 = models.SubMergeField( - name="Is Registered?", - type="checkbox", - ) - - field_options = models.SubFieldOptions( - date_format="DD - MM - YYYY", - ) - - data = models.TemplateCreateRequest( - client_id="37dee8d8440c66d54cfa05d92c160882", - files=[open("example_signature_request.pdf", "rb")], - title="Test Template", - subject="Please sign this document", - message="For your approval", - signer_roles=[role_1, role_2], - cc_roles=["Manager"], - merge_fields=[merge_field_1, merge_field_2], - field_options=field_options, - test_mode=True, - ) - - try: - response = template_api.template_create(data) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) - +REPLACE_ME_WITH_EXAMPLE_FOR__template_create_Python_CODE +``` ``` - ### Parameters | Name | Type | Description | Notes | @@ -183,7 +97,6 @@ with ApiClient(configuration) as api_client: - **Content-Type**: application/json, multipart/form-data - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -206,67 +119,9 @@ The first step in an embedded template workflow. Creates a draft template that c * Bearer (JWT) Authentication (oauth2): ```python -from pprint import pprint - -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", -) - -with ApiClient(configuration) as api_client: - template_api = apis.TemplateApi(api_client) - - role_1 = models.SubTemplateRole( - name="Client", - order=0, - ) - - role_2 = models.SubTemplateRole( - name="Witness", - order=1, - ) - - merge_field_1 = models.SubMergeField( - name="Full Name", - type="text", - ) - - merge_field_2 = models.SubMergeField( - name="Is Registered?", - type="checkbox", - ) - - field_options = models.SubFieldOptions( - date_format="DD - MM - YYYY", - ) - - data = models.TemplateCreateEmbeddedDraftRequest( - client_id="37dee8d8440c66d54cfa05d92c160882", - files=[open("example_signature_request.pdf", "rb")], - title="Test Template", - subject="Please sign this document", - message="For your approval", - signer_roles=[role_1, role_2], - cc_roles=["Manager"], - merge_fields=[merge_field_1, merge_field_2], - field_options=field_options, - test_mode=True, - ) - - try: - response = template_api.template_create_embedded_draft(data) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) - +REPLACE_ME_WITH_EXAMPLE_FOR__template_create_embedded_draft_Python_CODE +``` ``` - ### Parameters | Name | Type | Description | Notes | @@ -286,7 +141,6 @@ with ApiClient(configuration) as api_client: - **Content-Type**: application/json, multipart/form-data - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -309,29 +163,9 @@ Completely deletes the template specified from the account. * Bearer (JWT) Authentication (oauth2): ```python -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", -) - -with ApiClient(configuration) as api_client: - template_api = apis.TemplateApi(api_client) - - template_id = "5de8179668f2033afac48da1868d0093bf133266" - - try: - template_api.template_delete(template_id) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) - +REPLACE_ME_WITH_EXAMPLE_FOR__template_delete_Python_CODE +``` ``` - ### Parameters | Name | Type | Description | Notes | @@ -351,7 +185,6 @@ void (empty response body) - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -362,7 +195,7 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # ```template_files``` -> ```file_type template_files(template_id)``` +> ```io.IOBase template_files(template_id)``` Get Template Files @@ -374,42 +207,19 @@ Obtain a copy of the current documents specified by the `template_id` parameter. * Bearer (JWT) Authentication (oauth2): ```python -from pprint import pprint - -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", -) - -with ApiClient(configuration) as api_client: - template_api = apis.TemplateApi(api_client) - - template_id = "5de8179668f2033afac48da1868d0093bf133266" - - try: - response = template_api.template_files(template_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) - +REPLACE_ME_WITH_EXAMPLE_FOR__template_files_Python_CODE +``` ``` - ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | `template_id` | **str** | The id of the template files to retrieve. | | -| `file_type` | **str** | Set to `pdf` for a single merged document or `zip` for a collection of individual documents. | [optional] | +| `file_type` | **str** | Set to `pdf` for a single merged document or `zip` for a collection of individual documents. | [optional] | ### Return type -**file_type** +**io.IOBase** ### Authorization @@ -420,7 +230,6 @@ with ApiClient(configuration) as api_client: - **Content-Type**: Not defined - **Accept**: application/pdf, application/zip, application/json - ### HTTP response details | Status code | Description | Response headers | @@ -443,32 +252,9 @@ Obtain a copy of the current documents specified by the `template_id` parameter. * Bearer (JWT) Authentication (oauth2): ```python -from pprint import pprint - -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", -) - -with ApiClient(configuration) as api_client: - template_api = apis.TemplateApi(api_client) - - template_id = "5de8179668f2033afac48da1868d0093bf133266" - - try: - response = template_api.template_files_as_data_uri(template_id) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) - +REPLACE_ME_WITH_EXAMPLE_FOR__template_files_as_data_uri_Python_CODE +``` ``` - ### Parameters | Name | Type | Description | Notes | @@ -488,7 +274,6 @@ with ApiClient(configuration) as api_client: - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -511,38 +296,15 @@ Obtain a copy of the current documents specified by the `template_id` parameter. * Bearer (JWT) Authentication (oauth2): ```python -from pprint import pprint - -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", -) - -with ApiClient(configuration) as api_client: - template_api = apis.TemplateApi(api_client) - - template_id = "5de8179668f2033afac48da1868d0093bf133266" - - try: - response = template_api.template_files_as_file_url(template_id) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) - +REPLACE_ME_WITH_EXAMPLE_FOR__template_files_as_file_url_Python_CODE +``` ``` - ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | `template_id` | **str** | The id of the template files to retrieve. | | -| `force_download` | **int** | 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. | [optional][default to 1] | +| `force_download` | **int** | 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. | [optional][default to 1] | ### Return type @@ -557,7 +319,6 @@ with ApiClient(configuration) as api_client: - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -580,32 +341,9 @@ Returns the Template specified by the `template_id` parameter. * Bearer (JWT) Authentication (oauth2): ```python -from pprint import pprint - -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", -) - -with ApiClient(configuration) as api_client: - template_api = apis.TemplateApi(api_client) - - template_id = "f57db65d3f933b5316d398057a36176831451a35" - - try: - response = template_api.template_get(template_id) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) - +REPLACE_ME_WITH_EXAMPLE_FOR__template_get_Python_CODE +``` ``` - ### Parameters | Name | Type | Description | Notes | @@ -625,7 +363,6 @@ with ApiClient(configuration) as api_client: - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -648,41 +385,16 @@ Returns a list of the Templates that are accessible by you. Take a look at our * Bearer (JWT) Authentication (oauth2): ```python -from pprint import pprint - -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", -) - -with ApiClient(configuration) as api_client: - template_api = apis.TemplateApi(api_client) - - account_id = "f57db65d3f933b5316d398057a36176831451a35" - - try: - response = template_api.template_list( - account_id=account_id, - ) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) - +REPLACE_ME_WITH_EXAMPLE_FOR__template_list_Python_CODE +``` ``` - ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| `account_id` | **str** | Which account to return Templates for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. | [optional] | -| `page` | **int** | Which page number of the Template List to return. Defaults to `1`. | [optional][default to 1] | -| `page_size` | **int** | Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. | [optional][default to 20] | +| `account_id` | **str** | Which account to return Templates for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. | [optional] | +| `page` | **int** | Which page number of the Template List to return. Defaults to `1`. | [optional][default to 1] | +| `page_size` | **int** | Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. | [optional][default to 20] | | `query` | **str** | String that includes search terms and/or fields to be used to filter the Template objects. | [optional] | ### Return type @@ -698,7 +410,6 @@ with ApiClient(configuration) as api_client: - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -721,36 +432,9 @@ Removes the specified Account's access to the specified Template. * Bearer (JWT) Authentication (oauth2): ```python -from pprint import pprint - -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", -) - -with ApiClient(configuration) as api_client: - template_api = apis.TemplateApi(api_client) - - data = models.TemplateRemoveUserRequest( - email_address="george@dropboxsign.com", - ) - - template_id = "21f920ec2b7f4b6bb64d3ed79f26303843046536" - - try: - response = template_api.template_remove_user(template_id, data) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) - +REPLACE_ME_WITH_EXAMPLE_FOR__template_remove_user_Python_CODE +``` ``` - ### Parameters | Name | Type | Description | Notes | @@ -771,7 +455,6 @@ with ApiClient(configuration) as api_client: - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -794,36 +477,9 @@ Overlays a new file with the overlay of an existing template. The new file(s) mu * Bearer (JWT) Authentication (oauth2): ```python -from pprint import pprint - -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", -) - -with ApiClient(configuration) as api_client: - template_api = apis.TemplateApi(api_client) - - data = models.TemplateUpdateFilesRequest( - files=[open("example_signature_request.pdf", "rb")], - ) - - template_id = "5de8179668f2033afac48da1868d0093bf133266" - - try: - response = template_api.template_update_files(template_id, data) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) - +REPLACE_ME_WITH_EXAMPLE_FOR__template_update_files_Python_CODE +``` ``` - ### Parameters | Name | Type | Description | Notes | @@ -844,7 +500,6 @@ with ApiClient(configuration) as api_client: - **Content-Type**: application/json, multipart/form-data - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | diff --git a/sdks/python/docs/TemplateCreateEmbeddedDraftRequest.md b/sdks/python/docs/TemplateCreateEmbeddedDraftRequest.md index d495ce46b..73ee457cf 100644 --- a/sdks/python/docs/TemplateCreateEmbeddedDraftRequest.md +++ b/sdks/python/docs/TemplateCreateEmbeddedDraftRequest.md @@ -5,32 +5,56 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `client_id`*_required_ | ```str``` | 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` | ```[file_type]``` | 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` | ```[str]``` | 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` | ```bool``` | This allows the requester to specify whether the user is allowed to provide email addresses to CC when creating a template. | [default to True] | -| `allow_reassign` | ```bool``` | 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. | [default to False] | -| `attachments` | [```[SubAttachment]```](SubAttachment.md) | A list describing the attachments | | -| `cc_roles` | ```[str]``` | The CC roles that must be assigned when using the template to send a signature request | | -| `editor_options` | [```SubEditorOptions```](SubEditorOptions.md) | | | -| `field_options` | [```SubFieldOptions```](SubFieldOptions.md) | | | -| `force_signer_roles` | ```bool``` | Provide users the ability to review/edit the template signer roles. | [default to False] | -| `force_subject_message` | ```bool``` | Provide users the ability to review/edit the template subject and message. | [default to False] | -| `form_field_groups` | [```[SubFormFieldGroup]```](SubFormFieldGroup.md) | 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` | [```[SubFormFieldRule]```](SubFormFieldRule.md) | Conditional Logic rules for fields defined in `form_fields_per_document`. | | -| `form_fields_per_document` | [```[SubFormFieldsPerDocumentBase]```](SubFormFieldsPerDocumentBase.md) | 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` | [```[SubMergeField]```](SubMergeField.md) | 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` | ```str``` | The default template email message. | | -| `metadata` | ```{str: (bool, date, datetime, dict, float, int, list, str, none_type)}``` | 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` | ```bool``` | 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. | [default to False] | -| `show_progress_stepper` | ```bool``` | When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. | [default to True] | -| `signer_roles` | [```[SubTemplateRole]```](SubTemplateRole.md) | An array of the designated signer roles that must be specified when sending a SignatureRequest using this Template. | | -| `skip_me_now` | ```bool``` | Disables the "Me (Now)" option for the person preparing the document. Does not work with type `send_document`. Defaults to `false`. | [default to False] | -| `subject` | ```str``` | The template title (alias). | | -| `test_mode` | ```bool``` | Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. | [default to False] | -| `title` | ```str``` | The title you want to assign to the SignatureRequest. | | -| `use_preexisting_fields` | ```bool``` | Enable the detection of predefined PDF fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). | [default to False] | +| `client_id`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Client id of the app you're using to create this draft. Used to apply the branding and callback url defined for the app. REPLACE_ME_WITH_DESCRIPTION_END | | +| `files` | ```List[io.IOBase]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Use `files[]` to indicate the uploaded file(s) to send for signature. -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) +This endpoint requires either **files** or **file_urls[]**, but not both. REPLACE_ME_WITH_DESCRIPTION_END | | +| `file_urls` | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `allow_ccs` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN This allows the requester to specify whether the user is allowed to provide email addresses to CC when creating a template. REPLACE_ME_WITH_DESCRIPTION_END | [default to True] | +| `allow_reassign` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `attachments` | [```List[SubAttachment]```](SubAttachment.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN A list describing the attachments REPLACE_ME_WITH_DESCRIPTION_END | | +| `cc_roles` | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The CC roles that must be assigned when using the template to send a signature request REPLACE_ME_WITH_DESCRIPTION_END | | +| `editor_options` | [```SubEditorOptions```](SubEditorOptions.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `field_options` | [```SubFieldOptions```](SubFieldOptions.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `force_signer_roles` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Provide users the ability to review/edit the template signer roles. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `force_subject_message` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Provide users the ability to review/edit the template subject and message. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `form_field_groups` | [```List[SubFormFieldGroup]```](SubFormFieldGroup.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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`. REPLACE_ME_WITH_DESCRIPTION_END | | +| `form_field_rules` | [```List[SubFormFieldRule]```](SubFormFieldRule.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN Conditional Logic rules for fields defined in `form_fields_per_document`. REPLACE_ME_WITH_DESCRIPTION_END | | +| `form_fields_per_document` | [```List[SubFormFieldsPerDocumentBase]```](SubFormFieldsPerDocumentBase.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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` REPLACE_ME_WITH_DESCRIPTION_END | | +| `merge_fields` | [```List[SubMergeField]```](SubMergeField.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `message` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The default template email message. REPLACE_ME_WITH_DESCRIPTION_END | | +| `metadata` | ```Dict[str, object]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `show_preview` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `show_progress_stepper` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. REPLACE_ME_WITH_DESCRIPTION_END | [default to True] | +| `signer_roles` | [```List[SubTemplateRole]```](SubTemplateRole.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN An array of the designated signer roles that must be specified when sending a SignatureRequest using this Template. REPLACE_ME_WITH_DESCRIPTION_END | | +| `skip_me_now` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Disables the "Me (Now)" option for the person preparing the document. Does not work with type `send_document`. Defaults to `false`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `subject` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The template title (alias). REPLACE_ME_WITH_DESCRIPTION_END | | +| `test_mode` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `title` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The title you want to assign to the SignatureRequest. REPLACE_ME_WITH_DESCRIPTION_END | | +| `use_preexisting_fields` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Enable the detection of predefined PDF fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateCreateEmbeddedDraftResponse.md b/sdks/python/docs/TemplateCreateEmbeddedDraftResponse.md index 55b55f700..3a2cc70ed 100644 --- a/sdks/python/docs/TemplateCreateEmbeddedDraftResponse.md +++ b/sdks/python/docs/TemplateCreateEmbeddedDraftResponse.md @@ -5,9 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `template` | [```TemplateCreateEmbeddedDraftResponseTemplate```](TemplateCreateEmbeddedDraftResponseTemplate.md) | | | -| `warnings` | [```[WarningResponse]```](WarningResponse.md) | A list of warnings. | | +| `template` | [```TemplateCreateEmbeddedDraftResponseTemplate```](TemplateCreateEmbeddedDraftResponseTemplate.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN A list of warnings. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/TemplateCreateEmbeddedDraftResponseTemplate.md b/sdks/python/docs/TemplateCreateEmbeddedDraftResponseTemplate.md index 299318265..80f515238 100644 --- a/sdks/python/docs/TemplateCreateEmbeddedDraftResponseTemplate.md +++ b/sdks/python/docs/TemplateCreateEmbeddedDraftResponseTemplate.md @@ -1,15 +1,14 @@ # TemplateCreateEmbeddedDraftResponseTemplate -Template object with parameters: `template_id`, `edit_url`, `expires_at`. +Template object with parameters: `template_id`, `edit_url`, `expires_at`. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `template_id` | ```str``` | The id of the Template. | | -| `edit_url` | ```str``` | Link to edit the template. | | -| `expires_at` | ```int``` | When the link expires. | | -| `warnings` | [```[WarningResponse]```](WarningResponse.md) | A list of warnings. | | +| `template_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The id of the Template. REPLACE_ME_WITH_DESCRIPTION_END | | +| `edit_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Link to edit the template. REPLACE_ME_WITH_DESCRIPTION_END | | +| `expires_at` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN When the link expires. REPLACE_ME_WITH_DESCRIPTION_END | | +| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN A list of warnings. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/TemplateCreateRequest.md b/sdks/python/docs/TemplateCreateRequest.md index 44d7c33eb..8de7db73b 100644 --- a/sdks/python/docs/TemplateCreateRequest.md +++ b/sdks/python/docs/TemplateCreateRequest.md @@ -5,25 +5,46 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `form_fields_per_document`*_required_ | [```[SubFormFieldsPerDocumentBase]```](SubFormFieldsPerDocumentBase.md) | 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`*_required_ | [```[SubTemplateRole]```](SubTemplateRole.md) | An array of the designated signer roles that must be specified when sending a SignatureRequest using this Template. | | -| `files` | ```[file_type]``` | 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` | ```[str]``` | 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` | ```bool``` | 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. | [default to False] | -| `attachments` | [```[SubAttachment]```](SubAttachment.md) | A list describing the attachments | | -| `cc_roles` | ```[str]``` | The CC roles that must be assigned when using the template to send a signature request | | -| `client_id` | ```str``` | 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` | [```SubFieldOptions```](SubFieldOptions.md) | | | -| `form_field_groups` | [```[SubFormFieldGroup]```](SubFormFieldGroup.md) | 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` | [```[SubFormFieldRule]```](SubFormFieldRule.md) | Conditional Logic rules for fields defined in `form_fields_per_document`. | | -| `merge_fields` | [```[SubMergeField]```](SubMergeField.md) | 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` | ```str``` | The default template email message. | | -| `metadata` | ```{str: (bool, date, datetime, dict, float, int, list, str, none_type)}``` | 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` | ```str``` | The template title (alias). | | -| `test_mode` | ```bool``` | Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. | [default to False] | -| `title` | ```str``` | The title you want to assign to the SignatureRequest. | | -| `use_preexisting_fields` | ```bool``` | Enable the detection of predefined PDF fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). | [default to False] | +| `form_fields_per_document`*_required_ | [```List[SubFormFieldsPerDocumentBase]```](SubFormFieldsPerDocumentBase.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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).) -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) +**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` REPLACE_ME_WITH_DESCRIPTION_END | | +| `signer_roles`*_required_ | [```List[SubTemplateRole]```](SubTemplateRole.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN An array of the designated signer roles that must be specified when sending a SignatureRequest using this Template. REPLACE_ME_WITH_DESCRIPTION_END | | +| `files` | ```List[io.IOBase]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Use `files[]` to indicate the uploaded file(s) to send for signature. + +This endpoint requires either **files** or **file_urls[]**, but not both. REPLACE_ME_WITH_DESCRIPTION_END | | +| `file_urls` | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `allow_reassign` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `attachments` | [```List[SubAttachment]```](SubAttachment.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN A list describing the attachments REPLACE_ME_WITH_DESCRIPTION_END | | +| `cc_roles` | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The CC roles that must be assigned when using the template to send a signature request REPLACE_ME_WITH_DESCRIPTION_END | | +| `client_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Client id of the app you're using to create this draft. Used to apply the branding and callback url defined for the app. REPLACE_ME_WITH_DESCRIPTION_END | | +| `field_options` | [```SubFieldOptions```](SubFieldOptions.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `form_field_groups` | [```List[SubFormFieldGroup]```](SubFormFieldGroup.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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`. REPLACE_ME_WITH_DESCRIPTION_END | | +| `form_field_rules` | [```List[SubFormFieldRule]```](SubFormFieldRule.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN Conditional Logic rules for fields defined in `form_fields_per_document`. REPLACE_ME_WITH_DESCRIPTION_END | | +| `merge_fields` | [```List[SubMergeField]```](SubMergeField.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `message` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The default template email message. REPLACE_ME_WITH_DESCRIPTION_END | | +| `metadata` | ```Dict[str, object]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `subject` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The template title (alias). REPLACE_ME_WITH_DESCRIPTION_END | | +| `test_mode` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `title` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The title you want to assign to the SignatureRequest. REPLACE_ME_WITH_DESCRIPTION_END | | +| `use_preexisting_fields` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Enable the detection of predefined PDF fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateCreateResponse.md b/sdks/python/docs/TemplateCreateResponse.md index 663bed62c..86122951b 100644 --- a/sdks/python/docs/TemplateCreateResponse.md +++ b/sdks/python/docs/TemplateCreateResponse.md @@ -5,9 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `template` | [```TemplateCreateResponseTemplate```](TemplateCreateResponseTemplate.md) | | | -| `warnings` | [```[WarningResponse]```](WarningResponse.md) | A list of warnings. | | +| `template` | [```TemplateCreateResponseTemplate```](TemplateCreateResponseTemplate.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN A list of warnings. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/TemplateCreateResponseTemplate.md b/sdks/python/docs/TemplateCreateResponseTemplate.md index 21d6307c7..07456de90 100644 --- a/sdks/python/docs/TemplateCreateResponseTemplate.md +++ b/sdks/python/docs/TemplateCreateResponseTemplate.md @@ -1,12 +1,11 @@ # TemplateCreateResponseTemplate -Template object with parameters: `template_id`. +Template object with parameters: `template_id`. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `template_id` | ```str``` | The id of the Template. | | +| `template_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The id of the Template. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/TemplateEditResponse.md b/sdks/python/docs/TemplateEditResponse.md index 30dcd803a..b04adb394 100644 --- a/sdks/python/docs/TemplateEditResponse.md +++ b/sdks/python/docs/TemplateEditResponse.md @@ -5,8 +5,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `template_id` | ```str``` | The id of the Template. | | +| `template_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The id of the Template. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/TemplateGetResponse.md b/sdks/python/docs/TemplateGetResponse.md index 6f29c8bf0..bc43fa5e8 100644 --- a/sdks/python/docs/TemplateGetResponse.md +++ b/sdks/python/docs/TemplateGetResponse.md @@ -5,9 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `template` | [```TemplateResponse```](TemplateResponse.md) | | | -| `warnings` | [```[WarningResponse]```](WarningResponse.md) | A list of warnings. | | +| `template` | [```TemplateResponse```](TemplateResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN A list of warnings. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/TemplateListResponse.md b/sdks/python/docs/TemplateListResponse.md index 14878d126..a30f8aa73 100644 --- a/sdks/python/docs/TemplateListResponse.md +++ b/sdks/python/docs/TemplateListResponse.md @@ -5,10 +5,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `templates` | [```[TemplateResponse]```](TemplateResponse.md) | List of templates that the API caller has access to. | | -| `list_info` | [```ListInfoResponse```](ListInfoResponse.md) | | | -| `warnings` | [```[WarningResponse]```](WarningResponse.md) | A list of warnings. | | +| `templates` | [```List[TemplateResponse]```](TemplateResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN List of templates that the API caller has access to. REPLACE_ME_WITH_DESCRIPTION_END | | +| `list_info` | [```ListInfoResponse```](ListInfoResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN A list of warnings. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/TemplateRemoveUserRequest.md b/sdks/python/docs/TemplateRemoveUserRequest.md index c151a0bef..265e46d7a 100644 --- a/sdks/python/docs/TemplateRemoveUserRequest.md +++ b/sdks/python/docs/TemplateRemoveUserRequest.md @@ -5,9 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `account_id` | ```str``` | The id or email address of the Account to remove access to the Template. The account id prevails if both are provided. | | -| `email_address` | ```str``` | The id or email address of the Account to remove access to the Template. The account id prevails if both are provided. | | +| `account_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The id or email address of the Account to remove access to the Template. The account id prevails if both are provided. REPLACE_ME_WITH_DESCRIPTION_END | | +| `email_address` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The id or email address of the Account to remove access to the Template. The account id prevails if both are provided. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/TemplateResponse.md b/sdks/python/docs/TemplateResponse.md index bb26bb762..952bb546a 100644 --- a/sdks/python/docs/TemplateResponse.md +++ b/sdks/python/docs/TemplateResponse.md @@ -5,22 +5,23 @@ Contains information about the templates you and your team have created. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `template_id` | ```str``` | The id of the Template. | | -| `title` | ```str``` | 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` | ```str``` | 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` | ```int``` | Time the template was last updated. | | -| `is_embedded` | ```bool, none_type``` | `true` if this template was created using an embedded flow, `false` if it was created on our website. | | -| `is_creator` | ```bool, none_type``` | `true` if you are the owner of this template, `false` if it's been shared with you by a team member. | | -| `can_edit` | ```bool, none_type``` | Indicates whether edit rights have been granted to you by the owner (always `true` if that's you). | | -| `is_locked` | ```bool, none_type``` | 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` | [```{str: (bool, date, datetime, dict, float, int, list, str, none_type)}```](.md) | The metadata attached to the template. | | -| `signer_roles` | [```[TemplateResponseSignerRole]```](TemplateResponseSignerRole.md) | An array of the designated signer roles that must be specified when sending a SignatureRequest using this Template. | | -| `cc_roles` | [```[TemplateResponseCCRole]```](TemplateResponseCCRole.md) | An array of the designated CC roles that must be specified when sending a SignatureRequest using this Template. | | -| `documents` | [```[TemplateResponseDocument]```](TemplateResponseDocument.md) | An array describing each document associated with this Template. Includes form field data for each document. | | -| `custom_fields` | [```[TemplateResponseDocumentCustomFieldBase], none_type```](TemplateResponseDocumentCustomFieldBase.md) | 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` | [```[TemplateResponseDocumentFormFieldBase], none_type```](TemplateResponseDocumentFormFieldBase.md) | 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` | [```[TemplateResponseAccount], none_type```](TemplateResponseAccount.md) | An array of the Accounts that can use this Template. | | +| `template_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The id of the Template. REPLACE_ME_WITH_DESCRIPTION_END | | +| `title` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `message` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `updated_at` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Time the template was last updated. REPLACE_ME_WITH_DESCRIPTION_END | | +| `is_embedded` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN `true` if this template was created using an embedded flow, `false` if it was created on our website. REPLACE_ME_WITH_DESCRIPTION_END | | +| `is_creator` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN `true` if you are the owner of this template, `false` if it's been shared with you by a team member. REPLACE_ME_WITH_DESCRIPTION_END | | +| `can_edit` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Indicates whether edit rights have been granted to you by the owner (always `true` if that's you). REPLACE_ME_WITH_DESCRIPTION_END | | +| `is_locked` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `metadata` | ```object``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The metadata attached to the template. REPLACE_ME_WITH_DESCRIPTION_END | | +| `signer_roles` | [```List[TemplateResponseSignerRole]```](TemplateResponseSignerRole.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN An array of the designated signer roles that must be specified when sending a SignatureRequest using this Template. REPLACE_ME_WITH_DESCRIPTION_END | | +| `cc_roles` | [```List[TemplateResponseCCRole]```](TemplateResponseCCRole.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN An array of the designated CC roles that must be specified when sending a SignatureRequest using this Template. REPLACE_ME_WITH_DESCRIPTION_END | | +| `documents` | [```List[TemplateResponseDocument]```](TemplateResponseDocument.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN An array describing each document associated with this Template. Includes form field data for each document. REPLACE_ME_WITH_DESCRIPTION_END | | +| `custom_fields` | [```List[TemplateResponseDocumentCustomFieldBase]```](TemplateResponseDocumentCustomFieldBase.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN Deprecated. Use `custom_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead. REPLACE_ME_WITH_DESCRIPTION_END | | +| `named_form_fields` | [```List[TemplateResponseDocumentFormFieldBase]```](TemplateResponseDocumentFormFieldBase.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN Deprecated. Use `form_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead. REPLACE_ME_WITH_DESCRIPTION_END | | +| `accounts` | [```List[TemplateResponseAccount]```](TemplateResponseAccount.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN An array of the Accounts that can use this Template. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/TemplateResponseAccount.md b/sdks/python/docs/TemplateResponseAccount.md index e991a4092..53d76fe47 100644 --- a/sdks/python/docs/TemplateResponseAccount.md +++ b/sdks/python/docs/TemplateResponseAccount.md @@ -5,13 +5,12 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `account_id` | ```str``` | The id of the Account. | | -| `email_address` | ```str``` | The email address associated with the Account. | | -| `is_locked` | ```bool``` | Returns `true` if the user has been locked out of their account by a team admin. | | -| `is_paid_hs` | ```bool``` | Returns `true` if the user has a paid Dropbox Sign account. | | -| `is_paid_hf` | ```bool``` | Returns `true` if the user has a paid HelloFax account. | | -| `quotas` | [```TemplateResponseAccountQuota```](TemplateResponseAccountQuota.md) | | | +| `account_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The id of the Account. REPLACE_ME_WITH_DESCRIPTION_END | | +| `email_address` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The email address associated with the Account. REPLACE_ME_WITH_DESCRIPTION_END | | +| `is_locked` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Returns `true` if the user has been locked out of their account by a team admin. REPLACE_ME_WITH_DESCRIPTION_END | | +| `is_paid_hs` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Returns `true` if the user has a paid Dropbox Sign account. REPLACE_ME_WITH_DESCRIPTION_END | | +| `is_paid_hf` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Returns `true` if the user has a paid HelloFax account. REPLACE_ME_WITH_DESCRIPTION_END | | +| `quotas` | [```TemplateResponseAccountQuota```](TemplateResponseAccountQuota.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/TemplateResponseAccountQuota.md b/sdks/python/docs/TemplateResponseAccountQuota.md index 1af33065a..8d683b39b 100644 --- a/sdks/python/docs/TemplateResponseAccountQuota.md +++ b/sdks/python/docs/TemplateResponseAccountQuota.md @@ -5,11 +5,10 @@ An array of the designated CC roles that must be specified when sending a Signat ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `templates_left` | ```int``` | API templates remaining. | | -| `api_signature_requests_left` | ```int``` | API signature requests remaining. | | -| `documents_left` | ```int``` | Signature requests remaining. | | -| `sms_verifications_left` | ```int``` | SMS verifications remaining. | | +| `templates_left` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN API templates remaining. REPLACE_ME_WITH_DESCRIPTION_END | | +| `api_signature_requests_left` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN API signature requests remaining. REPLACE_ME_WITH_DESCRIPTION_END | | +| `documents_left` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Signature requests remaining. REPLACE_ME_WITH_DESCRIPTION_END | | +| `sms_verifications_left` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN SMS verifications remaining. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/TemplateResponseCCRole.md b/sdks/python/docs/TemplateResponseCCRole.md index 68b6feafe..2d32d89a9 100644 --- a/sdks/python/docs/TemplateResponseCCRole.md +++ b/sdks/python/docs/TemplateResponseCCRole.md @@ -5,8 +5,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `name` | ```str``` | The name of the Role. | | +| `name` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The name of the Role. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/TemplateResponseDocument.md b/sdks/python/docs/TemplateResponseDocument.md index 760ab54b2..3f41f9dc8 100644 --- a/sdks/python/docs/TemplateResponseDocument.md +++ b/sdks/python/docs/TemplateResponseDocument.md @@ -5,13 +5,12 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `name` | ```str``` | Name of the associated file. | | -| `index` | ```int``` | Document ordering, the lowest index is displayed first and the highest last (0-based indexing). | | -| `field_groups` | [```[TemplateResponseDocumentFieldGroup]```](TemplateResponseDocumentFieldGroup.md) | An array of Form Field Group objects. | | -| `form_fields` | [```[TemplateResponseDocumentFormFieldBase]```](TemplateResponseDocumentFormFieldBase.md) | An array of Form Field objects containing the name and type of each named field. | | -| `custom_fields` | [```[TemplateResponseDocumentCustomFieldBase]```](TemplateResponseDocumentCustomFieldBase.md) | An array of Form Field objects containing the name and type of each named field. | | -| `static_fields` | [```[TemplateResponseDocumentStaticFieldBase], none_type```](TemplateResponseDocumentStaticFieldBase.md) | An array describing static overlay fields. **NOTE:** Only available for certain subscriptions. | | +| `name` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Name of the associated file. REPLACE_ME_WITH_DESCRIPTION_END | | +| `index` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Document ordering, the lowest index is displayed first and the highest last (0-based indexing). REPLACE_ME_WITH_DESCRIPTION_END | | +| `field_groups` | [```List[TemplateResponseDocumentFieldGroup]```](TemplateResponseDocumentFieldGroup.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN An array of Form Field Group objects. REPLACE_ME_WITH_DESCRIPTION_END | | +| `form_fields` | [```List[TemplateResponseDocumentFormFieldBase]```](TemplateResponseDocumentFormFieldBase.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN An array of Form Field objects containing the name and type of each named field. REPLACE_ME_WITH_DESCRIPTION_END | | +| `custom_fields` | [```List[TemplateResponseDocumentCustomFieldBase]```](TemplateResponseDocumentCustomFieldBase.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN An array of Form Field objects containing the name and type of each named field. REPLACE_ME_WITH_DESCRIPTION_END | | +| `static_fields` | [```List[TemplateResponseDocumentStaticFieldBase]```](TemplateResponseDocumentStaticFieldBase.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN An array describing static overlay fields. **NOTE:** Only available for certain subscriptions. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/TemplateResponseDocumentCustomFieldBase.md b/sdks/python/docs/TemplateResponseDocumentCustomFieldBase.md index aa31b88ae..8242c180c 100644 --- a/sdks/python/docs/TemplateResponseDocumentCustomFieldBase.md +++ b/sdks/python/docs/TemplateResponseDocumentCustomFieldBase.md @@ -5,17 +5,16 @@ An array of Form Field objects containing the name and type of each named field. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | | | -| `api_id` | ```str``` | The unique ID for this field. | | -| `name` | ```str``` | The name of the Custom Field. | | -| `signer` | ```str, none_type``` | The signer of the Custom Field. Can be `null` if field is a merge field (assigned to Sender). | | -| `x` | ```int``` | The horizontal offset in pixels for this form field. | | -| `y` | ```int``` | The vertical offset in pixels for this form field. | | -| `width` | ```int``` | The width in pixels of this form field. | | -| `height` | ```int``` | The height in pixels of this form field. | | -| `required` | ```bool``` | Boolean showing whether or not this field is required. | | -| `group` | ```str, none_type``` | The name of the group this field is in. If this field is not a group, this defaults to `null`. | | +| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `api_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The unique ID for this field. REPLACE_ME_WITH_DESCRIPTION_END | | +| `name` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The name of the Custom Field. REPLACE_ME_WITH_DESCRIPTION_END | | +| `signer` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The signer of the Custom Field. Can be `null` if field is a merge field (assigned to Sender). REPLACE_ME_WITH_DESCRIPTION_END | | +| `x` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The horizontal offset in pixels for this form field. REPLACE_ME_WITH_DESCRIPTION_END | | +| `y` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The vertical offset in pixels for this form field. REPLACE_ME_WITH_DESCRIPTION_END | | +| `width` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The width in pixels of this form field. REPLACE_ME_WITH_DESCRIPTION_END | | +| `height` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The height in pixels of this form field. REPLACE_ME_WITH_DESCRIPTION_END | | +| `required` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Boolean showing whether or not this field is required. REPLACE_ME_WITH_DESCRIPTION_END | | +| `group` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The name of the group this field is in. If this field is not a group, this defaults to `null`. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/TemplateResponseDocumentCustomFieldCheckbox.md b/sdks/python/docs/TemplateResponseDocumentCustomFieldCheckbox.md index 62a96ed0e..cb57a3b9c 100644 --- a/sdks/python/docs/TemplateResponseDocumentCustomFieldCheckbox.md +++ b/sdks/python/docs/TemplateResponseDocumentCustomFieldCheckbox.md @@ -1,12 +1,14 @@ # TemplateResponseDocumentCustomFieldCheckbox -This class extends `TemplateResponseDocumentCustomFieldBase` +This class extends `TemplateResponseDocumentCustomFieldBase` ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | The type of this Custom Field. Only `text` and `checkbox` are currently supported.

* Text uses `TemplateResponseDocumentCustomFieldText`
* Checkbox uses `TemplateResponseDocumentCustomFieldCheckbox` | [default to "checkbox"] | +| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The type of this Custom Field. Only `text` and `checkbox` are currently supported. -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) +* Text uses `TemplateResponseDocumentCustomFieldText` +* Checkbox uses `TemplateResponseDocumentCustomFieldCheckbox` REPLACE_ME_WITH_DESCRIPTION_END | [default to 'checkbox'] | +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateResponseDocumentCustomFieldText.md b/sdks/python/docs/TemplateResponseDocumentCustomFieldText.md index f0c2fd527..c78bb667a 100644 --- a/sdks/python/docs/TemplateResponseDocumentCustomFieldText.md +++ b/sdks/python/docs/TemplateResponseDocumentCustomFieldText.md @@ -1,16 +1,18 @@ # TemplateResponseDocumentCustomFieldText -This class extends `TemplateResponseDocumentCustomFieldBase` +This class extends `TemplateResponseDocumentCustomFieldBase` ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | The type of this Custom Field. Only `text` and `checkbox` are currently supported.

* Text uses `TemplateResponseDocumentCustomFieldText`
* Checkbox uses `TemplateResponseDocumentCustomFieldCheckbox` | [default to "text"] | -| `avg_text_length` | [```TemplateResponseFieldAvgTextLength```](TemplateResponseFieldAvgTextLength.md) | | | -| `is_multiline` | ```bool``` | Whether this form field is multiline text. | | -| `original_font_size` | ```int``` | Original font size used in this form field's text. | | -| `font_family` | ```str``` | Font family used in this form field's text. | | +| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The type of this Custom Field. Only `text` and `checkbox` are currently supported. -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) +* Text uses `TemplateResponseDocumentCustomFieldText` +* Checkbox uses `TemplateResponseDocumentCustomFieldCheckbox` REPLACE_ME_WITH_DESCRIPTION_END | [default to 'text'] | +| `avg_text_length` | [```TemplateResponseFieldAvgTextLength```](TemplateResponseFieldAvgTextLength.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `is_multiline` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Whether this form field is multiline text. REPLACE_ME_WITH_DESCRIPTION_END | | +| `original_font_size` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Original font size used in this form field's text. REPLACE_ME_WITH_DESCRIPTION_END | | +| `font_family` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Font family used in this form field's text. REPLACE_ME_WITH_DESCRIPTION_END | | +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateResponseDocumentFieldGroup.md b/sdks/python/docs/TemplateResponseDocumentFieldGroup.md index ec90f2362..37abac1c4 100644 --- a/sdks/python/docs/TemplateResponseDocumentFieldGroup.md +++ b/sdks/python/docs/TemplateResponseDocumentFieldGroup.md @@ -5,9 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `name` | ```str``` | The name of the form field group. | | -| `rule` | [```TemplateResponseDocumentFieldGroupRule```](TemplateResponseDocumentFieldGroupRule.md) | | | +| `name` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The name of the form field group. REPLACE_ME_WITH_DESCRIPTION_END | | +| `rule` | [```TemplateResponseDocumentFieldGroupRule```](TemplateResponseDocumentFieldGroupRule.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/TemplateResponseDocumentFieldGroupRule.md b/sdks/python/docs/TemplateResponseDocumentFieldGroupRule.md index c23407f0e..7cc8bcb83 100644 --- a/sdks/python/docs/TemplateResponseDocumentFieldGroupRule.md +++ b/sdks/python/docs/TemplateResponseDocumentFieldGroupRule.md @@ -5,9 +5,12 @@ The rule used to validate checkboxes in the form field group. See [checkbox fiel ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `requirement` | ```str``` | 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` | ```str``` | Name of the group | | +| `requirement` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Examples: `require_0-1` `require_1` `require_1-ormore` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) +- 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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `group_label` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Name of the group REPLACE_ME_WITH_DESCRIPTION_END | | +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateResponseDocumentFormFieldBase.md b/sdks/python/docs/TemplateResponseDocumentFormFieldBase.md index 322b09baa..43961b707 100644 --- a/sdks/python/docs/TemplateResponseDocumentFormFieldBase.md +++ b/sdks/python/docs/TemplateResponseDocumentFormFieldBase.md @@ -5,17 +5,16 @@ An array of Form Field objects containing the name and type of each named field. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | | | -| `api_id` | ```str``` | A unique id for the form field. | | -| `name` | ```str``` | The name of the form field. | | -| `signer` | ```str``` | The signer of the Form Field. | | -| `x` | ```int``` | The horizontal offset in pixels for this form field. | | -| `y` | ```int``` | The vertical offset in pixels for this form field. | | -| `width` | ```int``` | The width in pixels of this form field. | | -| `height` | ```int``` | The height in pixels of this form field. | | -| `required` | ```bool``` | Boolean showing whether or not this field is required. | | -| `group` | ```str, none_type``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | +| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `api_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN A unique id for the form field. REPLACE_ME_WITH_DESCRIPTION_END | | +| `name` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The name of the form field. REPLACE_ME_WITH_DESCRIPTION_END | | +| `signer` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The signer of the Form Field. REPLACE_ME_WITH_DESCRIPTION_END | | +| `x` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The horizontal offset in pixels for this form field. REPLACE_ME_WITH_DESCRIPTION_END | | +| `y` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The vertical offset in pixels for this form field. REPLACE_ME_WITH_DESCRIPTION_END | | +| `width` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The width in pixels of this form field. REPLACE_ME_WITH_DESCRIPTION_END | | +| `height` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The height in pixels of this form field. REPLACE_ME_WITH_DESCRIPTION_END | | +| `required` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Boolean showing whether or not this field is required. REPLACE_ME_WITH_DESCRIPTION_END | | +| `group` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/TemplateResponseDocumentFormFieldCheckbox.md b/sdks/python/docs/TemplateResponseDocumentFormFieldCheckbox.md index fc45bdcff..3e7ac21b2 100644 --- a/sdks/python/docs/TemplateResponseDocumentFormFieldCheckbox.md +++ b/sdks/python/docs/TemplateResponseDocumentFormFieldCheckbox.md @@ -1,12 +1,20 @@ # TemplateResponseDocumentFormFieldCheckbox -This class extends `TemplateResponseDocumentFormFieldBase` +This class extends `TemplateResponseDocumentFormFieldBase` ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | 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` | [default to "checkbox"] | +| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The type of this form field. See [field types](/api/reference/constants/#field-types). -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) +* 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` REPLACE_ME_WITH_DESCRIPTION_END | [default to 'checkbox'] | +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateResponseDocumentFormFieldDateSigned.md b/sdks/python/docs/TemplateResponseDocumentFormFieldDateSigned.md index b40da9445..c7add9fe4 100644 --- a/sdks/python/docs/TemplateResponseDocumentFormFieldDateSigned.md +++ b/sdks/python/docs/TemplateResponseDocumentFormFieldDateSigned.md @@ -1,12 +1,20 @@ # TemplateResponseDocumentFormFieldDateSigned -This class extends `TemplateResponseDocumentFormFieldBase` +This class extends `TemplateResponseDocumentFormFieldBase` ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | 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` | [default to "date_signed"] | +| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The type of this form field. See [field types](/api/reference/constants/#field-types). -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) +* 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` REPLACE_ME_WITH_DESCRIPTION_END | [default to 'date_signed'] | +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateResponseDocumentFormFieldDropdown.md b/sdks/python/docs/TemplateResponseDocumentFormFieldDropdown.md index 83b3db08d..833a860ce 100644 --- a/sdks/python/docs/TemplateResponseDocumentFormFieldDropdown.md +++ b/sdks/python/docs/TemplateResponseDocumentFormFieldDropdown.md @@ -1,12 +1,20 @@ # TemplateResponseDocumentFormFieldDropdown -This class extends `TemplateResponseDocumentFormFieldBase` +This class extends `TemplateResponseDocumentFormFieldBase` ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | 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` | [default to "dropdown"] | +| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The type of this form field. See [field types](/api/reference/constants/#field-types). -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) +* 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` REPLACE_ME_WITH_DESCRIPTION_END | [default to 'dropdown'] | +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateResponseDocumentFormFieldHyperlink.md b/sdks/python/docs/TemplateResponseDocumentFormFieldHyperlink.md index b79b5bb85..d729a4209 100644 --- a/sdks/python/docs/TemplateResponseDocumentFormFieldHyperlink.md +++ b/sdks/python/docs/TemplateResponseDocumentFormFieldHyperlink.md @@ -1,16 +1,24 @@ # TemplateResponseDocumentFormFieldHyperlink -This class extends `TemplateResponseDocumentFormFieldBase` +This class extends `TemplateResponseDocumentFormFieldBase` ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | 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` | [default to "hyperlink"] | -| `avg_text_length` | [```TemplateResponseFieldAvgTextLength```](TemplateResponseFieldAvgTextLength.md) | | | -| `is_multiline` | ```bool``` | Whether this form field is multiline text. | | -| `original_font_size` | ```int``` | Original font size used in this form field's text. | | -| `font_family` | ```str``` | Font family used in this form field's text. | | +| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The type of this form field. See [field types](/api/reference/constants/#field-types). -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) +* 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` REPLACE_ME_WITH_DESCRIPTION_END | [default to 'hyperlink'] | +| `avg_text_length` | [```TemplateResponseFieldAvgTextLength```](TemplateResponseFieldAvgTextLength.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `is_multiline` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Whether this form field is multiline text. REPLACE_ME_WITH_DESCRIPTION_END | | +| `original_font_size` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Original font size used in this form field's text. REPLACE_ME_WITH_DESCRIPTION_END | | +| `font_family` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Font family used in this form field's text. REPLACE_ME_WITH_DESCRIPTION_END | | +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateResponseDocumentFormFieldInitials.md b/sdks/python/docs/TemplateResponseDocumentFormFieldInitials.md index 7656afe98..1a02cca93 100644 --- a/sdks/python/docs/TemplateResponseDocumentFormFieldInitials.md +++ b/sdks/python/docs/TemplateResponseDocumentFormFieldInitials.md @@ -1,12 +1,20 @@ # TemplateResponseDocumentFormFieldInitials -This class extends `TemplateResponseDocumentFormFieldBase` +This class extends `TemplateResponseDocumentFormFieldBase` ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | 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` | [default to "initials"] | +| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The type of this form field. See [field types](/api/reference/constants/#field-types). -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) +* 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` REPLACE_ME_WITH_DESCRIPTION_END | [default to 'initials'] | +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateResponseDocumentFormFieldRadio.md b/sdks/python/docs/TemplateResponseDocumentFormFieldRadio.md index 420e96f23..6d7727056 100644 --- a/sdks/python/docs/TemplateResponseDocumentFormFieldRadio.md +++ b/sdks/python/docs/TemplateResponseDocumentFormFieldRadio.md @@ -1,12 +1,20 @@ # TemplateResponseDocumentFormFieldRadio -This class extends `TemplateResponseDocumentFormFieldBase` +This class extends `TemplateResponseDocumentFormFieldBase` ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | 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` | [default to "radio"] | +| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The type of this form field. See [field types](/api/reference/constants/#field-types). -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) +* 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` REPLACE_ME_WITH_DESCRIPTION_END | [default to 'radio'] | +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateResponseDocumentFormFieldSignature.md b/sdks/python/docs/TemplateResponseDocumentFormFieldSignature.md index a8dfab4bb..fc80288b3 100644 --- a/sdks/python/docs/TemplateResponseDocumentFormFieldSignature.md +++ b/sdks/python/docs/TemplateResponseDocumentFormFieldSignature.md @@ -1,12 +1,20 @@ # TemplateResponseDocumentFormFieldSignature -This class extends `TemplateResponseDocumentFormFieldBase` +This class extends `TemplateResponseDocumentFormFieldBase` ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | 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` | [default to "signature"] | +| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The type of this form field. See [field types](/api/reference/constants/#field-types). -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) +* 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` REPLACE_ME_WITH_DESCRIPTION_END | [default to 'signature'] | +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateResponseDocumentFormFieldText.md b/sdks/python/docs/TemplateResponseDocumentFormFieldText.md index 5728c3fc2..a718c409d 100644 --- a/sdks/python/docs/TemplateResponseDocumentFormFieldText.md +++ b/sdks/python/docs/TemplateResponseDocumentFormFieldText.md @@ -1,17 +1,25 @@ # TemplateResponseDocumentFormFieldText -This class extends `TemplateResponseDocumentFormFieldBase` +This class extends `TemplateResponseDocumentFormFieldBase` ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | 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` | [default to "text"] | -| `avg_text_length` | [```TemplateResponseFieldAvgTextLength```](TemplateResponseFieldAvgTextLength.md) | | | -| `is_multiline` | ```bool``` | Whether this form field is multiline text. | | -| `original_font_size` | ```int``` | Original font size used in this form field's text. | | -| `font_family` | ```str``` | Font family used in this form field's text. | | -| `validation_type` | ```str, none_type``` | 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. | | +| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The type of this form field. See [field types](/api/reference/constants/#field-types). -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) +* 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` REPLACE_ME_WITH_DESCRIPTION_END | [default to 'text'] | +| `avg_text_length` | [```TemplateResponseFieldAvgTextLength```](TemplateResponseFieldAvgTextLength.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `is_multiline` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Whether this form field is multiline text. REPLACE_ME_WITH_DESCRIPTION_END | | +| `original_font_size` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Original font size used in this form field's text. REPLACE_ME_WITH_DESCRIPTION_END | | +| `font_family` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Font family used in this form field's text. REPLACE_ME_WITH_DESCRIPTION_END | | +| `validation_type` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateResponseDocumentStaticFieldBase.md b/sdks/python/docs/TemplateResponseDocumentStaticFieldBase.md index 8240142ff..fe209fb43 100644 --- a/sdks/python/docs/TemplateResponseDocumentStaticFieldBase.md +++ b/sdks/python/docs/TemplateResponseDocumentStaticFieldBase.md @@ -5,17 +5,16 @@ An array describing static overlay fields. **NOTE:** Only available for certain ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | | | -| `api_id` | ```str``` | A unique id for the static field. | | -| `name` | ```str``` | The name of the static field. | | -| `signer` | ```str``` | The signer of the Static Field. | [default to "me_now"] | -| `x` | ```int``` | The horizontal offset in pixels for this static field. | | -| `y` | ```int``` | The vertical offset in pixels for this static field. | | -| `width` | ```int``` | The width in pixels of this static field. | | -| `height` | ```int``` | The height in pixels of this static field. | | -| `required` | ```bool``` | Boolean showing whether or not this field is required. | | -| `group` | ```str, none_type``` | The name of the group this field is in. If this field is not a group, this defaults to `null`. | | +| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `api_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN A unique id for the static field. REPLACE_ME_WITH_DESCRIPTION_END | | +| `name` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The name of the static field. REPLACE_ME_WITH_DESCRIPTION_END | | +| `signer` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The signer of the Static Field. REPLACE_ME_WITH_DESCRIPTION_END | [default to 'me_now'] | +| `x` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The horizontal offset in pixels for this static field. REPLACE_ME_WITH_DESCRIPTION_END | | +| `y` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The vertical offset in pixels for this static field. REPLACE_ME_WITH_DESCRIPTION_END | | +| `width` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The width in pixels of this static field. REPLACE_ME_WITH_DESCRIPTION_END | | +| `height` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The height in pixels of this static field. REPLACE_ME_WITH_DESCRIPTION_END | | +| `required` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Boolean showing whether or not this field is required. REPLACE_ME_WITH_DESCRIPTION_END | | +| `group` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The name of the group this field is in. If this field is not a group, this defaults to `null`. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/TemplateResponseDocumentStaticFieldCheckbox.md b/sdks/python/docs/TemplateResponseDocumentStaticFieldCheckbox.md index 628884a7b..dcc985bb6 100644 --- a/sdks/python/docs/TemplateResponseDocumentStaticFieldCheckbox.md +++ b/sdks/python/docs/TemplateResponseDocumentStaticFieldCheckbox.md @@ -1,12 +1,20 @@ # TemplateResponseDocumentStaticFieldCheckbox -This class extends `TemplateResponseDocumentStaticFieldBase` +This class extends `TemplateResponseDocumentStaticFieldBase` ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | 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` | [default to "checkbox"] | +| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The type of this static field. See [field types](/api/reference/constants/#field-types). -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) +* 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` REPLACE_ME_WITH_DESCRIPTION_END | [default to 'checkbox'] | +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateResponseDocumentStaticFieldDateSigned.md b/sdks/python/docs/TemplateResponseDocumentStaticFieldDateSigned.md index 3124121ed..4134058c8 100644 --- a/sdks/python/docs/TemplateResponseDocumentStaticFieldDateSigned.md +++ b/sdks/python/docs/TemplateResponseDocumentStaticFieldDateSigned.md @@ -1,12 +1,20 @@ # TemplateResponseDocumentStaticFieldDateSigned -This class extends `TemplateResponseDocumentStaticFieldBase` +This class extends `TemplateResponseDocumentStaticFieldBase` ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | 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` | [default to "date_signed"] | +| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The type of this static field. See [field types](/api/reference/constants/#field-types). -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) +* 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` REPLACE_ME_WITH_DESCRIPTION_END | [default to 'date_signed'] | +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateResponseDocumentStaticFieldDropdown.md b/sdks/python/docs/TemplateResponseDocumentStaticFieldDropdown.md index 1b0424a2a..efd4deb1c 100644 --- a/sdks/python/docs/TemplateResponseDocumentStaticFieldDropdown.md +++ b/sdks/python/docs/TemplateResponseDocumentStaticFieldDropdown.md @@ -1,12 +1,20 @@ # TemplateResponseDocumentStaticFieldDropdown -This class extends `TemplateResponseDocumentStaticFieldBase` +This class extends `TemplateResponseDocumentStaticFieldBase` ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | 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` | [default to "dropdown"] | +| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The type of this static field. See [field types](/api/reference/constants/#field-types). -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) +* 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` REPLACE_ME_WITH_DESCRIPTION_END | [default to 'dropdown'] | +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateResponseDocumentStaticFieldHyperlink.md b/sdks/python/docs/TemplateResponseDocumentStaticFieldHyperlink.md index 3b9a20dbf..d242b07a0 100644 --- a/sdks/python/docs/TemplateResponseDocumentStaticFieldHyperlink.md +++ b/sdks/python/docs/TemplateResponseDocumentStaticFieldHyperlink.md @@ -1,12 +1,20 @@ # TemplateResponseDocumentStaticFieldHyperlink -This class extends `TemplateResponseDocumentStaticFieldBase` +This class extends `TemplateResponseDocumentStaticFieldBase` ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | 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` | [default to "hyperlink"] | +| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The type of this static field. See [field types](/api/reference/constants/#field-types). -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) +* 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` REPLACE_ME_WITH_DESCRIPTION_END | [default to 'hyperlink'] | +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateResponseDocumentStaticFieldInitials.md b/sdks/python/docs/TemplateResponseDocumentStaticFieldInitials.md index 3162cdb13..fbcfaa904 100644 --- a/sdks/python/docs/TemplateResponseDocumentStaticFieldInitials.md +++ b/sdks/python/docs/TemplateResponseDocumentStaticFieldInitials.md @@ -1,12 +1,20 @@ # TemplateResponseDocumentStaticFieldInitials -This class extends `TemplateResponseDocumentStaticFieldBase` +This class extends `TemplateResponseDocumentStaticFieldBase` ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | 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` | [default to "initials"] | +| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The type of this static field. See [field types](/api/reference/constants/#field-types). -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) +* 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` REPLACE_ME_WITH_DESCRIPTION_END | [default to 'initials'] | +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateResponseDocumentStaticFieldRadio.md b/sdks/python/docs/TemplateResponseDocumentStaticFieldRadio.md index 12f3fc31b..66331d2b2 100644 --- a/sdks/python/docs/TemplateResponseDocumentStaticFieldRadio.md +++ b/sdks/python/docs/TemplateResponseDocumentStaticFieldRadio.md @@ -1,12 +1,20 @@ # TemplateResponseDocumentStaticFieldRadio -This class extends `TemplateResponseDocumentStaticFieldBase` +This class extends `TemplateResponseDocumentStaticFieldBase` ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | 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` | [default to "radio"] | +| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The type of this static field. See [field types](/api/reference/constants/#field-types). -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) +* 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` REPLACE_ME_WITH_DESCRIPTION_END | [default to 'radio'] | +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateResponseDocumentStaticFieldSignature.md b/sdks/python/docs/TemplateResponseDocumentStaticFieldSignature.md index 453588a62..b7c64690e 100644 --- a/sdks/python/docs/TemplateResponseDocumentStaticFieldSignature.md +++ b/sdks/python/docs/TemplateResponseDocumentStaticFieldSignature.md @@ -1,12 +1,20 @@ # TemplateResponseDocumentStaticFieldSignature -This class extends `TemplateResponseDocumentStaticFieldBase` +This class extends `TemplateResponseDocumentStaticFieldBase` ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | 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` | [default to "signature"] | +| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The type of this static field. See [field types](/api/reference/constants/#field-types). -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) +* 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` REPLACE_ME_WITH_DESCRIPTION_END | [default to 'signature'] | +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateResponseDocumentStaticFieldText.md b/sdks/python/docs/TemplateResponseDocumentStaticFieldText.md index d468ca4a5..e9e4cded7 100644 --- a/sdks/python/docs/TemplateResponseDocumentStaticFieldText.md +++ b/sdks/python/docs/TemplateResponseDocumentStaticFieldText.md @@ -1,12 +1,20 @@ # TemplateResponseDocumentStaticFieldText -This class extends `TemplateResponseDocumentStaticFieldBase` +This class extends `TemplateResponseDocumentStaticFieldBase` ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | 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` | [default to "text"] | +| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The type of this static field. See [field types](/api/reference/constants/#field-types). -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) +* 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` REPLACE_ME_WITH_DESCRIPTION_END | [default to 'text'] | +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateResponseFieldAvgTextLength.md b/sdks/python/docs/TemplateResponseFieldAvgTextLength.md index 231267889..99d016336 100644 --- a/sdks/python/docs/TemplateResponseFieldAvgTextLength.md +++ b/sdks/python/docs/TemplateResponseFieldAvgTextLength.md @@ -5,9 +5,8 @@ Average text length in this field. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `num_lines` | ```int``` | Number of lines. | | -| `num_chars_per_line` | ```int``` | Number of characters per line. | | +| `num_lines` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Number of lines. REPLACE_ME_WITH_DESCRIPTION_END | | +| `num_chars_per_line` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Number of characters per line. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/TemplateResponseSignerRole.md b/sdks/python/docs/TemplateResponseSignerRole.md index 060870d39..49654fe83 100644 --- a/sdks/python/docs/TemplateResponseSignerRole.md +++ b/sdks/python/docs/TemplateResponseSignerRole.md @@ -5,9 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `name` | ```str``` | The name of the Role. | | -| `order` | ```int``` | If signer order is assigned this is the 0-based index for this role. | | +| `name` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The name of the Role. REPLACE_ME_WITH_DESCRIPTION_END | | +| `order` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN If signer order is assigned this is the 0-based index for this role. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/TemplateUpdateFilesRequest.md b/sdks/python/docs/TemplateUpdateFilesRequest.md index e853b1601..3cbaaa7ee 100644 --- a/sdks/python/docs/TemplateUpdateFilesRequest.md +++ b/sdks/python/docs/TemplateUpdateFilesRequest.md @@ -5,13 +5,16 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `client_id` | ```str``` | Client id of the app you're using to update this template. | | -| `files` | ```[file_type]``` | 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` | ```[str]``` | 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` | ```str``` | The new default template email message. | | -| `subject` | ```str``` | The new default template email subject. | | -| `test_mode` | ```bool``` | Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. | [default to False] | +| `client_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Client id of the app you're using to update this template. REPLACE_ME_WITH_DESCRIPTION_END | | +| `files` | ```List[io.IOBase]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Use `files[]` to indicate the uploaded file(s) to use for the template. -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) +This endpoint requires either **files** or **file_urls[]**, but not both. REPLACE_ME_WITH_DESCRIPTION_END | | +| `file_urls` | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `message` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The new default template email message. REPLACE_ME_WITH_DESCRIPTION_END | | +| `subject` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The new default template email subject. REPLACE_ME_WITH_DESCRIPTION_END | | +| `test_mode` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateUpdateFilesResponse.md b/sdks/python/docs/TemplateUpdateFilesResponse.md index 1f62b457f..109e71068 100644 --- a/sdks/python/docs/TemplateUpdateFilesResponse.md +++ b/sdks/python/docs/TemplateUpdateFilesResponse.md @@ -5,8 +5,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `template` | [```TemplateUpdateFilesResponseTemplate```](TemplateUpdateFilesResponseTemplate.md) | | | +| `template` | [```TemplateUpdateFilesResponseTemplate```](TemplateUpdateFilesResponseTemplate.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/TemplateUpdateFilesResponseTemplate.md b/sdks/python/docs/TemplateUpdateFilesResponseTemplate.md index 4efece562..5d6de872b 100644 --- a/sdks/python/docs/TemplateUpdateFilesResponseTemplate.md +++ b/sdks/python/docs/TemplateUpdateFilesResponseTemplate.md @@ -5,9 +5,8 @@ Contains template id ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `template_id` | ```str``` | The id of the Template. | | -| `warnings` | [```[WarningResponse]```](WarningResponse.md) | A list of warnings. | | +| `template_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The id of the Template. REPLACE_ME_WITH_DESCRIPTION_END | | +| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN A list of warnings. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/UnclaimedDraftApi.md b/sdks/python/docs/UnclaimedDraftApi.md index 7bb1bf93b..baabaf8e6 100644 --- a/sdks/python/docs/UnclaimedDraftApi.md +++ b/sdks/python/docs/UnclaimedDraftApi.md @@ -23,73 +23,9 @@ Creates a new Draft that can be claimed using the claim URL. The first authentic * Bearer (JWT) Authentication (oauth2): ```python -from pprint import pprint - -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", -) - -with ApiClient(configuration) as api_client: - unclaimed_draft_api = apis.UnclaimedDraftApi(api_client) - - signer_1 = models.SubUnclaimedDraftSigner( - email_address="jack@example.com", - name="Jack", - order=0, - ) - - signer_2 = models.SubUnclaimedDraftSigner( - email_address="jill@example.com", - name="Jill", - order=1, - ) - - signing_options = models.SubSigningOptions( - draw=True, - type=True, - upload=True, - phone=False, - default_type="draw", - ) - - field_options = models.SubFieldOptions( - date_format="DD - MM - YYYY", - ) - - data = models.UnclaimedDraftCreateRequest( - subject="The NDA we talked about", - type="request_signature", - message="Please sign this NDA and then we can discuss more. Let me know if you have any questions.", - signers=[signer_1, signer_2], - cc_email_addresses=[ - "lawyer1@dropboxsign.com", - "lawyer2@dropboxsign.com", - ], - files=[open("example_signature_request.pdf", "rb")], - metadata={ - "custom_id": 1234, - "custom_text": "NDA #9", - }, - signing_options=signing_options, - field_options=field_options, - test_mode=True, - ) - - try: - response = unclaimed_draft_api.unclaimed_draft_create(data) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) - +REPLACE_ME_WITH_EXAMPLE_FOR__unclaimed_draft_create_Python_CODE +``` ``` - ### Parameters | Name | Type | Description | Notes | @@ -109,7 +45,6 @@ with ApiClient(configuration) as api_client: - **Content-Type**: application/json, multipart/form-data - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -132,37 +67,9 @@ Creates a new Draft that can be claimed and used in an embedded iFrame. The firs * Bearer (JWT) Authentication (oauth2): ```python -from pprint import pprint - -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", -) - -with ApiClient(configuration) as api_client: - unclaimed_draft_api = apis.UnclaimedDraftApi(api_client) - - data = models.UnclaimedDraftCreateEmbeddedRequest( - client_id="ec64a202072370a737edf4a0eb7f4437", - files=[open("example_signature_request.pdf", "rb")], - requester_email_address="jack@dropboxsign.com", - test_mode=True, - ) - - try: - response = unclaimed_draft_api.unclaimed_draft_create_embedded(data) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) - +REPLACE_ME_WITH_EXAMPLE_FOR__unclaimed_draft_create_embedded_Python_CODE +``` ``` - ### Parameters | Name | Type | Description | Notes | @@ -182,7 +89,6 @@ with ApiClient(configuration) as api_client: - **Content-Type**: application/json, multipart/form-data - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -205,50 +111,9 @@ Creates a new Draft with a previously saved template(s) that can be claimed and * Bearer (JWT) Authentication (oauth2): ```python -from pprint import pprint - -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", -) - -with ApiClient(configuration) as api_client: - unclaimed_draft_api = apis.UnclaimedDraftApi(api_client) - - signer_1 = models.SubUnclaimedDraftTemplateSigner( - role="Client", - name="George", - email_address="george@example.com", - ) - - cc_1 = models.SubCC( - role="Accounting", - email_address="accounting@example.com", - ) - - data = models.UnclaimedDraftCreateEmbeddedWithTemplateRequest( - client_id="ec64a202072370a737edf4a0eb7f4437", - template_ids=["61a832ff0d8423f91d503e76bfbcc750f7417c78"], - requester_email_address="jack@dropboxsign.com", - signers=[signer_1], - ccs=[cc_1], - test_mode=True, - ) - - try: - 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) - +REPLACE_ME_WITH_EXAMPLE_FOR__unclaimed_draft_create_embedded_with_template_Python_CODE +``` ``` - ### Parameters | Name | Type | Description | Notes | @@ -268,7 +133,6 @@ with ApiClient(configuration) as api_client: - **Content-Type**: application/json, multipart/form-data - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -291,37 +155,9 @@ Creates a new signature request from an embedded request that can be edited prio * Bearer (JWT) Authentication (oauth2): ```python -from pprint import pprint - -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", -) - -with ApiClient(configuration) as api_client: - unclaimed_draft_api = apis.UnclaimedDraftApi(api_client) - - data = models.UnclaimedDraftEditAndResendRequest( - client_id="ec64a202072370a737edf4a0eb7f4437", - test_mode=True, - ) - - signature_request_id = "2f9781e1a83jdja934d808c153c2e1d3df6f8f2f" - - try: - 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) - +REPLACE_ME_WITH_EXAMPLE_FOR__unclaimed_draft_edit_and_resend_Python_CODE +``` ``` - ### Parameters | Name | Type | Description | Notes | @@ -342,7 +178,6 @@ with ApiClient(configuration) as api_client: - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | diff --git a/sdks/python/docs/UnclaimedDraftCreateEmbeddedRequest.md b/sdks/python/docs/UnclaimedDraftCreateEmbeddedRequest.md index 8a2f2da2e..511e5f0be 100644 --- a/sdks/python/docs/UnclaimedDraftCreateEmbeddedRequest.md +++ b/sdks/python/docs/UnclaimedDraftCreateEmbeddedRequest.md @@ -5,43 +5,74 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `client_id`*_required_ | ```str``` | 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`*_required_ | ```str``` | The email address of the user that should be designated as the requester of this draft, if the draft type is `request_signature`. | | -| `files` | ```[file_type]``` | 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` | ```[str]``` | 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` | ```bool``` | This allows the requester to specify whether the user is allowed to provide email addresses to CC when claiming the draft. | [default to True] | -| `allow_decline` | ```bool``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [default to False] | -| `allow_reassign` | ```bool``` | 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. | [default to False] | -| `attachments` | [```[SubAttachment]```](SubAttachment.md) | A list describing the attachments | | -| `cc_email_addresses` | ```[str]``` | The email addresses that should be CCed. | | -| `custom_fields` | [```[SubCustomField]```](SubCustomField.md) | 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` | [```SubEditorOptions```](SubEditorOptions.md) | | | -| `field_options` | [```SubFieldOptions```](SubFieldOptions.md) | | | -| `force_signer_page` | ```bool``` | Provide users the ability to review/edit the signers. | [default to False] | -| `force_subject_message` | ```bool``` | Provide users the ability to review/edit the subject and message. | [default to False] | -| `form_field_groups` | [```[SubFormFieldGroup]```](SubFormFieldGroup.md) | 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` | [```[SubFormFieldRule]```](SubFormFieldRule.md) | Conditional Logic rules for fields defined in `form_fields_per_document`. | | -| `form_fields_per_document` | [```[SubFormFieldsPerDocumentBase]```](SubFormFieldsPerDocumentBase.md) | 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` | ```bool``` | 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. | [default to False] | -| `hold_request` | ```bool``` | 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`. | [default to False] | -| `is_for_embedded_signing` | ```bool``` | The request created from this draft will also be signable in embedded mode if set to `true`. Defaults to `false`. | [default to False] | -| `message` | ```str``` | The custom message in the email that will be sent to the signers. | | -| `metadata` | ```{str: (bool, date, datetime, dict, float, int, list, str, none_type)}``` | 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` | ```str``` | The URL you want signers redirected to after they successfully request a signature. | | -| `show_preview` | ```bool``` | 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` | ```bool``` | When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. | [default to True] | -| `signers` | [```[SubUnclaimedDraftSigner]```](SubUnclaimedDraftSigner.md) | Add Signers to your Unclaimed Draft Signature Request. | | -| `signing_options` | [```SubSigningOptions```](SubSigningOptions.md) | | | -| `signing_redirect_url` | ```str``` | The URL you want signers redirected to after they successfully sign. | | -| `skip_me_now` | ```bool``` | Disables the "Me (Now)" option for the person preparing the document. Does not work with type `send_document`. Defaults to `false`. | [default to False] | -| `subject` | ```str``` | The subject in the email that will be sent to the signers. | | -| `test_mode` | ```bool``` | Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. | [default to False] | -| `type` | ```str``` | 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. | [default to "request_signature"] | -| `use_preexisting_fields` | ```bool``` | 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. | [default to False] | -| `use_text_tags` | ```bool``` | 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. | [default to False] | -| `populate_auto_fill_fields` | ```bool``` | 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. | [default to False] | -| `expires_at` | ```int, none_type``` | 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. | | +| `client_id`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Client id of the app used to create the draft. Used to apply the branding and callback url defined for the app. REPLACE_ME_WITH_DESCRIPTION_END | | +| `requester_email_address`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The email address of the user that should be designated as the requester of this draft, if the draft type is `request_signature`. REPLACE_ME_WITH_DESCRIPTION_END | | +| `files` | ```List[io.IOBase]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Use `files[]` to indicate the uploaded file(s) to send for signature. -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) +This endpoint requires either **files** or **file_urls[]**, but not both. REPLACE_ME_WITH_DESCRIPTION_END | | +| `file_urls` | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `allow_ccs` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN This allows the requester to specify whether the user is allowed to provide email addresses to CC when claiming the draft. REPLACE_ME_WITH_DESCRIPTION_END | [default to True] | +| `allow_decline` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Allows signers to decline to sign a document if `true`. Defaults to `false`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `allow_reassign` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `attachments` | [```List[SubAttachment]```](SubAttachment.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN A list describing the attachments REPLACE_ME_WITH_DESCRIPTION_END | | +| `cc_email_addresses` | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The email addresses that should be CCed. REPLACE_ME_WITH_DESCRIPTION_END | | +| `custom_fields` | [```List[SubCustomField]```](SubCustomField.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `editor_options` | [```SubEditorOptions```](SubEditorOptions.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `field_options` | [```SubFieldOptions```](SubFieldOptions.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `force_signer_page` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Provide users the ability to review/edit the signers. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `force_subject_message` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Provide users the ability to review/edit the subject and message. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `form_field_groups` | [```List[SubFormFieldGroup]```](SubFormFieldGroup.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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`. REPLACE_ME_WITH_DESCRIPTION_END | | +| `form_field_rules` | [```List[SubFormFieldRule]```](SubFormFieldRule.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN Conditional Logic rules for fields defined in `form_fields_per_document`. REPLACE_ME_WITH_DESCRIPTION_END | | +| `form_fields_per_document` | [```List[SubFormFieldsPerDocumentBase]```](SubFormFieldsPerDocumentBase.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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` REPLACE_ME_WITH_DESCRIPTION_END | | +| `hide_text_tags` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `hold_request` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `is_for_embedded_signing` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The request created from this draft will also be signable in embedded mode if set to `true`. Defaults to `false`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `message` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The custom message in the email that will be sent to the signers. REPLACE_ME_WITH_DESCRIPTION_END | | +| `metadata` | ```Dict[str, object]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `requesting_redirect_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The URL you want signers redirected to after they successfully request a signature. REPLACE_ME_WITH_DESCRIPTION_END | | +| `show_preview` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `show_progress_stepper` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. REPLACE_ME_WITH_DESCRIPTION_END | [default to True] | +| `signers` | [```List[SubUnclaimedDraftSigner]```](SubUnclaimedDraftSigner.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN Add Signers to your Unclaimed Draft Signature Request. REPLACE_ME_WITH_DESCRIPTION_END | | +| `signing_options` | [```SubSigningOptions```](SubSigningOptions.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `signing_redirect_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The URL you want signers redirected to after they successfully sign. REPLACE_ME_WITH_DESCRIPTION_END | | +| `skip_me_now` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Disables the "Me (Now)" option for the person preparing the document. Does not work with type `send_document`. Defaults to `false`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `subject` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The subject in the email that will be sent to the signers. REPLACE_ME_WITH_DESCRIPTION_END | | +| `test_mode` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `type` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | [default to 'request_signature'] | +| `use_preexisting_fields` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `use_text_tags` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `populate_auto_fill_fields` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `expires_at` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/UnclaimedDraftCreateEmbeddedWithTemplateRequest.md b/sdks/python/docs/UnclaimedDraftCreateEmbeddedWithTemplateRequest.md index 2bdd6fb35..5952325bb 100644 --- a/sdks/python/docs/UnclaimedDraftCreateEmbeddedWithTemplateRequest.md +++ b/sdks/python/docs/UnclaimedDraftCreateEmbeddedWithTemplateRequest.md @@ -5,37 +5,54 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `client_id`*_required_ | ```str``` | 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`*_required_ | ```str``` | The email address of the user that should be designated as the requester of this draft. | | -| `template_ids`*_required_ | ```[str]``` | Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the templates will be used. | | -| `allow_decline` | ```bool``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [default to False] | -| `allow_reassign` | ```bool``` | 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. | [default to False] | -| `ccs` | [```[SubCC]```](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | | -| `custom_fields` | [```[SubCustomField]```](SubCustomField.md) | An array defining values and options for custom fields. Required when a custom field exists in the Template. | | -| `editor_options` | [```SubEditorOptions```](SubEditorOptions.md) | | | -| `field_options` | [```SubFieldOptions```](SubFieldOptions.md) | | | -| `files` | ```[file_type]``` | 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` | ```[str]``` | 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` | ```bool``` | Provide users the ability to review/edit the template signer roles. | [default to False] | -| `force_subject_message` | ```bool``` | Provide users the ability to review/edit the template subject and message. | [default to False] | -| `hold_request` | ```bool``` | 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`. | [default to False] | -| `is_for_embedded_signing` | ```bool``` | The request created from this draft will also be signable in embedded mode if set to `true`. Defaults to `false`. | [default to False] | -| `message` | ```str``` | The custom message in the email that will be sent to the signers. | | -| `metadata` | ```{str: (bool, date, datetime, dict, float, int, list, str, none_type)}``` | 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` | ```bool``` | 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). | [default to False] | -| `requesting_redirect_url` | ```str``` | The URL you want signers redirected to after they successfully request a signature. | | -| `show_preview` | ```bool``` | 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. | [default to False] | -| `show_progress_stepper` | ```bool``` | When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. | [default to True] | -| `signers` | [```[SubUnclaimedDraftTemplateSigner]```](SubUnclaimedDraftTemplateSigner.md) | Add Signers to your Templated-based Signature Request. | | -| `signing_options` | [```SubSigningOptions```](SubSigningOptions.md) | | | -| `signing_redirect_url` | ```str``` | The URL you want signers redirected to after they successfully sign. | | -| `skip_me_now` | ```bool``` | Disables the "Me (Now)" option for the person preparing the document. Does not work with type `send_document`. Defaults to `false`. | [default to False] | -| `subject` | ```str``` | The subject in the email that will be sent to the signers. | | -| `test_mode` | ```bool``` | Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. | [default to False] | -| `title` | ```str``` | The title you want to assign to the SignatureRequest. | | -| `populate_auto_fill_fields` | ```bool``` | 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. | [default to False] | -| `allow_ccs` | ```bool``` | This allows the requester to specify whether the user is allowed to provide email addresses to CC when claiming the draft. | [default to False] | +| `client_id`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Client id of the app used to create the draft. Used to apply the branding and callback url defined for the app. REPLACE_ME_WITH_DESCRIPTION_END | | +| `requester_email_address`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The email address of the user that should be designated as the requester of this draft. REPLACE_ME_WITH_DESCRIPTION_END | | +| `template_ids`*_required_ | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the templates will be used. REPLACE_ME_WITH_DESCRIPTION_END | | +| `allow_decline` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Allows signers to decline to sign a document if `true`. Defaults to `false`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `allow_reassign` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) +**NOTE:** Only available for Premium plan and higher. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `ccs` | [```List[SubCC]```](SubCC.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN Add CC email recipients. Required when a CC role exists for the Template. REPLACE_ME_WITH_DESCRIPTION_END | | +| `custom_fields` | [```List[SubCustomField]```](SubCustomField.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN An array defining values and options for custom fields. Required when a custom field exists in the Template. REPLACE_ME_WITH_DESCRIPTION_END | | +| `editor_options` | [```SubEditorOptions```](SubEditorOptions.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `field_options` | [```SubFieldOptions```](SubFieldOptions.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `files` | ```List[io.IOBase]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `file_urls` | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `force_signer_roles` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Provide users the ability to review/edit the template signer roles. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `force_subject_message` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Provide users the ability to review/edit the template subject and message. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `hold_request` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `is_for_embedded_signing` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The request created from this draft will also be signable in embedded mode if set to `true`. Defaults to `false`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `message` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The custom message in the email that will be sent to the signers. REPLACE_ME_WITH_DESCRIPTION_END | | +| `metadata` | ```Dict[str, object]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `preview_only` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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). REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `requesting_redirect_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The URL you want signers redirected to after they successfully request a signature. REPLACE_ME_WITH_DESCRIPTION_END | | +| `show_preview` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `show_progress_stepper` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. REPLACE_ME_WITH_DESCRIPTION_END | [default to True] | +| `signers` | [```List[SubUnclaimedDraftTemplateSigner]```](SubUnclaimedDraftTemplateSigner.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN Add Signers to your Templated-based Signature Request. REPLACE_ME_WITH_DESCRIPTION_END | | +| `signing_options` | [```SubSigningOptions```](SubSigningOptions.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `signing_redirect_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The URL you want signers redirected to after they successfully sign. REPLACE_ME_WITH_DESCRIPTION_END | | +| `skip_me_now` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Disables the "Me (Now)" option for the person preparing the document. Does not work with type `send_document`. Defaults to `false`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `subject` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The subject in the email that will be sent to the signers. REPLACE_ME_WITH_DESCRIPTION_END | | +| `test_mode` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `title` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The title you want to assign to the SignatureRequest. REPLACE_ME_WITH_DESCRIPTION_END | | +| `populate_auto_fill_fields` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `allow_ccs` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN This allows the requester to specify whether the user is allowed to provide email addresses to CC when claiming the draft. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/UnclaimedDraftCreateRequest.md b/sdks/python/docs/UnclaimedDraftCreateRequest.md index b2b478f92..6f20be192 100644 --- a/sdks/python/docs/UnclaimedDraftCreateRequest.md +++ b/sdks/python/docs/UnclaimedDraftCreateRequest.md @@ -5,31 +5,55 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | 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` | ```[file_type]``` | 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` | ```[str]``` | 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` | ```bool``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [default to False] | -| `attachments` | [```[SubAttachment]```](SubAttachment.md) | A list describing the attachments | | -| `cc_email_addresses` | ```[str]``` | The email addresses that should be CCed. | | -| `client_id` | ```str``` | Client id of the app used to create the draft. Used to apply the branding and callback url defined for the app. | | -| `custom_fields` | [```[SubCustomField]```](SubCustomField.md) | 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` | [```SubFieldOptions```](SubFieldOptions.md) | | | -| `form_field_groups` | [```[SubFormFieldGroup]```](SubFormFieldGroup.md) | 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` | [```[SubFormFieldRule]```](SubFormFieldRule.md) | Conditional Logic rules for fields defined in `form_fields_per_document`. | | -| `form_fields_per_document` | [```[SubFormFieldsPerDocumentBase]```](SubFormFieldsPerDocumentBase.md) | 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` | ```bool``` | 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. | [default to False] | -| `message` | ```str``` | The custom message in the email that will be sent to the signers. | | -| `metadata` | ```{str: (bool, date, datetime, dict, float, int, list, str, none_type)}``` | 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` | ```bool``` | When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. | [default to True] | -| `signers` | [```[SubUnclaimedDraftSigner]```](SubUnclaimedDraftSigner.md) | Add Signers to your Unclaimed Draft Signature Request. | | -| `signing_options` | [```SubSigningOptions```](SubSigningOptions.md) | | | -| `signing_redirect_url` | ```str``` | The URL you want signers redirected to after they successfully sign. | | -| `subject` | ```str``` | The subject in the email that will be sent to the signers. | | -| `test_mode` | ```bool``` | Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. | [default to False] | -| `use_preexisting_fields` | ```bool``` | 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. | [default to False] | -| `use_text_tags` | ```bool``` | 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. | [default to False] | -| `expires_at` | ```int, none_type``` | 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. | | +| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `files` | ```List[io.IOBase]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Use `files[]` to indicate the uploaded file(s) to send for signature. -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) +This endpoint requires either **files** or **file_urls[]**, but not both. REPLACE_ME_WITH_DESCRIPTION_END | | +| `file_urls` | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `allow_decline` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Allows signers to decline to sign a document if `true`. Defaults to `false`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `attachments` | [```List[SubAttachment]```](SubAttachment.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN A list describing the attachments REPLACE_ME_WITH_DESCRIPTION_END | | +| `cc_email_addresses` | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The email addresses that should be CCed. REPLACE_ME_WITH_DESCRIPTION_END | | +| `client_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Client id of the app used to create the draft. Used to apply the branding and callback url defined for the app. REPLACE_ME_WITH_DESCRIPTION_END | | +| `custom_fields` | [```List[SubCustomField]```](SubCustomField.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `field_options` | [```SubFieldOptions```](SubFieldOptions.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `form_field_groups` | [```List[SubFormFieldGroup]```](SubFormFieldGroup.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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`. REPLACE_ME_WITH_DESCRIPTION_END | | +| `form_field_rules` | [```List[SubFormFieldRule]```](SubFormFieldRule.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN Conditional Logic rules for fields defined in `form_fields_per_document`. REPLACE_ME_WITH_DESCRIPTION_END | | +| `form_fields_per_document` | [```List[SubFormFieldsPerDocumentBase]```](SubFormFieldsPerDocumentBase.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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` REPLACE_ME_WITH_DESCRIPTION_END | | +| `hide_text_tags` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `message` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The custom message in the email that will be sent to the signers. REPLACE_ME_WITH_DESCRIPTION_END | | +| `metadata` | ```Dict[str, object]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `show_progress_stepper` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. REPLACE_ME_WITH_DESCRIPTION_END | [default to True] | +| `signers` | [```List[SubUnclaimedDraftSigner]```](SubUnclaimedDraftSigner.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN Add Signers to your Unclaimed Draft Signature Request. REPLACE_ME_WITH_DESCRIPTION_END | | +| `signing_options` | [```SubSigningOptions```](SubSigningOptions.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `signing_redirect_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The URL you want signers redirected to after they successfully sign. REPLACE_ME_WITH_DESCRIPTION_END | | +| `subject` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The subject in the email that will be sent to the signers. REPLACE_ME_WITH_DESCRIPTION_END | | +| `test_mode` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `use_preexisting_fields` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `use_text_tags` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `expires_at` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/UnclaimedDraftCreateResponse.md b/sdks/python/docs/UnclaimedDraftCreateResponse.md index f68452899..442f583db 100644 --- a/sdks/python/docs/UnclaimedDraftCreateResponse.md +++ b/sdks/python/docs/UnclaimedDraftCreateResponse.md @@ -5,9 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `unclaimed_draft` | [```UnclaimedDraftResponse```](UnclaimedDraftResponse.md) | | | -| `warnings` | [```[WarningResponse]```](WarningResponse.md) | A list of warnings. | | +| `unclaimed_draft` | [```UnclaimedDraftResponse```](UnclaimedDraftResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN A list of warnings. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/UnclaimedDraftEditAndResendRequest.md b/sdks/python/docs/UnclaimedDraftEditAndResendRequest.md index 4782fa45a..2647501ae 100644 --- a/sdks/python/docs/UnclaimedDraftEditAndResendRequest.md +++ b/sdks/python/docs/UnclaimedDraftEditAndResendRequest.md @@ -5,15 +5,14 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `client_id`*_required_ | ```str``` | Client id of the app used to create the draft. Used to apply the branding and callback url defined for the app. | | -| `editor_options` | [```SubEditorOptions```](SubEditorOptions.md) | | | -| `is_for_embedded_signing` | ```bool``` | The request created from this draft will also be signable in embedded mode if set to `true`. | | -| `requester_email_address` | ```str``` | 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` | ```str``` | The URL you want signers redirected to after they successfully request a signature. | | -| `show_progress_stepper` | ```bool``` | When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. | [default to True] | -| `signing_redirect_url` | ```str``` | The URL you want signers redirected to after they successfully sign. | | -| `test_mode` | ```bool``` | Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. | [default to False] | +| `client_id`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Client id of the app used to create the draft. Used to apply the branding and callback url defined for the app. REPLACE_ME_WITH_DESCRIPTION_END | | +| `editor_options` | [```SubEditorOptions```](SubEditorOptions.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `is_for_embedded_signing` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The request created from this draft will also be signable in embedded mode if set to `true`. REPLACE_ME_WITH_DESCRIPTION_END | | +| `requester_email_address` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `requesting_redirect_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The URL you want signers redirected to after they successfully request a signature. REPLACE_ME_WITH_DESCRIPTION_END | | +| `show_progress_stepper` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. REPLACE_ME_WITH_DESCRIPTION_END | [default to True] | +| `signing_redirect_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The URL you want signers redirected to after they successfully sign. REPLACE_ME_WITH_DESCRIPTION_END | | +| `test_mode` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/UnclaimedDraftResponse.md b/sdks/python/docs/UnclaimedDraftResponse.md index 5daa01a10..1716de48a 100644 --- a/sdks/python/docs/UnclaimedDraftResponse.md +++ b/sdks/python/docs/UnclaimedDraftResponse.md @@ -5,13 +5,12 @@ A group of documents that a user can take ownership of via the claim URL. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `signature_request_id` | ```str, none_type``` | The ID of the signature request that is represented by this UnclaimedDraft. | | -| `claim_url` | ```str``` | The URL to be used to claim this UnclaimedDraft. | | -| `signing_redirect_url` | ```str, none_type``` | The URL you want signers redirected to after they successfully sign. | | -| `requesting_redirect_url` | ```str, none_type``` | 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` | ```int, none_type``` | When the link expires. | | -| `test_mode` | ```bool``` | Whether this is a test draft. Signature requests made from test drafts have no legal value. | | +| `signature_request_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The ID of the signature request that is represented by this UnclaimedDraft. REPLACE_ME_WITH_DESCRIPTION_END | | +| `claim_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The URL to be used to claim this UnclaimedDraft. REPLACE_ME_WITH_DESCRIPTION_END | | +| `signing_redirect_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The URL you want signers redirected to after they successfully sign. REPLACE_ME_WITH_DESCRIPTION_END | | +| `requesting_redirect_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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.). REPLACE_ME_WITH_DESCRIPTION_END | | +| `expires_at` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN When the link expires. REPLACE_ME_WITH_DESCRIPTION_END | | +| `test_mode` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Whether this is a test draft. Signature requests made from test drafts have no legal value. REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/docs/WarningResponse.md b/sdks/python/docs/WarningResponse.md index c015bda8b..1eb34fa49 100644 --- a/sdks/python/docs/WarningResponse.md +++ b/sdks/python/docs/WarningResponse.md @@ -5,9 +5,8 @@ A list of warnings. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `warning_msg`*_required_ | ```str``` | Warning message | | -| `warning_name`*_required_ | ```str``` | Warning name | | +| `warning_msg`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Warning message REPLACE_ME_WITH_DESCRIPTION_END | | +| `warning_name`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Warning name REPLACE_ME_WITH_DESCRIPTION_END | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/python/dropbox_sign/__init__.py b/sdks/python/dropbox_sign/__init__.py index ccc78f37b..9790f7eeb 100644 --- a/sdks/python/dropbox_sign/__init__.py +++ b/sdks/python/dropbox_sign/__init__.py @@ -1,30 +1,217 @@ +# coding: utf-8 + # flake8: noqa """ Dropbox Sign API - Dropbox Sign v3 API # noqa: E501 + Dropbox Sign v3 API The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +__version__ = "2.0-dev" -__version__ = "1.5-dev" +# import apis into sdk package +from dropbox_sign.apis import * # import ApiClient +from dropbox_sign.api_response import ApiResponse from dropbox_sign.api_client import ApiClient - -# import Configuration from dropbox_sign.configuration import Configuration - -# import exceptions from dropbox_sign.exceptions import OpenApiException -from dropbox_sign.exceptions import ApiAttributeError from dropbox_sign.exceptions import ApiTypeError from dropbox_sign.exceptions import ApiValueError from dropbox_sign.exceptions import ApiKeyError +from dropbox_sign.exceptions import ApiAttributeError from dropbox_sign.exceptions import ApiException +# import models into sdk package +from dropbox_sign.models.account_create_request import AccountCreateRequest +from dropbox_sign.models.account_create_response import AccountCreateResponse +from dropbox_sign.models.account_get_response import AccountGetResponse +from dropbox_sign.models.account_response import AccountResponse +from dropbox_sign.models.account_response_quotas import AccountResponseQuotas +from dropbox_sign.models.account_response_usage import AccountResponseUsage +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.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_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_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_sign_url_response import EmbeddedSignUrlResponse +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.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_create_request import FaxLineCreateRequest +from dropbox_sign.models.fax_line_delete_request import FaxLineDeleteRequest +from dropbox_sign.models.fax_line_list_response import FaxLineListResponse +from dropbox_sign.models.fax_line_remove_user_request import FaxLineRemoveUserRequest +from dropbox_sign.models.fax_line_response import FaxLineResponse +from dropbox_sign.models.fax_line_response_fax_line import FaxLineResponseFaxLine +from dropbox_sign.models.file_response import FileResponse +from dropbox_sign.models.file_response_data_uri import FileResponseDataUri +from dropbox_sign.models.list_info_response import ListInfoResponse +from dropbox_sign.models.o_auth_token_generate_request import OAuthTokenGenerateRequest +from dropbox_sign.models.o_auth_token_refresh_request import OAuthTokenRefreshRequest +from dropbox_sign.models.o_auth_token_response import OAuthTokenResponse +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_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_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_cc import SubCC +from dropbox_sign.models.sub_custom_field import SubCustomField +from dropbox_sign.models.sub_editor_options import SubEditorOptions +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_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_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_signer import SubSignatureRequestSigner +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_white_labeling_options import SubWhiteLabelingOptions +from dropbox_sign.models.team_add_member_request import TeamAddMemberRequest +from dropbox_sign.models.team_create_request import TeamCreateRequest +from dropbox_sign.models.team_get_info_response import TeamGetInfoResponse +from dropbox_sign.models.team_get_response import TeamGetResponse +from dropbox_sign.models.team_info_response import TeamInfoResponse +from dropbox_sign.models.team_invite_response import TeamInviteResponse +from dropbox_sign.models.team_invites_response import TeamInvitesResponse +from dropbox_sign.models.team_member_response import TeamMemberResponse +from dropbox_sign.models.team_members_response import TeamMembersResponse +from dropbox_sign.models.team_parent_response import TeamParentResponse +from dropbox_sign.models.team_remove_member_request import TeamRemoveMemberRequest +from dropbox_sign.models.team_response import TeamResponse +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_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_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_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_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.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 5edf83a81..05f20926a 100644 --- a/sdks/python/dropbox_sign/api/__init__.py +++ b/sdks/python/dropbox_sign/api/__init__.py @@ -1,3 +1,15 @@ -# do not import all apis into this module because that uses a lot of memory and stack frames -# if you need the ability to import all apis from one package, import them with -# from dropbox_sign.apis import AccountApi +# flake8: noqa + +# import apis into api package +from dropbox_sign.api.account_api import AccountApi +from dropbox_sign.api.api_app_api import ApiAppApi +from dropbox_sign.api.bulk_send_job_api import BulkSendJobApi +from dropbox_sign.api.embedded_api import EmbeddedApi +from dropbox_sign.api.fax_line_api import FaxLineApi +from dropbox_sign.api.o_auth_api import OAuthApi +from dropbox_sign.api.report_api import ReportApi +from dropbox_sign.api.signature_request_api import SignatureRequestApi +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 5ca7fdd35..c57629f33 100644 --- a/sdks/python/dropbox_sign/api/account_api.py +++ b/sdks/python/dropbox_sign/api/account_api.py @@ -1,657 +1,1219 @@ +# coding: utf-8 + """ Dropbox Sign API - Dropbox Sign v3 API # noqa: E501 + Dropbox Sign v3 API The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr +from typing import Optional +from typing_extensions import Annotated +from dropbox_sign.models.account_create_request import AccountCreateRequest +from dropbox_sign.models.account_create_response import AccountCreateResponse +from dropbox_sign.models.account_get_response import AccountGetResponse +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.api_client import ApiClient, RequestSerialized +from dropbox_sign.api_response import ApiResponse +from dropbox_sign.rest import RESTResponseType +import io -from __future__ import annotations -import re # noqa: F401 -import sys # noqa: F401 - -from dropbox_sign.api_client import ApiClient, ApiException, Endpoint as _Endpoint -from dropbox_sign.model_utils import ( # noqa: F401 - check_allowed_values, - check_validations, - date, - datetime, - file_type, - none_type, - validate_and_convert_types -) -from dropbox_sign.model.account_create_request import AccountCreateRequest -from dropbox_sign.model.account_create_response import AccountCreateResponse -from dropbox_sign.model.account_get_response import AccountGetResponse -from dropbox_sign.model.account_update_request import AccountUpdateRequest -from dropbox_sign.model.account_verify_request import AccountVerifyRequest -from dropbox_sign.model.account_verify_response import AccountVerifyResponse -from dropbox_sign.model.error_response import ErrorResponse - - -class AccountApi(object): +class AccountApi: """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech Do not edit the class manually. """ - def __init__(self, api_client=None): + def __init__(self, api_client=None) -> None: if api_client is None: - api_client = ApiClient() + api_client = ApiClient.get_default() self.api_client = api_client - self.account_create_endpoint = _Endpoint( - settings={ - 'response_type': (AccountCreateResponse,), - 'auth': [ - 'api_key', - 'oauth2' - ], - 'endpoint_path': '/account/create', - 'operation_id': 'account_create', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'account_create_request', - ], - 'required': [ - 'account_create_request', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_create_request': - (AccountCreateRequest,), - }, - 'attribute_map': { - }, - 'location_map': { - 'account_create_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.account_get_endpoint = _Endpoint( - settings={ - 'response_type': (AccountGetResponse,), - 'auth': [ - 'api_key', - 'oauth2' - ], - 'endpoint_path': '/account', - 'operation_id': 'account_get', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'account_id', - 'email_address', - ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'email_address': - (str,), - }, - 'attribute_map': { - 'account_id': 'account_id', - 'email_address': 'email_address', - }, - 'location_map': { - 'account_id': 'query', - 'email_address': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.account_update_endpoint = _Endpoint( - settings={ - 'response_type': (AccountGetResponse,), - 'auth': [ - 'api_key', - 'oauth2' - ], - 'endpoint_path': '/account', - 'operation_id': 'account_update', - 'http_method': 'PUT', - 'servers': None, - }, - params_map={ - 'all': [ - 'account_update_request', - ], - 'required': [ - 'account_update_request', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_update_request': - (AccountUpdateRequest,), - }, - 'attribute_map': { - }, - 'location_map': { - 'account_update_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.account_verify_endpoint = _Endpoint( - settings={ - 'response_type': (AccountVerifyResponse,), - 'auth': [ - 'api_key', - 'oauth2' - ], - 'endpoint_path': '/account/verify', - 'operation_id': 'account_verify', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'account_verify_request', - ], - 'required': [ - 'account_verify_request', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_verify_request': - (AccountVerifyRequest,), - }, - 'attribute_map': { - }, - 'location_map': { - 'account_verify_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) + + @validate_call def account_create( self, - account_create_request, - **kwargs + account_create_request: AccountCreateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> AccountCreateResponse: - """Create Account # noqa: E501 - - Creates a new Dropbox Sign Account that is associated with the specified `email_address`. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.account_create(account_create_request, async_req=True) - >>> result = thread.get() - - Args: - account_create_request (AccountCreateRequest): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - AccountCreateResponse - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['account_create_request'] = \ - account_create_request - try: - return self.account_create_endpoint.call_with_http_info(**kwargs) - except ApiException as e: - if e.status == 200: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[AccountCreateResponse], - _check_type=True, - ) + """Create Account + + Creates a new Dropbox Sign Account that is associated with the specified `email_address`. + + :param account_create_request: (required) + :type account_create_request: AccountCreateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AccountCreateResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def account_create_with_http_info( + self, + account_create_request: AccountCreateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AccountCreateResponse]: + """Create Account + + Creates a new Dropbox Sign Account that is associated with the specified `email_address`. + + :param account_create_request: (required) + :type account_create_request: AccountCreateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AccountCreateResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def account_create_without_preload_content( + self, + account_create_request: AccountCreateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create Account + + Creates a new Dropbox Sign Account that is associated with the specified `email_address`. + + :param account_create_request: (required) + :type account_create_request: AccountCreateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AccountCreateResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + - raise e - range_code = "4XX"[0] - range_code_left = int(f"{range_code}00") - range_code_right = int(f"{range_code}99") + def _account_create_serialize( + self, + account_create_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + has_files = False + body_param = account_create_request + excluded_json_fields = set([]) + for param_name, param_type in body_param.openapi_types().items(): + param_value = getattr(body_param, param_name) + if param_value is None: + continue + + if "io.IOBase" in param_type: + has_files = True + _content_type = "multipart/form-data" + excluded_json_fields.add(param_name) + + if isinstance(param_value, list): + for index, item in enumerate(param_value): + _files[f'{param_name}[{index}]'] = item + else: + _files[param_name] = param_value + + _form_params = body_param.to_json_form_params(excluded_json_fields) + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + 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 range_code_left <= e.status <= range_code_right: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[ErrorResponse], - _check_type=True, + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _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 + + # authentication setting + _auth_settings: List[str] = [ + 'api_key', + 'oauth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/account/create', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) - raise e + + + @validate_call def account_get( self, - **kwargs + 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)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> AccountGetResponse: - """Get Account # noqa: E501 - - Returns the properties and settings of your Account. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.account_get(async_req=True) - >>> result = thread.get() - - - Keyword Args: - account_id (str): `account_id` or `email_address` is required. If both are provided, the account id prevails. The ID of the Account.. [optional] - email_address (str): `account_id` or `email_address` is required, If both are provided, the account id prevails. The email address of the Account.. [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - AccountGetResponse - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - try: - return self.account_get_endpoint.call_with_http_info(**kwargs) - except ApiException as e: - if e.status == 200: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[AccountGetResponse], - _check_type=True, - ) + """Get Account - raise e - range_code = "4XX"[0] - range_code_left = int(f"{range_code}00") - range_code_right = int(f"{range_code}99") + Returns the properties and settings of your Account. - if range_code_left <= e.status <= range_code_right: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[ErrorResponse], - _check_type=True, - ) + :param account_id: `account_id` or `email_address` is required. If both are provided, the account id prevails. The ID of the Account. + :type account_id: str + :param email_address: `account_id` or `email_address` is required, If both are provided, the account id prevails. The email address of the Account. + :type email_address: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._account_get_serialize( + account_id=account_id, + email_address=email_address, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AccountGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + 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, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AccountGetResponse]: + """Get Account + + Returns the properties and settings of your Account. + + :param account_id: `account_id` or `email_address` is required. If both are provided, the account id prevails. The ID of the Account. + :type account_id: str + :param email_address: `account_id` or `email_address` is required, If both are provided, the account id prevails. The email address of the Account. + :type email_address: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._account_get_serialize( + account_id=account_id, + email_address=email_address, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AccountGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + 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, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Account + + Returns the properties and settings of your Account. + + :param account_id: `account_id` or `email_address` is required. If both are provided, the account id prevails. The ID of the Account. + :type account_id: str + :param email_address: `account_id` or `email_address` is required, If both are provided, the account id prevails. The email address of the Account. + :type email_address: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._account_get_serialize( + account_id=account_id, + email_address=email_address, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AccountGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _account_get_serialize( + self, + account_id, + email_address, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if account_id is not None: + + _query_params.append(('account_id', account_id)) + + if email_address is not None: + + _query_params.append(('email_address', email_address)) + + # process the header parameters + # process the form parameters + # process the body parameter - raise e + # set the HTTP header `Accept` + 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' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/account', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def account_update( self, - account_update_request, - **kwargs + account_update_request: AccountUpdateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> AccountGetResponse: - """Update Account # noqa: E501 - - Updates the properties and settings of your Account. Currently only allows for updates to the [Callback URL](/api/reference/tag/Callbacks-and-Events) and locale. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.account_update(account_update_request, async_req=True) - >>> result = thread.get() - - Args: - account_update_request (AccountUpdateRequest): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - AccountGetResponse - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['account_update_request'] = \ - account_update_request - try: - return self.account_update_endpoint.call_with_http_info(**kwargs) - except ApiException as e: - if e.status == 200: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[AccountGetResponse], - _check_type=True, - ) + """Update Account + + Updates the properties and settings of your Account. Currently only allows for updates to the [Callback URL](/api/reference/tag/Callbacks-and-Events) and locale. - raise e - range_code = "4XX"[0] - range_code_left = int(f"{range_code}00") - range_code_right = int(f"{range_code}99") + :param account_update_request: (required) + :type account_update_request: AccountUpdateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AccountGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def account_update_with_http_info( + self, + account_update_request: AccountUpdateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AccountGetResponse]: + """Update Account + + Updates the properties and settings of your Account. Currently only allows for updates to the [Callback URL](/api/reference/tag/Callbacks-and-Events) and locale. + + :param account_update_request: (required) + :type account_update_request: AccountUpdateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AccountGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def account_update_without_preload_content( + self, + account_update_request: AccountUpdateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update Account + + Updates the properties and settings of your Account. Currently only allows for updates to the [Callback URL](/api/reference/tag/Callbacks-and-Events) and locale. + + :param account_update_request: (required) + :type account_update_request: AccountUpdateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AccountGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _account_update_serialize( + self, + account_update_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + has_files = False + body_param = account_update_request + excluded_json_fields = set([]) + for param_name, param_type in body_param.openapi_types().items(): + param_value = getattr(body_param, param_name) + if param_value is None: + continue + + if "io.IOBase" in param_type: + has_files = True + _content_type = "multipart/form-data" + excluded_json_fields.add(param_name) + + if isinstance(param_value, list): + for index, item in enumerate(param_value): + _files[f'{param_name}[{index}]'] = item + else: + _files[param_name] = param_value + + _form_params = body_param.to_json_form_params(excluded_json_fields) + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + 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 range_code_left <= e.status <= range_code_right: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[ErrorResponse], - _check_type=True, + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _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 + + # authentication setting + _auth_settings: List[str] = [ + 'api_key', + 'oauth2' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/account', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) - raise e + + + @validate_call def account_verify( self, - account_verify_request, - **kwargs + account_verify_request: AccountVerifyRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> AccountVerifyResponse: - """Verify Account # noqa: E501 - - Verifies whether an Dropbox Sign Account exists for the given email address. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.account_verify(account_verify_request, async_req=True) - >>> result = thread.get() - - Args: - account_verify_request (AccountVerifyRequest): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - AccountVerifyResponse - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['account_verify_request'] = \ - account_verify_request - try: - return self.account_verify_endpoint.call_with_http_info(**kwargs) - except ApiException as e: - if e.status == 200: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[AccountVerifyResponse], - _check_type=True, - ) + """Verify Account + + Verifies whether an Dropbox Sign Account exists for the given email address. + + :param account_verify_request: (required) + :type account_verify_request: AccountVerifyRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AccountVerifyResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def account_verify_with_http_info( + self, + account_verify_request: AccountVerifyRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AccountVerifyResponse]: + """Verify Account - raise e - range_code = "4XX"[0] - range_code_left = int(f"{range_code}00") - range_code_right = int(f"{range_code}99") + Verifies whether an Dropbox Sign Account exists for the given email address. + + :param account_verify_request: (required) + :type account_verify_request: AccountVerifyRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AccountVerifyResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def account_verify_without_preload_content( + self, + account_verify_request: AccountVerifyRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Verify Account - if range_code_left <= e.status <= range_code_right: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[ErrorResponse], - _check_type=True, + Verifies whether an Dropbox Sign Account exists for the given email address. + + :param account_verify_request: (required) + :type account_verify_request: AccountVerifyRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AccountVerifyResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _account_verify_serialize( + self, + account_verify_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + has_files = False + body_param = account_verify_request + excluded_json_fields = set([]) + for param_name, param_type in body_param.openapi_types().items(): + param_value = getattr(body_param, param_name) + if param_value is None: + continue + + if "io.IOBase" in param_type: + has_files = True + _content_type = "multipart/form-data" + excluded_json_fields.add(param_name) + + if isinstance(param_value, list): + for index, item in enumerate(param_value): + _files[f'{param_name}[{index}]'] = item + else: + _files[param_name] = param_value + + _form_params = body_param.to_json_form_params(excluded_json_fields) + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + 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' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _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 + + # authentication setting + _auth_settings: List[str] = [ + 'api_key', + 'oauth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/account/verify', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) - raise e diff --git a/sdks/python/dropbox_sign/api/api_app_api.py b/sdks/python/dropbox_sign/api/api_app_api.py index c575780ef..5e444567c 100644 --- a/sdks/python/dropbox_sign/api/api_app_api.py +++ b/sdks/python/dropbox_sign/api/api_app_api.py @@ -1,796 +1,1463 @@ +# coding: utf-8 + """ Dropbox Sign API - Dropbox Sign v3 API # noqa: E501 + Dropbox Sign v3 API The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated -from __future__ import annotations -import re # noqa: F401 -import sys # noqa: F401 - -from dropbox_sign.api_client import ApiClient, ApiException, Endpoint as _Endpoint -from dropbox_sign.model_utils import ( # noqa: F401 - check_allowed_values, - check_validations, - date, - datetime, - file_type, - none_type, - validate_and_convert_types -) -from dropbox_sign.model.api_app_create_request import ApiAppCreateRequest -from dropbox_sign.model.api_app_get_response import ApiAppGetResponse -from dropbox_sign.model.api_app_list_response import ApiAppListResponse -from dropbox_sign.model.api_app_update_request import ApiAppUpdateRequest -from dropbox_sign.model.error_response import ErrorResponse - - -class ApiAppApi(object): +from pydantic import Field, StrictInt, StrictStr +from typing import Optional +from typing_extensions import Annotated +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_update_request import ApiAppUpdateRequest + +from dropbox_sign.api_client import ApiClient, RequestSerialized +from dropbox_sign.api_response import ApiResponse +from dropbox_sign.rest import RESTResponseType +import io + + +class ApiAppApi: """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech Do not edit the class manually. """ - def __init__(self, api_client=None): + def __init__(self, api_client=None) -> None: if api_client is None: - api_client = ApiClient() + api_client = ApiClient.get_default() self.api_client = api_client - self.api_app_create_endpoint = _Endpoint( - settings={ - 'response_type': (ApiAppGetResponse,), - 'auth': [ - 'api_key', - 'oauth2' - ], - 'endpoint_path': '/api_app', - 'operation_id': 'api_app_create', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'api_app_create_request', - ], - 'required': [ - 'api_app_create_request', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'api_app_create_request': - (ApiAppCreateRequest,), - }, - 'attribute_map': { - }, - 'location_map': { - 'api_app_create_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json', - 'multipart/form-data' - ] - }, - api_client=api_client - ) - self.api_app_delete_endpoint = _Endpoint( - settings={ - 'response_type': None, - 'auth': [ - 'api_key', - 'oauth2' - ], - 'endpoint_path': '/api_app/{client_id}', - 'operation_id': 'api_app_delete', - 'http_method': 'DELETE', - 'servers': None, - }, - params_map={ - 'all': [ - 'client_id', - ], - 'required': [ - 'client_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'client_id': - (str,), - }, - 'attribute_map': { - 'client_id': 'client_id', - }, - 'location_map': { - 'client_id': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.api_app_get_endpoint = _Endpoint( - settings={ - 'response_type': (ApiAppGetResponse,), - 'auth': [ - 'api_key', - 'oauth2' - ], - 'endpoint_path': '/api_app/{client_id}', - 'operation_id': 'api_app_get', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'client_id', - ], - 'required': [ - 'client_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'client_id': - (str,), - }, - 'attribute_map': { - 'client_id': 'client_id', - }, - 'location_map': { - 'client_id': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.api_app_list_endpoint = _Endpoint( - settings={ - 'response_type': (ApiAppListResponse,), - 'auth': [ - 'api_key', - 'oauth2' - ], - 'endpoint_path': '/api_app/list', - 'operation_id': 'api_app_list', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'page', - 'page_size', - ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'page': - (int,), - 'page_size': - (int,), - }, - 'attribute_map': { - 'page': 'page', - 'page_size': 'page_size', - }, - 'location_map': { - 'page': 'query', - 'page_size': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.api_app_update_endpoint = _Endpoint( - settings={ - 'response_type': (ApiAppGetResponse,), - 'auth': [ - 'api_key', - 'oauth2' - ], - 'endpoint_path': '/api_app/{client_id}', - 'operation_id': 'api_app_update', - 'http_method': 'PUT', - 'servers': None, - }, - params_map={ - 'all': [ - 'client_id', - 'api_app_update_request', - ], - 'required': [ - 'client_id', - 'api_app_update_request', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'client_id': - (str,), - 'api_app_update_request': - (ApiAppUpdateRequest,), - }, - 'attribute_map': { - 'client_id': 'client_id', - }, - 'location_map': { - 'client_id': 'path', - 'api_app_update_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json', - 'multipart/form-data' - ] - }, - api_client=api_client - ) + + @validate_call def api_app_create( self, - api_app_create_request, - **kwargs + api_app_create_request: ApiAppCreateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiAppGetResponse: - """Create API App # noqa: E501 - - Creates a new API App. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.api_app_create(api_app_create_request, async_req=True) - >>> result = thread.get() - - Args: - api_app_create_request (ApiAppCreateRequest): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - ApiAppGetResponse - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['api_app_create_request'] = \ - api_app_create_request - try: - return self.api_app_create_endpoint.call_with_http_info(**kwargs) - except ApiException as e: - if e.status == 201: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[ApiAppGetResponse], - _check_type=True, - ) + """Create API App + + Creates a new API App. + + :param api_app_create_request: (required) + :type api_app_create_request: ApiAppCreateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "ApiAppGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def api_app_create_with_http_info( + self, + api_app_create_request: ApiAppCreateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ApiAppGetResponse]: + """Create API App + + Creates a new API App. + + :param api_app_create_request: (required) + :type api_app_create_request: ApiAppCreateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "ApiAppGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def api_app_create_without_preload_content( + self, + api_app_create_request: ApiAppCreateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create API App + + Creates a new API App. + + :param api_app_create_request: (required) + :type api_app_create_request: ApiAppCreateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "ApiAppGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _api_app_create_serialize( + self, + api_app_create_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + has_files = False + body_param = api_app_create_request + excluded_json_fields = set([]) + for param_name, param_type in body_param.openapi_types().items(): + param_value = getattr(body_param, param_name) + if param_value is None: + continue + + if "io.IOBase" in param_type: + has_files = True + _content_type = "multipart/form-data" + excluded_json_fields.add(param_name) + + if isinstance(param_value, list): + for index, item in enumerate(param_value): + _files[f'{param_name}[{index}]'] = item + else: + _files[param_name] = param_value + + _form_params = body_param.to_json_form_params(excluded_json_fields) + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if api_app_create_request is not None and has_files is False: + _body_params = api_app_create_request + - raise e - range_code = "4XX"[0] - range_code_left = int(f"{range_code}00") - range_code_right = int(f"{range_code}99") + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) - if range_code_left <= e.status <= range_code_right: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[ErrorResponse], - _check_type=True, + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _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 + + # authentication setting + _auth_settings: List[str] = [ + 'api_key', + 'oauth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/api_app', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + - raise e + + @validate_call def api_app_delete( self, - client_id, - **kwargs + 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)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> None: - """Delete API App # noqa: E501 - - Deletes an API App. Can only be invoked for apps you own. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.api_app_delete(client_id, async_req=True) - >>> result = thread.get() - - Args: - client_id (str): The client id of the API App to delete. - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - None - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['client_id'] = \ - client_id - return self.api_app_delete_endpoint.call_with_http_info(**kwargs) + """Delete API App - def api_app_get( + Deletes an API App. Can only be invoked for apps you own. + + :param client_id: The client id of the API App to delete. (required) + :type client_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + 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.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete API App + + Deletes an API App. Can only be invoked for apps you own. + + :param client_id: The client id of the API App to delete. (required) + :type client_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + 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.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete API App + + Deletes an API App. Can only be invoked for apps you own. + + :param client_id: The client id of the API App to delete. (required) + :type client_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _api_app_delete_serialize( self, client_id, - **kwargs + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if client_id is not None: + _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' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'api_key', + 'oauth2' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/api_app/{client_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _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.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiAppGetResponse: - """Get API App # noqa: E501 - - Returns an object with information about an API App. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.api_app_get(client_id, async_req=True) - >>> result = thread.get() - - Args: - client_id (str): The client id of the API App to retrieve. - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - ApiAppGetResponse - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['client_id'] = \ - client_id - try: - return self.api_app_get_endpoint.call_with_http_info(**kwargs) - except ApiException as e: - if e.status == 200: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[ApiAppGetResponse], - _check_type=True, - ) + """Get API App - raise e - range_code = "4XX"[0] - range_code_left = int(f"{range_code}00") - range_code_right = int(f"{range_code}99") + Returns an object with information about an API App. - if range_code_left <= e.status <= range_code_right: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[ErrorResponse], - _check_type=True, - ) + :param client_id: The client id of the API App to retrieve. (required) + :type client_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiAppGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + 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.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ApiAppGetResponse]: + """Get API App + + Returns an object with information about an API App. + + :param client_id: The client id of the API App to retrieve. (required) + :type client_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiAppGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) - raise e + @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.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get API App + + Returns an object with information about an API App. + + :param client_id: The client id of the API App to retrieve. (required) + :type client_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiAppGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _api_app_get_serialize( + self, + client_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if client_id is not None: + _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' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'api_key', + 'oauth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api_app/{client_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def api_app_list( self, - **kwargs + 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)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiAppListResponse: - """List API Apps # noqa: E501 - - Returns a list of API Apps that are accessible by you. If you are on a team with an Admin or Developer role, this list will include apps owned by teammates. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.api_app_list(async_req=True) - >>> result = thread.get() - - - Keyword Args: - page (int): Which page number of the API App List to return. Defaults to `1`.. [optional] if omitted the server will use the default value of 1 - page_size (int): Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.. [optional] if omitted the server will use the default value of 20 - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - ApiAppListResponse - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - try: - return self.api_app_list_endpoint.call_with_http_info(**kwargs) - except ApiException as e: - if e.status == 200: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[ApiAppListResponse], - _check_type=True, - ) + """List API Apps + + Returns a list of API Apps that are accessible by you. If you are on a team with an Admin or Developer role, this list will include apps owned by teammates. + + :param page: Which page number of the API App List to return. Defaults to `1`. + :type page: int + :param page_size: Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_app_list_serialize( + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiAppListResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + 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, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ApiAppListResponse]: + """List API Apps + + Returns a list of API Apps that are accessible by you. If you are on a team with an Admin or Developer role, this list will include apps owned by teammates. + + :param page: Which page number of the API App List to return. Defaults to `1`. + :type page: int + :param page_size: Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_app_list_serialize( + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiAppListResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + 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, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List API Apps + + Returns a list of API Apps that are accessible by you. If you are on a team with an Admin or Developer role, this list will include apps owned by teammates. + + :param page: Which page number of the API App List to return. Defaults to `1`. + :type page: int + :param page_size: Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_app_list_serialize( + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiAppListResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _api_app_list_serialize( + self, + page, + page_size, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if page is not None: + + _query_params.append(('page', page)) + + if page_size is not None: + + _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' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'api_key', + 'oauth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api_app/list', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) - raise e - range_code = "4XX"[0] - range_code_left = int(f"{range_code}00") - range_code_right = int(f"{range_code}99") - if range_code_left <= e.status <= range_code_right: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[ErrorResponse], - _check_type=True, - ) - raise e + @validate_call def api_app_update( + self, + 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)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiAppGetResponse: + """Update API App + + Updates an existing API App. Can only be invoked for apps you own. Only the fields you provide will be updated. If you wish to clear an existing optional field, provide an empty string. + + :param client_id: The client id of the API App to update. (required) + :type client_id: str + :param api_app_update_request: (required) + :type api_app_update_request: ApiAppUpdateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_app_update_serialize( + client_id=client_id, + api_app_update_request=api_app_update_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiAppGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + 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.")], + 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)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ApiAppGetResponse]: + """Update API App + + Updates an existing API App. Can only be invoked for apps you own. Only the fields you provide will be updated. If you wish to clear an existing optional field, provide an empty string. + + :param client_id: The client id of the API App to update. (required) + :type client_id: str + :param api_app_update_request: (required) + :type api_app_update_request: ApiAppUpdateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_app_update_serialize( + client_id=client_id, + api_app_update_request=api_app_update_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiAppGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + 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.")], + 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)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update API App + + Updates an existing API App. Can only be invoked for apps you own. Only the fields you provide will be updated. If you wish to clear an existing optional field, provide an empty string. + + :param client_id: The client id of the API App to update. (required) + :type client_id: str + :param api_app_update_request: (required) + :type api_app_update_request: ApiAppUpdateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_app_update_serialize( + client_id=client_id, + api_app_update_request=api_app_update_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiAppGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _api_app_update_serialize( self, client_id, api_app_update_request, - **kwargs - ) -> ApiAppGetResponse: - """Update API App # noqa: E501 - - Updates an existing API App. Can only be invoked for apps you own. Only the fields you provide will be updated. If you wish to clear an existing optional field, provide an empty string. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.api_app_update(client_id, api_app_update_request, async_req=True) - >>> result = thread.get() - - Args: - client_id (str): The client id of the API App to update. - api_app_update_request (ApiAppUpdateRequest): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - ApiAppGetResponse - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['client_id'] = \ - client_id - kwargs['api_app_update_request'] = \ - api_app_update_request - try: - return self.api_app_update_endpoint.call_with_http_info(**kwargs) - except ApiException as e: - if e.status == 200: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[ApiAppGetResponse], - _check_type=True, - ) + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + has_files = False + body_param = api_app_update_request + excluded_json_fields = set([]) + for param_name, param_type in body_param.openapi_types().items(): + param_value = getattr(body_param, param_name) + if param_value is None: + continue + + if "io.IOBase" in param_type: + has_files = True + _content_type = "multipart/form-data" + excluded_json_fields.add(param_name) + + if isinstance(param_value, list): + for index, item in enumerate(param_value): + _files[f'{param_name}[{index}]'] = item + else: + _files[param_name] = param_value + + _form_params = body_param.to_json_form_params(excluded_json_fields) - raise e - range_code = "4XX"[0] - range_code_left = int(f"{range_code}00") - range_code_right = int(f"{range_code}99") + # process the path parameters + if client_id is not None: + _path_params['client_id'] = client_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if api_app_update_request is not None and has_files is False: + _body_params = api_app_update_request - if range_code_left <= e.status <= range_code_right: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[ErrorResponse], - _check_type=True, + + # set the HTTP header `Accept` + 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 + else: + _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 + + # authentication setting + _auth_settings: List[str] = [ + 'api_key', + 'oauth2' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/api_app/{client_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) - raise e 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 93e39e19e..8bb2a4386 100644 --- a/sdks/python/dropbox_sign/api/bulk_send_job_api.py +++ b/sdks/python/dropbox_sign/api/bulk_send_job_api.py @@ -1,358 +1,621 @@ +# coding: utf-8 + """ Dropbox Sign API - Dropbox Sign v3 API # noqa: E501 + Dropbox Sign v3 API The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated -from __future__ import annotations -import re # noqa: F401 -import sys # noqa: F401 +from pydantic import Field, StrictInt, StrictStr +from typing import Optional +from typing_extensions import Annotated +from dropbox_sign.models.bulk_send_job_get_response import BulkSendJobGetResponse +from dropbox_sign.models.bulk_send_job_list_response import BulkSendJobListResponse -from dropbox_sign.api_client import ApiClient, ApiException, Endpoint as _Endpoint -from dropbox_sign.model_utils import ( # noqa: F401 - check_allowed_values, - check_validations, - date, - datetime, - file_type, - none_type, - validate_and_convert_types -) -from dropbox_sign.model.bulk_send_job_get_response import BulkSendJobGetResponse -from dropbox_sign.model.bulk_send_job_list_response import BulkSendJobListResponse -from dropbox_sign.model.error_response import ErrorResponse +from dropbox_sign.api_client import ApiClient, RequestSerialized +from dropbox_sign.api_response import ApiResponse +from dropbox_sign.rest import RESTResponseType +import io -class BulkSendJobApi(object): +class BulkSendJobApi: """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech Do not edit the class manually. """ - def __init__(self, api_client=None): + def __init__(self, api_client=None) -> None: if api_client is None: - api_client = ApiClient() + api_client = ApiClient.get_default() self.api_client = api_client - self.bulk_send_job_get_endpoint = _Endpoint( - settings={ - 'response_type': (BulkSendJobGetResponse,), - 'auth': [ - 'api_key', - 'oauth2' - ], - 'endpoint_path': '/bulk_send_job/{bulk_send_job_id}', - 'operation_id': 'bulk_send_job_get', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'bulk_send_job_id', - 'page', - 'page_size', - ], - 'required': [ - 'bulk_send_job_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'bulk_send_job_id': - (str,), - 'page': - (int,), - 'page_size': - (int,), - }, - 'attribute_map': { - 'bulk_send_job_id': 'bulk_send_job_id', - 'page': 'page', - 'page_size': 'page_size', - }, - 'location_map': { - 'bulk_send_job_id': 'path', - 'page': 'query', - 'page_size': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.bulk_send_job_list_endpoint = _Endpoint( - settings={ - 'response_type': (BulkSendJobListResponse,), - 'auth': [ - 'api_key', - 'oauth2' - ], - 'endpoint_path': '/bulk_send_job/list', - 'operation_id': 'bulk_send_job_list', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'page', - 'page_size', - ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'page': - (int,), - 'page_size': - (int,), - }, - 'attribute_map': { - 'page': 'page', - 'page_size': 'page_size', - }, - 'location_map': { - 'page': 'query', - 'page_size': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) + + @validate_call def bulk_send_job_get( self, - bulk_send_job_id, - **kwargs + 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)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BulkSendJobGetResponse: - """Get Bulk Send Job # noqa: E501 - - Returns the status of the BulkSendJob and its SignatureRequests specified by the `bulk_send_job_id` parameter. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.bulk_send_job_get(bulk_send_job_id, async_req=True) - >>> result = thread.get() - - Args: - bulk_send_job_id (str): The id of the BulkSendJob to retrieve. - - Keyword Args: - page (int): Which page number of the BulkSendJob list to return. Defaults to `1`.. [optional] if omitted the server will use the default value of 1 - page_size (int): Number of objects to be returned per page. Must be between `1` and `100`. Default is 20.. [optional] if omitted the server will use the default value of 20 - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - BulkSendJobGetResponse - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False + """Get Bulk Send Job + + Returns the status of the BulkSendJob and its SignatureRequests specified by the `bulk_send_job_id` parameter. + + :param bulk_send_job_id: The id of the BulkSendJob to retrieve. (required) + :type bulk_send_job_id: str + :param page: Which page number of the BulkSendJob list to return. Defaults to `1`. + :type page: int + :param page_size: Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._bulk_send_job_get_serialize( + bulk_send_job_id=bulk_send_job_id, + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BulkSendJobGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + 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, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[BulkSendJobGetResponse]: + """Get Bulk Send Job + + Returns the status of the BulkSendJob and its SignatureRequests specified by the `bulk_send_job_id` parameter. + + :param bulk_send_job_id: The id of the BulkSendJob to retrieve. (required) + :type bulk_send_job_id: str + :param page: Which page number of the BulkSendJob list to return. Defaults to `1`. + :type page: int + :param page_size: Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._bulk_send_job_get_serialize( + bulk_send_job_id=bulk_send_job_id, + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BulkSendJobGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True + + + @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, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Bulk Send Job + + Returns the status of the BulkSendJob and its SignatureRequests specified by the `bulk_send_job_id` parameter. + + :param bulk_send_job_id: The id of the BulkSendJob to retrieve. (required) + :type bulk_send_job_id: str + :param page: Which page number of the BulkSendJob list to return. Defaults to `1`. + :type page: int + :param page_size: Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._bulk_send_job_get_serialize( + bulk_send_job_id=bulk_send_job_id, + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BulkSendJobGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['bulk_send_job_id'] = \ - bulk_send_job_id - try: - return self.bulk_send_job_get_endpoint.call_with_http_info(**kwargs) - except ApiException as e: - if e.status == 200: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[BulkSendJobGetResponse], - _check_type=True, - ) - - raise e - range_code = "4XX"[0] - range_code_left = int(f"{range_code}00") - range_code_right = int(f"{range_code}99") - - if range_code_left <= e.status <= range_code_right: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[ErrorResponse], - _check_type=True, - ) - - raise e + return response_data.response + + + def _bulk_send_job_get_serialize( + self, + bulk_send_job_id, + page, + page_size, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if bulk_send_job_id is not None: + _path_params['bulk_send_job_id'] = bulk_send_job_id + # process the query parameters + if page is not None: + + _query_params.append(('page', page)) + + if page_size is not None: + + _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' + ] + ) + + # authentication setting + _auth_settings: List[str] = [ + 'api_key', + 'oauth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/bulk_send_job/{bulk_send_job_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def bulk_send_job_list( self, - **kwargs + 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)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BulkSendJobListResponse: - """List Bulk Send Jobs # noqa: E501 - - Returns a list of BulkSendJob that you can access. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.bulk_send_job_list(async_req=True) - >>> result = thread.get() - - - Keyword Args: - page (int): Which page number of the BulkSendJob List to return. Defaults to `1`.. [optional] if omitted the server will use the default value of 1 - page_size (int): Number of objects to be returned per page. Must be between `1` and `100`. Default is 20.. [optional] if omitted the server will use the default value of 20 - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - BulkSendJobListResponse - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False + """List Bulk Send Jobs + + Returns a list of BulkSendJob that you can access. + + :param page: Which page number of the BulkSendJob List to return. Defaults to `1`. + :type page: int + :param page_size: Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._bulk_send_job_list_serialize( + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BulkSendJobListResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + 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, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[BulkSendJobListResponse]: + """List Bulk Send Jobs + + Returns a list of BulkSendJob that you can access. + + :param page: Which page number of the BulkSendJob List to return. Defaults to `1`. + :type page: int + :param page_size: Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._bulk_send_job_list_serialize( + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BulkSendJobListResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True + + + @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, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Bulk Send Jobs + + Returns a list of BulkSendJob that you can access. + + :param page: Which page number of the BulkSendJob List to return. Defaults to `1`. + :type page: int + :param page_size: Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._bulk_send_job_list_serialize( + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BulkSendJobListResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False + return response_data.response + + + def _bulk_send_job_list_serialize( + self, + page, + page_size, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if page is not None: + + _query_params.append(('page', page)) + + if page_size is not None: + + _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' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'api_key', + 'oauth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/bulk_send_job/list', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - try: - return self.bulk_send_job_list_endpoint.call_with_http_info(**kwargs) - except ApiException as e: - if e.status == 200: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[BulkSendJobListResponse], - _check_type=True, - ) - - raise e - range_code = "4XX"[0] - range_code_left = int(f"{range_code}00") - range_code_right = int(f"{range_code}99") - - if range_code_left <= e.status <= range_code_right: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[ErrorResponse], - _check_type=True, - ) - - raise e + diff --git a/sdks/python/dropbox_sign/api/embedded_api.py b/sdks/python/dropbox_sign/api/embedded_api.py index 78d374f79..481533027 100644 --- a/sdks/python/dropbox_sign/api/embedded_api.py +++ b/sdks/python/dropbox_sign/api/embedded_api.py @@ -1,358 +1,617 @@ +# coding: utf-8 + """ Dropbox Sign API - Dropbox Sign v3 API # noqa: E501 + Dropbox Sign v3 API The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated -from __future__ import annotations -import re # noqa: F401 -import sys # noqa: F401 +from pydantic import Field, StrictStr +from typing_extensions import Annotated +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_sign_url_response import EmbeddedSignUrlResponse -from dropbox_sign.api_client import ApiClient, ApiException, Endpoint as _Endpoint -from dropbox_sign.model_utils import ( # noqa: F401 - check_allowed_values, - check_validations, - date, - datetime, - file_type, - none_type, - validate_and_convert_types -) -from dropbox_sign.model.embedded_edit_url_request import EmbeddedEditUrlRequest -from dropbox_sign.model.embedded_edit_url_response import EmbeddedEditUrlResponse -from dropbox_sign.model.embedded_sign_url_response import EmbeddedSignUrlResponse -from dropbox_sign.model.error_response import ErrorResponse +from dropbox_sign.api_client import ApiClient, RequestSerialized +from dropbox_sign.api_response import ApiResponse +from dropbox_sign.rest import RESTResponseType +import io -class EmbeddedApi(object): +class EmbeddedApi: """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech Do not edit the class manually. """ - def __init__(self, api_client=None): + def __init__(self, api_client=None) -> None: if api_client is None: - api_client = ApiClient() + api_client = ApiClient.get_default() self.api_client = api_client - self.embedded_edit_url_endpoint = _Endpoint( - settings={ - 'response_type': (EmbeddedEditUrlResponse,), - 'auth': [ - 'api_key', - 'oauth2' - ], - 'endpoint_path': '/embedded/edit_url/{template_id}', - 'operation_id': 'embedded_edit_url', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'template_id', - 'embedded_edit_url_request', - ], - 'required': [ - 'template_id', - 'embedded_edit_url_request', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'template_id': - (str,), - 'embedded_edit_url_request': - (EmbeddedEditUrlRequest,), - }, - 'attribute_map': { - 'template_id': 'template_id', - }, - 'location_map': { - 'template_id': 'path', - 'embedded_edit_url_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.embedded_sign_url_endpoint = _Endpoint( - settings={ - 'response_type': (EmbeddedSignUrlResponse,), - 'auth': [ - 'api_key', - 'oauth2' - ], - 'endpoint_path': '/embedded/sign_url/{signature_id}', - 'operation_id': 'embedded_sign_url', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'signature_id', - ], - 'required': [ - 'signature_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'signature_id': - (str,), - }, - 'attribute_map': { - 'signature_id': 'signature_id', - }, - 'location_map': { - 'signature_id': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) + + @validate_call def embedded_edit_url( self, - template_id, - embedded_edit_url_request, - **kwargs + 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)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> EmbeddedEditUrlResponse: - """Get Embedded Template Edit URL # noqa: E501 - - Retrieves an embedded object containing a template url that can be opened in an iFrame. Note that only templates created via the embedded template process are available to be edited with this endpoint. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.embedded_edit_url(template_id, embedded_edit_url_request, async_req=True) - >>> result = thread.get() - - Args: - template_id (str): The id of the template to edit. - embedded_edit_url_request (EmbeddedEditUrlRequest): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - EmbeddedEditUrlResponse - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False + """Get Embedded Template Edit URL + + Retrieves an embedded object containing a template url that can be opened in an iFrame. Note that only templates created via the embedded template process are available to be edited with this endpoint. + + :param template_id: The id of the template to edit. (required) + :type template_id: str + :param embedded_edit_url_request: (required) + :type embedded_edit_url_request: EmbeddedEditUrlRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._embedded_edit_url_serialize( + template_id=template_id, + embedded_edit_url_request=embedded_edit_url_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EmbeddedEditUrlResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + 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.")], + 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)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[EmbeddedEditUrlResponse]: + """Get Embedded Template Edit URL + + Retrieves an embedded object containing a template url that can be opened in an iFrame. Note that only templates created via the embedded template process are available to be edited with this endpoint. + + :param template_id: The id of the template to edit. (required) + :type template_id: str + :param embedded_edit_url_request: (required) + :type embedded_edit_url_request: EmbeddedEditUrlRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._embedded_edit_url_serialize( + template_id=template_id, + embedded_edit_url_request=embedded_edit_url_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EmbeddedEditUrlResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True + + + @validate_call + def embedded_edit_url_without_preload_content( + self, + 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)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Embedded Template Edit URL + + Retrieves an embedded object containing a template url that can be opened in an iFrame. Note that only templates created via the embedded template process are available to be edited with this endpoint. + + :param template_id: The id of the template to edit. (required) + :type template_id: str + :param embedded_edit_url_request: (required) + :type embedded_edit_url_request: EmbeddedEditUrlRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._embedded_edit_url_serialize( + template_id=template_id, + embedded_edit_url_request=embedded_edit_url_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EmbeddedEditUrlResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['template_id'] = \ - template_id - kwargs['embedded_edit_url_request'] = \ - embedded_edit_url_request - try: - return self.embedded_edit_url_endpoint.call_with_http_info(**kwargs) - except ApiException as e: - if e.status == 200: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[EmbeddedEditUrlResponse], - _check_type=True, - ) + return response_data.response + + + def _embedded_edit_url_serialize( + self, + template_id, + embedded_edit_url_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + has_files = False + body_param = embedded_edit_url_request + excluded_json_fields = set([]) + for param_name, param_type in body_param.openapi_types().items(): + param_value = getattr(body_param, param_name) + if param_value is None: + continue + + if "io.IOBase" in param_type: + has_files = True + _content_type = "multipart/form-data" + excluded_json_fields.add(param_name) + + if isinstance(param_value, list): + for index, item in enumerate(param_value): + _files[f'{param_name}[{index}]'] = item + else: + _files[param_name] = param_value - raise e - range_code = "4XX"[0] - range_code_left = int(f"{range_code}00") - range_code_right = int(f"{range_code}99") + _form_params = body_param.to_json_form_params(excluded_json_fields) - if range_code_left <= e.status <= range_code_right: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[ErrorResponse], - _check_type=True, + # process the path parameters + if template_id is not None: + _path_params['template_id'] = template_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + 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' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _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 + + # authentication setting + _auth_settings: List[str] = [ + 'api_key', + 'oauth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/embedded/edit_url/{template_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + - raise e + + @validate_call def embedded_sign_url( self, - signature_id, - **kwargs + 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)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> EmbeddedSignUrlResponse: - """Get Embedded Sign URL # noqa: E501 - - Retrieves an embedded object containing a signature url that can be opened in an iFrame. Note that templates created via the embedded template process will only be accessible through the API. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.embedded_sign_url(signature_id, async_req=True) - >>> result = thread.get() - - Args: - signature_id (str): The id of the signature to get a signature url for. - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - EmbeddedSignUrlResponse - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False + """Get Embedded Sign URL + + Retrieves an embedded object containing a signature url that can be opened in an iFrame. Note that templates created via the embedded template process will only be accessible through the API. + + :param signature_id: The id of the signature to get a signature url for. (required) + :type signature_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EmbeddedSignUrlResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + 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.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[EmbeddedSignUrlResponse]: + """Get Embedded Sign URL + + Retrieves an embedded object containing a signature url that can be opened in an iFrame. Note that templates created via the embedded template process will only be accessible through the API. + + :param signature_id: The id of the signature to get a signature url for. (required) + :type signature_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EmbeddedSignUrlResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True + + + @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.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Embedded Sign URL + + Retrieves an embedded object containing a signature url that can be opened in an iFrame. Note that templates created via the embedded template process will only be accessible through the API. + + :param signature_id: The id of the signature to get a signature url for. (required) + :type signature_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EmbeddedSignUrlResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['signature_id'] = \ - signature_id - try: - return self.embedded_sign_url_endpoint.call_with_http_info(**kwargs) - except ApiException as e: - if e.status == 200: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[EmbeddedSignUrlResponse], - _check_type=True, - ) + return response_data.response - raise e - range_code = "4XX"[0] - range_code_left = int(f"{range_code}00") - range_code_right = int(f"{range_code}99") - if range_code_left <= e.status <= range_code_right: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[ErrorResponse], - _check_type=True, - ) + def _embedded_sign_url_serialize( + self, + signature_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if signature_id is not None: + _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' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'api_key', + 'oauth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/embedded/sign_url/{signature_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) - raise e diff --git a/sdks/python/dropbox_sign/api/fax_line_api.py b/sdks/python/dropbox_sign/api/fax_line_api.py index 84e0d1b40..27b3b8a3a 100644 --- a/sdks/python/dropbox_sign/api/fax_line_api.py +++ b/sdks/python/dropbox_sign/api/fax_line_api.py @@ -1,1195 +1,2125 @@ +# coding: utf-8 + """ Dropbox Sign API - Dropbox Sign v3 API # noqa: E501 + Dropbox Sign v3 API The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - + Generated by OpenAPI Generator (https://openapi-generator.tech) -from __future__ import annotations -import re # noqa: F401 -import sys # noqa: F401 - -from dropbox_sign.api_client import ApiClient, ApiException, Endpoint as _Endpoint -from dropbox_sign.model_utils import ( # noqa: F401 - check_allowed_values, - check_validations, - date, - datetime, - file_type, - none_type, - validate_and_convert_types -) -from dropbox_sign.model.error_response import ErrorResponse -from dropbox_sign.model.fax_line_add_user_request import FaxLineAddUserRequest -from dropbox_sign.model.fax_line_area_code_get_response import FaxLineAreaCodeGetResponse -from dropbox_sign.model.fax_line_create_request import FaxLineCreateRequest -from dropbox_sign.model.fax_line_delete_request import FaxLineDeleteRequest -from dropbox_sign.model.fax_line_list_response import FaxLineListResponse -from dropbox_sign.model.fax_line_remove_user_request import FaxLineRemoveUserRequest -from dropbox_sign.model.fax_line_response import FaxLineResponse - - -class FaxLineApi(object): + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictBool, StrictInt, StrictStr, field_validator +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_create_request import FaxLineCreateRequest +from dropbox_sign.models.fax_line_delete_request import FaxLineDeleteRequest +from dropbox_sign.models.fax_line_list_response import FaxLineListResponse +from dropbox_sign.models.fax_line_remove_user_request import FaxLineRemoveUserRequest +from dropbox_sign.models.fax_line_response import FaxLineResponse + +from dropbox_sign.api_client import ApiClient, RequestSerialized +from dropbox_sign.api_response import ApiResponse +from dropbox_sign.rest import RESTResponseType +import io + + +class FaxLineApi: """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech Do not edit the class manually. """ - def __init__(self, api_client=None): + def __init__(self, api_client=None) -> None: if api_client is None: - api_client = ApiClient() + api_client = ApiClient.get_default() self.api_client = api_client - self.fax_line_add_user_endpoint = _Endpoint( - settings={ - 'response_type': (FaxLineResponse,), - 'auth': [ - 'api_key' - ], - 'endpoint_path': '/fax_line/add_user', - 'operation_id': 'fax_line_add_user', - 'http_method': 'PUT', - 'servers': None, - }, - params_map={ - 'all': [ - 'fax_line_add_user_request', - ], - 'required': [ - 'fax_line_add_user_request', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'fax_line_add_user_request': - (FaxLineAddUserRequest,), - }, - 'attribute_map': { - }, - 'location_map': { - 'fax_line_add_user_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.fax_line_area_code_get_endpoint = _Endpoint( - settings={ - 'response_type': (FaxLineAreaCodeGetResponse,), - 'auth': [ - 'api_key' - ], - 'endpoint_path': '/fax_line/area_codes', - 'operation_id': 'fax_line_area_code_get', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'country', - 'state', - 'province', - 'city', - ], - 'required': [ - 'country', - ], - 'nullable': [ - ], - 'enum': [ - 'country', - 'state', - 'province', - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - ('country',): { - - "CA": "CA", - "US": "US", - "UK": "UK" - }, - ('state',): { - - "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" - }, - ('province',): { - - "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" - }, - }, - 'openapi_types': { - 'country': - (str,), - 'state': - (str,), - 'province': - (str,), - 'city': - (str,), - }, - 'attribute_map': { - 'country': 'country', - 'state': 'state', - 'province': 'province', - 'city': 'city', - }, - 'location_map': { - 'country': 'query', - 'state': 'query', - 'province': 'query', - 'city': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.fax_line_create_endpoint = _Endpoint( - settings={ - 'response_type': (FaxLineResponse,), - 'auth': [ - 'api_key' - ], - 'endpoint_path': '/fax_line/create', - 'operation_id': 'fax_line_create', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'fax_line_create_request', - ], - 'required': [ - 'fax_line_create_request', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'fax_line_create_request': - (FaxLineCreateRequest,), - }, - 'attribute_map': { - }, - 'location_map': { - 'fax_line_create_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.fax_line_delete_endpoint = _Endpoint( - settings={ - 'response_type': None, - 'auth': [ - 'api_key' - ], - 'endpoint_path': '/fax_line', - 'operation_id': 'fax_line_delete', - 'http_method': 'DELETE', - 'servers': None, - }, - params_map={ - 'all': [ - 'fax_line_delete_request', - ], - 'required': [ - 'fax_line_delete_request', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'fax_line_delete_request': - (FaxLineDeleteRequest,), - }, - 'attribute_map': { - }, - 'location_map': { - 'fax_line_delete_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.fax_line_get_endpoint = _Endpoint( - settings={ - 'response_type': (FaxLineResponse,), - 'auth': [ - 'api_key' - ], - 'endpoint_path': '/fax_line', - 'operation_id': 'fax_line_get', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'number', - ], - 'required': [ - 'number', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'number': - (str,), - }, - 'attribute_map': { - 'number': 'number', - }, - 'location_map': { - 'number': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.fax_line_list_endpoint = _Endpoint( - settings={ - 'response_type': (FaxLineListResponse,), - 'auth': [ - 'api_key' - ], - 'endpoint_path': '/fax_line/list', - 'operation_id': 'fax_line_list', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'account_id', - 'page', - 'page_size', - 'show_team_lines', - ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'page': - (int,), - 'page_size': - (int,), - 'show_team_lines': - (bool,), - }, - 'attribute_map': { - 'account_id': 'account_id', - 'page': 'page', - 'page_size': 'page_size', - 'show_team_lines': 'show_team_lines', - }, - 'location_map': { - 'account_id': 'query', - 'page': 'query', - 'page_size': 'query', - 'show_team_lines': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.fax_line_remove_user_endpoint = _Endpoint( - settings={ - 'response_type': (FaxLineResponse,), - 'auth': [ - 'api_key' - ], - 'endpoint_path': '/fax_line/remove_user', - 'operation_id': 'fax_line_remove_user', - 'http_method': 'PUT', - 'servers': None, - }, - params_map={ - 'all': [ - 'fax_line_remove_user_request', - ], - 'required': [ - 'fax_line_remove_user_request', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'fax_line_remove_user_request': - (FaxLineRemoveUserRequest,), - }, - 'attribute_map': { - }, - 'location_map': { - 'fax_line_remove_user_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) + + @validate_call def fax_line_add_user( self, - fax_line_add_user_request, - **kwargs + fax_line_add_user_request: FaxLineAddUserRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> FaxLineResponse: - """Add Fax Line User # noqa: E501 - - Grants a user access to the specified Fax Line. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.fax_line_add_user(fax_line_add_user_request, async_req=True) - >>> result = thread.get() - - Args: - fax_line_add_user_request (FaxLineAddUserRequest): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - FaxLineResponse - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False + """Add Fax Line User + + Grants a user access to the specified Fax Line. + + :param fax_line_add_user_request: (required) + :type fax_line_add_user_request: FaxLineAddUserRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FaxLineResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def fax_line_add_user_with_http_info( + self, + fax_line_add_user_request: FaxLineAddUserRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[FaxLineResponse]: + """Add Fax Line User + + Grants a user access to the specified Fax Line. + + :param fax_line_add_user_request: (required) + :type fax_line_add_user_request: FaxLineAddUserRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FaxLineResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True + + + @validate_call + def fax_line_add_user_without_preload_content( + self, + fax_line_add_user_request: FaxLineAddUserRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Add Fax Line User + + Grants a user access to the specified Fax Line. + + :param fax_line_add_user_request: (required) + :type fax_line_add_user_request: FaxLineAddUserRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FaxLineResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['fax_line_add_user_request'] = \ - fax_line_add_user_request - try: - return self.fax_line_add_user_endpoint.call_with_http_info(**kwargs) - except ApiException as e: - if e.status == 200: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[FaxLineResponse], - _check_type=True, - ) + return response_data.response - raise e - range_code = "4XX"[0] - range_code_left = int(f"{range_code}00") - range_code_right = int(f"{range_code}99") - if range_code_left <= e.status <= range_code_right: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[ErrorResponse], - _check_type=True, + def _fax_line_add_user_serialize( + self, + fax_line_add_user_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + has_files = False + body_param = fax_line_add_user_request + excluded_json_fields = set([]) + for param_name, param_type in body_param.openapi_types().items(): + param_value = getattr(body_param, param_name) + if param_value is None: + continue + + if "io.IOBase" in param_type: + has_files = True + _content_type = "multipart/form-data" + excluded_json_fields.add(param_name) + + if isinstance(param_value, list): + for index, item in enumerate(param_value): + _files[f'{param_name}[{index}]'] = item + else: + _files[param_name] = param_value + + _form_params = body_param.to_json_form_params(excluded_json_fields) + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + 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' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _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 + + # authentication setting + _auth_settings: List[str] = [ + 'api_key' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/fax_line/add_user', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + - raise e + + @validate_call def fax_line_area_code_get( self, - country, - **kwargs + 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)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> FaxLineAreaCodeGetResponse: - """Get Available Fax Line Area Codes # noqa: E501 - - Returns a response with the area codes available for a given state/provice and city. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.fax_line_area_code_get(country, async_req=True) - >>> result = thread.get() - - Args: - country (str): Filter area codes by country. - - Keyword Args: - state (str): Filter area codes by state.. [optional] - province (str): Filter area codes by province.. [optional] - city (str): Filter area codes by city.. [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - FaxLineAreaCodeGetResponse - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False + """Get Available Fax Line Area Codes + + Returns a response with the area codes available for a given state/provice and city. + + :param country: Filter area codes by country. (required) + :type country: str + :param state: Filter area codes by state. + :type state: str + :param province: Filter area codes by province. + :type province: str + :param city: Filter area codes by city. + :type city: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._fax_line_area_code_get_serialize( + country=country, + state=state, + province=province, + city=city, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FaxLineAreaCodeGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + 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, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[FaxLineAreaCodeGetResponse]: + """Get Available Fax Line Area Codes + + Returns a response with the area codes available for a given state/provice and city. + + :param country: Filter area codes by country. (required) + :type country: str + :param state: Filter area codes by state. + :type state: str + :param province: Filter area codes by province. + :type province: str + :param city: Filter area codes by city. + :type city: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._fax_line_area_code_get_serialize( + country=country, + state=state, + province=province, + city=city, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FaxLineAreaCodeGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True + + + @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, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Available Fax Line Area Codes + + Returns a response with the area codes available for a given state/provice and city. + + :param country: Filter area codes by country. (required) + :type country: str + :param state: Filter area codes by state. + :type state: str + :param province: Filter area codes by province. + :type province: str + :param city: Filter area codes by city. + :type city: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._fax_line_area_code_get_serialize( + country=country, + state=state, + province=province, + city=city, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FaxLineAreaCodeGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False + return response_data.response + + + def _fax_line_area_code_get_serialize( + self, + country, + state, + province, + city, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if country is not None: + + _query_params.append(('country', country)) + + if state is not None: + + _query_params.append(('state', state)) + + if province is not None: + + _query_params.append(('province', province)) + + if city is not None: + + _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' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'api_key' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/fax_line/area_codes', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['country'] = \ - country - try: - return self.fax_line_area_code_get_endpoint.call_with_http_info(**kwargs) - except ApiException as e: - if e.status == 200: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[FaxLineAreaCodeGetResponse], - _check_type=True, - ) - raise e - range_code = "4XX"[0] - range_code_left = int(f"{range_code}00") - range_code_right = int(f"{range_code}99") - if range_code_left <= e.status <= range_code_right: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[ErrorResponse], - _check_type=True, - ) - raise e + @validate_call def fax_line_create( self, - fax_line_create_request, - **kwargs + fax_line_create_request: FaxLineCreateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> FaxLineResponse: - """Purchase Fax Line # noqa: E501 - - Purchases a new Fax Line. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.fax_line_create(fax_line_create_request, async_req=True) - >>> result = thread.get() - - Args: - fax_line_create_request (FaxLineCreateRequest): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - FaxLineResponse - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False + """Purchase Fax Line + + Purchases a new Fax Line. + + :param fax_line_create_request: (required) + :type fax_line_create_request: FaxLineCreateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FaxLineResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def fax_line_create_with_http_info( + self, + fax_line_create_request: FaxLineCreateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[FaxLineResponse]: + """Purchase Fax Line + + Purchases a new Fax Line. + + :param fax_line_create_request: (required) + :type fax_line_create_request: FaxLineCreateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FaxLineResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True + + + @validate_call + def fax_line_create_without_preload_content( + self, + fax_line_create_request: FaxLineCreateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Purchase Fax Line + + Purchases a new Fax Line. + + :param fax_line_create_request: (required) + :type fax_line_create_request: FaxLineCreateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FaxLineResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['fax_line_create_request'] = \ - fax_line_create_request - try: - return self.fax_line_create_endpoint.call_with_http_info(**kwargs) - except ApiException as e: - if e.status == 200: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[FaxLineResponse], - _check_type=True, - ) + return response_data.response - raise e - range_code = "4XX"[0] - range_code_left = int(f"{range_code}00") - range_code_right = int(f"{range_code}99") - if range_code_left <= e.status <= range_code_right: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[ErrorResponse], - _check_type=True, + def _fax_line_create_serialize( + self, + fax_line_create_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + has_files = False + body_param = fax_line_create_request + excluded_json_fields = set([]) + for param_name, param_type in body_param.openapi_types().items(): + param_value = getattr(body_param, param_name) + if param_value is None: + continue + + if "io.IOBase" in param_type: + has_files = True + _content_type = "multipart/form-data" + excluded_json_fields.add(param_name) + + if isinstance(param_value, list): + for index, item in enumerate(param_value): + _files[f'{param_name}[{index}]'] = item + else: + _files[param_name] = param_value + + _form_params = body_param.to_json_form_params(excluded_json_fields) + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + 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' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _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 + + # authentication setting + _auth_settings: List[str] = [ + 'api_key' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/fax_line/create', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) - raise e + + + @validate_call def fax_line_delete( self, - fax_line_delete_request, - **kwargs + fax_line_delete_request: FaxLineDeleteRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> None: - """Delete Fax Line # noqa: E501 - - Deletes the specified Fax Line from the subscription. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.fax_line_delete(fax_line_delete_request, async_req=True) - >>> result = thread.get() - - Args: - fax_line_delete_request (FaxLineDeleteRequest): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - None - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False + """Delete Fax Line + + Deletes the specified Fax Line from the subscription. + + :param fax_line_delete_request: (required) + :type fax_line_delete_request: FaxLineDeleteRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def fax_line_delete_with_http_info( + self, + fax_line_delete_request: FaxLineDeleteRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete Fax Line + + Deletes the specified Fax Line from the subscription. + + :param fax_line_delete_request: (required) + :type fax_line_delete_request: FaxLineDeleteRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True + + + @validate_call + def fax_line_delete_without_preload_content( + self, + fax_line_delete_request: FaxLineDeleteRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete Fax Line + + Deletes the specified Fax Line from the subscription. + + :param fax_line_delete_request: (required) + :type fax_line_delete_request: FaxLineDeleteRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['fax_line_delete_request'] = \ - fax_line_delete_request - return self.fax_line_delete_endpoint.call_with_http_info(**kwargs) + return response_data.response + + def _fax_line_delete_serialize( + self, + fax_line_delete_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + has_files = False + body_param = fax_line_delete_request + excluded_json_fields = set([]) + for param_name, param_type in body_param.openapi_types().items(): + param_value = getattr(body_param, param_name) + if param_value is None: + continue + + if "io.IOBase" in param_type: + has_files = True + _content_type = "multipart/form-data" + excluded_json_fields.add(param_name) + + if isinstance(param_value, list): + for index, item in enumerate(param_value): + _files[f'{param_name}[{index}]'] = item + else: + _files[param_name] = param_value + + _form_params = body_param.to_json_form_params(excluded_json_fields) + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + 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' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _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 + + # authentication setting + _auth_settings: List[str] = [ + 'api_key' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/fax_line', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def fax_line_get( self, - number, - **kwargs + number: Annotated[StrictStr, Field(description="The Fax Line number.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> FaxLineResponse: - """Get Fax Line # noqa: E501 - - Returns the properties and settings of a Fax Line. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.fax_line_get(number, async_req=True) - >>> result = thread.get() - - Args: - number (str): The Fax Line number. - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - FaxLineResponse - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False + """Get Fax Line + + Returns the properties and settings of a Fax Line. + + :param number: The Fax Line number. (required) + :type number: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._fax_line_get_serialize( + number=number, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FaxLineResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def fax_line_get_with_http_info( + self, + number: Annotated[StrictStr, Field(description="The Fax Line number.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[FaxLineResponse]: + """Get Fax Line + + Returns the properties and settings of a Fax Line. + + :param number: The Fax Line number. (required) + :type number: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._fax_line_get_serialize( + number=number, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FaxLineResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True + + + @validate_call + def fax_line_get_without_preload_content( + self, + number: Annotated[StrictStr, Field(description="The Fax Line number.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Fax Line + + Returns the properties and settings of a Fax Line. + + :param number: The Fax Line number. (required) + :type number: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._fax_line_get_serialize( + number=number, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FaxLineResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['number'] = \ - number - try: - return self.fax_line_get_endpoint.call_with_http_info(**kwargs) - except ApiException as e: - if e.status == 200: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[FaxLineResponse], - _check_type=True, - ) + return response_data.response - raise e - range_code = "4XX"[0] - range_code_left = int(f"{range_code}00") - range_code_right = int(f"{range_code}99") - if range_code_left <= e.status <= range_code_right: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[ErrorResponse], - _check_type=True, - ) + def _fax_line_get_serialize( + self, + number, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if number is not None: + + _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' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'api_key' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/fax_line', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) - raise e + + + @validate_call def fax_line_list( self, - **kwargs + 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, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> FaxLineListResponse: - """List Fax Lines # noqa: E501 - - Returns the properties and settings of multiple Fax Lines. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.fax_line_list(async_req=True) - >>> result = thread.get() - - - Keyword Args: - account_id (str): Account ID. [optional] - page (int): Page. [optional] if omitted the server will use the default value of 1 - page_size (int): Page size. [optional] if omitted the server will use the default value of 20 - show_team_lines (bool): Show team lines. [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - FaxLineListResponse - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False + """List Fax Lines + + Returns the properties and settings of multiple Fax Lines. + + :param account_id: Account ID + :type account_id: str + :param page: Page + :type page: int + :param page_size: Page size + :type page_size: int + :param show_team_lines: Show team lines + :type show_team_lines: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._fax_line_list_serialize( + account_id=account_id, + page=page, + page_size=page_size, + show_team_lines=show_team_lines, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FaxLineListResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + 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, + 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, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[FaxLineListResponse]: + """List Fax Lines + + Returns the properties and settings of multiple Fax Lines. + + :param account_id: Account ID + :type account_id: str + :param page: Page + :type page: int + :param page_size: Page size + :type page_size: int + :param show_team_lines: Show team lines + :type show_team_lines: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._fax_line_list_serialize( + account_id=account_id, + page=page, + page_size=page_size, + show_team_lines=show_team_lines, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FaxLineListResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True + + + @validate_call + def fax_line_list_without_preload_content( + self, + 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, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Fax Lines + + Returns the properties and settings of multiple Fax Lines. + + :param account_id: Account ID + :type account_id: str + :param page: Page + :type page: int + :param page_size: Page size + :type page_size: int + :param show_team_lines: Show team lines + :type show_team_lines: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._fax_line_list_serialize( + account_id=account_id, + page=page, + page_size=page_size, + show_team_lines=show_team_lines, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FaxLineListResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - try: - return self.fax_line_list_endpoint.call_with_http_info(**kwargs) - except ApiException as e: - if e.status == 200: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[FaxLineListResponse], - _check_type=True, - ) + return response_data.response - raise e - range_code = "4XX"[0] - range_code_left = int(f"{range_code}00") - range_code_right = int(f"{range_code}99") - if range_code_left <= e.status <= range_code_right: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[ErrorResponse], - _check_type=True, - ) + def _fax_line_list_serialize( + self, + account_id, + page, + page_size, + show_team_lines, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if account_id is not None: + + _query_params.append(('account_id', account_id)) + + if page is not None: + + _query_params.append(('page', page)) + + if page_size is not None: + + _query_params.append(('page_size', page_size)) + + if show_team_lines is not None: + + _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' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'api_key' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/fax_line/list', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + - raise e + + @validate_call def fax_line_remove_user( self, - fax_line_remove_user_request, - **kwargs + fax_line_remove_user_request: FaxLineRemoveUserRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> FaxLineResponse: - """Remove Fax Line Access # noqa: E501 - - Removes a user's access to the specified Fax Line. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.fax_line_remove_user(fax_line_remove_user_request, async_req=True) - >>> result = thread.get() - - Args: - fax_line_remove_user_request (FaxLineRemoveUserRequest): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - FaxLineResponse - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False + """Remove Fax Line Access + + Removes a user's access to the specified Fax Line. + + :param fax_line_remove_user_request: (required) + :type fax_line_remove_user_request: FaxLineRemoveUserRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FaxLineResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def fax_line_remove_user_with_http_info( + self, + fax_line_remove_user_request: FaxLineRemoveUserRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[FaxLineResponse]: + """Remove Fax Line Access + + Removes a user's access to the specified Fax Line. + + :param fax_line_remove_user_request: (required) + :type fax_line_remove_user_request: FaxLineRemoveUserRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FaxLineResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True + + + @validate_call + def fax_line_remove_user_without_preload_content( + self, + fax_line_remove_user_request: FaxLineRemoveUserRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Remove Fax Line Access + + Removes a user's access to the specified Fax Line. + + :param fax_line_remove_user_request: (required) + :type fax_line_remove_user_request: FaxLineRemoveUserRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FaxLineResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['fax_line_remove_user_request'] = \ - fax_line_remove_user_request - try: - return self.fax_line_remove_user_endpoint.call_with_http_info(**kwargs) - except ApiException as e: - if e.status == 200: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[FaxLineResponse], - _check_type=True, - ) + return response_data.response - raise e - range_code = "4XX"[0] - range_code_left = int(f"{range_code}00") - range_code_right = int(f"{range_code}99") - if range_code_left <= e.status <= range_code_right: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[ErrorResponse], - _check_type=True, + def _fax_line_remove_user_serialize( + self, + fax_line_remove_user_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + has_files = False + body_param = fax_line_remove_user_request + excluded_json_fields = set([]) + for param_name, param_type in body_param.openapi_types().items(): + param_value = getattr(body_param, param_name) + if param_value is None: + continue + + if "io.IOBase" in param_type: + has_files = True + _content_type = "multipart/form-data" + excluded_json_fields.add(param_name) + + if isinstance(param_value, list): + for index, item in enumerate(param_value): + _files[f'{param_name}[{index}]'] = item + else: + _files[param_name] = param_value + + _form_params = body_param.to_json_form_params(excluded_json_fields) + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + 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' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _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 + + # authentication setting + _auth_settings: List[str] = [ + 'api_key' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/fax_line/remove_user', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) - raise e diff --git a/sdks/python/dropbox_sign/api/o_auth_api.py b/sdks/python/dropbox_sign/api/o_auth_api.py index 8c85a5b08..e2d6c5f8d 100644 --- a/sdks/python/dropbox_sign/api/o_auth_api.py +++ b/sdks/python/dropbox_sign/api/o_auth_api.py @@ -1,328 +1,630 @@ +# coding: utf-8 + """ Dropbox Sign API - Dropbox Sign v3 API # noqa: E501 + Dropbox Sign v3 API The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated -from __future__ import annotations -import re # noqa: F401 -import sys # noqa: F401 +from dropbox_sign.models.o_auth_token_generate_request import OAuthTokenGenerateRequest +from dropbox_sign.models.o_auth_token_refresh_request import OAuthTokenRefreshRequest +from dropbox_sign.models.o_auth_token_response import OAuthTokenResponse -from dropbox_sign.api_client import ApiClient, ApiException, Endpoint as _Endpoint -from dropbox_sign.model_utils import ( # noqa: F401 - check_allowed_values, - check_validations, - date, - datetime, - file_type, - none_type, - validate_and_convert_types -) -from dropbox_sign.model.o_auth_token_generate_request import OAuthTokenGenerateRequest -from dropbox_sign.model.o_auth_token_refresh_request import OAuthTokenRefreshRequest -from dropbox_sign.model.o_auth_token_response import OAuthTokenResponse +from dropbox_sign.api_client import ApiClient, RequestSerialized +from dropbox_sign.api_response import ApiResponse +from dropbox_sign.rest import RESTResponseType +import io -class OAuthApi(object): +class OAuthApi: """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech Do not edit the class manually. """ - def __init__(self, api_client=None): + def __init__(self, api_client=None) -> None: if api_client is None: - api_client = ApiClient() + api_client = ApiClient.get_default() self.api_client = api_client - self.oauth_token_generate_endpoint = _Endpoint( - settings={ - 'response_type': (OAuthTokenResponse,), - 'auth': [], - 'endpoint_path': '/oauth/token', - 'operation_id': 'oauth_token_generate', - 'http_method': 'POST', - 'servers': [ - { - 'url': "https://app.hellosign.com", - 'description': "No description provided", - }, - ] - }, - params_map={ - 'all': [ - 'o_auth_token_generate_request', - ], - 'required': [ - 'o_auth_token_generate_request', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'o_auth_token_generate_request': - (OAuthTokenGenerateRequest,), - }, - 'attribute_map': { - }, - 'location_map': { - 'o_auth_token_generate_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.oauth_token_refresh_endpoint = _Endpoint( - settings={ - 'response_type': (OAuthTokenResponse,), - 'auth': [], - 'endpoint_path': '/oauth/token?refresh', - 'operation_id': 'oauth_token_refresh', - 'http_method': 'POST', - 'servers': [ - { - 'url': "https://app.hellosign.com", - 'description': "No description provided", - }, - ] - }, - params_map={ - 'all': [ - 'o_auth_token_refresh_request', - ], - 'required': [ - 'o_auth_token_refresh_request', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'o_auth_token_refresh_request': - (OAuthTokenRefreshRequest,), - }, - 'attribute_map': { - }, - 'location_map': { - 'o_auth_token_refresh_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) + + @validate_call def oauth_token_generate( self, - o_auth_token_generate_request, - **kwargs + o_auth_token_generate_request: OAuthTokenGenerateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=1)] = 0, ) -> OAuthTokenResponse: - """OAuth Token Generate # noqa: E501 - - Once you have retrieved the code from the user callback, you will need to exchange it for an access token via a backend call. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.oauth_token_generate(o_auth_token_generate_request, async_req=True) - >>> result = thread.get() - - Args: - o_auth_token_generate_request (OAuthTokenGenerateRequest): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - OAuthTokenResponse - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False + """OAuth Token Generate + + Once you have retrieved the code from the user callback, you will need to exchange it for an access token via a backend call. + + :param o_auth_token_generate_request: (required) + :type o_auth_token_generate_request: OAuthTokenGenerateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OAuthTokenResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def oauth_token_generate_with_http_info( + self, + o_auth_token_generate_request: OAuthTokenGenerateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=1)] = 0, + ) -> ApiResponse[OAuthTokenResponse]: + """OAuth Token Generate + + Once you have retrieved the code from the user callback, you will need to exchange it for an access token via a backend call. + + :param o_auth_token_generate_request: (required) + :type o_auth_token_generate_request: OAuthTokenGenerateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OAuthTokenResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True + + + @validate_call + def oauth_token_generate_without_preload_content( + self, + o_auth_token_generate_request: OAuthTokenGenerateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=1)] = 0, + ) -> RESTResponseType: + """OAuth Token Generate + + Once you have retrieved the code from the user callback, you will need to exchange it for an access token via a backend call. + + :param o_auth_token_generate_request: (required) + :type o_auth_token_generate_request: OAuthTokenGenerateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OAuthTokenResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['o_auth_token_generate_request'] = \ - o_auth_token_generate_request - try: - return self.oauth_token_generate_endpoint.call_with_http_info(**kwargs) - except ApiException as e: - if e.status == 200: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[OAuthTokenResponse], - _check_type=True, + return response_data.response + + + def _oauth_token_generate_serialize( + self, + o_auth_token_generate_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _hosts = [ + 'https://app.hellosign.com' + ] + _host = _hosts[_host_index] + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + has_files = False + body_param = o_auth_token_generate_request + excluded_json_fields = set([]) + for param_name, param_type in body_param.openapi_types().items(): + param_value = getattr(body_param, param_name) + if param_value is None: + continue + + if "io.IOBase" in param_type: + has_files = True + _content_type = "multipart/form-data" + excluded_json_fields.add(param_name) + + if isinstance(param_value, list): + for index, item in enumerate(param_value): + _files[f'{param_name}[{index}]'] = item + else: + _files[param_name] = param_value + + _form_params = body_param.to_json_form_params(excluded_json_fields) + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + 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' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _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 + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/oauth/token', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + - raise e + @validate_call def oauth_token_refresh( self, - o_auth_token_refresh_request, - **kwargs + o_auth_token_refresh_request: OAuthTokenRefreshRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=1)] = 0, ) -> OAuthTokenResponse: - """OAuth Token Refresh # noqa: E501 - - Access tokens are only valid for a given period of time (typically one hour) for security reasons. Whenever acquiring an new access token its TTL is also given (see `expires_in`), along with a refresh token that can be used to acquire a new access token after the current one has expired. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.oauth_token_refresh(o_auth_token_refresh_request, async_req=True) - >>> result = thread.get() - - Args: - o_auth_token_refresh_request (OAuthTokenRefreshRequest): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - OAuthTokenResponse - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False + """OAuth Token Refresh + + Access tokens are only valid for a given period of time (typically one hour) for security reasons. Whenever acquiring an new access token its TTL is also given (see `expires_in`), along with a refresh token that can be used to acquire a new access token after the current one has expired. + + :param o_auth_token_refresh_request: (required) + :type o_auth_token_refresh_request: OAuthTokenRefreshRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OAuthTokenResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def oauth_token_refresh_with_http_info( + self, + o_auth_token_refresh_request: OAuthTokenRefreshRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=1)] = 0, + ) -> ApiResponse[OAuthTokenResponse]: + """OAuth Token Refresh + + Access tokens are only valid for a given period of time (typically one hour) for security reasons. Whenever acquiring an new access token its TTL is also given (see `expires_in`), along with a refresh token that can be used to acquire a new access token after the current one has expired. + + :param o_auth_token_refresh_request: (required) + :type o_auth_token_refresh_request: OAuthTokenRefreshRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OAuthTokenResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True + + + @validate_call + def oauth_token_refresh_without_preload_content( + self, + o_auth_token_refresh_request: OAuthTokenRefreshRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=1)] = 0, + ) -> RESTResponseType: + """OAuth Token Refresh + + Access tokens are only valid for a given period of time (typically one hour) for security reasons. Whenever acquiring an new access token its TTL is also given (see `expires_in`), along with a refresh token that can be used to acquire a new access token after the current one has expired. + + :param o_auth_token_refresh_request: (required) + :type o_auth_token_refresh_request: OAuthTokenRefreshRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OAuthTokenResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['o_auth_token_refresh_request'] = \ - o_auth_token_refresh_request - try: - return self.oauth_token_refresh_endpoint.call_with_http_info(**kwargs) - except ApiException as e: - if e.status == 200: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[OAuthTokenResponse], - _check_type=True, + return response_data.response + + + def _oauth_token_refresh_serialize( + self, + o_auth_token_refresh_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _hosts = [ + 'https://app.hellosign.com' + ] + _host = _hosts[_host_index] + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + has_files = False + body_param = o_auth_token_refresh_request + excluded_json_fields = set([]) + for param_name, param_type in body_param.openapi_types().items(): + param_value = getattr(body_param, param_name) + if param_value is None: + continue + + if "io.IOBase" in param_type: + has_files = True + _content_type = "multipart/form-data" + excluded_json_fields.add(param_name) + + if isinstance(param_value, list): + for index, item in enumerate(param_value): + _files[f'{param_name}[{index}]'] = item + else: + _files[param_name] = param_value + + _form_params = body_param.to_json_form_params(excluded_json_fields) + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + 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' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _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 + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/oauth/token?refresh', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) - raise e diff --git a/sdks/python/dropbox_sign/api/report_api.py b/sdks/python/dropbox_sign/api/report_api.py index 72295306f..d1b0c9429 100644 --- a/sdks/python/dropbox_sign/api/report_api.py +++ b/sdks/python/dropbox_sign/api/report_api.py @@ -1,194 +1,335 @@ +# coding: utf-8 + """ Dropbox Sign API - Dropbox Sign v3 API # noqa: E501 + Dropbox Sign v3 API The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated -from __future__ import annotations -import re # noqa: F401 -import sys # noqa: F401 +from dropbox_sign.models.report_create_request import ReportCreateRequest +from dropbox_sign.models.report_create_response import ReportCreateResponse -from dropbox_sign.api_client import ApiClient, ApiException, Endpoint as _Endpoint -from dropbox_sign.model_utils import ( # noqa: F401 - check_allowed_values, - check_validations, - date, - datetime, - file_type, - none_type, - validate_and_convert_types -) -from dropbox_sign.model.error_response import ErrorResponse -from dropbox_sign.model.report_create_request import ReportCreateRequest -from dropbox_sign.model.report_create_response import ReportCreateResponse +from dropbox_sign.api_client import ApiClient, RequestSerialized +from dropbox_sign.api_response import ApiResponse +from dropbox_sign.rest import RESTResponseType +import io -class ReportApi(object): +class ReportApi: """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech Do not edit the class manually. """ - def __init__(self, api_client=None): + def __init__(self, api_client=None) -> None: if api_client is None: - api_client = ApiClient() + api_client = ApiClient.get_default() self.api_client = api_client - self.report_create_endpoint = _Endpoint( - settings={ - 'response_type': (ReportCreateResponse,), - 'auth': [ - 'api_key' - ], - 'endpoint_path': '/report/create', - 'operation_id': 'report_create', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'report_create_request', - ], - 'required': [ - 'report_create_request', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'report_create_request': - (ReportCreateRequest,), - }, - 'attribute_map': { - }, - 'location_map': { - 'report_create_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) + + @validate_call def report_create( self, - report_create_request, - **kwargs + report_create_request: ReportCreateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ReportCreateResponse: - """Create Report # noqa: E501 - - Request the creation of one or more report(s). When the report(s) have been generated, you will receive an email (one per requested report type) containing a link to download the report as a CSV file. The requested date range may be up to 12 months in duration, and `start_date` must not be more than 10 years in the past. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.report_create(report_create_request, async_req=True) - >>> result = thread.get() - - Args: - report_create_request (ReportCreateRequest): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - ReportCreateResponse - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False + """Create Report + + Request the creation of one or more report(s). When the report(s) have been generated, you will receive an email (one per requested report type) containing a link to download the report as a CSV file. The requested date range may be up to 12 months in duration, and `start_date` must not be more than 10 years in the past. + + :param report_create_request: (required) + :type report_create_request: ReportCreateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ReportCreateResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def report_create_with_http_info( + self, + report_create_request: ReportCreateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ReportCreateResponse]: + """Create Report + + Request the creation of one or more report(s). When the report(s) have been generated, you will receive an email (one per requested report type) containing a link to download the report as a CSV file. The requested date range may be up to 12 months in duration, and `start_date` must not be more than 10 years in the past. + + :param report_create_request: (required) + :type report_create_request: ReportCreateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ReportCreateResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True + + + @validate_call + def report_create_without_preload_content( + self, + report_create_request: ReportCreateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create Report + + Request the creation of one or more report(s). When the report(s) have been generated, you will receive an email (one per requested report type) containing a link to download the report as a CSV file. The requested date range may be up to 12 months in duration, and `start_date` must not be more than 10 years in the past. + + :param report_create_request: (required) + :type report_create_request: ReportCreateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ReportCreateResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['report_create_request'] = \ - report_create_request - try: - return self.report_create_endpoint.call_with_http_info(**kwargs) - except ApiException as e: - if e.status == 200: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[ReportCreateResponse], - _check_type=True, - ) + return response_data.response + + + def _report_create_serialize( + self, + report_create_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } - raise e - range_code = "4XX"[0] - range_code_left = int(f"{range_code}00") - range_code_right = int(f"{range_code}99") + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None - if range_code_left <= e.status <= range_code_right: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[ErrorResponse], - _check_type=True, + has_files = False + body_param = report_create_request + excluded_json_fields = set([]) + for param_name, param_type in body_param.openapi_types().items(): + param_value = getattr(body_param, param_name) + if param_value is None: + continue + + if "io.IOBase" in param_type: + has_files = True + _content_type = "multipart/form-data" + excluded_json_fields.add(param_name) + + if isinstance(param_value, list): + for index, item in enumerate(param_value): + _files[f'{param_name}[{index}]'] = item + else: + _files[param_name] = param_value + + _form_params = body_param.to_json_form_params(excluded_json_fields) + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + 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' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _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 + + # authentication setting + _auth_settings: List[str] = [ + 'api_key' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/report/create', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) - raise e diff --git a/sdks/python/dropbox_sign/api/signature_request_api.py b/sdks/python/dropbox_sign/api/signature_request_api.py index 3ce10edbf..ad053259d 100644 --- a/sdks/python/dropbox_sign/api/signature_request_api.py +++ b/sdks/python/dropbox_sign/api/signature_request_api.py @@ -1,2505 +1,5027 @@ +# coding: utf-8 + """ Dropbox Sign API - Dropbox Sign v3 API # noqa: E501 + Dropbox Sign v3 API The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) - -from __future__ import annotations -import re # noqa: F401 -import sys # noqa: F401 - -from dropbox_sign.api_client import ApiClient, ApiException, Endpoint as _Endpoint -from dropbox_sign.model_utils import ( # noqa: F401 - check_allowed_values, - check_validations, - date, - datetime, - file_type, - none_type, - validate_and_convert_types -) -from dropbox_sign.model.bulk_send_job_send_response import BulkSendJobSendResponse -from dropbox_sign.model.error_response import ErrorResponse -from dropbox_sign.model.file_response import FileResponse -from dropbox_sign.model.file_response_data_uri import FileResponseDataUri -from dropbox_sign.model.signature_request_bulk_create_embedded_with_template_request import SignatureRequestBulkCreateEmbeddedWithTemplateRequest -from dropbox_sign.model.signature_request_bulk_send_with_template_request import SignatureRequestBulkSendWithTemplateRequest -from dropbox_sign.model.signature_request_create_embedded_request import SignatureRequestCreateEmbeddedRequest -from dropbox_sign.model.signature_request_create_embedded_with_template_request import SignatureRequestCreateEmbeddedWithTemplateRequest -from dropbox_sign.model.signature_request_get_response import SignatureRequestGetResponse -from dropbox_sign.model.signature_request_list_response import SignatureRequestListResponse -from dropbox_sign.model.signature_request_remind_request import SignatureRequestRemindRequest -from dropbox_sign.model.signature_request_send_request import SignatureRequestSendRequest -from dropbox_sign.model.signature_request_send_with_template_request import SignatureRequestSendWithTemplateRequest -from dropbox_sign.model.signature_request_update_request import SignatureRequestUpdateRequest - - -class SignatureRequestApi(object): + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictBool, StrictBytes, StrictInt, StrictStr, field_validator +from typing import Any, Dict, List, Optional, Union +from typing_extensions import Annotated +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_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_custom_field import SubCustomField +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_signature_request_signer import SubSignatureRequestSigner +from dropbox_sign.models.sub_signing_options import SubSigningOptions + +from dropbox_sign.api_client import ApiClient, RequestSerialized +from dropbox_sign.api_response import ApiResponse +from dropbox_sign.rest import RESTResponseType +import io + + +class SignatureRequestApi: """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech Do not edit the class manually. """ - def __init__(self, api_client=None): + def __init__(self, api_client=None) -> None: if api_client is None: - api_client = ApiClient() + api_client = ApiClient.get_default() self.api_client = api_client - self.signature_request_bulk_create_embedded_with_template_endpoint = _Endpoint( - settings={ - 'response_type': (BulkSendJobSendResponse,), - 'auth': [ - 'api_key' - ], - 'endpoint_path': '/signature_request/bulk_create_embedded_with_template', - 'operation_id': 'signature_request_bulk_create_embedded_with_template', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'signature_request_bulk_create_embedded_with_template_request', - ], - 'required': [ - 'signature_request_bulk_create_embedded_with_template_request', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'signature_request_bulk_create_embedded_with_template_request': - (SignatureRequestBulkCreateEmbeddedWithTemplateRequest,), - }, - 'attribute_map': { - }, - 'location_map': { - 'signature_request_bulk_create_embedded_with_template_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json', - 'multipart/form-data' - ] - }, - api_client=api_client - ) - self.signature_request_bulk_send_with_template_endpoint = _Endpoint( - settings={ - 'response_type': (BulkSendJobSendResponse,), - 'auth': [ - 'api_key', - 'oauth2' - ], - 'endpoint_path': '/signature_request/bulk_send_with_template', - 'operation_id': 'signature_request_bulk_send_with_template', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'signature_request_bulk_send_with_template_request', - ], - 'required': [ - 'signature_request_bulk_send_with_template_request', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'signature_request_bulk_send_with_template_request': - (SignatureRequestBulkSendWithTemplateRequest,), - }, - 'attribute_map': { - }, - 'location_map': { - 'signature_request_bulk_send_with_template_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json', - 'multipart/form-data' - ] - }, - api_client=api_client - ) - self.signature_request_cancel_endpoint = _Endpoint( - settings={ - 'response_type': None, - 'auth': [ - 'api_key', - 'oauth2' - ], - 'endpoint_path': '/signature_request/cancel/{signature_request_id}', - 'operation_id': 'signature_request_cancel', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'signature_request_id', - ], - 'required': [ - 'signature_request_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'signature_request_id': - (str,), - }, - 'attribute_map': { - 'signature_request_id': 'signature_request_id', - }, - 'location_map': { - 'signature_request_id': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.signature_request_create_embedded_endpoint = _Endpoint( - settings={ - 'response_type': (SignatureRequestGetResponse,), - 'auth': [ - 'api_key', - 'oauth2' - ], - 'endpoint_path': '/signature_request/create_embedded', - 'operation_id': 'signature_request_create_embedded', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'signature_request_create_embedded_request', - ], - 'required': [ - 'signature_request_create_embedded_request', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'signature_request_create_embedded_request': - (SignatureRequestCreateEmbeddedRequest,), - }, - 'attribute_map': { - }, - 'location_map': { - 'signature_request_create_embedded_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json', - 'multipart/form-data' - ] - }, - api_client=api_client - ) - self.signature_request_create_embedded_with_template_endpoint = _Endpoint( - settings={ - 'response_type': (SignatureRequestGetResponse,), - 'auth': [ - 'api_key', - 'oauth2' - ], - 'endpoint_path': '/signature_request/create_embedded_with_template', - 'operation_id': 'signature_request_create_embedded_with_template', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'signature_request_create_embedded_with_template_request', - ], - 'required': [ - 'signature_request_create_embedded_with_template_request', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'signature_request_create_embedded_with_template_request': - (SignatureRequestCreateEmbeddedWithTemplateRequest,), - }, - 'attribute_map': { - }, - 'location_map': { - 'signature_request_create_embedded_with_template_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json', - 'multipart/form-data' - ] - }, - api_client=api_client - ) - self.signature_request_files_endpoint = _Endpoint( - settings={ - 'response_type': (file_type,), - 'auth': [ - 'api_key', - 'oauth2' - ], - 'endpoint_path': '/signature_request/files/{signature_request_id}', - 'operation_id': 'signature_request_files', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'signature_request_id', - 'file_type', - ], - 'required': [ - 'signature_request_id', - ], - 'nullable': [ - ], - 'enum': [ - 'file_type', - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - ('file_type',): { - - "PDF": "pdf", - "ZIP": "zip" - }, - }, - 'openapi_types': { - 'signature_request_id': - (str,), - 'file_type': - (str,), - }, - 'attribute_map': { - 'signature_request_id': 'signature_request_id', - 'file_type': 'file_type', - }, - 'location_map': { - 'signature_request_id': 'path', - 'file_type': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/pdf', - 'application/zip', - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.signature_request_files_as_data_uri_endpoint = _Endpoint( - settings={ - 'response_type': (FileResponseDataUri,), - 'auth': [ - 'api_key', - 'oauth2' - ], - 'endpoint_path': '/signature_request/files_as_data_uri/{signature_request_id}', - 'operation_id': 'signature_request_files_as_data_uri', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'signature_request_id', - ], - 'required': [ - 'signature_request_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'signature_request_id': - (str,), - }, - 'attribute_map': { - 'signature_request_id': 'signature_request_id', - }, - 'location_map': { - 'signature_request_id': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.signature_request_files_as_file_url_endpoint = _Endpoint( - settings={ - 'response_type': (FileResponse,), - 'auth': [ - 'api_key', - 'oauth2' - ], - 'endpoint_path': '/signature_request/files_as_file_url/{signature_request_id}', - 'operation_id': 'signature_request_files_as_file_url', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'signature_request_id', - 'force_download', - ], - 'required': [ - 'signature_request_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'signature_request_id': - (str,), - 'force_download': - (int,), - }, - 'attribute_map': { - 'signature_request_id': 'signature_request_id', - 'force_download': 'force_download', - }, - 'location_map': { - 'signature_request_id': 'path', - 'force_download': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.signature_request_get_endpoint = _Endpoint( - settings={ - 'response_type': (SignatureRequestGetResponse,), - 'auth': [ - 'api_key', - 'oauth2' - ], - 'endpoint_path': '/signature_request/{signature_request_id}', - 'operation_id': 'signature_request_get', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'signature_request_id', - ], - 'required': [ - 'signature_request_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'signature_request_id': - (str,), - }, - 'attribute_map': { - 'signature_request_id': 'signature_request_id', - }, - 'location_map': { - 'signature_request_id': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.signature_request_list_endpoint = _Endpoint( - settings={ - 'response_type': (SignatureRequestListResponse,), - 'auth': [ - 'api_key', - 'oauth2' - ], - 'endpoint_path': '/signature_request/list', - 'operation_id': 'signature_request_list', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'account_id', - 'page', - 'page_size', - 'query', - ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'page': - (int,), - 'page_size': - (int,), - 'query': - (str,), - }, - 'attribute_map': { - 'account_id': 'account_id', - 'page': 'page', - 'page_size': 'page_size', - 'query': 'query', - }, - 'location_map': { - 'account_id': 'query', - 'page': 'query', - 'page_size': 'query', - 'query': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.signature_request_release_hold_endpoint = _Endpoint( - settings={ - 'response_type': (SignatureRequestGetResponse,), - 'auth': [ - 'api_key', - 'oauth2' - ], - 'endpoint_path': '/signature_request/release_hold/{signature_request_id}', - 'operation_id': 'signature_request_release_hold', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'signature_request_id', - ], - 'required': [ - 'signature_request_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'signature_request_id': - (str,), - }, - 'attribute_map': { - 'signature_request_id': 'signature_request_id', - }, - 'location_map': { - 'signature_request_id': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.signature_request_remind_endpoint = _Endpoint( - settings={ - 'response_type': (SignatureRequestGetResponse,), - 'auth': [ - 'api_key', - 'oauth2' - ], - 'endpoint_path': '/signature_request/remind/{signature_request_id}', - 'operation_id': 'signature_request_remind', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'signature_request_id', - 'signature_request_remind_request', - ], - 'required': [ - 'signature_request_id', - 'signature_request_remind_request', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'signature_request_id': - (str,), - 'signature_request_remind_request': - (SignatureRequestRemindRequest,), - }, - 'attribute_map': { - 'signature_request_id': 'signature_request_id', - }, - 'location_map': { - 'signature_request_id': 'path', - 'signature_request_remind_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.signature_request_remove_endpoint = _Endpoint( - settings={ - 'response_type': None, - 'auth': [ - 'api_key' - ], - 'endpoint_path': '/signature_request/remove/{signature_request_id}', - 'operation_id': 'signature_request_remove', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'signature_request_id', - ], - 'required': [ - 'signature_request_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'signature_request_id': - (str,), - }, - 'attribute_map': { - 'signature_request_id': 'signature_request_id', - }, - 'location_map': { - 'signature_request_id': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.signature_request_send_endpoint = _Endpoint( - settings={ - 'response_type': (SignatureRequestGetResponse,), - 'auth': [ - 'api_key', - 'oauth2' - ], - 'endpoint_path': '/signature_request/send', - 'operation_id': 'signature_request_send', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'signature_request_send_request', - ], - 'required': [ - 'signature_request_send_request', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'signature_request_send_request': - (SignatureRequestSendRequest,), - }, - 'attribute_map': { - }, - 'location_map': { - 'signature_request_send_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json', - 'multipart/form-data' - ] - }, - api_client=api_client - ) - self.signature_request_send_with_template_endpoint = _Endpoint( - settings={ - 'response_type': (SignatureRequestGetResponse,), - 'auth': [ - 'api_key', - 'oauth2' - ], - 'endpoint_path': '/signature_request/send_with_template', - 'operation_id': 'signature_request_send_with_template', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'signature_request_send_with_template_request', - ], - 'required': [ - 'signature_request_send_with_template_request', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'signature_request_send_with_template_request': - (SignatureRequestSendWithTemplateRequest,), - }, - 'attribute_map': { - }, - 'location_map': { - 'signature_request_send_with_template_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json', - 'multipart/form-data' - ] - }, - api_client=api_client - ) - self.signature_request_update_endpoint = _Endpoint( - settings={ - 'response_type': (SignatureRequestGetResponse,), - 'auth': [ - 'api_key', - 'oauth2' - ], - 'endpoint_path': '/signature_request/update/{signature_request_id}', - 'operation_id': 'signature_request_update', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'signature_request_id', - 'signature_request_update_request', - ], - 'required': [ - 'signature_request_id', - 'signature_request_update_request', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'signature_request_id': - (str,), - 'signature_request_update_request': - (SignatureRequestUpdateRequest,), - }, - 'attribute_map': { - 'signature_request_id': 'signature_request_id', - }, - 'location_map': { - 'signature_request_id': 'path', - 'signature_request_update_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) + + @validate_call def signature_request_bulk_create_embedded_with_template( self, - signature_request_bulk_create_embedded_with_template_request, - **kwargs + signature_request_bulk_create_embedded_with_template_request: SignatureRequestBulkCreateEmbeddedWithTemplateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BulkSendJobSendResponse: - """Embedded Bulk Send with Template # noqa: E501 - - Creates BulkSendJob which sends up to 250 SignatureRequests in bulk based off of the provided Template(s) specified with the `template_ids` parameter to be signed in an embedded iFrame. These embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. **NOTE:** Only available for Standard plan and higher. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.signature_request_bulk_create_embedded_with_template(signature_request_bulk_create_embedded_with_template_request, async_req=True) - >>> result = thread.get() - - Args: - signature_request_bulk_create_embedded_with_template_request (SignatureRequestBulkCreateEmbeddedWithTemplateRequest): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - BulkSendJobSendResponse - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['signature_request_bulk_create_embedded_with_template_request'] = \ - signature_request_bulk_create_embedded_with_template_request - try: - return self.signature_request_bulk_create_embedded_with_template_endpoint.call_with_http_info(**kwargs) - except ApiException as e: - if e.status == 200: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[BulkSendJobSendResponse], - _check_type=True, + """Embedded Bulk Send with Template + + Creates BulkSendJob which sends up to 250 SignatureRequests in bulk based off of the provided Template(s) specified with the `template_ids` parameter to be signed in an embedded iFrame. These embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. **NOTE:** Only available for Standard plan and higher. + + :param signature_request_bulk_create_embedded_with_template_request: (required) + :type signature_request_bulk_create_embedded_with_template_request: SignatureRequestBulkCreateEmbeddedWithTemplateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BulkSendJobSendResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def signature_request_bulk_create_embedded_with_template_with_http_info( + self, + signature_request_bulk_create_embedded_with_template_request: SignatureRequestBulkCreateEmbeddedWithTemplateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[BulkSendJobSendResponse]: + """Embedded Bulk Send with Template + + Creates BulkSendJob which sends up to 250 SignatureRequests in bulk based off of the provided Template(s) specified with the `template_ids` parameter to be signed in an embedded iFrame. These embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. **NOTE:** Only available for Standard plan and higher. + + :param signature_request_bulk_create_embedded_with_template_request: (required) + :type signature_request_bulk_create_embedded_with_template_request: SignatureRequestBulkCreateEmbeddedWithTemplateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BulkSendJobSendResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def signature_request_bulk_create_embedded_with_template_without_preload_content( + self, + signature_request_bulk_create_embedded_with_template_request: SignatureRequestBulkCreateEmbeddedWithTemplateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Embedded Bulk Send with Template + + Creates BulkSendJob which sends up to 250 SignatureRequests in bulk based off of the provided Template(s) specified with the `template_ids` parameter to be signed in an embedded iFrame. These embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. **NOTE:** Only available for Standard plan and higher. + + :param signature_request_bulk_create_embedded_with_template_request: (required) + :type signature_request_bulk_create_embedded_with_template_request: SignatureRequestBulkCreateEmbeddedWithTemplateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BulkSendJobSendResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_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, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + has_files = False + body_param = signature_request_bulk_create_embedded_with_template_request + excluded_json_fields = set([]) + for param_name, param_type in body_param.openapi_types().items(): + param_value = getattr(body_param, param_name) + if param_value is None: + continue + + if "io.IOBase" in param_type: + has_files = True + _content_type = "multipart/form-data" + excluded_json_fields.add(param_name) + + if isinstance(param_value, list): + for index, item in enumerate(param_value): + _files[f'{param_name}[{index}]'] = item + else: + _files[param_name] = param_value + + _form_params = body_param.to_json_form_params(excluded_json_fields) + + # process the path parameters + # process the query parameters + # 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: + _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' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _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 + + # authentication setting + _auth_settings: List[str] = [ + 'api_key' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/signature_request/bulk_create_embedded_with_template', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) - raise e - range_code = "4XX"[0] - range_code_left = int(f"{range_code}00") - range_code_right = int(f"{range_code}99") - if range_code_left <= e.status <= range_code_right: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[ErrorResponse], - _check_type=True, - ) - raise e + @validate_call def signature_request_bulk_send_with_template( self, - signature_request_bulk_send_with_template_request, - **kwargs + signature_request_bulk_send_with_template_request: SignatureRequestBulkSendWithTemplateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BulkSendJobSendResponse: - """Bulk Send with Template # noqa: E501 - - Creates BulkSendJob which sends up to 250 SignatureRequests in bulk based off of the provided Template(s) specified with the `template_ids` parameter. **NOTE:** Only available for Standard plan and higher. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.signature_request_bulk_send_with_template(signature_request_bulk_send_with_template_request, async_req=True) - >>> result = thread.get() - - Args: - signature_request_bulk_send_with_template_request (SignatureRequestBulkSendWithTemplateRequest): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - BulkSendJobSendResponse - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['signature_request_bulk_send_with_template_request'] = \ - signature_request_bulk_send_with_template_request - try: - return self.signature_request_bulk_send_with_template_endpoint.call_with_http_info(**kwargs) - except ApiException as e: - if e.status == 200: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[BulkSendJobSendResponse], - _check_type=True, + """Bulk Send with Template + + Creates BulkSendJob which sends up to 250 SignatureRequests in bulk based off of the provided Template(s) specified with the `template_ids` parameter. **NOTE:** Only available for Standard plan and higher. + + :param signature_request_bulk_send_with_template_request: (required) + :type signature_request_bulk_send_with_template_request: SignatureRequestBulkSendWithTemplateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BulkSendJobSendResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def signature_request_bulk_send_with_template_with_http_info( + self, + signature_request_bulk_send_with_template_request: SignatureRequestBulkSendWithTemplateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[BulkSendJobSendResponse]: + """Bulk Send with Template + + Creates BulkSendJob which sends up to 250 SignatureRequests in bulk based off of the provided Template(s) specified with the `template_ids` parameter. **NOTE:** Only available for Standard plan and higher. + + :param signature_request_bulk_send_with_template_request: (required) + :type signature_request_bulk_send_with_template_request: SignatureRequestBulkSendWithTemplateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BulkSendJobSendResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def signature_request_bulk_send_with_template_without_preload_content( + self, + signature_request_bulk_send_with_template_request: SignatureRequestBulkSendWithTemplateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Bulk Send with Template + + Creates BulkSendJob which sends up to 250 SignatureRequests in bulk based off of the provided Template(s) specified with the `template_ids` parameter. **NOTE:** Only available for Standard plan and higher. + + :param signature_request_bulk_send_with_template_request: (required) + :type signature_request_bulk_send_with_template_request: SignatureRequestBulkSendWithTemplateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BulkSendJobSendResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_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, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + has_files = False + body_param = signature_request_bulk_send_with_template_request + excluded_json_fields = set([]) + for param_name, param_type in body_param.openapi_types().items(): + param_value = getattr(body_param, param_name) + if param_value is None: + continue + + if "io.IOBase" in param_type: + has_files = True + _content_type = "multipart/form-data" + excluded_json_fields.add(param_name) + + if isinstance(param_value, list): + for index, item in enumerate(param_value): + _files[f'{param_name}[{index}]'] = item + else: + _files[param_name] = param_value + + _form_params = body_param.to_json_form_params(excluded_json_fields) + + # process the path parameters + # process the query parameters + # 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: + _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' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _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 - raise e - range_code = "4XX"[0] - range_code_left = int(f"{range_code}00") - range_code_right = int(f"{range_code}99") + # authentication setting + _auth_settings: List[str] = [ + 'api_key', + 'oauth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/signature_request/bulk_send_with_template', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) - if range_code_left <= e.status <= range_code_right: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[ErrorResponse], - _check_type=True, - ) - raise e + + @validate_call def signature_request_cancel( self, - signature_request_id, - **kwargs + 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)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> None: - """Cancel Incomplete Signature Request # noqa: E501 - - Cancels an incomplete signature request. This action is **not reversible**. The request will be canceled and signers will no longer be able to sign. If they try to access the signature request they will receive a HTTP 410 status code indicating that the resource has been deleted. Cancelation is asynchronous and a successful call to this endpoint will return an empty 200 OK response if the signature request is eligible to be canceled and has been successfully queued. This 200 OK response does not indicate a successful cancelation of the signature request itself. The cancelation is confirmed via the `signature_request_canceled` event. It is recommended that a [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the `signature_request_canceled` event. This callback will be sent only when the cancelation has completed successfully. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the [API Dashboard](https://app.hellosign.com/apidashboard) and retry the cancelation if necessary. To be eligible for cancelation, a signature request must have been sent successfully, must not yet have been signed by all signers, and you must either be the sender or own the API app under which it was sent. A partially signed signature request can be canceled. **NOTE:** To remove your access to a completed signature request, use the endpoint: `POST /signature_request/remove/[:signature_request_id]`. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.signature_request_cancel(signature_request_id, async_req=True) - >>> result = thread.get() - - Args: - signature_request_id (str): The id of the incomplete SignatureRequest to cancel. - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - None - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['signature_request_id'] = \ - signature_request_id - return self.signature_request_cancel_endpoint.call_with_http_info(**kwargs) + """Cancel Incomplete Signature Request + + Cancels an incomplete signature request. This action is **not reversible**. The request will be canceled and signers will no longer be able to sign. If they try to access the signature request they will receive a HTTP 410 status code indicating that the resource has been deleted. Cancelation is asynchronous and a successful call to this endpoint will return an empty 200 OK response if the signature request is eligible to be canceled and has been successfully queued. This 200 OK response does not indicate a successful cancelation of the signature request itself. The cancelation is confirmed via the `signature_request_canceled` event. It is recommended that a [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the `signature_request_canceled` event. This callback will be sent only when the cancelation has completed successfully. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the [API Dashboard](https://app.hellosign.com/apidashboard) and retry the cancelation if necessary. To be eligible for cancelation, a signature request must have been sent successfully, must not yet have been signed by all signers, and you must either be the sender or own the API app under which it was sent. A partially signed signature request can be canceled. **NOTE:** To remove your access to a completed signature request, use the endpoint: `POST /signature_request/remove/[:signature_request_id]`. + + :param signature_request_id: The id of the incomplete SignatureRequest to cancel. (required) + :type signature_request_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + 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.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Cancel Incomplete Signature Request + + Cancels an incomplete signature request. This action is **not reversible**. The request will be canceled and signers will no longer be able to sign. If they try to access the signature request they will receive a HTTP 410 status code indicating that the resource has been deleted. Cancelation is asynchronous and a successful call to this endpoint will return an empty 200 OK response if the signature request is eligible to be canceled and has been successfully queued. This 200 OK response does not indicate a successful cancelation of the signature request itself. The cancelation is confirmed via the `signature_request_canceled` event. It is recommended that a [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the `signature_request_canceled` event. This callback will be sent only when the cancelation has completed successfully. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the [API Dashboard](https://app.hellosign.com/apidashboard) and retry the cancelation if necessary. To be eligible for cancelation, a signature request must have been sent successfully, must not yet have been signed by all signers, and you must either be the sender or own the API app under which it was sent. A partially signed signature request can be canceled. **NOTE:** To remove your access to a completed signature request, use the endpoint: `POST /signature_request/remove/[:signature_request_id]`. + + :param signature_request_id: The id of the incomplete SignatureRequest to cancel. (required) + :type signature_request_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + 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.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Cancel Incomplete Signature Request + + Cancels an incomplete signature request. This action is **not reversible**. The request will be canceled and signers will no longer be able to sign. If they try to access the signature request they will receive a HTTP 410 status code indicating that the resource has been deleted. Cancelation is asynchronous and a successful call to this endpoint will return an empty 200 OK response if the signature request is eligible to be canceled and has been successfully queued. This 200 OK response does not indicate a successful cancelation of the signature request itself. The cancelation is confirmed via the `signature_request_canceled` event. It is recommended that a [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the `signature_request_canceled` event. This callback will be sent only when the cancelation has completed successfully. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the [API Dashboard](https://app.hellosign.com/apidashboard) and retry the cancelation if necessary. To be eligible for cancelation, a signature request must have been sent successfully, must not yet have been signed by all signers, and you must either be the sender or own the API app under which it was sent. A partially signed signature request can be canceled. **NOTE:** To remove your access to a completed signature request, use the endpoint: `POST /signature_request/remove/[:signature_request_id]`. + + :param signature_request_id: The id of the incomplete SignatureRequest to cancel. (required) + :type signature_request_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _signature_request_cancel_serialize( + self, + signature_request_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if signature_request_id is not None: + _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' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'api_key', + 'oauth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/signature_request/cancel/{signature_request_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def signature_request_create_embedded( self, - signature_request_create_embedded_request, - **kwargs + signature_request_create_embedded_request: SignatureRequestCreateEmbeddedRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> SignatureRequestGetResponse: - """Create Embedded Signature Request # noqa: E501 - - Creates a new SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.signature_request_create_embedded(signature_request_create_embedded_request, async_req=True) - >>> result = thread.get() - - Args: - signature_request_create_embedded_request (SignatureRequestCreateEmbeddedRequest): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - SignatureRequestGetResponse - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['signature_request_create_embedded_request'] = \ - signature_request_create_embedded_request - try: - return self.signature_request_create_embedded_endpoint.call_with_http_info(**kwargs) - except ApiException as e: - if e.status == 200: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[SignatureRequestGetResponse], - _check_type=True, + """Create Embedded Signature Request + + Creates a new SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + + :param signature_request_create_embedded_request: (required) + :type signature_request_create_embedded_request: SignatureRequestCreateEmbeddedRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SignatureRequestGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def signature_request_create_embedded_with_http_info( + self, + signature_request_create_embedded_request: SignatureRequestCreateEmbeddedRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SignatureRequestGetResponse]: + """Create Embedded Signature Request + + Creates a new SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + + :param signature_request_create_embedded_request: (required) + :type signature_request_create_embedded_request: SignatureRequestCreateEmbeddedRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SignatureRequestGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def signature_request_create_embedded_without_preload_content( + self, + signature_request_create_embedded_request: SignatureRequestCreateEmbeddedRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create Embedded Signature Request + + Creates a new SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + + :param signature_request_create_embedded_request: (required) + :type signature_request_create_embedded_request: SignatureRequestCreateEmbeddedRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SignatureRequestGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _signature_request_create_embedded_serialize( + self, + signature_request_create_embedded_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + has_files = False + body_param = signature_request_create_embedded_request + excluded_json_fields = set([]) + for param_name, param_type in body_param.openapi_types().items(): + param_value = getattr(body_param, param_name) + if param_value is None: + continue + + if "io.IOBase" in param_type: + has_files = True + _content_type = "multipart/form-data" + excluded_json_fields.add(param_name) + + if isinstance(param_value, list): + for index, item in enumerate(param_value): + _files[f'{param_name}[{index}]'] = item + else: + _files[param_name] = param_value + + _form_params = body_param.to_json_form_params(excluded_json_fields) + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + 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' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _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 - raise e - range_code = "4XX"[0] - range_code_left = int(f"{range_code}00") - range_code_right = int(f"{range_code}99") + # authentication setting + _auth_settings: List[str] = [ + 'api_key', + 'oauth2' + ] - if range_code_left <= e.status <= range_code_right: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[ErrorResponse], - _check_type=True, - ) + return self.api_client.param_serialize( + method='POST', + resource_path='/signature_request/create_embedded', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) - raise e + + + @validate_call def signature_request_create_embedded_with_template( self, - signature_request_create_embedded_with_template_request, - **kwargs + signature_request_create_embedded_with_template_request: SignatureRequestCreateEmbeddedWithTemplateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> SignatureRequestGetResponse: - """Create Embedded Signature Request with Template # noqa: E501 - - Creates a new SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.signature_request_create_embedded_with_template(signature_request_create_embedded_with_template_request, async_req=True) - >>> result = thread.get() - - Args: - signature_request_create_embedded_with_template_request (SignatureRequestCreateEmbeddedWithTemplateRequest): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - SignatureRequestGetResponse - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['signature_request_create_embedded_with_template_request'] = \ - signature_request_create_embedded_with_template_request - try: - return self.signature_request_create_embedded_with_template_endpoint.call_with_http_info(**kwargs) - except ApiException as e: - if e.status == 200: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[SignatureRequestGetResponse], - _check_type=True, + """Create Embedded Signature Request with Template + + Creates a new SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + + :param signature_request_create_embedded_with_template_request: (required) + :type signature_request_create_embedded_with_template_request: SignatureRequestCreateEmbeddedWithTemplateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SignatureRequestGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def signature_request_create_embedded_with_template_with_http_info( + self, + signature_request_create_embedded_with_template_request: SignatureRequestCreateEmbeddedWithTemplateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SignatureRequestGetResponse]: + """Create Embedded Signature Request with Template + + Creates a new SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + + :param signature_request_create_embedded_with_template_request: (required) + :type signature_request_create_embedded_with_template_request: SignatureRequestCreateEmbeddedWithTemplateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SignatureRequestGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def signature_request_create_embedded_with_template_without_preload_content( + self, + signature_request_create_embedded_with_template_request: SignatureRequestCreateEmbeddedWithTemplateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create Embedded Signature Request with Template + + Creates a new SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + + :param signature_request_create_embedded_with_template_request: (required) + :type signature_request_create_embedded_with_template_request: SignatureRequestCreateEmbeddedWithTemplateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SignatureRequestGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_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, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + has_files = False + body_param = signature_request_create_embedded_with_template_request + excluded_json_fields = set([]) + for param_name, param_type in body_param.openapi_types().items(): + param_value = getattr(body_param, param_name) + if param_value is None: + continue + + if "io.IOBase" in param_type: + has_files = True + _content_type = "multipart/form-data" + excluded_json_fields.add(param_name) + + if isinstance(param_value, list): + for index, item in enumerate(param_value): + _files[f'{param_name}[{index}]'] = item + else: + _files[param_name] = param_value + + _form_params = body_param.to_json_form_params(excluded_json_fields) + + # process the path parameters + # process the query parameters + # 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: + _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' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _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 - raise e - range_code = "4XX"[0] - range_code_left = int(f"{range_code}00") - range_code_right = int(f"{range_code}99") + # authentication setting + _auth_settings: List[str] = [ + 'api_key', + 'oauth2' + ] - if range_code_left <= e.status <= range_code_right: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[ErrorResponse], - _check_type=True, - ) + return self.api_client.param_serialize( + method='POST', + resource_path='/signature_request/create_embedded_with_template', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) - raise e + + + @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, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> io.IOBase: + """Download Files + + Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a PDF or ZIP file. If the files are currently being prepared, a status code of `409` will be returned instead. + + :param signature_request_id: The id of the SignatureRequest to retrieve. (required) + :type signature_request_id: str + :param file_type: Set to `pdf` for a single merged document or `zip` for a collection of individual documents. + :type file_type: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._signature_request_files_serialize( + signature_request_id=signature_request_id, + file_type=file_type, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "io.IOBase", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + 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, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[io.IOBase]: + """Download Files + + Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a PDF or ZIP file. If the files are currently being prepared, a status code of `409` will be returned instead. + + :param signature_request_id: The id of the SignatureRequest to retrieve. (required) + :type signature_request_id: str + :param file_type: Set to `pdf` for a single merged document or `zip` for a collection of individual documents. + :type file_type: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._signature_request_files_serialize( + signature_request_id=signature_request_id, + file_type=file_type, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "io.IOBase", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + 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, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Download Files + + Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a PDF or ZIP file. If the files are currently being prepared, a status code of `409` will be returned instead. + + :param signature_request_id: The id of the SignatureRequest to retrieve. (required) + :type signature_request_id: str + :param file_type: Set to `pdf` for a single merged document or `zip` for a collection of individual documents. + :type file_type: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._signature_request_files_serialize( + signature_request_id=signature_request_id, + file_type=file_type, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "io.IOBase", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _signature_request_files_serialize( self, signature_request_id, - **kwargs - ) -> file_type: - """Download Files # noqa: E501 - - Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a PDF or ZIP file. If the files are currently being prepared, a status code of `409` will be returned instead. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.signature_request_files(signature_request_id, async_req=True) - >>> result = thread.get() - - Args: - signature_request_id (str): The id of the SignatureRequest to retrieve. - - Keyword Args: - file_type (str): Set to `pdf` for a single merged document or `zip` for a collection of individual documents.. [optional] if omitted the server will use the default value of "pdf" - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - file_type - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['signature_request_id'] = \ - signature_request_id - try: - return self.signature_request_files_endpoint.call_with_http_info(**kwargs) - except ApiException as e: - if e.status == 200: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[file_type], - _check_type=True, - ) + file_type, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if signature_request_id is not None: + _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)) + + # 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' + ] + ) - raise e - range_code = "4XX"[0] - range_code_left = int(f"{range_code}00") - range_code_right = int(f"{range_code}99") - if range_code_left <= e.status <= range_code_right: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[ErrorResponse], - _check_type=True, - ) + # authentication setting + _auth_settings: List[str] = [ + 'api_key', + 'oauth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/signature_request/files/{signature_request_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) - raise e + + + @validate_call def signature_request_files_as_data_uri( self, - signature_request_id, - **kwargs + 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)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> FileResponseDataUri: - """Download Files as Data Uri # noqa: E501 - - Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a JSON object with a `data_uri` representing the base64 encoded file (PDFs only). If the files are currently being prepared, a status code of `409` will be returned instead. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.signature_request_files_as_data_uri(signature_request_id, async_req=True) - >>> result = thread.get() - - Args: - signature_request_id (str): The id of the SignatureRequest to retrieve. - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - FileResponseDataUri - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['signature_request_id'] = \ - signature_request_id - try: - return self.signature_request_files_as_data_uri_endpoint.call_with_http_info(**kwargs) - except ApiException as e: - if e.status == 200: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[FileResponseDataUri], - _check_type=True, - ) + """Download Files as Data Uri + + Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a JSON object with a `data_uri` representing the base64 encoded file (PDFs only). If the files are currently being prepared, a status code of `409` will be returned instead. + + :param signature_request_id: The id of the SignatureRequest to retrieve. (required) + :type signature_request_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FileResponseDataUri", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + 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.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[FileResponseDataUri]: + """Download Files as Data Uri + + Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a JSON object with a `data_uri` representing the base64 encoded file (PDFs only). If the files are currently being prepared, a status code of `409` will be returned instead. + + :param signature_request_id: The id of the SignatureRequest to retrieve. (required) + :type signature_request_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FileResponseDataUri", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + 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.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Download Files as Data Uri + + Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a JSON object with a `data_uri` representing the base64 encoded file (PDFs only). If the files are currently being prepared, a status code of `409` will be returned instead. + + :param signature_request_id: The id of the SignatureRequest to retrieve. (required) + :type signature_request_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FileResponseDataUri", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _signature_request_files_as_data_uri_serialize( + self, + signature_request_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if signature_request_id is not None: + _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' + ] + ) + + + # authentication setting + _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}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) - raise e - range_code = "4XX"[0] - range_code_left = int(f"{range_code}00") - range_code_right = int(f"{range_code}99") - if range_code_left <= e.status <= range_code_right: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[ErrorResponse], - _check_type=True, - ) - raise e + @validate_call def signature_request_files_as_file_url( self, - signature_request_id, - **kwargs + 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)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> FileResponse: - """Download Files as File Url # noqa: E501 - - Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a JSON object with a url to the file (PDFs only). If the files are currently being prepared, a status code of `409` will be returned instead. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.signature_request_files_as_file_url(signature_request_id, async_req=True) - >>> result = thread.get() - - Args: - signature_request_id (str): The id of the SignatureRequest to retrieve. - - Keyword Args: - force_download (int): 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.. [optional] if omitted the server will use the default value of 1 - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - FileResponse - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['signature_request_id'] = \ - signature_request_id - try: - return self.signature_request_files_as_file_url_endpoint.call_with_http_info(**kwargs) - except ApiException as e: - if e.status == 200: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[FileResponse], - _check_type=True, - ) + """Download Files as File Url + + Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a JSON object with a url to the file (PDFs only). If the files are currently being prepared, a status code of `409` will be returned instead. + + :param signature_request_id: The id of the SignatureRequest to retrieve. (required) + :type signature_request_id: str + :param force_download: 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. + :type force_download: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._signature_request_files_as_file_url_serialize( + signature_request_id=signature_request_id, + force_download=force_download, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FileResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + 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, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[FileResponse]: + """Download Files as File Url + + Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a JSON object with a url to the file (PDFs only). If the files are currently being prepared, a status code of `409` will be returned instead. + + :param signature_request_id: The id of the SignatureRequest to retrieve. (required) + :type signature_request_id: str + :param force_download: 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. + :type force_download: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._signature_request_files_as_file_url_serialize( + signature_request_id=signature_request_id, + force_download=force_download, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FileResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + 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, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Download Files as File Url + + Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a JSON object with a url to the file (PDFs only). If the files are currently being prepared, a status code of `409` will be returned instead. + + :param signature_request_id: The id of the SignatureRequest to retrieve. (required) + :type signature_request_id: str + :param force_download: 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. + :type force_download: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._signature_request_files_as_file_url_serialize( + signature_request_id=signature_request_id, + force_download=force_download, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FileResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _signature_request_files_as_file_url_serialize( + self, + signature_request_id, + force_download, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if signature_request_id is not None: + _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)) + + # 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' + ] + ) - raise e - range_code = "4XX"[0] - range_code_left = int(f"{range_code}00") - range_code_right = int(f"{range_code}99") - if range_code_left <= e.status <= range_code_right: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[ErrorResponse], - _check_type=True, - ) + # authentication setting + _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}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) - raise e + + + @validate_call def signature_request_get( self, - signature_request_id, - **kwargs + 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)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> SignatureRequestGetResponse: - """Get Signature Request # noqa: E501 - - Returns the status of the SignatureRequest specified by the `signature_request_id` parameter. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.signature_request_get(signature_request_id, async_req=True) - >>> result = thread.get() - - Args: - signature_request_id (str): The id of the SignatureRequest to retrieve. - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - SignatureRequestGetResponse - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['signature_request_id'] = \ - signature_request_id - try: - return self.signature_request_get_endpoint.call_with_http_info(**kwargs) - except ApiException as e: - if e.status == 200: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[SignatureRequestGetResponse], - _check_type=True, - ) + """Get Signature Request + + Returns the status of the SignatureRequest specified by the `signature_request_id` parameter. + + :param signature_request_id: The id of the SignatureRequest to retrieve. (required) + :type signature_request_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SignatureRequestGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + 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.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SignatureRequestGetResponse]: + """Get Signature Request + + Returns the status of the SignatureRequest specified by the `signature_request_id` parameter. + + :param signature_request_id: The id of the SignatureRequest to retrieve. (required) + :type signature_request_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SignatureRequestGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + 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.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Signature Request + + Returns the status of the SignatureRequest specified by the `signature_request_id` parameter. + + :param signature_request_id: The id of the SignatureRequest to retrieve. (required) + :type signature_request_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SignatureRequestGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _signature_request_get_serialize( + self, + signature_request_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if signature_request_id is not None: + _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' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'api_key', + 'oauth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/signature_request/{signature_request_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) - raise e - range_code = "4XX"[0] - range_code_left = int(f"{range_code}00") - range_code_right = int(f"{range_code}99") - if range_code_left <= e.status <= range_code_right: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[ErrorResponse], - _check_type=True, - ) - raise e + @validate_call def signature_request_list( self, - **kwargs + 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)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> SignatureRequestListResponse: - """List Signature Requests # noqa: E501 - - Returns a list of SignatureRequests that you can access. This includes SignatureRequests you have sent as well as received, but not ones that you have been CCed on. Take a look at our [search guide](/api/reference/search/) to learn more about querying signature requests. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.signature_request_list(async_req=True) - >>> result = thread.get() - - - Keyword Args: - account_id (str): Which account to return SignatureRequests for. Must be a team member. Use `all` to indicate all team members. Defaults to your account.. [optional] - page (int): Which page number of the SignatureRequest List to return. Defaults to `1`.. [optional] if omitted the server will use the default value of 1 - page_size (int): Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.. [optional] if omitted the server will use the default value of 20 - query (str): String that includes search terms and/or fields to be used to filter the SignatureRequest objects.. [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - SignatureRequestListResponse - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - try: - return self.signature_request_list_endpoint.call_with_http_info(**kwargs) - except ApiException as e: - if e.status == 200: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[SignatureRequestListResponse], - _check_type=True, - ) + """List Signature Requests + + Returns a list of SignatureRequests that you can access. This includes SignatureRequests you have sent as well as received, but not ones that you have been CCed on. Take a look at our [search guide](/api/reference/search/) to learn more about querying signature requests. + + :param account_id: Which account to return SignatureRequests for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. + :type account_id: str + :param page: Which page number of the SignatureRequest List to return. Defaults to `1`. + :type page: int + :param page_size: Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. + :type page_size: int + :param query: String that includes search terms and/or fields to be used to filter the SignatureRequest objects. + :type query: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._signature_request_list_serialize( + account_id=account_id, + page=page, + page_size=page_size, + query=query, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SignatureRequestListResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + 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, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SignatureRequestListResponse]: + """List Signature Requests + + Returns a list of SignatureRequests that you can access. This includes SignatureRequests you have sent as well as received, but not ones that you have been CCed on. Take a look at our [search guide](/api/reference/search/) to learn more about querying signature requests. + + :param account_id: Which account to return SignatureRequests for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. + :type account_id: str + :param page: Which page number of the SignatureRequest List to return. Defaults to `1`. + :type page: int + :param page_size: Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. + :type page_size: int + :param query: String that includes search terms and/or fields to be used to filter the SignatureRequest objects. + :type query: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._signature_request_list_serialize( + account_id=account_id, + page=page, + page_size=page_size, + query=query, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SignatureRequestListResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + 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, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Signature Requests + + Returns a list of SignatureRequests that you can access. This includes SignatureRequests you have sent as well as received, but not ones that you have been CCed on. Take a look at our [search guide](/api/reference/search/) to learn more about querying signature requests. + + :param account_id: Which account to return SignatureRequests for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. + :type account_id: str + :param page: Which page number of the SignatureRequest List to return. Defaults to `1`. + :type page: int + :param page_size: Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. + :type page_size: int + :param query: String that includes search terms and/or fields to be used to filter the SignatureRequest objects. + :type query: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._signature_request_list_serialize( + account_id=account_id, + page=page, + page_size=page_size, + query=query, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SignatureRequestListResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _signature_request_list_serialize( + self, + account_id, + page, + page_size, + query, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if account_id is not None: + + _query_params.append(('account_id', account_id)) + + if page is not None: + + _query_params.append(('page', page)) + + if page_size is not None: + + _query_params.append(('page_size', page_size)) + + if query is not None: + + _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' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'api_key', + 'oauth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/signature_request/list', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) - raise e - range_code = "4XX"[0] - range_code_left = int(f"{range_code}00") - range_code_right = int(f"{range_code}99") - if range_code_left <= e.status <= range_code_right: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[ErrorResponse], - _check_type=True, - ) - raise e + @validate_call def signature_request_release_hold( self, - signature_request_id, - **kwargs + 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)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> SignatureRequestGetResponse: - """Release On-Hold Signature Request # noqa: E501 - - Releases a held SignatureRequest that was claimed and prepared from an [UnclaimedDraft](/api/reference/tag/Unclaimed-Draft). The owner of the Draft must indicate at Draft creation that the SignatureRequest created from the Draft should be held. Releasing the SignatureRequest will send requests to all signers. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.signature_request_release_hold(signature_request_id, async_req=True) - >>> result = thread.get() - - Args: - signature_request_id (str): The id of the SignatureRequest to release. - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - SignatureRequestGetResponse - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['signature_request_id'] = \ - signature_request_id - try: - return self.signature_request_release_hold_endpoint.call_with_http_info(**kwargs) - except ApiException as e: - if e.status == 200: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[SignatureRequestGetResponse], - _check_type=True, - ) + """Release On-Hold Signature Request + + Releases a held SignatureRequest that was claimed and prepared from an [UnclaimedDraft](/api/reference/tag/Unclaimed-Draft). The owner of the Draft must indicate at Draft creation that the SignatureRequest created from the Draft should be held. Releasing the SignatureRequest will send requests to all signers. + + :param signature_request_id: The id of the SignatureRequest to release. (required) + :type signature_request_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SignatureRequestGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + 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.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SignatureRequestGetResponse]: + """Release On-Hold Signature Request + + Releases a held SignatureRequest that was claimed and prepared from an [UnclaimedDraft](/api/reference/tag/Unclaimed-Draft). The owner of the Draft must indicate at Draft creation that the SignatureRequest created from the Draft should be held. Releasing the SignatureRequest will send requests to all signers. + + :param signature_request_id: The id of the SignatureRequest to release. (required) + :type signature_request_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SignatureRequestGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + 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.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Release On-Hold Signature Request + + Releases a held SignatureRequest that was claimed and prepared from an [UnclaimedDraft](/api/reference/tag/Unclaimed-Draft). The owner of the Draft must indicate at Draft creation that the SignatureRequest created from the Draft should be held. Releasing the SignatureRequest will send requests to all signers. + + :param signature_request_id: The id of the SignatureRequest to release. (required) + :type signature_request_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SignatureRequestGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _signature_request_release_hold_serialize( + self, + signature_request_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if signature_request_id is not None: + _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' + ] + ) - raise e - range_code = "4XX"[0] - range_code_left = int(f"{range_code}00") - range_code_right = int(f"{range_code}99") - if range_code_left <= e.status <= range_code_right: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[ErrorResponse], - _check_type=True, - ) + # authentication setting + _auth_settings: List[str] = [ + 'api_key', + 'oauth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/signature_request/release_hold/{signature_request_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + - raise e + + @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_remind_request: SignatureRequestRemindRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SignatureRequestGetResponse: + """Send Request Reminder + + Sends an email to the signer reminding them to sign the signature request. You cannot send a reminder within 1 hour of the last reminder that was sent. This includes manual AND automatic reminders. **NOTE:** This action can **not** be used with embedded signature requests. + + :param signature_request_id: The id of the SignatureRequest to send a reminder for. (required) + :type signature_request_id: str + :param signature_request_remind_request: (required) + :type signature_request_remind_request: SignatureRequestRemindRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._signature_request_remind_serialize( + signature_request_id=signature_request_id, + signature_request_remind_request=signature_request_remind_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SignatureRequestGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + 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_remind_request: SignatureRequestRemindRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SignatureRequestGetResponse]: + """Send Request Reminder + + Sends an email to the signer reminding them to sign the signature request. You cannot send a reminder within 1 hour of the last reminder that was sent. This includes manual AND automatic reminders. **NOTE:** This action can **not** be used with embedded signature requests. + + :param signature_request_id: The id of the SignatureRequest to send a reminder for. (required) + :type signature_request_id: str + :param signature_request_remind_request: (required) + :type signature_request_remind_request: SignatureRequestRemindRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._signature_request_remind_serialize( + signature_request_id=signature_request_id, + signature_request_remind_request=signature_request_remind_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SignatureRequestGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + 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_remind_request: SignatureRequestRemindRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Send Request Reminder + + Sends an email to the signer reminding them to sign the signature request. You cannot send a reminder within 1 hour of the last reminder that was sent. This includes manual AND automatic reminders. **NOTE:** This action can **not** be used with embedded signature requests. + + :param signature_request_id: The id of the SignatureRequest to send a reminder for. (required) + :type signature_request_id: str + :param signature_request_remind_request: (required) + :type signature_request_remind_request: SignatureRequestRemindRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._signature_request_remind_serialize( + signature_request_id=signature_request_id, + signature_request_remind_request=signature_request_remind_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SignatureRequestGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _signature_request_remind_serialize( self, signature_request_id, signature_request_remind_request, - **kwargs - ) -> SignatureRequestGetResponse: - """Send Request Reminder # noqa: E501 - - Sends an email to the signer reminding them to sign the signature request. You cannot send a reminder within 1 hour of the last reminder that was sent. This includes manual AND automatic reminders. **NOTE:** This action can **not** be used with embedded signature requests. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.signature_request_remind(signature_request_id, signature_request_remind_request, async_req=True) - >>> result = thread.get() - - Args: - signature_request_id (str): The id of the SignatureRequest to send a reminder for. - signature_request_remind_request (SignatureRequestRemindRequest): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - SignatureRequestGetResponse - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['signature_request_id'] = \ - signature_request_id - kwargs['signature_request_remind_request'] = \ - signature_request_remind_request - try: - return self.signature_request_remind_endpoint.call_with_http_info(**kwargs) - except ApiException as e: - if e.status == 200: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[SignatureRequestGetResponse], - _check_type=True, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + has_files = False + body_param = signature_request_remind_request + excluded_json_fields = set([]) + for param_name, param_type in body_param.openapi_types().items(): + param_value = getattr(body_param, param_name) + if param_value is None: + continue + + if "io.IOBase" in param_type: + has_files = True + _content_type = "multipart/form-data" + excluded_json_fields.add(param_name) + + if isinstance(param_value, list): + for index, item in enumerate(param_value): + _files[f'{param_name}[{index}]'] = item + else: + _files[param_name] = param_value + + _form_params = body_param.to_json_form_params(excluded_json_fields) + + # process the path parameters + if signature_request_id is not None: + _path_params['signature_request_id'] = signature_request_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + 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' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _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 - raise e - range_code = "4XX"[0] - range_code_left = int(f"{range_code}00") - range_code_right = int(f"{range_code}99") + # authentication setting + _auth_settings: List[str] = [ + 'api_key', + 'oauth2' + ] - if range_code_left <= e.status <= range_code_right: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[ErrorResponse], - _check_type=True, - ) + return self.api_client.param_serialize( + method='POST', + resource_path='/signature_request/remind/{signature_request_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) - raise e + + + @validate_call def signature_request_remove( self, - signature_request_id, - **kwargs + 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)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> None: - """Remove Signature Request Access # noqa: E501 - - Removes your access to a completed signature request. This action is **not reversible**. The signature request must be fully executed by all parties (signed or declined to sign). Other parties will continue to maintain access to the completed signature request document(s). Unlike /signature_request/cancel, this endpoint is synchronous and your access will be immediately removed. Upon successful removal, this endpoint will return a 200 OK response. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.signature_request_remove(signature_request_id, async_req=True) - >>> result = thread.get() - - Args: - signature_request_id (str): The id of the SignatureRequest to remove. - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - None - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['signature_request_id'] = \ - signature_request_id - return self.signature_request_remove_endpoint.call_with_http_info(**kwargs) + """Remove Signature Request Access + + Removes your access to a completed signature request. This action is **not reversible**. The signature request must be fully executed by all parties (signed or declined to sign). Other parties will continue to maintain access to the completed signature request document(s). Unlike /signature_request/cancel, this endpoint is synchronous and your access will be immediately removed. Upon successful removal, this endpoint will return a 200 OK response. + + :param signature_request_id: The id of the SignatureRequest to remove. (required) + :type signature_request_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + 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.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Remove Signature Request Access + + Removes your access to a completed signature request. This action is **not reversible**. The signature request must be fully executed by all parties (signed or declined to sign). Other parties will continue to maintain access to the completed signature request document(s). Unlike /signature_request/cancel, this endpoint is synchronous and your access will be immediately removed. Upon successful removal, this endpoint will return a 200 OK response. + + :param signature_request_id: The id of the SignatureRequest to remove. (required) + :type signature_request_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + 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.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Remove Signature Request Access + + Removes your access to a completed signature request. This action is **not reversible**. The signature request must be fully executed by all parties (signed or declined to sign). Other parties will continue to maintain access to the completed signature request document(s). Unlike /signature_request/cancel, this endpoint is synchronous and your access will be immediately removed. Upon successful removal, this endpoint will return a 200 OK response. + + :param signature_request_id: The id of the SignatureRequest to remove. (required) + :type signature_request_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _signature_request_remove_serialize( + self, + signature_request_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if signature_request_id is not None: + _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' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'api_key' + ] + return self.api_client.param_serialize( + method='POST', + resource_path='/signature_request/remove/{signature_request_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def signature_request_send( self, - signature_request_send_request, - **kwargs + files: Annotated[Optional[List[Union[StrictBytes, StrictStr]]], Field(description="Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.")] = None, + file_urls: Annotated[Optional[List[StrictStr]], Field(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.")] = None, + signers: Annotated[Optional[List[SubSignatureRequestSigner]], Field(description="Add Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both.")] = None, + grouped_signers: Annotated[Optional[List[SubSignatureRequestGroupedSigners]], Field(description="Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both.")] = None, + allow_decline: Annotated[Optional[StrictBool], Field(description="Allows signers to decline to sign a document if `true`. Defaults to `false`.")] = None, + allow_reassign: Annotated[Optional[StrictBool], Field(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.")] = None, + attachments: Annotated[Optional[List[SubAttachment]], Field(description="A list describing the attachments")] = None, + cc_email_addresses: Annotated[Optional[List[StrictStr]], Field(description="The email addresses that should be CCed.")] = None, + client_id: Annotated[Optional[StrictStr], Field(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.")] = None, + custom_fields: Annotated[Optional[List[SubCustomField]], Field(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.")] = None, + field_options: Optional[SubFieldOptions] = None, + form_field_groups: Annotated[Optional[List[SubFormFieldGroup]], Field(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`.")] = None, + form_field_rules: Annotated[Optional[List[SubFormFieldRule]], Field(description="Conditional Logic rules for fields defined in `form_fields_per_document`.")] = None, + form_fields_per_document: Annotated[Optional[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`")] = None, + hide_text_tags: Annotated[Optional[StrictBool], Field(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.")] = None, + is_qualified_signature: Annotated[Optional[StrictBool], Field(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.")] = None, + is_eid: Annotated[Optional[StrictBool], Field(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.")] = None, + message: Annotated[Optional[Annotated[str, Field(strict=True, max_length=5000)]], Field(description="The custom message in the email that will be sent to the signers.")] = None, + metadata: Annotated[Optional[Dict[str, Any]], Field(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.")] = None, + signing_options: Optional[SubSigningOptions] = None, + signing_redirect_url: Annotated[Optional[StrictStr], Field(description="The URL you want signers redirected to after they successfully sign.")] = None, + subject: Annotated[Optional[Annotated[str, Field(strict=True, max_length=255)]], Field(description="The subject in the email that will be sent to the signers.")] = None, + test_mode: Annotated[Optional[StrictBool], Field(description="Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.")] = None, + title: Annotated[Optional[Annotated[str, Field(strict=True, max_length=255)]], Field(description="The title you want to assign to the SignatureRequest.")] = None, + use_text_tags: Annotated[Optional[StrictBool], Field(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`.")] = None, + expires_at: Annotated[Optional[StrictInt], Field(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.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> SignatureRequestGetResponse: - """Send Signature Request # noqa: E501 - - Creates and sends a new SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.signature_request_send(signature_request_send_request, async_req=True) - >>> result = thread.get() - - Args: - signature_request_send_request (SignatureRequestSendRequest): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - SignatureRequestGetResponse - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['signature_request_send_request'] = \ - signature_request_send_request - try: - return self.signature_request_send_endpoint.call_with_http_info(**kwargs) - except ApiException as e: - if e.status == 200: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[SignatureRequestGetResponse], - _check_type=True, + """Send Signature Request + + Creates and sends a new SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. + + :param files: Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + :type files: List[io.IOBase] + :param file_urls: 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. + :type file_urls: List[str] + :param signers: Add Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. + :type signers: List[SubSignatureRequestSigner] + :param grouped_signers: Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. + :type grouped_signers: List[SubSignatureRequestGroupedSigners] + :param allow_decline: Allows signers to decline to sign a document if `true`. Defaults to `false`. + :type allow_decline: bool + :param allow_reassign: 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. + :type allow_reassign: bool + :param attachments: A list describing the attachments + :type attachments: List[SubAttachment] + :param cc_email_addresses: The email addresses that should be CCed. + :type cc_email_addresses: List[str] + :param client_id: 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. + :type client_id: str + :param custom_fields: 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. + :type custom_fields: List[SubCustomField] + :param field_options: + :type field_options: SubFieldOptions + :param form_field_groups: 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`. + :type form_field_groups: List[SubFormFieldGroup] + :param form_field_rules: Conditional Logic rules for fields defined in `form_fields_per_document`. + :type form_field_rules: List[SubFormFieldRule] + :param form_fields_per_document: 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` + :type form_fields_per_document: List[SubFormFieldsPerDocumentBase] + :param hide_text_tags: 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. + :type hide_text_tags: bool + :param is_qualified_signature: 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. + :type is_qualified_signature: bool + :param is_eid: 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. + :type is_eid: bool + :param message: The custom message in the email that will be sent to the signers. + :type message: str + :param metadata: 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. + :type metadata: Dict[str, object] + :param signing_options: + :type signing_options: SubSigningOptions + :param signing_redirect_url: The URL you want signers redirected to after they successfully sign. + :type signing_redirect_url: str + :param subject: The subject in the email that will be sent to the signers. + :type subject: str + :param test_mode: Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + :type test_mode: bool + :param title: The title you want to assign to the SignatureRequest. + :type title: str + :param use_text_tags: 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`. + :type use_text_tags: bool + :param expires_at: 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. + :type expires_at: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._signature_request_send_serialize( + files=files, + file_urls=file_urls, + signers=signers, + grouped_signers=grouped_signers, + allow_decline=allow_decline, + allow_reassign=allow_reassign, + attachments=attachments, + cc_email_addresses=cc_email_addresses, + client_id=client_id, + custom_fields=custom_fields, + field_options=field_options, + form_field_groups=form_field_groups, + form_field_rules=form_field_rules, + form_fields_per_document=form_fields_per_document, + hide_text_tags=hide_text_tags, + is_qualified_signature=is_qualified_signature, + is_eid=is_eid, + message=message, + metadata=metadata, + signing_options=signing_options, + signing_redirect_url=signing_redirect_url, + subject=subject, + test_mode=test_mode, + title=title, + use_text_tags=use_text_tags, + expires_at=expires_at, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SignatureRequestGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def signature_request_send_with_http_info( + self, + files: Annotated[Optional[List[Union[StrictBytes, StrictStr]]], Field(description="Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.")] = None, + file_urls: Annotated[Optional[List[StrictStr]], Field(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.")] = None, + signers: Annotated[Optional[List[SubSignatureRequestSigner]], Field(description="Add Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both.")] = None, + grouped_signers: Annotated[Optional[List[SubSignatureRequestGroupedSigners]], Field(description="Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both.")] = None, + allow_decline: Annotated[Optional[StrictBool], Field(description="Allows signers to decline to sign a document if `true`. Defaults to `false`.")] = None, + allow_reassign: Annotated[Optional[StrictBool], Field(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.")] = None, + attachments: Annotated[Optional[List[SubAttachment]], Field(description="A list describing the attachments")] = None, + cc_email_addresses: Annotated[Optional[List[StrictStr]], Field(description="The email addresses that should be CCed.")] = None, + client_id: Annotated[Optional[StrictStr], Field(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.")] = None, + custom_fields: Annotated[Optional[List[SubCustomField]], Field(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.")] = None, + field_options: Optional[SubFieldOptions] = None, + form_field_groups: Annotated[Optional[List[SubFormFieldGroup]], Field(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`.")] = None, + form_field_rules: Annotated[Optional[List[SubFormFieldRule]], Field(description="Conditional Logic rules for fields defined in `form_fields_per_document`.")] = None, + form_fields_per_document: Annotated[Optional[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`")] = None, + hide_text_tags: Annotated[Optional[StrictBool], Field(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.")] = None, + is_qualified_signature: Annotated[Optional[StrictBool], Field(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.")] = None, + is_eid: Annotated[Optional[StrictBool], Field(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.")] = None, + message: Annotated[Optional[Annotated[str, Field(strict=True, max_length=5000)]], Field(description="The custom message in the email that will be sent to the signers.")] = None, + metadata: Annotated[Optional[Dict[str, Any]], Field(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.")] = None, + signing_options: Optional[SubSigningOptions] = None, + signing_redirect_url: Annotated[Optional[StrictStr], Field(description="The URL you want signers redirected to after they successfully sign.")] = None, + subject: Annotated[Optional[Annotated[str, Field(strict=True, max_length=255)]], Field(description="The subject in the email that will be sent to the signers.")] = None, + test_mode: Annotated[Optional[StrictBool], Field(description="Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.")] = None, + title: Annotated[Optional[Annotated[str, Field(strict=True, max_length=255)]], Field(description="The title you want to assign to the SignatureRequest.")] = None, + use_text_tags: Annotated[Optional[StrictBool], Field(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`.")] = None, + expires_at: Annotated[Optional[StrictInt], Field(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.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SignatureRequestGetResponse]: + """Send Signature Request + + Creates and sends a new SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. + + :param files: Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + :type files: List[io.IOBase] + :param file_urls: 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. + :type file_urls: List[str] + :param signers: Add Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. + :type signers: List[SubSignatureRequestSigner] + :param grouped_signers: Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. + :type grouped_signers: List[SubSignatureRequestGroupedSigners] + :param allow_decline: Allows signers to decline to sign a document if `true`. Defaults to `false`. + :type allow_decline: bool + :param allow_reassign: 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. + :type allow_reassign: bool + :param attachments: A list describing the attachments + :type attachments: List[SubAttachment] + :param cc_email_addresses: The email addresses that should be CCed. + :type cc_email_addresses: List[str] + :param client_id: 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. + :type client_id: str + :param custom_fields: 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. + :type custom_fields: List[SubCustomField] + :param field_options: + :type field_options: SubFieldOptions + :param form_field_groups: 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`. + :type form_field_groups: List[SubFormFieldGroup] + :param form_field_rules: Conditional Logic rules for fields defined in `form_fields_per_document`. + :type form_field_rules: List[SubFormFieldRule] + :param form_fields_per_document: 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` + :type form_fields_per_document: List[SubFormFieldsPerDocumentBase] + :param hide_text_tags: 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. + :type hide_text_tags: bool + :param is_qualified_signature: 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. + :type is_qualified_signature: bool + :param is_eid: 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. + :type is_eid: bool + :param message: The custom message in the email that will be sent to the signers. + :type message: str + :param metadata: 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. + :type metadata: Dict[str, object] + :param signing_options: + :type signing_options: SubSigningOptions + :param signing_redirect_url: The URL you want signers redirected to after they successfully sign. + :type signing_redirect_url: str + :param subject: The subject in the email that will be sent to the signers. + :type subject: str + :param test_mode: Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + :type test_mode: bool + :param title: The title you want to assign to the SignatureRequest. + :type title: str + :param use_text_tags: 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`. + :type use_text_tags: bool + :param expires_at: 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. + :type expires_at: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._signature_request_send_serialize( + files=files, + file_urls=file_urls, + signers=signers, + grouped_signers=grouped_signers, + allow_decline=allow_decline, + allow_reassign=allow_reassign, + attachments=attachments, + cc_email_addresses=cc_email_addresses, + client_id=client_id, + custom_fields=custom_fields, + field_options=field_options, + form_field_groups=form_field_groups, + form_field_rules=form_field_rules, + form_fields_per_document=form_fields_per_document, + hide_text_tags=hide_text_tags, + is_qualified_signature=is_qualified_signature, + is_eid=is_eid, + message=message, + metadata=metadata, + signing_options=signing_options, + signing_redirect_url=signing_redirect_url, + subject=subject, + test_mode=test_mode, + title=title, + use_text_tags=use_text_tags, + expires_at=expires_at, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SignatureRequestGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def signature_request_send_without_preload_content( + self, + files: Annotated[Optional[List[Union[StrictBytes, StrictStr]]], Field(description="Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.")] = None, + file_urls: Annotated[Optional[List[StrictStr]], Field(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.")] = None, + signers: Annotated[Optional[List[SubSignatureRequestSigner]], Field(description="Add Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both.")] = None, + grouped_signers: Annotated[Optional[List[SubSignatureRequestGroupedSigners]], Field(description="Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both.")] = None, + allow_decline: Annotated[Optional[StrictBool], Field(description="Allows signers to decline to sign a document if `true`. Defaults to `false`.")] = None, + allow_reassign: Annotated[Optional[StrictBool], Field(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.")] = None, + attachments: Annotated[Optional[List[SubAttachment]], Field(description="A list describing the attachments")] = None, + cc_email_addresses: Annotated[Optional[List[StrictStr]], Field(description="The email addresses that should be CCed.")] = None, + client_id: Annotated[Optional[StrictStr], Field(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.")] = None, + custom_fields: Annotated[Optional[List[SubCustomField]], Field(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.")] = None, + field_options: Optional[SubFieldOptions] = None, + form_field_groups: Annotated[Optional[List[SubFormFieldGroup]], Field(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`.")] = None, + form_field_rules: Annotated[Optional[List[SubFormFieldRule]], Field(description="Conditional Logic rules for fields defined in `form_fields_per_document`.")] = None, + form_fields_per_document: Annotated[Optional[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`")] = None, + hide_text_tags: Annotated[Optional[StrictBool], Field(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.")] = None, + is_qualified_signature: Annotated[Optional[StrictBool], Field(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.")] = None, + is_eid: Annotated[Optional[StrictBool], Field(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.")] = None, + message: Annotated[Optional[Annotated[str, Field(strict=True, max_length=5000)]], Field(description="The custom message in the email that will be sent to the signers.")] = None, + metadata: Annotated[Optional[Dict[str, Any]], Field(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.")] = None, + signing_options: Optional[SubSigningOptions] = None, + signing_redirect_url: Annotated[Optional[StrictStr], Field(description="The URL you want signers redirected to after they successfully sign.")] = None, + subject: Annotated[Optional[Annotated[str, Field(strict=True, max_length=255)]], Field(description="The subject in the email that will be sent to the signers.")] = None, + test_mode: Annotated[Optional[StrictBool], Field(description="Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.")] = None, + title: Annotated[Optional[Annotated[str, Field(strict=True, max_length=255)]], Field(description="The title you want to assign to the SignatureRequest.")] = None, + use_text_tags: Annotated[Optional[StrictBool], Field(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`.")] = None, + expires_at: Annotated[Optional[StrictInt], Field(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.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Send Signature Request + + Creates and sends a new SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. + + :param files: Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + :type files: List[io.IOBase] + :param file_urls: 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. + :type file_urls: List[str] + :param signers: Add Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. + :type signers: List[SubSignatureRequestSigner] + :param grouped_signers: Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. + :type grouped_signers: List[SubSignatureRequestGroupedSigners] + :param allow_decline: Allows signers to decline to sign a document if `true`. Defaults to `false`. + :type allow_decline: bool + :param allow_reassign: 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. + :type allow_reassign: bool + :param attachments: A list describing the attachments + :type attachments: List[SubAttachment] + :param cc_email_addresses: The email addresses that should be CCed. + :type cc_email_addresses: List[str] + :param client_id: 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. + :type client_id: str + :param custom_fields: 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. + :type custom_fields: List[SubCustomField] + :param field_options: + :type field_options: SubFieldOptions + :param form_field_groups: 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`. + :type form_field_groups: List[SubFormFieldGroup] + :param form_field_rules: Conditional Logic rules for fields defined in `form_fields_per_document`. + :type form_field_rules: List[SubFormFieldRule] + :param form_fields_per_document: 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` + :type form_fields_per_document: List[SubFormFieldsPerDocumentBase] + :param hide_text_tags: 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. + :type hide_text_tags: bool + :param is_qualified_signature: 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. + :type is_qualified_signature: bool + :param is_eid: 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. + :type is_eid: bool + :param message: The custom message in the email that will be sent to the signers. + :type message: str + :param metadata: 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. + :type metadata: Dict[str, object] + :param signing_options: + :type signing_options: SubSigningOptions + :param signing_redirect_url: The URL you want signers redirected to after they successfully sign. + :type signing_redirect_url: str + :param subject: The subject in the email that will be sent to the signers. + :type subject: str + :param test_mode: Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + :type test_mode: bool + :param title: The title you want to assign to the SignatureRequest. + :type title: str + :param use_text_tags: 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`. + :type use_text_tags: bool + :param expires_at: 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. + :type expires_at: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._signature_request_send_serialize( + files=files, + file_urls=file_urls, + signers=signers, + grouped_signers=grouped_signers, + allow_decline=allow_decline, + allow_reassign=allow_reassign, + attachments=attachments, + cc_email_addresses=cc_email_addresses, + client_id=client_id, + custom_fields=custom_fields, + field_options=field_options, + form_field_groups=form_field_groups, + form_field_rules=form_field_rules, + form_fields_per_document=form_fields_per_document, + hide_text_tags=hide_text_tags, + is_qualified_signature=is_qualified_signature, + is_eid=is_eid, + message=message, + metadata=metadata, + signing_options=signing_options, + signing_redirect_url=signing_redirect_url, + subject=subject, + test_mode=test_mode, + title=title, + use_text_tags=use_text_tags, + expires_at=expires_at, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SignatureRequestGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _signature_request_send_serialize( + self, + 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, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'files': 'csv', + 'file_urls': 'csv', + 'signers': 'csv', + 'grouped_signers': 'csv', + 'attachments': 'csv', + 'cc_email_addresses': 'csv', + 'custom_fields': 'csv', + 'form_field_groups': 'csv', + 'form_field_rules': 'csv', + 'form_fields_per_document': 'csv', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + if files is not None: + _files['files'] = files + if file_urls is not None: + _form_params.append(('file_urls', file_urls)) + if signers is not None: + _form_params.append(('signers', signers)) + if grouped_signers is not None: + _form_params.append(('grouped_signers', grouped_signers)) + if allow_decline is not None: + _form_params.append(('allow_decline', allow_decline)) + if allow_reassign is not None: + _form_params.append(('allow_reassign', allow_reassign)) + if attachments is not None: + _form_params.append(('attachments', attachments)) + if cc_email_addresses is not None: + _form_params.append(('cc_email_addresses', cc_email_addresses)) + if client_id is not None: + _form_params.append(('client_id', client_id)) + if custom_fields is not None: + _form_params.append(('custom_fields', custom_fields)) + if field_options is not None: + _form_params.append(('field_options', field_options)) + if form_field_groups is not None: + _form_params.append(('form_field_groups', form_field_groups)) + if form_field_rules is not None: + _form_params.append(('form_field_rules', form_field_rules)) + if form_fields_per_document is not None: + _form_params.append(('form_fields_per_document', form_fields_per_document)) + if hide_text_tags is not None: + _form_params.append(('hide_text_tags', hide_text_tags)) + if is_qualified_signature is not None: + _form_params.append(('is_qualified_signature', is_qualified_signature)) + if is_eid is not None: + _form_params.append(('is_eid', is_eid)) + if message is not None: + _form_params.append(('message', message)) + if metadata is not None: + _form_params.append(('metadata', metadata)) + if signing_options is not None: + _form_params.append(('signing_options', signing_options)) + if signing_redirect_url is not None: + _form_params.append(('signing_redirect_url', signing_redirect_url)) + if subject is not None: + _form_params.append(('subject', subject)) + if test_mode is not None: + _form_params.append(('test_mode', test_mode)) + if title is not None: + _form_params.append(('title', title)) + if use_text_tags is not None: + _form_params.append(('use_text_tags', use_text_tags)) + if expires_at is not None: + _form_params.append(('expires_at', expires_at)) + # 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' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'multipart/form-data' + ] ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type - raise e - range_code = "4XX"[0] - range_code_left = int(f"{range_code}00") - range_code_right = int(f"{range_code}99") + # authentication setting + _auth_settings: List[str] = [ + 'api_key', + 'oauth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/signature_request/send', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) - if range_code_left <= e.status <= range_code_right: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[ErrorResponse], - _check_type=True, - ) - raise e + + @validate_call def signature_request_send_with_template( self, - signature_request_send_with_template_request, - **kwargs + signature_request_send_with_template_request: SignatureRequestSendWithTemplateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> SignatureRequestGetResponse: - """Send with Template # noqa: E501 - - Creates and sends a new SignatureRequest based off of the Template(s) specified with the `template_ids` parameter. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.signature_request_send_with_template(signature_request_send_with_template_request, async_req=True) - >>> result = thread.get() - - Args: - signature_request_send_with_template_request (SignatureRequestSendWithTemplateRequest): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - SignatureRequestGetResponse - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['signature_request_send_with_template_request'] = \ - signature_request_send_with_template_request - try: - return self.signature_request_send_with_template_endpoint.call_with_http_info(**kwargs) - except ApiException as e: - if e.status == 200: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[SignatureRequestGetResponse], - _check_type=True, + """Send with Template + + Creates and sends a new SignatureRequest based off of the Template(s) specified with the `template_ids` parameter. + + :param signature_request_send_with_template_request: (required) + :type signature_request_send_with_template_request: SignatureRequestSendWithTemplateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SignatureRequestGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def signature_request_send_with_template_with_http_info( + self, + signature_request_send_with_template_request: SignatureRequestSendWithTemplateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SignatureRequestGetResponse]: + """Send with Template + + Creates and sends a new SignatureRequest based off of the Template(s) specified with the `template_ids` parameter. + + :param signature_request_send_with_template_request: (required) + :type signature_request_send_with_template_request: SignatureRequestSendWithTemplateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SignatureRequestGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def signature_request_send_with_template_without_preload_content( + self, + signature_request_send_with_template_request: SignatureRequestSendWithTemplateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Send with Template + + Creates and sends a new SignatureRequest based off of the Template(s) specified with the `template_ids` parameter. + + :param signature_request_send_with_template_request: (required) + :type signature_request_send_with_template_request: SignatureRequestSendWithTemplateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SignatureRequestGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _signature_request_send_with_template_serialize( + self, + signature_request_send_with_template_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + has_files = False + body_param = signature_request_send_with_template_request + excluded_json_fields = set([]) + for param_name, param_type in body_param.openapi_types().items(): + param_value = getattr(body_param, param_name) + if param_value is None: + continue + + if "io.IOBase" in param_type: + has_files = True + _content_type = "multipart/form-data" + excluded_json_fields.add(param_name) + + if isinstance(param_value, list): + for index, item in enumerate(param_value): + _files[f'{param_name}[{index}]'] = item + else: + _files[param_name] = param_value + + _form_params = body_param.to_json_form_params(excluded_json_fields) + + # process the path parameters + # process the query parameters + # 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: + _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' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _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 - raise e - range_code = "4XX"[0] - range_code_left = int(f"{range_code}00") - range_code_right = int(f"{range_code}99") + # authentication setting + _auth_settings: List[str] = [ + 'api_key', + 'oauth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/signature_request/send_with_template', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) - if range_code_left <= e.status <= range_code_right: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[ErrorResponse], - _check_type=True, - ) - raise e + + @validate_call def signature_request_update( + self, + 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)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SignatureRequestGetResponse: + """Update Signature Request + + Updates the email address and/or the name for a given signer on a signature request. You can listen for the `signature_request_email_bounce` event on your app or account to detect bounced emails, and respond with this method. Updating the email address of a signer will generate a new `signature_id` value. **NOTE:** This action cannot be performed on a signature request with an appended signature page. + + :param signature_request_id: The id of the SignatureRequest to update. (required) + :type signature_request_id: str + :param signature_request_update_request: (required) + :type signature_request_update_request: SignatureRequestUpdateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._signature_request_update_serialize( + signature_request_id=signature_request_id, + signature_request_update_request=signature_request_update_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SignatureRequestGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + 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_update_request: SignatureRequestUpdateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SignatureRequestGetResponse]: + """Update Signature Request + + Updates the email address and/or the name for a given signer on a signature request. You can listen for the `signature_request_email_bounce` event on your app or account to detect bounced emails, and respond with this method. Updating the email address of a signer will generate a new `signature_id` value. **NOTE:** This action cannot be performed on a signature request with an appended signature page. + + :param signature_request_id: The id of the SignatureRequest to update. (required) + :type signature_request_id: str + :param signature_request_update_request: (required) + :type signature_request_update_request: SignatureRequestUpdateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._signature_request_update_serialize( + signature_request_id=signature_request_id, + signature_request_update_request=signature_request_update_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SignatureRequestGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + 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_update_request: SignatureRequestUpdateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update Signature Request + + Updates the email address and/or the name for a given signer on a signature request. You can listen for the `signature_request_email_bounce` event on your app or account to detect bounced emails, and respond with this method. Updating the email address of a signer will generate a new `signature_id` value. **NOTE:** This action cannot be performed on a signature request with an appended signature page. + + :param signature_request_id: The id of the SignatureRequest to update. (required) + :type signature_request_id: str + :param signature_request_update_request: (required) + :type signature_request_update_request: SignatureRequestUpdateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._signature_request_update_serialize( + signature_request_id=signature_request_id, + signature_request_update_request=signature_request_update_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SignatureRequestGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _signature_request_update_serialize( self, signature_request_id, signature_request_update_request, - **kwargs - ) -> SignatureRequestGetResponse: - """Update Signature Request # noqa: E501 - - Updates the email address and/or the name for a given signer on a signature request. You can listen for the `signature_request_email_bounce` event on your app or account to detect bounced emails, and respond with this method. Updating the email address of a signer will generate a new `signature_id` value. **NOTE:** This action cannot be performed on a signature request with an appended signature page. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.signature_request_update(signature_request_id, signature_request_update_request, async_req=True) - >>> result = thread.get() - - Args: - signature_request_id (str): The id of the SignatureRequest to update. - signature_request_update_request (SignatureRequestUpdateRequest): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - SignatureRequestGetResponse - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['signature_request_id'] = \ - signature_request_id - kwargs['signature_request_update_request'] = \ - signature_request_update_request - try: - return self.signature_request_update_endpoint.call_with_http_info(**kwargs) - except ApiException as e: - if e.status == 200: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[SignatureRequestGetResponse], - _check_type=True, - ) - - raise e - range_code = "4XX"[0] - range_code_left = int(f"{range_code}00") - range_code_right = int(f"{range_code}99") - - if range_code_left <= e.status <= range_code_right: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[ErrorResponse], - _check_type=True, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + has_files = False + body_param = signature_request_update_request + excluded_json_fields = set([]) + for param_name, param_type in body_param.openapi_types().items(): + param_value = getattr(body_param, param_name) + if param_value is None: + continue + + if "io.IOBase" in param_type: + has_files = True + _content_type = "multipart/form-data" + excluded_json_fields.add(param_name) + + if isinstance(param_value, list): + for index, item in enumerate(param_value): + _files[f'{param_name}[{index}]'] = item + else: + _files[param_name] = param_value + + _form_params = body_param.to_json_form_params(excluded_json_fields) + + # process the path parameters + if signature_request_id is not None: + _path_params['signature_request_id'] = signature_request_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + 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' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _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 + + # authentication setting + _auth_settings: List[str] = [ + 'api_key', + 'oauth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/signature_request/update/{signature_request_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) - raise e diff --git a/sdks/python/dropbox_sign/api/team_api.py b/sdks/python/dropbox_sign/api/team_api.py index 98dc21564..6cce0fbc1 100644 --- a/sdks/python/dropbox_sign/api/team_api.py +++ b/sdks/python/dropbox_sign/api/team_api.py @@ -1,1557 +1,2874 @@ +# coding: utf-8 + """ Dropbox Sign API - Dropbox Sign v3 API # noqa: E501 + Dropbox Sign v3 API The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - + Generated by OpenAPI Generator (https://openapi-generator.tech) -from __future__ import annotations -import re # noqa: F401 -import sys # noqa: F401 - -from dropbox_sign.api_client import ApiClient, ApiException, Endpoint as _Endpoint -from dropbox_sign.model_utils import ( # noqa: F401 - check_allowed_values, - check_validations, - date, - datetime, - file_type, - none_type, - validate_and_convert_types -) -from dropbox_sign.model.error_response import ErrorResponse -from dropbox_sign.model.team_add_member_request import TeamAddMemberRequest -from dropbox_sign.model.team_create_request import TeamCreateRequest -from dropbox_sign.model.team_get_info_response import TeamGetInfoResponse -from dropbox_sign.model.team_get_response import TeamGetResponse -from dropbox_sign.model.team_invites_response import TeamInvitesResponse -from dropbox_sign.model.team_members_response import TeamMembersResponse -from dropbox_sign.model.team_remove_member_request import TeamRemoveMemberRequest -from dropbox_sign.model.team_sub_teams_response import TeamSubTeamsResponse -from dropbox_sign.model.team_update_request import TeamUpdateRequest - - -class TeamApi(object): + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictInt, StrictStr +from typing import Optional +from typing_extensions import Annotated +from dropbox_sign.models.team_add_member_request import TeamAddMemberRequest +from dropbox_sign.models.team_create_request import TeamCreateRequest +from dropbox_sign.models.team_get_info_response import TeamGetInfoResponse +from dropbox_sign.models.team_get_response import TeamGetResponse +from dropbox_sign.models.team_invites_response import TeamInvitesResponse +from dropbox_sign.models.team_members_response import TeamMembersResponse +from dropbox_sign.models.team_remove_member_request import TeamRemoveMemberRequest +from dropbox_sign.models.team_sub_teams_response import TeamSubTeamsResponse +from dropbox_sign.models.team_update_request import TeamUpdateRequest + +from dropbox_sign.api_client import ApiClient, RequestSerialized +from dropbox_sign.api_response import ApiResponse +from dropbox_sign.rest import RESTResponseType +import io + + +class TeamApi: """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech Do not edit the class manually. """ - def __init__(self, api_client=None): + def __init__(self, api_client=None) -> None: if api_client is None: - api_client = ApiClient() + api_client = ApiClient.get_default() self.api_client = api_client - self.team_add_member_endpoint = _Endpoint( - settings={ - 'response_type': (TeamGetResponse,), - 'auth': [ - 'api_key', - 'oauth2' - ], - 'endpoint_path': '/team/add_member', - 'operation_id': 'team_add_member', - 'http_method': 'PUT', - 'servers': None, - }, - params_map={ - 'all': [ - 'team_add_member_request', - 'team_id', - ], - 'required': [ - 'team_add_member_request', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'team_add_member_request': - (TeamAddMemberRequest,), - 'team_id': - (str,), - }, - 'attribute_map': { - 'team_id': 'team_id', - }, - 'location_map': { - 'team_add_member_request': 'body', - 'team_id': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.team_create_endpoint = _Endpoint( - settings={ - 'response_type': (TeamGetResponse,), - 'auth': [ - 'api_key', - 'oauth2' - ], - 'endpoint_path': '/team/create', - 'operation_id': 'team_create', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'team_create_request', - ], - 'required': [ - 'team_create_request', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'team_create_request': - (TeamCreateRequest,), - }, - 'attribute_map': { - }, - 'location_map': { - 'team_create_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.team_delete_endpoint = _Endpoint( - settings={ - 'response_type': None, - 'auth': [ - 'api_key', - 'oauth2' - ], - 'endpoint_path': '/team/destroy', - 'operation_id': 'team_delete', - 'http_method': 'DELETE', - 'servers': None, - }, - params_map={ - 'all': [ - ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - }, - 'attribute_map': { - }, - 'location_map': { - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.team_get_endpoint = _Endpoint( - settings={ - 'response_type': (TeamGetResponse,), - 'auth': [ - 'api_key', - 'oauth2' - ], - 'endpoint_path': '/team', - 'operation_id': 'team_get', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - }, - 'attribute_map': { - }, - 'location_map': { - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.team_info_endpoint = _Endpoint( - settings={ - 'response_type': (TeamGetInfoResponse,), - 'auth': [ - 'api_key', - 'oauth2' - ], - 'endpoint_path': '/team/info', - 'operation_id': 'team_info', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'team_id', - ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'team_id': - (str,), - }, - 'attribute_map': { - 'team_id': 'team_id', - }, - 'location_map': { - 'team_id': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.team_invites_endpoint = _Endpoint( - settings={ - 'response_type': (TeamInvitesResponse,), - 'auth': [ - 'api_key', - 'oauth2' - ], - 'endpoint_path': '/team/invites', - 'operation_id': 'team_invites', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'email_address', - ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'email_address': - (str,), - }, - 'attribute_map': { - 'email_address': 'email_address', - }, - 'location_map': { - 'email_address': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.team_members_endpoint = _Endpoint( - settings={ - 'response_type': (TeamMembersResponse,), - 'auth': [ - 'api_key', - 'oauth2' - ], - 'endpoint_path': '/team/members/{team_id}', - 'operation_id': 'team_members', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'team_id', - 'page', - 'page_size', - ], - 'required': [ - 'team_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - 'page_size', - ] - }, - root_map={ - 'validations': { - ('page_size',): { - - 'inclusive_maximum': 100, - 'inclusive_minimum': 1, - }, - }, - 'allowed_values': { - }, - 'openapi_types': { - 'team_id': - (str,), - 'page': - (int,), - 'page_size': - (int,), - }, - 'attribute_map': { - 'team_id': 'team_id', - 'page': 'page', - 'page_size': 'page_size', - }, - 'location_map': { - 'team_id': 'path', - 'page': 'query', - 'page_size': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.team_remove_member_endpoint = _Endpoint( - settings={ - 'response_type': (TeamGetResponse,), - 'auth': [ - 'api_key', - 'oauth2' - ], - 'endpoint_path': '/team/remove_member', - 'operation_id': 'team_remove_member', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'team_remove_member_request', - ], - 'required': [ - 'team_remove_member_request', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'team_remove_member_request': - (TeamRemoveMemberRequest,), - }, - 'attribute_map': { - }, - 'location_map': { - 'team_remove_member_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.team_sub_teams_endpoint = _Endpoint( - settings={ - 'response_type': (TeamSubTeamsResponse,), - 'auth': [ - 'api_key', - 'oauth2' - ], - 'endpoint_path': '/team/sub_teams/{team_id}', - 'operation_id': 'team_sub_teams', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'team_id', - 'page', - 'page_size', - ], - 'required': [ - 'team_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - 'page_size', - ] - }, - root_map={ - 'validations': { - ('page_size',): { - - 'inclusive_maximum': 100, - 'inclusive_minimum': 1, - }, - }, - 'allowed_values': { - }, - 'openapi_types': { - 'team_id': - (str,), - 'page': - (int,), - 'page_size': - (int,), - }, - 'attribute_map': { - 'team_id': 'team_id', - 'page': 'page', - 'page_size': 'page_size', - }, - 'location_map': { - 'team_id': 'path', - 'page': 'query', - 'page_size': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.team_update_endpoint = _Endpoint( - settings={ - 'response_type': (TeamGetResponse,), - 'auth': [ - 'api_key', - 'oauth2' - ], - 'endpoint_path': '/team', - 'operation_id': 'team_update', - 'http_method': 'PUT', - 'servers': None, - }, - params_map={ - 'all': [ - 'team_update_request', - ], - 'required': [ - 'team_update_request', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'team_update_request': - (TeamUpdateRequest,), - }, - 'attribute_map': { - }, - 'location_map': { - 'team_update_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) + + @validate_call def team_add_member( self, - team_add_member_request, - **kwargs + team_add_member_request: TeamAddMemberRequest, + 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)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> TeamGetResponse: - """Add User to Team # noqa: E501 - - Invites a user (specified using the `email_address` parameter) to your Team. If the user does not currently have a Dropbox Sign Account, a new one will be created for them. If a user is already a part of another Team, a `team_invite_failed` error will be returned. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.team_add_member(team_add_member_request, async_req=True) - >>> result = thread.get() - - Args: - team_add_member_request (TeamAddMemberRequest): - - Keyword Args: - team_id (str): The id of the team.. [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - TeamGetResponse - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['team_add_member_request'] = \ - team_add_member_request - try: - return self.team_add_member_endpoint.call_with_http_info(**kwargs) - except ApiException as e: - if e.status == 200: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[TeamGetResponse], - _check_type=True, + """Add User to Team + + Invites a user (specified using the `email_address` parameter) to your Team. If the user does not currently have a Dropbox Sign Account, a new one will be created for them. If a user is already a part of another Team, a `team_invite_failed` error will be returned. + + :param team_add_member_request: (required) + :type team_add_member_request: TeamAddMemberRequest + :param team_id: The id of the team. + :type team_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._team_add_member_serialize( + team_add_member_request=team_add_member_request, + team_id=team_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TeamGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + 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, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[TeamGetResponse]: + """Add User to Team + + Invites a user (specified using the `email_address` parameter) to your Team. If the user does not currently have a Dropbox Sign Account, a new one will be created for them. If a user is already a part of another Team, a `team_invite_failed` error will be returned. + + :param team_add_member_request: (required) + :type team_add_member_request: TeamAddMemberRequest + :param team_id: The id of the team. + :type team_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._team_add_member_serialize( + team_add_member_request=team_add_member_request, + team_id=team_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TeamGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + 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, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Add User to Team + + Invites a user (specified using the `email_address` parameter) to your Team. If the user does not currently have a Dropbox Sign Account, a new one will be created for them. If a user is already a part of another Team, a `team_invite_failed` error will be returned. + + :param team_add_member_request: (required) + :type team_add_member_request: TeamAddMemberRequest + :param team_id: The id of the team. + :type team_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._team_add_member_serialize( + team_add_member_request=team_add_member_request, + team_id=team_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TeamGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _team_add_member_serialize( + self, + team_add_member_request, + team_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + has_files = False + body_param = team_add_member_request + excluded_json_fields = set([]) + for param_name, param_type in body_param.openapi_types().items(): + param_value = getattr(body_param, param_name) + if param_value is None: + continue + + if "io.IOBase" in param_type: + has_files = True + _content_type = "multipart/form-data" + excluded_json_fields.add(param_name) + + if isinstance(param_value, list): + for index, item in enumerate(param_value): + _files[f'{param_name}[{index}]'] = item + else: + _files[param_name] = param_value + + _form_params = body_param.to_json_form_params(excluded_json_fields) + + # process the path parameters + # process the query parameters + if team_id is not None: + + _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' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _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 + + # authentication setting + _auth_settings: List[str] = [ + 'api_key', + 'oauth2' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/team/add_member', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) - raise e - range_code = "4XX"[0] - range_code_left = int(f"{range_code}00") - range_code_right = int(f"{range_code}99") - if range_code_left <= e.status <= range_code_right: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[ErrorResponse], - _check_type=True, - ) - raise e + @validate_call def team_create( self, - team_create_request, - **kwargs + team_create_request: TeamCreateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> TeamGetResponse: - """Create Team # noqa: E501 - - Creates a new Team and makes you a member. You must not currently belong to a Team to invoke. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.team_create(team_create_request, async_req=True) - >>> result = thread.get() - - Args: - team_create_request (TeamCreateRequest): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - TeamGetResponse - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['team_create_request'] = \ - team_create_request - try: - return self.team_create_endpoint.call_with_http_info(**kwargs) - except ApiException as e: - if e.status == 200: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[TeamGetResponse], - _check_type=True, + """Create Team + + Creates a new Team and makes you a member. You must not currently belong to a Team to invoke. + + :param team_create_request: (required) + :type team_create_request: TeamCreateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TeamGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def team_create_with_http_info( + self, + team_create_request: TeamCreateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[TeamGetResponse]: + """Create Team + + Creates a new Team and makes you a member. You must not currently belong to a Team to invoke. + + :param team_create_request: (required) + :type team_create_request: TeamCreateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TeamGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def team_create_without_preload_content( + self, + team_create_request: TeamCreateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create Team + + Creates a new Team and makes you a member. You must not currently belong to a Team to invoke. + + :param team_create_request: (required) + :type team_create_request: TeamCreateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TeamGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _team_create_serialize( + self, + team_create_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + has_files = False + body_param = team_create_request + excluded_json_fields = set([]) + for param_name, param_type in body_param.openapi_types().items(): + param_value = getattr(body_param, param_name) + if param_value is None: + continue + + if "io.IOBase" in param_type: + has_files = True + _content_type = "multipart/form-data" + excluded_json_fields.add(param_name) + + if isinstance(param_value, list): + for index, item in enumerate(param_value): + _files[f'{param_name}[{index}]'] = item + else: + _files[param_name] = param_value + + _form_params = body_param.to_json_form_params(excluded_json_fields) + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + 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' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _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 + + # authentication setting + _auth_settings: List[str] = [ + 'api_key', + 'oauth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/team/create', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) - raise e - range_code = "4XX"[0] - range_code_left = int(f"{range_code}00") - range_code_right = int(f"{range_code}99") - if range_code_left <= e.status <= range_code_right: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[ErrorResponse], - _check_type=True, - ) - raise e + @validate_call def team_delete( self, - **kwargs + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> None: - """Delete Team # noqa: E501 - - Deletes your Team. Can only be invoked when you have a Team with only one member (yourself). # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.team_delete(async_req=True) - >>> result = thread.get() - - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - None - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - return self.team_delete_endpoint.call_with_http_info(**kwargs) + """Delete Team + + Deletes your Team. Can only be invoked when you have a Team with only one member (yourself). + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._team_delete_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def team_delete_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete Team + + Deletes your Team. Can only be invoked when you have a Team with only one member (yourself). + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._team_delete_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def team_delete_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete Team + + Deletes your Team. Can only be invoked when you have a Team with only one member (yourself). + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._team_delete_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _team_delete_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # 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' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'api_key', + 'oauth2' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/team/destroy', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def team_get( self, - **kwargs + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> TeamGetResponse: - """Get Team # noqa: E501 - - Returns information about your Team as well as a list of its members. If you do not belong to a Team, a 404 error with an error_name of \"not_found\" will be returned. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.team_get(async_req=True) - >>> result = thread.get() - - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - TeamGetResponse - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - try: - return self.team_get_endpoint.call_with_http_info(**kwargs) - except ApiException as e: - if e.status == 200: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[TeamGetResponse], - _check_type=True, - ) + """Get Team + + Returns information about your Team as well as a list of its members. If you do not belong to a Team, a 404 error with an error_name of \"not_found\" will be returned. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._team_get_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TeamGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def team_get_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[TeamGetResponse]: + """Get Team + + Returns information about your Team as well as a list of its members. If you do not belong to a Team, a 404 error with an error_name of \"not_found\" will be returned. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._team_get_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TeamGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def team_get_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Team + + Returns information about your Team as well as a list of its members. If you do not belong to a Team, a 404 error with an error_name of \"not_found\" will be returned. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._team_get_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TeamGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _team_get_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # 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' + ] + ) - raise e - range_code = "4XX"[0] - range_code_left = int(f"{range_code}00") - range_code_right = int(f"{range_code}99") - if range_code_left <= e.status <= range_code_right: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[ErrorResponse], - _check_type=True, - ) + # authentication setting + _auth_settings: List[str] = [ + 'api_key', + 'oauth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/team', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + - raise e + + @validate_call def team_info( self, - **kwargs + 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)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> TeamGetInfoResponse: - """Get Team Info # noqa: E501 - - Provides information about a team. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.team_info(async_req=True) - >>> result = thread.get() - - - Keyword Args: - team_id (str): The id of the team.. [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - TeamGetInfoResponse - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - try: - return self.team_info_endpoint.call_with_http_info(**kwargs) - except ApiException as e: - if e.status == 200: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[TeamGetInfoResponse], - _check_type=True, - ) + """Get Team Info + + Provides information about a team. + + :param team_id: The id of the team. + :type team_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TeamGetInfoResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + 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, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[TeamGetInfoResponse]: + """Get Team Info + + Provides information about a team. + + :param team_id: The id of the team. + :type team_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TeamGetInfoResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + 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, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Team Info + + Provides information about a team. + + :param team_id: The id of the team. + :type team_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TeamGetInfoResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _team_info_serialize( + self, + team_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if team_id is not None: + + _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' + ] + ) - raise e - range_code = "4XX"[0] - range_code_left = int(f"{range_code}00") - range_code_right = int(f"{range_code}99") - if range_code_left <= e.status <= range_code_right: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[ErrorResponse], - _check_type=True, - ) + # authentication setting + _auth_settings: List[str] = [ + 'api_key', + 'oauth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/team/info', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + - raise e + + @validate_call def team_invites( self, - **kwargs + 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)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> TeamInvitesResponse: - """List Team Invites # noqa: E501 - - Provides a list of team invites (and their roles). # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.team_invites(async_req=True) - >>> result = thread.get() - - - Keyword Args: - email_address (str): The email address for which to display the team invites.. [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - TeamInvitesResponse - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - try: - return self.team_invites_endpoint.call_with_http_info(**kwargs) - except ApiException as e: - if e.status == 200: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[TeamInvitesResponse], - _check_type=True, - ) + """List Team Invites + + Provides a list of team invites (and their roles). + + :param email_address: The email address for which to display the team invites. + :type email_address: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TeamInvitesResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + 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, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[TeamInvitesResponse]: + """List Team Invites + + Provides a list of team invites (and their roles). + + :param email_address: The email address for which to display the team invites. + :type email_address: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TeamInvitesResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + 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, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Team Invites + + Provides a list of team invites (and their roles). + + :param email_address: The email address for which to display the team invites. + :type email_address: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TeamInvitesResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _team_invites_serialize( + self, + email_address, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if email_address is not None: + + _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' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'api_key', + 'oauth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/team/invites', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) - raise e - range_code = "4XX"[0] - range_code_left = int(f"{range_code}00") - range_code_right = int(f"{range_code}99") - if range_code_left <= e.status <= range_code_right: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[ErrorResponse], - _check_type=True, - ) - raise e + @validate_call def team_members( self, - team_id, - **kwargs + 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)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> TeamMembersResponse: - """List Team Members # noqa: E501 - - Provides a paginated list of members (and their roles) that belong to a given team. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.team_members(team_id, async_req=True) - >>> result = thread.get() - - Args: - team_id (str): The id of the team that a member list is being requested from. - - Keyword Args: - page (int): Which page number of the team member list to return. Defaults to `1`.. [optional] if omitted the server will use the default value of 1 - page_size (int): Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.. [optional] if omitted the server will use the default value of 20 - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - TeamMembersResponse - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['team_id'] = \ - team_id - try: - return self.team_members_endpoint.call_with_http_info(**kwargs) - except ApiException as e: - if e.status == 200: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[TeamMembersResponse], - _check_type=True, - ) + """List Team Members + + Provides a paginated list of members (and their roles) that belong to a given team. + + :param team_id: The id of the team that a member list is being requested from. (required) + :type team_id: str + :param page: Which page number of the team member list to return. Defaults to `1`. + :type page: int + :param page_size: Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._team_members_serialize( + team_id=team_id, + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TeamMembersResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + 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, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[TeamMembersResponse]: + """List Team Members + + Provides a paginated list of members (and their roles) that belong to a given team. + + :param team_id: The id of the team that a member list is being requested from. (required) + :type team_id: str + :param page: Which page number of the team member list to return. Defaults to `1`. + :type page: int + :param page_size: Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._team_members_serialize( + team_id=team_id, + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TeamMembersResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + 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, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Team Members + + Provides a paginated list of members (and their roles) that belong to a given team. + + :param team_id: The id of the team that a member list is being requested from. (required) + :type team_id: str + :param page: Which page number of the team member list to return. Defaults to `1`. + :type page: int + :param page_size: Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._team_members_serialize( + team_id=team_id, + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TeamMembersResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _team_members_serialize( + self, + team_id, + page, + page_size, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if team_id is not None: + _path_params['team_id'] = team_id + # process the query parameters + if page is not None: + + _query_params.append(('page', page)) + + if page_size is not None: + + _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' + ] + ) - raise e - range_code = "4XX"[0] - range_code_left = int(f"{range_code}00") - range_code_right = int(f"{range_code}99") - if range_code_left <= e.status <= range_code_right: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[ErrorResponse], - _check_type=True, - ) + # authentication setting + _auth_settings: List[str] = [ + 'api_key', + 'oauth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/team/members/{team_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) - raise e + + + @validate_call def team_remove_member( self, - team_remove_member_request, - **kwargs + team_remove_member_request: TeamRemoveMemberRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> TeamGetResponse: - """Remove User from Team # noqa: E501 - - Removes the provided user Account from your Team. If the Account had an outstanding invitation to your Team, the invitation will be expired. If you choose to transfer documents from the removed Account to an Account provided in the `new_owner_email_address` parameter (available only for Enterprise plans), the response status code will be 201, which indicates that your request has been queued but not fully executed. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.team_remove_member(team_remove_member_request, async_req=True) - >>> result = thread.get() - - Args: - team_remove_member_request (TeamRemoveMemberRequest): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - TeamGetResponse - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['team_remove_member_request'] = \ - team_remove_member_request - try: - return self.team_remove_member_endpoint.call_with_http_info(**kwargs) - except ApiException as e: - if e.status == 201: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[TeamGetResponse], - _check_type=True, + """Remove User from Team + + Removes the provided user Account from your Team. If the Account had an outstanding invitation to your Team, the invitation will be expired. If you choose to transfer documents from the removed Account to an Account provided in the `new_owner_email_address` parameter (available only for Enterprise plans), the response status code will be 201, which indicates that your request has been queued but not fully executed. + + :param team_remove_member_request: (required) + :type team_remove_member_request: TeamRemoveMemberRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "TeamGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def team_remove_member_with_http_info( + self, + team_remove_member_request: TeamRemoveMemberRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[TeamGetResponse]: + """Remove User from Team + + Removes the provided user Account from your Team. If the Account had an outstanding invitation to your Team, the invitation will be expired. If you choose to transfer documents from the removed Account to an Account provided in the `new_owner_email_address` parameter (available only for Enterprise plans), the response status code will be 201, which indicates that your request has been queued but not fully executed. + + :param team_remove_member_request: (required) + :type team_remove_member_request: TeamRemoveMemberRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "TeamGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def team_remove_member_without_preload_content( + self, + team_remove_member_request: TeamRemoveMemberRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Remove User from Team + + Removes the provided user Account from your Team. If the Account had an outstanding invitation to your Team, the invitation will be expired. If you choose to transfer documents from the removed Account to an Account provided in the `new_owner_email_address` parameter (available only for Enterprise plans), the response status code will be 201, which indicates that your request has been queued but not fully executed. + + :param team_remove_member_request: (required) + :type team_remove_member_request: TeamRemoveMemberRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "TeamGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _team_remove_member_serialize( + self, + team_remove_member_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + has_files = False + body_param = team_remove_member_request + excluded_json_fields = set([]) + for param_name, param_type in body_param.openapi_types().items(): + param_value = getattr(body_param, param_name) + if param_value is None: + continue + + if "io.IOBase" in param_type: + has_files = True + _content_type = "multipart/form-data" + excluded_json_fields.add(param_name) + + if isinstance(param_value, list): + for index, item in enumerate(param_value): + _files[f'{param_name}[{index}]'] = item + else: + _files[param_name] = param_value + + _form_params = body_param.to_json_form_params(excluded_json_fields) + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + 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' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _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 + + # authentication setting + _auth_settings: List[str] = [ + 'api_key', + 'oauth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/team/remove_member', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) - raise e - range_code = "4XX"[0] - range_code_left = int(f"{range_code}00") - range_code_right = int(f"{range_code}99") - if range_code_left <= e.status <= range_code_right: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[ErrorResponse], - _check_type=True, - ) - raise e + @validate_call def team_sub_teams( self, - team_id, - **kwargs + 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, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> TeamSubTeamsResponse: - """List Sub Teams # noqa: E501 - - Provides a paginated list of sub teams that belong to a given team. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.team_sub_teams(team_id, async_req=True) - >>> result = thread.get() - - Args: - team_id (str): The id of the parent Team. - - Keyword Args: - page (int): Which page number of the SubTeam List to return. Defaults to `1`.. [optional] if omitted the server will use the default value of 1 - page_size (int): Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.. [optional] if omitted the server will use the default value of 20 - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - TeamSubTeamsResponse - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['team_id'] = \ - team_id - try: - return self.team_sub_teams_endpoint.call_with_http_info(**kwargs) - except ApiException as e: - if e.status == 200: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[TeamSubTeamsResponse], - _check_type=True, - ) + """List Sub Teams + + Provides a paginated list of sub teams that belong to a given team. + + :param team_id: The id of the parent Team. (required) + :type team_id: str + :param page: Which page number of the SubTeam List to return. Defaults to `1`. + :type page: int + :param page_size: Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._team_sub_teams_serialize( + team_id=team_id, + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TeamSubTeamsResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + 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, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[TeamSubTeamsResponse]: + """List Sub Teams + + Provides a paginated list of sub teams that belong to a given team. + + :param team_id: The id of the parent Team. (required) + :type team_id: str + :param page: Which page number of the SubTeam List to return. Defaults to `1`. + :type page: int + :param page_size: Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._team_sub_teams_serialize( + team_id=team_id, + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TeamSubTeamsResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + 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, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Sub Teams + + Provides a paginated list of sub teams that belong to a given team. + + :param team_id: The id of the parent Team. (required) + :type team_id: str + :param page: Which page number of the SubTeam List to return. Defaults to `1`. + :type page: int + :param page_size: Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._team_sub_teams_serialize( + team_id=team_id, + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TeamSubTeamsResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _team_sub_teams_serialize( + self, + team_id, + page, + page_size, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if team_id is not None: + _path_params['team_id'] = team_id + # process the query parameters + if page is not None: + + _query_params.append(('page', page)) + + if page_size is not None: + + _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' + ] + ) - raise e - range_code = "4XX"[0] - range_code_left = int(f"{range_code}00") - range_code_right = int(f"{range_code}99") - if range_code_left <= e.status <= range_code_right: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[ErrorResponse], - _check_type=True, - ) + # authentication setting + _auth_settings: List[str] = [ + 'api_key', + 'oauth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/team/sub_teams/{team_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) - raise e + + + @validate_call def team_update( self, - team_update_request, - **kwargs + team_update_request: TeamUpdateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> TeamGetResponse: - """Update Team # noqa: E501 - - Updates the name of your Team. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.team_update(team_update_request, async_req=True) - >>> result = thread.get() - - Args: - team_update_request (TeamUpdateRequest): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - TeamGetResponse - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['team_update_request'] = \ - team_update_request - try: - return self.team_update_endpoint.call_with_http_info(**kwargs) - except ApiException as e: - if e.status == 200: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[TeamGetResponse], - _check_type=True, - ) - - raise e - range_code = "4XX"[0] - range_code_left = int(f"{range_code}00") - range_code_right = int(f"{range_code}99") - - if range_code_left <= e.status <= range_code_right: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[ErrorResponse], - _check_type=True, + """Update Team + + Updates the name of your Team. + + :param team_update_request: (required) + :type team_update_request: TeamUpdateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TeamGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def team_update_with_http_info( + self, + team_update_request: TeamUpdateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[TeamGetResponse]: + """Update Team + + Updates the name of your Team. + + :param team_update_request: (required) + :type team_update_request: TeamUpdateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TeamGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def team_update_without_preload_content( + self, + team_update_request: TeamUpdateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update Team + + Updates the name of your Team. + + :param team_update_request: (required) + :type team_update_request: TeamUpdateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TeamGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _team_update_serialize( + self, + team_update_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + has_files = False + body_param = team_update_request + excluded_json_fields = set([]) + for param_name, param_type in body_param.openapi_types().items(): + param_value = getattr(body_param, param_name) + if param_value is None: + continue + + if "io.IOBase" in param_type: + has_files = True + _content_type = "multipart/form-data" + excluded_json_fields.add(param_name) + + if isinstance(param_value, list): + for index, item in enumerate(param_value): + _files[f'{param_name}[{index}]'] = item + else: + _files[param_name] = param_value + + _form_params = body_param.to_json_form_params(excluded_json_fields) + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + 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' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _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 + + # authentication setting + _auth_settings: List[str] = [ + 'api_key', + 'oauth2' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/team', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) - raise e diff --git a/sdks/python/dropbox_sign/api/template_api.py b/sdks/python/dropbox_sign/api/template_api.py index aa5eed855..ab0500a4c 100644 --- a/sdks/python/dropbox_sign/api/template_api.py +++ b/sdks/python/dropbox_sign/api/template_api.py @@ -1,1778 +1,3252 @@ +# coding: utf-8 + """ Dropbox Sign API - Dropbox Sign v3 API # noqa: E501 + Dropbox Sign v3 API The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - + Generated by OpenAPI Generator (https://openapi-generator.tech) -from __future__ import annotations -import re # noqa: F401 -import sys # noqa: F401 - -from dropbox_sign.api_client import ApiClient, ApiException, Endpoint as _Endpoint -from dropbox_sign.model_utils import ( # noqa: F401 - check_allowed_values, - check_validations, - date, - datetime, - file_type, - none_type, - validate_and_convert_types -) -from dropbox_sign.model.error_response import ErrorResponse -from dropbox_sign.model.file_response import FileResponse -from dropbox_sign.model.file_response_data_uri import FileResponseDataUri -from dropbox_sign.model.template_add_user_request import TemplateAddUserRequest -from dropbox_sign.model.template_create_embedded_draft_request import TemplateCreateEmbeddedDraftRequest -from dropbox_sign.model.template_create_embedded_draft_response import TemplateCreateEmbeddedDraftResponse -from dropbox_sign.model.template_create_request import TemplateCreateRequest -from dropbox_sign.model.template_create_response import TemplateCreateResponse -from dropbox_sign.model.template_get_response import TemplateGetResponse -from dropbox_sign.model.template_list_response import TemplateListResponse -from dropbox_sign.model.template_remove_user_request import TemplateRemoveUserRequest -from dropbox_sign.model.template_update_files_request import TemplateUpdateFilesRequest -from dropbox_sign.model.template_update_files_response import TemplateUpdateFilesResponse - - -class TemplateApi(object): + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictBytes, StrictInt, StrictStr, field_validator +from typing import Optional, Union +from typing_extensions import Annotated +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_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.api_client import ApiClient, RequestSerialized +from dropbox_sign.api_response import ApiResponse +from dropbox_sign.rest import RESTResponseType +import io + + +class TemplateApi: """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech Do not edit the class manually. """ - def __init__(self, api_client=None): + def __init__(self, api_client=None) -> None: if api_client is None: - api_client = ApiClient() + api_client = ApiClient.get_default() self.api_client = api_client - self.template_add_user_endpoint = _Endpoint( - settings={ - 'response_type': (TemplateGetResponse,), - 'auth': [ - 'api_key', - 'oauth2' - ], - 'endpoint_path': '/template/add_user/{template_id}', - 'operation_id': 'template_add_user', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'template_id', - 'template_add_user_request', - ], - 'required': [ - 'template_id', - 'template_add_user_request', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'template_id': - (str,), - 'template_add_user_request': - (TemplateAddUserRequest,), - }, - 'attribute_map': { - 'template_id': 'template_id', - }, - 'location_map': { - 'template_id': 'path', - 'template_add_user_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.template_create_endpoint = _Endpoint( - settings={ - 'response_type': (TemplateCreateResponse,), - 'auth': [ - 'api_key', - 'oauth2' - ], - 'endpoint_path': '/template/create', - 'operation_id': 'template_create', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'template_create_request', - ], - 'required': [ - 'template_create_request', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'template_create_request': - (TemplateCreateRequest,), - }, - 'attribute_map': { - }, - 'location_map': { - 'template_create_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json', - 'multipart/form-data' - ] - }, - api_client=api_client - ) - self.template_create_embedded_draft_endpoint = _Endpoint( - settings={ - 'response_type': (TemplateCreateEmbeddedDraftResponse,), - 'auth': [ - 'api_key', - 'oauth2' - ], - 'endpoint_path': '/template/create_embedded_draft', - 'operation_id': 'template_create_embedded_draft', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'template_create_embedded_draft_request', - ], - 'required': [ - 'template_create_embedded_draft_request', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'template_create_embedded_draft_request': - (TemplateCreateEmbeddedDraftRequest,), - }, - 'attribute_map': { - }, - 'location_map': { - 'template_create_embedded_draft_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json', - 'multipart/form-data' - ] - }, - api_client=api_client - ) - self.template_delete_endpoint = _Endpoint( - settings={ - 'response_type': None, - 'auth': [ - 'api_key', - 'oauth2' - ], - 'endpoint_path': '/template/delete/{template_id}', - 'operation_id': 'template_delete', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'template_id', - ], - 'required': [ - 'template_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'template_id': - (str,), - }, - 'attribute_map': { - 'template_id': 'template_id', - }, - 'location_map': { - 'template_id': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.template_files_endpoint = _Endpoint( - settings={ - 'response_type': (file_type,), - 'auth': [ - 'api_key', - 'oauth2' - ], - 'endpoint_path': '/template/files/{template_id}', - 'operation_id': 'template_files', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'template_id', - 'file_type', - ], - 'required': [ - 'template_id', - ], - 'nullable': [ - ], - 'enum': [ - 'file_type', - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - ('file_type',): { - - "PDF": "pdf", - "ZIP": "zip" - }, - }, - 'openapi_types': { - 'template_id': - (str,), - 'file_type': - (str,), - }, - 'attribute_map': { - 'template_id': 'template_id', - 'file_type': 'file_type', - }, - 'location_map': { - 'template_id': 'path', - 'file_type': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/pdf', - 'application/zip', - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.template_files_as_data_uri_endpoint = _Endpoint( - settings={ - 'response_type': (FileResponseDataUri,), - 'auth': [ - 'api_key', - 'oauth2' - ], - 'endpoint_path': '/template/files_as_data_uri/{template_id}', - 'operation_id': 'template_files_as_data_uri', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'template_id', - ], - 'required': [ - 'template_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'template_id': - (str,), - }, - 'attribute_map': { - 'template_id': 'template_id', - }, - 'location_map': { - 'template_id': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.template_files_as_file_url_endpoint = _Endpoint( - settings={ - 'response_type': (FileResponse,), - 'auth': [ - 'api_key', - 'oauth2' - ], - 'endpoint_path': '/template/files_as_file_url/{template_id}', - 'operation_id': 'template_files_as_file_url', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'template_id', - 'force_download', - ], - 'required': [ - 'template_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'template_id': - (str,), - 'force_download': - (int,), - }, - 'attribute_map': { - 'template_id': 'template_id', - 'force_download': 'force_download', - }, - 'location_map': { - 'template_id': 'path', - 'force_download': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.template_get_endpoint = _Endpoint( - settings={ - 'response_type': (TemplateGetResponse,), - 'auth': [ - 'api_key', - 'oauth2' - ], - 'endpoint_path': '/template/{template_id}', - 'operation_id': 'template_get', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'template_id', - ], - 'required': [ - 'template_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'template_id': - (str,), - }, - 'attribute_map': { - 'template_id': 'template_id', - }, - 'location_map': { - 'template_id': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.template_list_endpoint = _Endpoint( - settings={ - 'response_type': (TemplateListResponse,), - 'auth': [ - 'api_key', - 'oauth2' - ], - 'endpoint_path': '/template/list', - 'operation_id': 'template_list', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'account_id', - 'page', - 'page_size', - 'query', - ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - 'page_size', - ] - }, - root_map={ - 'validations': { - ('page_size',): { - - 'inclusive_maximum': 100, - 'inclusive_minimum': 1, - }, - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'page': - (int,), - 'page_size': - (int,), - 'query': - (str,), - }, - 'attribute_map': { - 'account_id': 'account_id', - 'page': 'page', - 'page_size': 'page_size', - 'query': 'query', - }, - 'location_map': { - 'account_id': 'query', - 'page': 'query', - 'page_size': 'query', - 'query': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.template_remove_user_endpoint = _Endpoint( - settings={ - 'response_type': (TemplateGetResponse,), - 'auth': [ - 'api_key', - 'oauth2' - ], - 'endpoint_path': '/template/remove_user/{template_id}', - 'operation_id': 'template_remove_user', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'template_id', - 'template_remove_user_request', - ], - 'required': [ - 'template_id', - 'template_remove_user_request', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'template_id': - (str,), - 'template_remove_user_request': - (TemplateRemoveUserRequest,), - }, - 'attribute_map': { - 'template_id': 'template_id', - }, - 'location_map': { - 'template_id': 'path', - 'template_remove_user_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.template_update_files_endpoint = _Endpoint( - settings={ - 'response_type': (TemplateUpdateFilesResponse,), - 'auth': [ - 'api_key', - 'oauth2' - ], - 'endpoint_path': '/template/update_files/{template_id}', - 'operation_id': 'template_update_files', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'template_id', - 'template_update_files_request', - ], - 'required': [ - 'template_id', - 'template_update_files_request', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'template_id': - (str,), - 'template_update_files_request': - (TemplateUpdateFilesRequest,), - }, - 'attribute_map': { - 'template_id': 'template_id', - }, - 'location_map': { - 'template_id': 'path', - 'template_update_files_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json', - 'multipart/form-data' - ] - }, - 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_add_user_request: TemplateAddUserRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> TemplateGetResponse: + """Add User to Template + + Gives the specified Account access to the specified Template. The specified Account must be a part of your Team. + + :param template_id: The id of the Template to give the Account access to. (required) + :type template_id: str + :param template_add_user_request: (required) + :type template_add_user_request: TemplateAddUserRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._template_add_user_serialize( + template_id=template_id, + template_add_user_request=template_add_user_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TemplateGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + 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_add_user_request: TemplateAddUserRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[TemplateGetResponse]: + """Add User to Template + + Gives the specified Account access to the specified Template. The specified Account must be a part of your Team. + + :param template_id: The id of the Template to give the Account access to. (required) + :type template_id: str + :param template_add_user_request: (required) + :type template_add_user_request: TemplateAddUserRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._template_add_user_serialize( + template_id=template_id, + template_add_user_request=template_add_user_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TemplateGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + 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_add_user_request: TemplateAddUserRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Add User to Template + + Gives the specified Account access to the specified Template. The specified Account must be a part of your Team. + + :param template_id: The id of the Template to give the Account access to. (required) + :type template_id: str + :param template_add_user_request: (required) + :type template_add_user_request: TemplateAddUserRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._template_add_user_serialize( + template_id=template_id, + template_add_user_request=template_add_user_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TemplateGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _template_add_user_serialize( self, template_id, template_add_user_request, - **kwargs - ) -> TemplateGetResponse: - """Add User to Template # noqa: E501 - - Gives the specified Account access to the specified Template. The specified Account must be a part of your Team. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.template_add_user(template_id, template_add_user_request, async_req=True) - >>> result = thread.get() - - Args: - template_id (str): The id of the Template to give the Account access to. - template_add_user_request (TemplateAddUserRequest): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - TemplateGetResponse - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['template_id'] = \ - template_id - kwargs['template_add_user_request'] = \ - template_add_user_request - try: - return self.template_add_user_endpoint.call_with_http_info(**kwargs) - except ApiException as e: - if e.status == 200: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[TemplateGetResponse], - _check_type=True, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + has_files = False + body_param = template_add_user_request + excluded_json_fields = set([]) + for param_name, param_type in body_param.openapi_types().items(): + param_value = getattr(body_param, param_name) + if param_value is None: + continue + + if "io.IOBase" in param_type: + has_files = True + _content_type = "multipart/form-data" + excluded_json_fields.add(param_name) + + if isinstance(param_value, list): + for index, item in enumerate(param_value): + _files[f'{param_name}[{index}]'] = item + else: + _files[param_name] = param_value + + _form_params = body_param.to_json_form_params(excluded_json_fields) + + # process the path parameters + if template_id is not None: + _path_params['template_id'] = template_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + 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' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _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 - raise e - range_code = "4XX"[0] - range_code_left = int(f"{range_code}00") - range_code_right = int(f"{range_code}99") + # authentication setting + _auth_settings: List[str] = [ + 'api_key', + 'oauth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/template/add_user/{template_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) - if range_code_left <= e.status <= range_code_right: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[ErrorResponse], - _check_type=True, - ) - raise e + + @validate_call def template_create( self, - template_create_request, - **kwargs + template_create_request: TemplateCreateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> TemplateCreateResponse: - """Create Template # noqa: E501 - - Creates a template that can then be used. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.template_create(template_create_request, async_req=True) - >>> result = thread.get() - - Args: - template_create_request (TemplateCreateRequest): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - TemplateCreateResponse - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['template_create_request'] = \ - template_create_request - try: - return self.template_create_endpoint.call_with_http_info(**kwargs) - except ApiException as e: - if e.status == 200: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[TemplateCreateResponse], - _check_type=True, + """Create Template + + Creates a template that can then be used. + + :param template_create_request: (required) + :type template_create_request: TemplateCreateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TemplateCreateResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def template_create_with_http_info( + self, + template_create_request: TemplateCreateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[TemplateCreateResponse]: + """Create Template + + Creates a template that can then be used. + + :param template_create_request: (required) + :type template_create_request: TemplateCreateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TemplateCreateResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def template_create_without_preload_content( + self, + template_create_request: TemplateCreateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create Template + + Creates a template that can then be used. + + :param template_create_request: (required) + :type template_create_request: TemplateCreateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TemplateCreateResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _template_create_serialize( + self, + template_create_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + has_files = False + body_param = template_create_request + excluded_json_fields = set([]) + for param_name, param_type in body_param.openapi_types().items(): + param_value = getattr(body_param, param_name) + if param_value is None: + continue + + if "io.IOBase" in param_type: + has_files = True + _content_type = "multipart/form-data" + excluded_json_fields.add(param_name) + + if isinstance(param_value, list): + for index, item in enumerate(param_value): + _files[f'{param_name}[{index}]'] = item + else: + _files[param_name] = param_value + + _form_params = body_param.to_json_form_params(excluded_json_fields) + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + 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' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _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 - raise e - range_code = "4XX"[0] - range_code_left = int(f"{range_code}00") - range_code_right = int(f"{range_code}99") + # authentication setting + _auth_settings: List[str] = [ + 'api_key', + 'oauth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/template/create', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) - if range_code_left <= e.status <= range_code_right: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[ErrorResponse], - _check_type=True, - ) - raise e + + @validate_call def template_create_embedded_draft( self, - template_create_embedded_draft_request, - **kwargs + template_create_embedded_draft_request: TemplateCreateEmbeddedDraftRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> TemplateCreateEmbeddedDraftResponse: - """Create Embedded Template Draft # noqa: E501 - - The first step in an embedded template workflow. Creates a draft template that can then be further set up in the template 'edit' stage. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.template_create_embedded_draft(template_create_embedded_draft_request, async_req=True) - >>> result = thread.get() - - Args: - template_create_embedded_draft_request (TemplateCreateEmbeddedDraftRequest): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - TemplateCreateEmbeddedDraftResponse - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['template_create_embedded_draft_request'] = \ - template_create_embedded_draft_request - try: - return self.template_create_embedded_draft_endpoint.call_with_http_info(**kwargs) - except ApiException as e: - if e.status == 200: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[TemplateCreateEmbeddedDraftResponse], - _check_type=True, + """Create Embedded Template Draft + + The first step in an embedded template workflow. Creates a draft template that can then be further set up in the template 'edit' stage. + + :param template_create_embedded_draft_request: (required) + :type template_create_embedded_draft_request: TemplateCreateEmbeddedDraftRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TemplateCreateEmbeddedDraftResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def template_create_embedded_draft_with_http_info( + self, + template_create_embedded_draft_request: TemplateCreateEmbeddedDraftRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[TemplateCreateEmbeddedDraftResponse]: + """Create Embedded Template Draft + + The first step in an embedded template workflow. Creates a draft template that can then be further set up in the template 'edit' stage. + + :param template_create_embedded_draft_request: (required) + :type template_create_embedded_draft_request: TemplateCreateEmbeddedDraftRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TemplateCreateEmbeddedDraftResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def template_create_embedded_draft_without_preload_content( + self, + template_create_embedded_draft_request: TemplateCreateEmbeddedDraftRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create Embedded Template Draft + + The first step in an embedded template workflow. Creates a draft template that can then be further set up in the template 'edit' stage. + + :param template_create_embedded_draft_request: (required) + :type template_create_embedded_draft_request: TemplateCreateEmbeddedDraftRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TemplateCreateEmbeddedDraftResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _template_create_embedded_draft_serialize( + self, + template_create_embedded_draft_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + has_files = False + body_param = template_create_embedded_draft_request + excluded_json_fields = set([]) + for param_name, param_type in body_param.openapi_types().items(): + param_value = getattr(body_param, param_name) + if param_value is None: + continue + + if "io.IOBase" in param_type: + has_files = True + _content_type = "multipart/form-data" + excluded_json_fields.add(param_name) + + if isinstance(param_value, list): + for index, item in enumerate(param_value): + _files[f'{param_name}[{index}]'] = item + else: + _files[param_name] = param_value + + _form_params = body_param.to_json_form_params(excluded_json_fields) + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + 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' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _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 + + # authentication setting + _auth_settings: List[str] = [ + 'api_key', + 'oauth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/template/create_embedded_draft', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) - raise e - range_code = "4XX"[0] - range_code_left = int(f"{range_code}00") - range_code_right = int(f"{range_code}99") - if range_code_left <= e.status <= range_code_right: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[ErrorResponse], - _check_type=True, - ) - raise e + @validate_call def template_delete( self, - template_id, - **kwargs + 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)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> None: - """Delete Template # noqa: E501 - - Completely deletes the template specified from the account. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.template_delete(template_id, async_req=True) - >>> result = thread.get() - - Args: - template_id (str): The id of the Template to delete. - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - None - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['template_id'] = \ - template_id - return self.template_delete_endpoint.call_with_http_info(**kwargs) + """Delete Template + + Completely deletes the template specified from the account. + + :param template_id: The id of the Template to delete. (required) + :type template_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + 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.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete Template + + Completely deletes the template specified from the account. + + :param template_id: The id of the Template to delete. (required) + :type template_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + 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.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete Template + + Completely deletes the template specified from the account. + + :param template_id: The id of the Template to delete. (required) + :type template_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _template_delete_serialize( + self, + template_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if template_id is not None: + _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' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'api_key', + 'oauth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/template/delete/{template_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _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, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> io.IOBase: + """Get Template Files + + Obtain a copy of the current documents specified by the `template_id` parameter. Returns a PDF or ZIP file. If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event. + + :param template_id: The id of the template files to retrieve. (required) + :type template_id: str + :param file_type: Set to `pdf` for a single merged document or `zip` for a collection of individual documents. + :type file_type: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._template_files_serialize( + template_id=template_id, + file_type=file_type, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "io.IOBase", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + 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, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[io.IOBase]: + """Get Template Files + + Obtain a copy of the current documents specified by the `template_id` parameter. Returns a PDF or ZIP file. If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event. + + :param template_id: The id of the template files to retrieve. (required) + :type template_id: str + :param file_type: Set to `pdf` for a single merged document or `zip` for a collection of individual documents. + :type file_type: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._template_files_serialize( + template_id=template_id, + file_type=file_type, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "io.IOBase", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + 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, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Template Files + + Obtain a copy of the current documents specified by the `template_id` parameter. Returns a PDF or ZIP file. If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event. + + :param template_id: The id of the template files to retrieve. (required) + :type template_id: str + :param file_type: Set to `pdf` for a single merged document or `zip` for a collection of individual documents. + :type file_type: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._template_files_serialize( + template_id=template_id, + file_type=file_type, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "io.IOBase", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _template_files_serialize( self, template_id, - **kwargs - ) -> file_type: - """Get Template Files # noqa: E501 - - Obtain a copy of the current documents specified by the `template_id` parameter. Returns a PDF or ZIP file. If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.template_files(template_id, async_req=True) - >>> result = thread.get() - - Args: - template_id (str): The id of the template files to retrieve. - - Keyword Args: - file_type (str): Set to `pdf` for a single merged document or `zip` for a collection of individual documents.. [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - file_type - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['template_id'] = \ - template_id - try: - return self.template_files_endpoint.call_with_http_info(**kwargs) - except ApiException as e: - if e.status == 200: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[file_type], - _check_type=True, - ) + file_type, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if template_id is not None: + _path_params['template_id'] = template_id + # process the query parameters + if file_type is not None: + + _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' + ] + ) - raise e - range_code = "4XX"[0] - range_code_left = int(f"{range_code}00") - range_code_right = int(f"{range_code}99") - if range_code_left <= e.status <= range_code_right: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[ErrorResponse], - _check_type=True, - ) + # authentication setting + _auth_settings: List[str] = [ + 'api_key', + 'oauth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/template/files/{template_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + - raise e + + @validate_call def template_files_as_data_uri( self, - template_id, - **kwargs + 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)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> FileResponseDataUri: - """Get Template Files as Data Uri # noqa: E501 - - Obtain a copy of the current documents specified by the `template_id` parameter. Returns a JSON object with a `data_uri` representing the base64 encoded file (PDFs only). If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.template_files_as_data_uri(template_id, async_req=True) - >>> result = thread.get() - - Args: - template_id (str): The id of the template files to retrieve. - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - FileResponseDataUri - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['template_id'] = \ - template_id - try: - return self.template_files_as_data_uri_endpoint.call_with_http_info(**kwargs) - except ApiException as e: - if e.status == 200: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[FileResponseDataUri], - _check_type=True, - ) + """Get Template Files as Data Uri + + Obtain a copy of the current documents specified by the `template_id` parameter. Returns a JSON object with a `data_uri` representing the base64 encoded file (PDFs only). If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event. + + :param template_id: The id of the template files to retrieve. (required) + :type template_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FileResponseDataUri", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + 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.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[FileResponseDataUri]: + """Get Template Files as Data Uri + + Obtain a copy of the current documents specified by the `template_id` parameter. Returns a JSON object with a `data_uri` representing the base64 encoded file (PDFs only). If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event. + + :param template_id: The id of the template files to retrieve. (required) + :type template_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FileResponseDataUri", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + 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.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Template Files as Data Uri + + Obtain a copy of the current documents specified by the `template_id` parameter. Returns a JSON object with a `data_uri` representing the base64 encoded file (PDFs only). If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event. + + :param template_id: The id of the template files to retrieve. (required) + :type template_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FileResponseDataUri", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _template_files_as_data_uri_serialize( + self, + template_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if template_id is not None: + _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' + ] + ) - raise e - range_code = "4XX"[0] - range_code_left = int(f"{range_code}00") - range_code_right = int(f"{range_code}99") - if range_code_left <= e.status <= range_code_right: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[ErrorResponse], - _check_type=True, - ) + # authentication setting + _auth_settings: List[str] = [ + 'api_key', + 'oauth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/template/files_as_data_uri/{template_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) - raise e + + + @validate_call def template_files_as_file_url( self, - template_id, - **kwargs + 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)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> FileResponse: - """Get Template Files as File Url # noqa: E501 - - Obtain a copy of the current documents specified by the `template_id` parameter. Returns a JSON object with a url to the file (PDFs only). If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.template_files_as_file_url(template_id, async_req=True) - >>> result = thread.get() - - Args: - template_id (str): The id of the template files to retrieve. - - Keyword Args: - force_download (int): 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.. [optional] if omitted the server will use the default value of 1 - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - FileResponse - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['template_id'] = \ - template_id - try: - return self.template_files_as_file_url_endpoint.call_with_http_info(**kwargs) - except ApiException as e: - if e.status == 200: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[FileResponse], - _check_type=True, - ) + """Get Template Files as File Url + + Obtain a copy of the current documents specified by the `template_id` parameter. Returns a JSON object with a url to the file (PDFs only). If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event. + + :param template_id: The id of the template files to retrieve. (required) + :type template_id: str + :param force_download: 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. + :type force_download: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._template_files_as_file_url_serialize( + template_id=template_id, + force_download=force_download, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FileResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + 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, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[FileResponse]: + """Get Template Files as File Url + + Obtain a copy of the current documents specified by the `template_id` parameter. Returns a JSON object with a url to the file (PDFs only). If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event. + + :param template_id: The id of the template files to retrieve. (required) + :type template_id: str + :param force_download: 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. + :type force_download: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._template_files_as_file_url_serialize( + template_id=template_id, + force_download=force_download, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FileResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + 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, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Template Files as File Url + + Obtain a copy of the current documents specified by the `template_id` parameter. Returns a JSON object with a url to the file (PDFs only). If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event. + + :param template_id: The id of the template files to retrieve. (required) + :type template_id: str + :param force_download: 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. + :type force_download: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._template_files_as_file_url_serialize( + template_id=template_id, + force_download=force_download, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FileResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _template_files_as_file_url_serialize( + self, + template_id, + force_download, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if template_id is not None: + _path_params['template_id'] = template_id + # process the query parameters + if force_download is not None: + + _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' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'api_key', + 'oauth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/template/files_as_file_url/{template_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) - raise e - range_code = "4XX"[0] - range_code_left = int(f"{range_code}00") - range_code_right = int(f"{range_code}99") - if range_code_left <= e.status <= range_code_right: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[ErrorResponse], - _check_type=True, - ) - raise e + @validate_call def template_get( self, - template_id, - **kwargs + 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)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> TemplateGetResponse: - """Get Template # noqa: E501 - - Returns the Template specified by the `template_id` parameter. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.template_get(template_id, async_req=True) - >>> result = thread.get() - - Args: - template_id (str): The id of the Template to retrieve. - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - TemplateGetResponse - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['template_id'] = \ - template_id - try: - return self.template_get_endpoint.call_with_http_info(**kwargs) - except ApiException as e: - if e.status == 200: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[TemplateGetResponse], - _check_type=True, - ) + """Get Template + + Returns the Template specified by the `template_id` parameter. + + :param template_id: The id of the Template to retrieve. (required) + :type template_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TemplateGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + 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.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[TemplateGetResponse]: + """Get Template + + Returns the Template specified by the `template_id` parameter. + + :param template_id: The id of the Template to retrieve. (required) + :type template_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TemplateGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + 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.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Template + + Returns the Template specified by the `template_id` parameter. + + :param template_id: The id of the Template to retrieve. (required) + :type template_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TemplateGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _template_get_serialize( + self, + template_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if template_id is not None: + _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' + ] + ) - raise e - range_code = "4XX"[0] - range_code_left = int(f"{range_code}00") - range_code_right = int(f"{range_code}99") - if range_code_left <= e.status <= range_code_right: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[ErrorResponse], - _check_type=True, - ) + # authentication setting + _auth_settings: List[str] = [ + 'api_key', + 'oauth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/template/{template_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) - raise e + + + @validate_call def template_list( self, - **kwargs + 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)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> TemplateListResponse: - """List Templates # noqa: E501 - - Returns a list of the Templates that are accessible by you. Take a look at our [search guide](/api/reference/search/) to learn more about querying templates. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.template_list(async_req=True) - >>> result = thread.get() - - - Keyword Args: - account_id (str): Which account to return Templates for. Must be a team member. Use `all` to indicate all team members. Defaults to your account.. [optional] - page (int): Which page number of the Template List to return. Defaults to `1`.. [optional] if omitted the server will use the default value of 1 - page_size (int): Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.. [optional] if omitted the server will use the default value of 20 - query (str): String that includes search terms and/or fields to be used to filter the Template objects.. [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - TemplateListResponse - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - try: - return self.template_list_endpoint.call_with_http_info(**kwargs) - except ApiException as e: - if e.status == 200: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[TemplateListResponse], - _check_type=True, - ) + """List Templates + + Returns a list of the Templates that are accessible by you. Take a look at our [search guide](/api/reference/search/) to learn more about querying templates. + + :param account_id: Which account to return Templates for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. + :type account_id: str + :param page: Which page number of the Template List to return. Defaults to `1`. + :type page: int + :param page_size: Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. + :type page_size: int + :param query: String that includes search terms and/or fields to be used to filter the Template objects. + :type query: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._template_list_serialize( + account_id=account_id, + page=page, + page_size=page_size, + query=query, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TemplateListResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + 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, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[TemplateListResponse]: + """List Templates + + Returns a list of the Templates that are accessible by you. Take a look at our [search guide](/api/reference/search/) to learn more about querying templates. + + :param account_id: Which account to return Templates for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. + :type account_id: str + :param page: Which page number of the Template List to return. Defaults to `1`. + :type page: int + :param page_size: Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. + :type page_size: int + :param query: String that includes search terms and/or fields to be used to filter the Template objects. + :type query: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._template_list_serialize( + account_id=account_id, + page=page, + page_size=page_size, + query=query, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TemplateListResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + 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, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Templates + + Returns a list of the Templates that are accessible by you. Take a look at our [search guide](/api/reference/search/) to learn more about querying templates. + + :param account_id: Which account to return Templates for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. + :type account_id: str + :param page: Which page number of the Template List to return. Defaults to `1`. + :type page: int + :param page_size: Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. + :type page_size: int + :param query: String that includes search terms and/or fields to be used to filter the Template objects. + :type query: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._template_list_serialize( + account_id=account_id, + page=page, + page_size=page_size, + query=query, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TemplateListResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _template_list_serialize( + self, + account_id, + page, + page_size, + query, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if account_id is not None: + + _query_params.append(('account_id', account_id)) + + if page is not None: + + _query_params.append(('page', page)) + + if page_size is not None: + + _query_params.append(('page_size', page_size)) + + if query is not None: + + _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' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'api_key', + 'oauth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/template/list', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) - raise e - range_code = "4XX"[0] - range_code_left = int(f"{range_code}00") - range_code_right = int(f"{range_code}99") - if range_code_left <= e.status <= range_code_right: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[ErrorResponse], - _check_type=True, - ) - raise e + @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_remove_user_request: TemplateRemoveUserRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> TemplateGetResponse: + """Remove User from Template + + Removes the specified Account's access to the specified Template. + + :param template_id: The id of the Template to remove the Account's access to. (required) + :type template_id: str + :param template_remove_user_request: (required) + :type template_remove_user_request: TemplateRemoveUserRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._template_remove_user_serialize( + template_id=template_id, + template_remove_user_request=template_remove_user_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TemplateGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + 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_remove_user_request: TemplateRemoveUserRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[TemplateGetResponse]: + """Remove User from Template + + Removes the specified Account's access to the specified Template. + + :param template_id: The id of the Template to remove the Account's access to. (required) + :type template_id: str + :param template_remove_user_request: (required) + :type template_remove_user_request: TemplateRemoveUserRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._template_remove_user_serialize( + template_id=template_id, + template_remove_user_request=template_remove_user_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TemplateGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + 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_remove_user_request: TemplateRemoveUserRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Remove User from Template + + Removes the specified Account's access to the specified Template. + + :param template_id: The id of the Template to remove the Account's access to. (required) + :type template_id: str + :param template_remove_user_request: (required) + :type template_remove_user_request: TemplateRemoveUserRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._template_remove_user_serialize( + template_id=template_id, + template_remove_user_request=template_remove_user_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TemplateGetResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _template_remove_user_serialize( self, template_id, template_remove_user_request, - **kwargs - ) -> TemplateGetResponse: - """Remove User from Template # noqa: E501 - - Removes the specified Account's access to the specified Template. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.template_remove_user(template_id, template_remove_user_request, async_req=True) - >>> result = thread.get() - - Args: - template_id (str): The id of the Template to remove the Account's access to. - template_remove_user_request (TemplateRemoveUserRequest): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - TemplateGetResponse - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['template_id'] = \ - template_id - kwargs['template_remove_user_request'] = \ - template_remove_user_request - try: - return self.template_remove_user_endpoint.call_with_http_info(**kwargs) - except ApiException as e: - if e.status == 200: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[TemplateGetResponse], - _check_type=True, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + has_files = False + body_param = template_remove_user_request + excluded_json_fields = set([]) + for param_name, param_type in body_param.openapi_types().items(): + param_value = getattr(body_param, param_name) + if param_value is None: + continue + + if "io.IOBase" in param_type: + has_files = True + _content_type = "multipart/form-data" + excluded_json_fields.add(param_name) + + if isinstance(param_value, list): + for index, item in enumerate(param_value): + _files[f'{param_name}[{index}]'] = item + else: + _files[param_name] = param_value + + _form_params = body_param.to_json_form_params(excluded_json_fields) + + # process the path parameters + if template_id is not None: + _path_params['template_id'] = template_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + 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' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _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 - raise e - range_code = "4XX"[0] - range_code_left = int(f"{range_code}00") - range_code_right = int(f"{range_code}99") + # authentication setting + _auth_settings: List[str] = [ + 'api_key', + 'oauth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/template/remove_user/{template_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) - if range_code_left <= e.status <= range_code_right: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[ErrorResponse], - _check_type=True, - ) - raise e + + @validate_call def template_update_files( + self, + 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)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> TemplateUpdateFilesResponse: + """Update Template Files + + Overlays a new file with the overlay of an existing template. The new file(s) must: 1. have the same or higher page count 2. the same orientation as the file(s) being replaced. This will not overwrite or in any way affect the existing template. Both the existing template and new template will be available for use after executing this endpoint. Also note that this will decrement your template quota. Overlaying new files is asynchronous and a successful call to this endpoint will return 200 OK response if the request passes initial validation checks. It is recommended that a callback be implemented to listen for the callback event. A `template_created` event will be sent when the files are updated or a `template_error` event will be sent if there was a problem while updating the files. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the API dashboard and retry the request if necessary. If the page orientation or page count is different from the original template document, we will notify you with a `template_error` [callback event](https://app.hellosign.com/api/eventsAndCallbacksWalkthrough). + + :param template_id: The ID of the template whose files to update. (required) + :type template_id: str + :param template_update_files_request: (required) + :type template_update_files_request: TemplateUpdateFilesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._template_update_files_serialize( + template_id=template_id, + template_update_files_request=template_update_files_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TemplateUpdateFilesResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + 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_update_files_request: TemplateUpdateFilesRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[TemplateUpdateFilesResponse]: + """Update Template Files + + Overlays a new file with the overlay of an existing template. The new file(s) must: 1. have the same or higher page count 2. the same orientation as the file(s) being replaced. This will not overwrite or in any way affect the existing template. Both the existing template and new template will be available for use after executing this endpoint. Also note that this will decrement your template quota. Overlaying new files is asynchronous and a successful call to this endpoint will return 200 OK response if the request passes initial validation checks. It is recommended that a callback be implemented to listen for the callback event. A `template_created` event will be sent when the files are updated or a `template_error` event will be sent if there was a problem while updating the files. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the API dashboard and retry the request if necessary. If the page orientation or page count is different from the original template document, we will notify you with a `template_error` [callback event](https://app.hellosign.com/api/eventsAndCallbacksWalkthrough). + + :param template_id: The ID of the template whose files to update. (required) + :type template_id: str + :param template_update_files_request: (required) + :type template_update_files_request: TemplateUpdateFilesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._template_update_files_serialize( + template_id=template_id, + template_update_files_request=template_update_files_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TemplateUpdateFilesResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + 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_update_files_request: TemplateUpdateFilesRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update Template Files + + Overlays a new file with the overlay of an existing template. The new file(s) must: 1. have the same or higher page count 2. the same orientation as the file(s) being replaced. This will not overwrite or in any way affect the existing template. Both the existing template and new template will be available for use after executing this endpoint. Also note that this will decrement your template quota. Overlaying new files is asynchronous and a successful call to this endpoint will return 200 OK response if the request passes initial validation checks. It is recommended that a callback be implemented to listen for the callback event. A `template_created` event will be sent when the files are updated or a `template_error` event will be sent if there was a problem while updating the files. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the API dashboard and retry the request if necessary. If the page orientation or page count is different from the original template document, we will notify you with a `template_error` [callback event](https://app.hellosign.com/api/eventsAndCallbacksWalkthrough). + + :param template_id: The ID of the template whose files to update. (required) + :type template_id: str + :param template_update_files_request: (required) + :type template_update_files_request: TemplateUpdateFilesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._template_update_files_serialize( + template_id=template_id, + template_update_files_request=template_update_files_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TemplateUpdateFilesResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _template_update_files_serialize( self, template_id, template_update_files_request, - **kwargs - ) -> TemplateUpdateFilesResponse: - """Update Template Files # noqa: E501 - - Overlays a new file with the overlay of an existing template. The new file(s) must: 1. have the same or higher page count 2. the same orientation as the file(s) being replaced. This will not overwrite or in any way affect the existing template. Both the existing template and new template will be available for use after executing this endpoint. Also note that this will decrement your template quota. Overlaying new files is asynchronous and a successful call to this endpoint will return 200 OK response if the request passes initial validation checks. It is recommended that a callback be implemented to listen for the callback event. A `template_created` event will be sent when the files are updated or a `template_error` event will be sent if there was a problem while updating the files. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the API dashboard and retry the request if necessary. If the page orientation or page count is different from the original template document, we will notify you with a `template_error` [callback event](https://app.hellosign.com/api/eventsAndCallbacksWalkthrough). # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.template_update_files(template_id, template_update_files_request, async_req=True) - >>> result = thread.get() - - Args: - template_id (str): The ID of the template whose files to update. - template_update_files_request (TemplateUpdateFilesRequest): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - TemplateUpdateFilesResponse - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['template_id'] = \ - template_id - kwargs['template_update_files_request'] = \ - template_update_files_request - try: - return self.template_update_files_endpoint.call_with_http_info(**kwargs) - except ApiException as e: - if e.status == 200: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[TemplateUpdateFilesResponse], - _check_type=True, - ) - - raise e - range_code = "4XX"[0] - range_code_left = int(f"{range_code}00") - range_code_right = int(f"{range_code}99") - - if range_code_left <= e.status <= range_code_right: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[ErrorResponse], - _check_type=True, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + has_files = False + body_param = template_update_files_request + excluded_json_fields = set([]) + for param_name, param_type in body_param.openapi_types().items(): + param_value = getattr(body_param, param_name) + if param_value is None: + continue + + if "io.IOBase" in param_type: + has_files = True + _content_type = "multipart/form-data" + excluded_json_fields.add(param_name) + + if isinstance(param_value, list): + for index, item in enumerate(param_value): + _files[f'{param_name}[{index}]'] = item + else: + _files[param_name] = param_value + + _form_params = body_param.to_json_form_params(excluded_json_fields) + + # process the path parameters + if template_id is not None: + _path_params['template_id'] = template_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + 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' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _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 + + # authentication setting + _auth_settings: List[str] = [ + 'api_key', + 'oauth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/template/update_files/{template_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) - raise e diff --git a/sdks/python/dropbox_sign/api/unclaimed_draft_api.py b/sdks/python/dropbox_sign/api/unclaimed_draft_api.py index b66f30104..9b12974fe 100644 --- a/sdks/python/dropbox_sign/api/unclaimed_draft_api.py +++ b/sdks/python/dropbox_sign/api/unclaimed_draft_api.py @@ -1,670 +1,1250 @@ +# coding: utf-8 + """ Dropbox Sign API - Dropbox Sign v3 API # noqa: E501 + Dropbox Sign v3 API The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +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.api_client import ApiClient, RequestSerialized +from dropbox_sign.api_response import ApiResponse +from dropbox_sign.rest import RESTResponseType +import io -from __future__ import annotations -import re # noqa: F401 -import sys # noqa: F401 - -from dropbox_sign.api_client import ApiClient, ApiException, Endpoint as _Endpoint -from dropbox_sign.model_utils import ( # noqa: F401 - check_allowed_values, - check_validations, - date, - datetime, - file_type, - none_type, - validate_and_convert_types -) -from dropbox_sign.model.error_response import ErrorResponse -from dropbox_sign.model.unclaimed_draft_create_embedded_request import UnclaimedDraftCreateEmbeddedRequest -from dropbox_sign.model.unclaimed_draft_create_embedded_with_template_request import UnclaimedDraftCreateEmbeddedWithTemplateRequest -from dropbox_sign.model.unclaimed_draft_create_request import UnclaimedDraftCreateRequest -from dropbox_sign.model.unclaimed_draft_create_response import UnclaimedDraftCreateResponse -from dropbox_sign.model.unclaimed_draft_edit_and_resend_request import UnclaimedDraftEditAndResendRequest - - -class UnclaimedDraftApi(object): +class UnclaimedDraftApi: """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech Do not edit the class manually. """ - def __init__(self, api_client=None): + def __init__(self, api_client=None) -> None: if api_client is None: - api_client = ApiClient() + api_client = ApiClient.get_default() self.api_client = api_client - self.unclaimed_draft_create_endpoint = _Endpoint( - settings={ - 'response_type': (UnclaimedDraftCreateResponse,), - 'auth': [ - 'api_key', - 'oauth2' - ], - 'endpoint_path': '/unclaimed_draft/create', - 'operation_id': 'unclaimed_draft_create', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'unclaimed_draft_create_request', - ], - 'required': [ - 'unclaimed_draft_create_request', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'unclaimed_draft_create_request': - (UnclaimedDraftCreateRequest,), - }, - 'attribute_map': { - }, - 'location_map': { - 'unclaimed_draft_create_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json', - 'multipart/form-data' - ] - }, - api_client=api_client - ) - self.unclaimed_draft_create_embedded_endpoint = _Endpoint( - settings={ - 'response_type': (UnclaimedDraftCreateResponse,), - 'auth': [ - 'api_key', - 'oauth2' - ], - 'endpoint_path': '/unclaimed_draft/create_embedded', - 'operation_id': 'unclaimed_draft_create_embedded', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'unclaimed_draft_create_embedded_request', - ], - 'required': [ - 'unclaimed_draft_create_embedded_request', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'unclaimed_draft_create_embedded_request': - (UnclaimedDraftCreateEmbeddedRequest,), - }, - 'attribute_map': { - }, - 'location_map': { - 'unclaimed_draft_create_embedded_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json', - 'multipart/form-data' - ] - }, - api_client=api_client - ) - self.unclaimed_draft_create_embedded_with_template_endpoint = _Endpoint( - settings={ - 'response_type': (UnclaimedDraftCreateResponse,), - 'auth': [ - 'api_key', - 'oauth2' - ], - 'endpoint_path': '/unclaimed_draft/create_embedded_with_template', - 'operation_id': 'unclaimed_draft_create_embedded_with_template', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'unclaimed_draft_create_embedded_with_template_request', - ], - 'required': [ - 'unclaimed_draft_create_embedded_with_template_request', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'unclaimed_draft_create_embedded_with_template_request': - (UnclaimedDraftCreateEmbeddedWithTemplateRequest,), - }, - 'attribute_map': { - }, - 'location_map': { - 'unclaimed_draft_create_embedded_with_template_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json', - 'multipart/form-data' - ] - }, - api_client=api_client - ) - self.unclaimed_draft_edit_and_resend_endpoint = _Endpoint( - settings={ - 'response_type': (UnclaimedDraftCreateResponse,), - 'auth': [ - 'api_key', - 'oauth2' - ], - 'endpoint_path': '/unclaimed_draft/edit_and_resend/{signature_request_id}', - 'operation_id': 'unclaimed_draft_edit_and_resend', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'signature_request_id', - 'unclaimed_draft_edit_and_resend_request', - ], - 'required': [ - 'signature_request_id', - 'unclaimed_draft_edit_and_resend_request', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'signature_request_id': - (str,), - 'unclaimed_draft_edit_and_resend_request': - (UnclaimedDraftEditAndResendRequest,), - }, - 'attribute_map': { - 'signature_request_id': 'signature_request_id', - }, - 'location_map': { - 'signature_request_id': 'path', - 'unclaimed_draft_edit_and_resend_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) + + @validate_call def unclaimed_draft_create( self, - unclaimed_draft_create_request, - **kwargs + unclaimed_draft_create_request: UnclaimedDraftCreateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UnclaimedDraftCreateResponse: - """Create Unclaimed Draft # noqa: E501 - - Creates a new Draft that can be claimed using the claim URL. The first authenticated user to access the URL will claim the Draft and will be shown either the \"Sign and send\" or the \"Request signature\" page with the Draft loaded. Subsequent access to the claim URL will result in a 404. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.unclaimed_draft_create(unclaimed_draft_create_request, async_req=True) - >>> result = thread.get() - - Args: - unclaimed_draft_create_request (UnclaimedDraftCreateRequest): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - UnclaimedDraftCreateResponse - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['unclaimed_draft_create_request'] = \ - unclaimed_draft_create_request - try: - return self.unclaimed_draft_create_endpoint.call_with_http_info(**kwargs) - except ApiException as e: - if e.status == 200: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[UnclaimedDraftCreateResponse], - _check_type=True, - ) + """Create Unclaimed Draft + + Creates a new Draft that can be claimed using the claim URL. The first authenticated user to access the URL will claim the Draft and will be shown either the \"Sign and send\" or the \"Request signature\" page with the Draft loaded. Subsequent access to the claim URL will result in a 404. + + :param unclaimed_draft_create_request: (required) + :type unclaimed_draft_create_request: UnclaimedDraftCreateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UnclaimedDraftCreateResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def unclaimed_draft_create_with_http_info( + self, + unclaimed_draft_create_request: UnclaimedDraftCreateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[UnclaimedDraftCreateResponse]: + """Create Unclaimed Draft + + Creates a new Draft that can be claimed using the claim URL. The first authenticated user to access the URL will claim the Draft and will be shown either the \"Sign and send\" or the \"Request signature\" page with the Draft loaded. Subsequent access to the claim URL will result in a 404. + + :param unclaimed_draft_create_request: (required) + :type unclaimed_draft_create_request: UnclaimedDraftCreateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UnclaimedDraftCreateResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def unclaimed_draft_create_without_preload_content( + self, + unclaimed_draft_create_request: UnclaimedDraftCreateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create Unclaimed Draft + + Creates a new Draft that can be claimed using the claim URL. The first authenticated user to access the URL will claim the Draft and will be shown either the \"Sign and send\" or the \"Request signature\" page with the Draft loaded. Subsequent access to the claim URL will result in a 404. + + :param unclaimed_draft_create_request: (required) + :type unclaimed_draft_create_request: UnclaimedDraftCreateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UnclaimedDraftCreateResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _unclaimed_draft_create_serialize( + self, + unclaimed_draft_create_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + has_files = False + body_param = unclaimed_draft_create_request + excluded_json_fields = set([]) + for param_name, param_type in body_param.openapi_types().items(): + param_value = getattr(body_param, param_name) + if param_value is None: + continue + + if "io.IOBase" in param_type: + has_files = True + _content_type = "multipart/form-data" + excluded_json_fields.add(param_name) + + if isinstance(param_value, list): + for index, item in enumerate(param_value): + _files[f'{param_name}[{index}]'] = item + else: + _files[param_name] = param_value - raise e - range_code = "4XX"[0] - range_code_left = int(f"{range_code}00") - range_code_right = int(f"{range_code}99") + _form_params = body_param.to_json_form_params(excluded_json_fields) - if range_code_left <= e.status <= range_code_right: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[ErrorResponse], - _check_type=True, + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + 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' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _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 + + # authentication setting + _auth_settings: List[str] = [ + 'api_key', + 'oauth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/unclaimed_draft/create', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + - raise e + @validate_call def unclaimed_draft_create_embedded( self, - unclaimed_draft_create_embedded_request, - **kwargs + unclaimed_draft_create_embedded_request: UnclaimedDraftCreateEmbeddedRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UnclaimedDraftCreateResponse: - """Create Embedded Unclaimed Draft # noqa: E501 - - Creates a new Draft that can be claimed and used in an embedded iFrame. The first authenticated user to access the URL will claim the Draft and will be shown the \"Request signature\" page with the Draft loaded. Subsequent access to the claim URL will result in a `404`. For this embedded endpoint the `requester_email_address` parameter is required. **NOTE:** Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.unclaimed_draft_create_embedded(unclaimed_draft_create_embedded_request, async_req=True) - >>> result = thread.get() - - Args: - unclaimed_draft_create_embedded_request (UnclaimedDraftCreateEmbeddedRequest): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - UnclaimedDraftCreateResponse - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['unclaimed_draft_create_embedded_request'] = \ - unclaimed_draft_create_embedded_request - try: - return self.unclaimed_draft_create_embedded_endpoint.call_with_http_info(**kwargs) - except ApiException as e: - if e.status == 200: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[UnclaimedDraftCreateResponse], - _check_type=True, - ) + """Create Embedded Unclaimed Draft + + Creates a new Draft that can be claimed and used in an embedded iFrame. The first authenticated user to access the URL will claim the Draft and will be shown the \"Request signature\" page with the Draft loaded. Subsequent access to the claim URL will result in a `404`. For this embedded endpoint the `requester_email_address` parameter is required. **NOTE:** Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. + + :param unclaimed_draft_create_embedded_request: (required) + :type unclaimed_draft_create_embedded_request: UnclaimedDraftCreateEmbeddedRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UnclaimedDraftCreateResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def unclaimed_draft_create_embedded_with_http_info( + self, + unclaimed_draft_create_embedded_request: UnclaimedDraftCreateEmbeddedRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[UnclaimedDraftCreateResponse]: + """Create Embedded Unclaimed Draft + + Creates a new Draft that can be claimed and used in an embedded iFrame. The first authenticated user to access the URL will claim the Draft and will be shown the \"Request signature\" page with the Draft loaded. Subsequent access to the claim URL will result in a `404`. For this embedded endpoint the `requester_email_address` parameter is required. **NOTE:** Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. + + :param unclaimed_draft_create_embedded_request: (required) + :type unclaimed_draft_create_embedded_request: UnclaimedDraftCreateEmbeddedRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UnclaimedDraftCreateResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def unclaimed_draft_create_embedded_without_preload_content( + self, + unclaimed_draft_create_embedded_request: UnclaimedDraftCreateEmbeddedRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create Embedded Unclaimed Draft + + Creates a new Draft that can be claimed and used in an embedded iFrame. The first authenticated user to access the URL will claim the Draft and will be shown the \"Request signature\" page with the Draft loaded. Subsequent access to the claim URL will result in a `404`. For this embedded endpoint the `requester_email_address` parameter is required. **NOTE:** Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. + + :param unclaimed_draft_create_embedded_request: (required) + :type unclaimed_draft_create_embedded_request: UnclaimedDraftCreateEmbeddedRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UnclaimedDraftCreateResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _unclaimed_draft_create_embedded_serialize( + self, + unclaimed_draft_create_embedded_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + has_files = False + body_param = unclaimed_draft_create_embedded_request + excluded_json_fields = set([]) + for param_name, param_type in body_param.openapi_types().items(): + param_value = getattr(body_param, param_name) + if param_value is None: + continue - raise e - range_code = "4XX"[0] - range_code_left = int(f"{range_code}00") - range_code_right = int(f"{range_code}99") + if "io.IOBase" in param_type: + has_files = True + _content_type = "multipart/form-data" + excluded_json_fields.add(param_name) - if range_code_left <= e.status <= range_code_right: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[ErrorResponse], - _check_type=True, + if isinstance(param_value, list): + for index, item in enumerate(param_value): + _files[f'{param_name}[{index}]'] = item + else: + _files[param_name] = param_value + + _form_params = body_param.to_json_form_params(excluded_json_fields) + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + 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' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _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 - raise e + # authentication setting + _auth_settings: List[str] = [ + 'api_key', + 'oauth2' + ] + return self.api_client.param_serialize( + method='POST', + resource_path='/unclaimed_draft/create_embedded', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def unclaimed_draft_create_embedded_with_template( self, - unclaimed_draft_create_embedded_with_template_request, - **kwargs + unclaimed_draft_create_embedded_with_template_request: UnclaimedDraftCreateEmbeddedWithTemplateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UnclaimedDraftCreateResponse: - """Create Embedded Unclaimed Draft with Template # noqa: E501 - - Creates a new Draft with a previously saved template(s) that can be claimed and used in an embedded iFrame. The first authenticated user to access the URL will claim the Draft and will be shown the \"Request signature\" page with the Draft loaded. Subsequent access to the claim URL will result in a `404`. For this embedded endpoint the `requester_email_address` parameter is required. **NOTE:** Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.unclaimed_draft_create_embedded_with_template(unclaimed_draft_create_embedded_with_template_request, async_req=True) - >>> result = thread.get() - - Args: - unclaimed_draft_create_embedded_with_template_request (UnclaimedDraftCreateEmbeddedWithTemplateRequest): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - UnclaimedDraftCreateResponse - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['unclaimed_draft_create_embedded_with_template_request'] = \ - unclaimed_draft_create_embedded_with_template_request - try: - return self.unclaimed_draft_create_embedded_with_template_endpoint.call_with_http_info(**kwargs) - except ApiException as e: - if e.status == 200: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[UnclaimedDraftCreateResponse], - _check_type=True, - ) + """Create Embedded Unclaimed Draft with Template + + Creates a new Draft with a previously saved template(s) that can be claimed and used in an embedded iFrame. The first authenticated user to access the URL will claim the Draft and will be shown the \"Request signature\" page with the Draft loaded. Subsequent access to the claim URL will result in a `404`. For this embedded endpoint the `requester_email_address` parameter is required. **NOTE:** Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. + + :param unclaimed_draft_create_embedded_with_template_request: (required) + :type unclaimed_draft_create_embedded_with_template_request: UnclaimedDraftCreateEmbeddedWithTemplateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UnclaimedDraftCreateResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def unclaimed_draft_create_embedded_with_template_with_http_info( + self, + unclaimed_draft_create_embedded_with_template_request: UnclaimedDraftCreateEmbeddedWithTemplateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[UnclaimedDraftCreateResponse]: + """Create Embedded Unclaimed Draft with Template + + Creates a new Draft with a previously saved template(s) that can be claimed and used in an embedded iFrame. The first authenticated user to access the URL will claim the Draft and will be shown the \"Request signature\" page with the Draft loaded. Subsequent access to the claim URL will result in a `404`. For this embedded endpoint the `requester_email_address` parameter is required. **NOTE:** Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. + + :param unclaimed_draft_create_embedded_with_template_request: (required) + :type unclaimed_draft_create_embedded_with_template_request: UnclaimedDraftCreateEmbeddedWithTemplateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UnclaimedDraftCreateResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def unclaimed_draft_create_embedded_with_template_without_preload_content( + self, + unclaimed_draft_create_embedded_with_template_request: UnclaimedDraftCreateEmbeddedWithTemplateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create Embedded Unclaimed Draft with Template + + Creates a new Draft with a previously saved template(s) that can be claimed and used in an embedded iFrame. The first authenticated user to access the URL will claim the Draft and will be shown the \"Request signature\" page with the Draft loaded. Subsequent access to the claim URL will result in a `404`. For this embedded endpoint the `requester_email_address` parameter is required. **NOTE:** Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. + + :param unclaimed_draft_create_embedded_with_template_request: (required) + :type unclaimed_draft_create_embedded_with_template_request: UnclaimedDraftCreateEmbeddedWithTemplateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # 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 + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UnclaimedDraftCreateResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_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, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + has_files = False + body_param = unclaimed_draft_create_embedded_with_template_request + excluded_json_fields = set([]) + for param_name, param_type in body_param.openapi_types().items(): + param_value = getattr(body_param, param_name) + if param_value is None: + continue + + if "io.IOBase" in param_type: + has_files = True + _content_type = "multipart/form-data" + excluded_json_fields.add(param_name) + + if isinstance(param_value, list): + for index, item in enumerate(param_value): + _files[f'{param_name}[{index}]'] = item + else: + _files[param_name] = param_value + + _form_params = body_param.to_json_form_params(excluded_json_fields) + + # process the path parameters + # process the query parameters + # 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: + _body_params = unclaimed_draft_create_embedded_with_template_request + - raise e - range_code = "4XX"[0] - range_code_left = int(f"{range_code}00") - range_code_right = int(f"{range_code}99") + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) - if range_code_left <= e.status <= range_code_right: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[ErrorResponse], - _check_type=True, + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _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 + + # authentication setting + _auth_settings: List[str] = [ + 'api_key', + 'oauth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/unclaimed_draft/create_embedded_with_template', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + - raise e + @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.")], + 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)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> UnclaimedDraftCreateResponse: + """Edit and Resend Unclaimed Draft + + Creates a new signature request from an embedded request that can be edited prior to being sent to the recipients. Parameter `test_mode` can be edited prior to request. Signers can be edited in embedded editor. Requester's email address will remain unchanged if `requester_email_address` parameter is not set. **NOTE:** Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. + + :param signature_request_id: The ID of the signature request to edit and resend. (required) + :type signature_request_id: str + :param unclaimed_draft_edit_and_resend_request: (required) + :type unclaimed_draft_edit_and_resend_request: UnclaimedDraftEditAndResendRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._unclaimed_draft_edit_and_resend_serialize( + signature_request_id=signature_request_id, + unclaimed_draft_edit_and_resend_request=unclaimed_draft_edit_and_resend_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UnclaimedDraftCreateResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + 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.")], + 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)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[UnclaimedDraftCreateResponse]: + """Edit and Resend Unclaimed Draft + + Creates a new signature request from an embedded request that can be edited prior to being sent to the recipients. Parameter `test_mode` can be edited prior to request. Signers can be edited in embedded editor. Requester's email address will remain unchanged if `requester_email_address` parameter is not set. **NOTE:** Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. + + :param signature_request_id: The ID of the signature request to edit and resend. (required) + :type signature_request_id: str + :param unclaimed_draft_edit_and_resend_request: (required) + :type unclaimed_draft_edit_and_resend_request: UnclaimedDraftEditAndResendRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._unclaimed_draft_edit_and_resend_serialize( + signature_request_id=signature_request_id, + unclaimed_draft_edit_and_resend_request=unclaimed_draft_edit_and_resend_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UnclaimedDraftCreateResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + 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.")], + 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)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Edit and Resend Unclaimed Draft + + Creates a new signature request from an embedded request that can be edited prior to being sent to the recipients. Parameter `test_mode` can be edited prior to request. Signers can be edited in embedded editor. Requester's email address will remain unchanged if `requester_email_address` parameter is not set. **NOTE:** Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. + + :param signature_request_id: The ID of the signature request to edit and resend. (required) + :type signature_request_id: str + :param unclaimed_draft_edit_and_resend_request: (required) + :type unclaimed_draft_edit_and_resend_request: UnclaimedDraftEditAndResendRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._unclaimed_draft_edit_and_resend_serialize( + signature_request_id=signature_request_id, + unclaimed_draft_edit_and_resend_request=unclaimed_draft_edit_and_resend_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UnclaimedDraftCreateResponse", + '4XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _unclaimed_draft_edit_and_resend_serialize( self, signature_request_id, unclaimed_draft_edit_and_resend_request, - **kwargs - ) -> UnclaimedDraftCreateResponse: - """Edit and Resend Unclaimed Draft # noqa: E501 - - Creates a new signature request from an embedded request that can be edited prior to being sent to the recipients. Parameter `test_mode` can be edited prior to request. Signers can be edited in embedded editor. Requester's email address will remain unchanged if `requester_email_address` parameter is not set. **NOTE:** Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.unclaimed_draft_edit_and_resend(signature_request_id, unclaimed_draft_edit_and_resend_request, async_req=True) - >>> result = thread.get() - - Args: - signature_request_id (str): The ID of the signature request to edit and resend. - unclaimed_draft_edit_and_resend_request (UnclaimedDraftEditAndResendRequest): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - UnclaimedDraftCreateResponse - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['signature_request_id'] = \ - signature_request_id - kwargs['unclaimed_draft_edit_and_resend_request'] = \ - unclaimed_draft_edit_and_resend_request - try: - return self.unclaimed_draft_edit_and_resend_endpoint.call_with_http_info(**kwargs) - except ApiException as e: - if e.status == 200: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[UnclaimedDraftCreateResponse], - _check_type=True, - ) + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None - raise e - range_code = "4XX"[0] - range_code_left = int(f"{range_code}00") - range_code_right = int(f"{range_code}99") + _collection_formats: Dict[str, str] = { + } - if range_code_left <= e.status <= range_code_right: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[ErrorResponse], - _check_type=True, + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + has_files = False + body_param = unclaimed_draft_edit_and_resend_request + excluded_json_fields = set([]) + for param_name, param_type in body_param.openapi_types().items(): + param_value = getattr(body_param, param_name) + if param_value is None: + continue + + if "io.IOBase" in param_type: + has_files = True + _content_type = "multipart/form-data" + excluded_json_fields.add(param_name) + + if isinstance(param_value, list): + for index, item in enumerate(param_value): + _files[f'{param_name}[{index}]'] = item + else: + _files[param_name] = param_value + + _form_params = body_param.to_json_form_params(excluded_json_fields) + + # process the path parameters + if signature_request_id is not None: + _path_params['signature_request_id'] = signature_request_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + 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' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _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 + + # authentication setting + _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}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) - raise e diff --git a/sdks/python/dropbox_sign/api_client.py b/sdks/python/dropbox_sign/api_client.py index f162a0807..9a11e845d 100644 --- a/sdks/python/dropbox_sign/api_client.py +++ b/sdks/python/dropbox_sign/api_client.py @@ -1,46 +1,50 @@ +# coding: utf-8 + """ Dropbox Sign API - Dropbox Sign v3 API # noqa: E501 + Dropbox Sign v3 API The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +import datetime +from dateutil.parser import parse +from enum import Enum +import decimal import json -import atexit import mimetypes -from multiprocessing.pool import ThreadPool -import io import os import re -import typing -from urllib.parse import quote -from urllib3.fields import RequestField +import tempfile +import io +from urllib.parse import quote +from typing import Tuple, Optional, List, Dict, Union +from pydantic import SecretStr -from dropbox_sign import rest from dropbox_sign.configuration import Configuration -from dropbox_sign.exceptions import ApiTypeError, ApiValueError, ApiException -from dropbox_sign.model_utils import ( - ModelNormal, - ModelSimple, - ModelComposed, - check_allowed_values, - check_validations, - date, - datetime, - deserialize_file, - file_type, - model_to_dict, - none_type, - validate_and_convert_types +from dropbox_sign.api_response import ApiResponse, T as ApiResponseT +import dropbox_sign.models +from dropbox_sign import rest +from dropbox_sign.exceptions import ( + ApiValueError, + ApiException, + BadRequestException, + UnauthorizedException, + ForbiddenException, + NotFoundException, + ServiceException ) +RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]] -class ApiClient(object): +class ApiClient: """Generic API client for OpenAPI client library builds. OpenAPI generic API client. This client handles the client- @@ -48,28 +52,39 @@ class ApiClient(object): the methods and models for each application are generated from the OpenAPI templates. - NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - Do not edit the class manually. - :param configuration: .Configuration object for this client :param header_name: a header to pass when making calls to the API. :param header_value: a header value to pass when making calls to the API. :param cookie: a cookie to include in the header when making calls to the API - :param pool_threads: The number of threads to use for async requests - to the API. More threads means more concurrent API requests. """ + 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, + } _pool = None - def __init__(self, configuration=None, header_name=None, header_value=None, - cookie=None, pool_threads=1): + def __init__( + self, + configuration=None, + header_name=None, + header_value=None, + cookie=None + ) -> None: + # use default configuration if none is provided if configuration is None: - configuration = Configuration.get_default_copy() + configuration = Configuration.get_default() self.configuration = configuration - self.pool_threads = pool_threads self.rest_client = rest.RESTClientObject(configuration) self.default_headers = {} @@ -77,31 +92,14 @@ def __init__(self, configuration=None, header_name=None, header_value=None, self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/1.5-dev/python' + self.user_agent = 'OpenAPI-Generator/2.0-dev/python' + self.client_side_validation = configuration.client_side_validation def __enter__(self): return self def __exit__(self, exc_type, exc_value, traceback): - self.close() - - def close(self): - if self._pool: - self._pool.close() - self._pool.join() - self._pool = None - if hasattr(atexit, 'unregister'): - atexit.unregister(self.close) - - @property - def pool(self): - """Create thread pool on first request - avoids instantiating unused threadpool for blocking clients. - """ - if self._pool is None: - atexit.register(self.close) - self._pool = ThreadPool(self.pool_threads) - return self._pool + pass @property def user_agent(self): @@ -115,26 +113,69 @@ def user_agent(self, value): def set_default_header(self, header_name, header_value): self.default_headers[header_name] = header_value - def __call_api( + + _default = None + + @classmethod + def get_default(cls): + """Return new instance of ApiClient. + + This method returns newly created, based on default constructor, + object of ApiClient class or returns a copy of default + ApiClient. + + :return: The ApiClient object. + """ + if cls._default is None: + cls._default = ApiClient() + return cls._default + + @classmethod + def set_default(cls, default): + """Set default instance of ApiClient. + + It stores default ApiClient. + + :param default: object of ApiClient. + """ + cls._default = default + + def param_serialize( self, - resource_path: str, - method: str, - path_params: typing.Optional[typing.Dict[str, typing.Any]] = None, - query_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None, - header_params: typing.Optional[typing.Dict[str, typing.Any]] = None, - body: typing.Optional[typing.Any] = None, - post_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None, - files: typing.Optional[typing.Dict[str, typing.List[io.IOBase]]] = None, - response_type: typing.Optional[typing.Tuple[typing.Any]] = None, - auth_settings: typing.Optional[typing.List[str]] = None, - _return_http_data_only: typing.Optional[bool] = None, - collection_formats: typing.Optional[typing.Dict[str, str]] = None, - _preload_content: bool = True, - _request_timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - _host: typing.Optional[str] = None, - _check_type: typing.Optional[bool] = None, - _content_type: typing.Optional[str] = None - ): + method, + resource_path, + path_params=None, + query_params=None, + header_params=None, + body=None, + post_params=None, + files=None, auth_settings=None, + collection_formats=None, + _host=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. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :return: tuple of form (path, http_method, query_params, header_params, + body, post_params, files) + """ config = self.configuration @@ -145,14 +186,17 @@ def __call_api( 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)) + header_params = dict( + 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( @@ -160,336 +204,269 @@ def __call_api( quote(str(v), safe=config.safe_chars_for_path_param) ) - # query parameters - if query_params: - query_params = self.sanitize_for_serialization(query_params) - query_params = self.parameters_to_tuples(query_params, - collection_formats) - # 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.extend(self.files_parameters(files)) - if header_params['Content-Type'].startswith("multipart"): - post_params = self.parameters_to_multipart(post_params, - (dict) ) + post_params = self.parameters_to_tuples( + post_params, + collection_formats + ) + if files: + post_params.extend(self.files_parameters(files)) + + # auth setting + self.update_params_for_auth( + header_params, + query_params, + auth_settings, + resource_path, + method, + body, + request_auth=_request_auth + ) # body if body: body = self.sanitize_for_serialization(body) - # auth setting - self.update_params_for_auth(header_params, query_params, - auth_settings, resource_path, method, body) - # request url - if _host is None: + if _host is None or self.configuration.ignore_operation_servers: url = self.configuration.host + resource_path else: # use server/host defined in path or operation instead url = _host + resource_path + # 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 += "?" + url_query + + return method, url, header_params, body, post_params + + + def call_api( + self, + method, + url, + header_params=None, + body=None, + post_params=None, + _request_timeout=None + ) -> rest.RESTResponse: + """Makes the HTTP request (synchronous) + :param method: Method to call. + :param url: Path to method endpoint. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param _request_timeout: timeout setting for this request. + :return: RESTResponse + """ + try: # perform request and return response - response_data = self.request( - method, url, query_params=query_params, headers=header_params, - post_params=post_params, body=body, - _preload_content=_preload_content, - _request_timeout=_request_timeout) + response_data = self.rest_client.request( + method, url, + headers=header_params, + body=body, post_params=post_params, + _request_timeout=_request_timeout + ) + except ApiException as e: - e.body = e.body.decode('utf-8') raise e - self.last_response = response_data + return response_data + + def response_deserialize( + self, + response_data: rest.RESTResponse, + response_types_map: Optional[Dict[str, ApiResponseT]]=None + ) -> ApiResponse[ApiResponseT]: + """Deserializes response into an object. + :param response_data: RESTResponse object to be deserialized. + :param response_types_map: dict of response types. + :return: ApiResponse + """ - return_data = response_data + msg = "RESTResponse.read() must be called before passing it to response_deserialize()" + assert response_data.data is not None, msg - if not _preload_content: - return (return_data) - return return_data + 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 found, look for '1XX', '2XX', etc. + response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) # deserialize response data - if response_type: - if response_type != (file_type,): - encoding = "utf-8" + response_text = None + return_data = None + try: + if response_type == "bytearray": + return_data = response_data.data + elif response_type == "file": + return_data = self.__deserialize_file(response_data) + elif response_type is not None: + match = None 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) - if match: - encoding = match.group(1) - response_data.data = response_data.data.decode(encoding) - - return_data = self.deserialize( - response_data, - response_type, - _check_type - ) - else: - return_data = None - - if _return_http_data_only: - return (return_data) - else: - return (return_data, response_data.status, - response_data.getheaders()) + 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) + finally: + if not 200 <= response_data.status <= 299: + raise ApiException.from_response( + http_resp=response_data, + body=response_text, + data=return_data, + ) - def parameters_to_multipart(self, params, collection_types): - """Get parameters as list of tuples, formatting as json if value is collection_types + return ApiResponse( + status_code = response_data.status, + data = return_data, + headers = response_data.getheaders(), + raw_data = response_data.data + ) - :param params: Parameters as list of two-tuples - :param dict collection_types: Parameter collection types - :return: Parameters as list of tuple or urllib3.fields.RequestField - """ - new_params = [] - if collection_types is None: - collection_types = (dict) - for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 - if isinstance(v, collection_types): # v is instance of collection_type, formatting as application/json - v = json.dumps(v, ensure_ascii=False).encode("utf-8") - field = RequestField(k, v) - field.make_multipart(content_type="application/json; charset=utf-8") - new_params.append(field) - else: - new_params.append((k, v)) - return new_params + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. - @classmethod - def sanitize_for_serialization(cls, obj): - """Prepares data for transmission before it is sent with the rest client If obj is None, return None. + If obj is SecretStr, return obj.get_secret_value() If obj is str, int, long, float, bool, return directly. If obj is datetime.datetime, datetime.date convert to string in iso8601 format. + If obj is decimal.Decimal return string representation. If obj is list, sanitize each element in the list. If obj is dict, return the dict. If obj is OpenAPI model, return the properties dict. - If obj is io.IOBase, return the bytes + :param obj: The data to serialize. :return: The serialized form of data. """ - if isinstance(obj, (ModelNormal, ModelComposed)): - return { - key: cls.sanitize_for_serialization(val) for key, val in model_to_dict(obj, serialize=True).items() - } - elif isinstance(obj, io.IOBase): - return cls.get_file_data_and_close_file(obj) - elif isinstance(obj, (str, int, float, none_type, bool)): + if obj is None: + return None + elif isinstance(obj, Enum): + return obj.value + elif isinstance(obj, SecretStr): + return obj.get_secret_value() + elif isinstance(obj, self.PRIMITIVE_TYPES): return obj - elif isinstance(obj, (datetime, date)): + elif isinstance(obj, list): + 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 + ) + elif isinstance(obj, (datetime.datetime, datetime.date)): return obj.isoformat() - elif isinstance(obj, ModelSimple): - return cls.sanitize_for_serialization(obj.value) - elif isinstance(obj, (list, tuple)): - return [cls.sanitize_for_serialization(item) for item in obj] - if isinstance(obj, dict): - return {key: cls.sanitize_for_serialization(val) for key, val in obj.items()} - raise ApiValueError('Unable to prepare type {} for serialization'.format(obj.__class__.__name__)) - - def deserialize(self, response, response_type, _check_type): + elif isinstance(obj, decimal.Decimal): + return str(obj) + + elif isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `openapi_types`, `attribute_map` + # 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')): + obj_dict = obj.to_dict() + else: + obj_dict = obj.__dict__ + + return { + 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]): """Deserializes response into an object. :param response: RESTResponse object to be deserialized. - :param response_type: For the response, a tuple containing: - valid classes - a list containing valid classes (for list schemas) - a dict containing a tuple of valid classes as the value - Example values: - (str,) - (Pet,) - (float, none_type) - ([int, none_type],) - ({str: (bool, str, int, float, date, datetime, str, none_type)},) - :param _check_type: boolean, whether to check the types of the data - received from the server - :type _check_type: bool + :param response_type: class literal for + deserialized object, or string of class name. + :param content_type: content type of response. :return: deserialized object. """ - # handle file downloading - # save response body into a tmp file and return the instance - if response_type == (file_type,): - content_disposition = response.getheader("Content-Disposition") - return deserialize_file(response.data, self.configuration, - content_disposition=content_disposition) # fetch data from response object - try: - received_data = json.loads(response.data) - except TypeError: - received_data = response.data - except ValueError: - received_data = response.data - - # store our data under the key of 'received_data' so users have some - # context if they are deserializing a string and the data type is wrong - deserialized_data = validate_and_convert_types( - received_data, - response_type, - ['received_data'], - True, - _check_type, - configuration=self.configuration - ) - return deserialized_data + if content_type is None: + try: + data = json.loads(response_text) + except ValueError: + data = response_text + elif content_type.startswith("application/json"): + if response_text == "": + data = "" + else: + data = json.loads(response_text) + elif content_type.startswith("text/plain"): + data = response_text + else: + raise ApiException( + status=0, + reason="Unsupported content type: {0}".format(content_type) + ) - def call_api( - self, - resource_path: str, - method: str, - path_params: typing.Optional[typing.Dict[str, typing.Any]] = None, - query_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None, - header_params: typing.Optional[typing.Dict[str, typing.Any]] = None, - body: typing.Optional[typing.Any] = None, - post_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None, - files: typing.Optional[typing.Dict[str, typing.List[io.IOBase]]] = None, - response_type: typing.Optional[typing.Tuple[typing.Any]] = None, - auth_settings: typing.Optional[typing.List[str]] = None, - async_req: typing.Optional[bool] = None, - _return_http_data_only: typing.Optional[bool] = None, - collection_formats: typing.Optional[typing.Dict[str, str]] = None, - _preload_content: bool = True, - _request_timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - _host: typing.Optional[str] = None, - _check_type: typing.Optional[bool] = None - ): - """Makes the HTTP request (synchronous) and returns deserialized data. - - To make an async_req request, set the async_req parameter. + return self.__deserialize(data, response_type) - :param resource_path: Path to method endpoint. - :param method: Method to call. - :param path_params: Path parameters in the url. - :param query_params: Query parameters in the url. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param auth_settings list: Auth Settings names for the request. - :param response_type: For the response, a tuple containing: - valid classes - a list containing valid classes (for list schemas) - a dict containing a tuple of valid classes as the value - Example values: - (str,) - (Pet,) - (float, none_type) - ([int, none_type],) - ({str: (bool, str, int, float, date, datetime, str, none_type)},) - :param files: key -> field name, value -> a list of open file - objects for `multipart/form-data`. - :type files: dict - :param async_req bool: execute request asynchronously - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param collection_formats: dict of collection formats for path, query, - header, and post parameters. - :type collection_formats: dict, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _check_type: boolean describing if the data back from the server - should have its type checked. - :type _check_type: bool, optional - :return: - If async_req parameter is True, - the request will be called asynchronously. - The method will return the request thread. - If parameter async_req is False or missing, - then the method will return the response directly. + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. """ - if not async_req: - return self.__call_api(resource_path, method, - path_params, query_params, header_params, - body, post_params, files, - response_type, auth_settings, - _return_http_data_only, collection_formats, - _preload_content, _request_timeout, _host, - _check_type) - - return self.pool.apply_async(self.__call_api, (resource_path, - method, path_params, - query_params, - header_params, body, - post_params, files, - response_type, - auth_settings, - _return_http_data_only, - collection_formats, - _preload_content, - _request_timeout, - _host, _check_type)) - - def request(self, method, url, query_params=None, headers=None, - post_params=None, body=None, _preload_content=True, - _request_timeout=None): - """Makes the HTTP request using RESTClient.""" - if method == "GET": - return self.rest_client.GET(url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers) - elif method == "HEAD": - return self.rest_client.HEAD(url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers) - elif method == "OPTIONS": - return self.rest_client.OPTIONS(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "POST": - return self.rest_client.POST(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "PUT": - return self.rest_client.PUT(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "PATCH": - return self.rest_client.PATCH(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "DELETE": - return self.rest_client.DELETE(url, - query_params=query_params, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) + if data is None: + return None + + if isinstance(klass, str): + 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] + + 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()} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(dropbox_sign.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_datetime(data) + elif klass == decimal.Decimal: + return decimal.Decimal(data) + elif issubclass(klass, Enum): + return self.__deserialize_enum(data, klass) else: - raise ApiValueError( - "http method must be `GET`, `HEAD`, `OPTIONS`," - " `POST`, `PATCH`, `PUT` or `DELETE`." - ) + return self.__deserialize_model(data, klass) def parameters_to_tuples(self, params, collection_formats): """Get parameters as list of tuples, formatting collections. @@ -498,10 +475,10 @@ def parameters_to_tuples(self, params, collection_formats): :param dict collection_formats: Parameter collection formats :return: Parameters as list of tuples, collections formatted """ - new_params = [] + new_params: List[Tuple[str, str]] = [] if collection_formats is None: collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 + 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': @@ -521,396 +498,296 @@ def parameters_to_tuples(self, params, collection_formats): new_params.append((k, v)) return new_params - @staticmethod - def get_file_data_and_close_file(file_instance: io.IOBase) -> bytes: - file_data = file_instance.read() - file_instance.close() - return file_data - - def files_parameters(self, files: typing.Optional[typing.Dict[str, typing.List[io.IOBase]]] = None): - """Builds form parameters. + def parameters_to_url_query(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. - :param files: None or a dict with key=param_name and - value is a list of open file objects - :return: List of tuples of form parameters with file data + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: URL query string (e.g. a=Hello%20World&b=123) """ - if files is None: - return [] + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if isinstance(v, bool): + v = str(v).lower() + if isinstance(v, (int, float)): + v = str(v) + if isinstance(v, dict): + v = json.dumps(v) - params = [] - for param_name, file_instances in files.items(): - if file_instances is None: - # if the file field is nullable, skip None values - continue - for file_instance in file_instances: - if file_instance is None: - # if the file field is nullable, skip None values - continue - if file_instance.closed is True: - raise ApiValueError( - "Cannot read a closed file. The passed in file_type " - "for %s must be open." % param_name + if k in collection_formats: + collection_format = collection_formats[k] + 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 = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(quote(str(value)) for value in v)) ) - filename = os.path.basename(file_instance.name) - filedata = self.get_file_data_and_close_file(file_instance) - mimetype = (mimetypes.guess_type(filename)[0] or - 'application/octet-stream') - params.append( - tuple([param_name, tuple([filename, filedata, mimetype])])) + else: + new_params.append((k, quote(str(v)))) + return "&".join(["=".join(map(str, item)) for item in new_params]) + + def files_parameters(self, files: Dict[str, Union[str, bytes, io.IOBase]]): + """Builds form parameters. + + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + for k, v in files.items(): + if isinstance(v, str): + with open(v, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + elif isinstance(v, bytes): + filename = k + filedata = v + elif isinstance(v, io.IOBase): + filename = os.path.basename(v.name) + 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])]) + ) return params - def select_header_accept(self, accepts): + def select_header_accept(self, accepts: List[str]) -> Optional[str]: """Returns `Accept` based on an array of accepts provided. :param accepts: List of headers. :return: Accept (e.g. application/json). """ if not accepts: - return + return None - accepts = [x.lower() for x in accepts] + for accept in accepts: + if re.search('json', accept, re.IGNORECASE): + return accept - if 'application/json' in accepts: - return 'application/json' - else: - return ', '.join(accepts) + return accepts[0] - def select_header_content_type(self, content_types, method=None, body=None): + def select_header_content_type(self, content_types): """Returns `Content-Type` based on an array of content_types provided. :param content_types: List of content-types. - :param method: http method (e.g. POST, PATCH). - :param body: http body to send. :return: Content-Type (e.g. application/json). """ if not content_types: - return 'application/json' + return None - content_types = [x.lower() for x in content_types] + for content_type in content_types: + if re.search('json', content_type, re.IGNORECASE): + return content_type - if (method == 'PATCH' and - 'application/json-patch+json' in content_types and - isinstance(body, list)): - return 'application/json-patch+json' + return content_types[0] - if 'application/json' in content_types or '*/*' in content_types: - return 'application/json' - else: - return content_types[0] - - def update_params_for_auth(self, headers, queries, auth_settings, - resource_path, method, body): + def update_params_for_auth( + self, + headers, + queries, + auth_settings, + resource_path, + method, + body, + request_auth=None + ) -> None: """Updates header and query params based on authentication setting. :param headers: Header parameters dict to be updated. :param queries: Query parameters tuple list to be updated. :param auth_settings: Authentication setting identifiers list. - :param resource_path: A string representation of the HTTP request resource path. - :param method: A string representation of the HTTP request method. - :param body: A object representing the body of the HTTP request. - The object type is the return value of _encoder.default(). + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param request_auth: if set, the provided settings will + override the token in the configuration. """ if not auth_settings: return - for auth in auth_settings: - auth_setting = self.configuration.auth_settings().get(auth) - if auth_setting: - 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`' + if request_auth: + self._apply_auth_params( + 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 ) + def _apply_auth_params( + self, + headers, + queries, + resource_path, + method, + body, + auth_setting + ) -> None: + """Updates the request parameters based on a single auth_setting -class Endpoint(object): - def __init__(self, settings=None, params_map=None, root_map=None, - headers_map=None, api_client=None, callable=None): - """Creates an endpoint - - Args: - settings (dict): see below key value pairs - 'response_type' (tuple/None): response type - 'auth' (list): a list of auth type keys - 'endpoint_path' (str): the endpoint path - 'operation_id' (str): endpoint string identifier - 'http_method' (str): POST/PUT/PATCH/GET etc - 'servers' (list): list of str servers that this endpoint is at - params_map (dict): see below key value pairs - 'all' (list): list of str endpoint parameter names - 'required' (list): list of required parameter names - 'nullable' (list): list of nullable parameter names - 'enum' (list): list of parameters with enum values - 'validation' (list): list of parameters with validations - root_map - 'validations' (dict): the dict mapping endpoint parameter tuple - paths to their validation dictionaries - 'allowed_values' (dict): the dict mapping endpoint parameter - tuple paths to their allowed_values (enum) dictionaries - 'openapi_types' (dict): param_name to openapi type - 'attribute_map' (dict): param_name to camelCase name - 'location_map' (dict): param_name to 'body', 'file', 'form', - 'header', 'path', 'query' - collection_format_map (dict): param_name to `csv` etc. - headers_map (dict): see below key value pairs - 'accept' (list): list of Accept header strings - 'content_type' (list): list of Content-Type header strings - api_client (ApiClient) api client instance - callable (function): the function which is invoked when the - Endpoint is called + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param auth_setting: auth settings for the endpoint """ - self.settings = settings - self.params_map = params_map - self.params_map['all'].extend([ - 'async_req', - '_host_index', - '_preload_content', - '_request_timeout', - '_return_http_data_only', - '_check_input_type', - '_check_return_type', - '_content_type', - '_spec_property_naming' - ]) - self.params_map['nullable'].extend(['_request_timeout']) - self.validations = root_map['validations'] - self.allowed_values = root_map['allowed_values'] - self.openapi_types = root_map['openapi_types'] - extra_types = { - 'async_req': (bool,), - '_host_index': (none_type, int), - '_preload_content': (bool,), - '_request_timeout': (none_type, float, (float,), [float], int, (int,), [int]), - '_return_http_data_only': (bool,), - '_check_input_type': (bool,), - '_check_return_type': (bool,), - '_spec_property_naming': (bool,), - '_content_type': (none_type, str) - } - self.openapi_types.update(extra_types) - self.attribute_map = root_map['attribute_map'] - self.location_map = root_map['location_map'] - self.collection_format_map = root_map['collection_format_map'] - self.headers_map = headers_map - self.api_client = api_client - self.callable = callable - - def __validate_inputs(self, kwargs): - for param in self.params_map['enum']: - if param in kwargs: - check_allowed_values( - self.allowed_values, - (param,), - kwargs[param] - ) + 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`' + ) - for param in self.params_map['validation']: - if param in kwargs: - check_validations( - self.validations, - (param,), - kwargs[param], - configuration=self.api_client.configuration - ) + def __deserialize_file(self, response): + """Deserializes body to file - if kwargs['_check_input_type'] is False: - return + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + handle file downloading + save response body into a tmp file and return the instance - for key, value in kwargs.items(): - fixed_val = validate_and_convert_types( - value, - self.openapi_types[key], - [key], - kwargs['_spec_property_naming'], - kwargs['_check_input_type'], - configuration=self.api_client.configuration + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + m = re.search( + r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition ) - kwargs[key] = fixed_val - - def __gather_params(self, kwargs): - params = { - 'body': None, - 'collection_format': {}, - 'file': {}, - 'form': [], - 'header': {}, - 'path': {}, - 'query': [] - } + assert m is not None, "Unexpected 'content-disposition' header value" + filename = m.group(1) + path = os.path.join(os.path.dirname(path), filename) - for param_name, param_value in kwargs.items(): - param_location = self.location_map.get(param_name) - if param_location is None: - continue - if param_location: - if param_location == 'body': - """We want to support a single typed object parameter for all endpoints, - including of multipart/form-data content-types. - """ - body = param_value.to_dict() - remove_files = [] - - for oas_name in param_value.openapi_types: - if hasattr(param_value, oas_name): - obj = param_value[oas_name] - if isinstance(obj, file_type): - params['file'][oas_name] = [obj] - remove_files.append(oas_name) - elif isinstance(obj, list): - i = 0 - for obj_value in obj: - if isinstance(obj_value, file_type): - key = oas_name + '[' + str(i) + ']' - params['file'][key] = [obj_value] - remove_files.append(oas_name) - i += 1 - - # remove duplicates - remove_files = list(set(remove_files)) - - for remove in remove_files: - body.pop(remove) - - if len(remove_files): - for param in body: - param_value_full = (param, body[param]) - - # do not change non-JSON values - if (not isinstance(body[param], (str, bool, int, float))): - param_value_full = (param, json.dumps(body[param])) - - params['form'].append(param_value_full) - else: - params['body'] = param_value - continue - base_name = self.attribute_map[param_name] - if (param_location == 'form' and - self.openapi_types[param_name] == (file_type,)): - params['file'][base_name] = [param_value] - elif (param_location == 'form' and - self.openapi_types[param_name] == ([file_type],)): - # param_value is already a list - params['file'][base_name] = param_value - elif param_location in {'form', 'query'}: - param_value_full = (base_name, param_value) - params[param_location].append(param_value_full) - if param_location not in {'form', 'query'}: - params[param_location][base_name] = param_value - collection_format = self.collection_format_map.get(param_name) - if collection_format: - params['collection_format'][base_name] = collection_format + with open(path, "wb") as f: + f.write(response.data) - return params + return path - def __call__(self, *args, **kwargs): - """ This method is invoked when endpoints are called - Example: + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. - api_instance = AccountApi() - api_instance.account_create # this is an instance of the class Endpoint - api_instance.account_create() # this invokes api_instance.account_create.__call__() - which then invokes the callable functions stored in that endpoint at - api_instance.account_create.callable or self.callable in this class + :param data: str. + :param klass: class literal. + :return: int, long, float, str, bool. """ - return self.callable(self, *args, **kwargs) + try: + return klass(data) + except UnicodeEncodeError: + return str(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return an original value. + + :return: object. + """ + return value - def call_with_http_info(self, **kwargs): + def __deserialize_date(self, string): + """Deserializes string to date. + :param string: str. + :return: date. + """ try: - index = self.api_client.configuration.server_operation_index.get( - self.settings['operation_id'], self.api_client.configuration.server_index - ) if kwargs['_host_index'] is None else kwargs['_host_index'] - server_variables = self.api_client.configuration.server_operation_variables.get( - self.settings['operation_id'], self.api_client.configuration.server_variables - ) - _host = self.api_client.configuration.get_host_from_settings( - index, variables=server_variables, servers=self.settings['servers'] + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) ) - except IndexError: - if self.settings['servers']: - raise ApiValueError( - "Invalid host index. Must be 0 <= index < %s" % - len(self.settings['servers']) - ) - _host = None - - for key, value in kwargs.items(): - if key not in self.params_map['all']: - raise ApiTypeError( - "Got an unexpected parameter '%s'" - " to method `%s`" % - (key, self.settings['operation_id']) - ) - # only throw this nullable ApiValueError if _check_input_type - # is False, if _check_input_type==True we catch this case - # in self.__validate_inputs - if (key not in self.params_map['nullable'] and value is None - and kwargs['_check_input_type'] is False): - raise ApiValueError( - "Value may not be None for non-nullable parameter `%s`" - " when calling `%s`" % - (key, self.settings['operation_id']) - ) - for key in self.params_map['required']: - if key not in kwargs.keys(): - raise ApiValueError( - "Missing the required parameter `%s` when calling " - "`%s`" % (key, self.settings['operation_id']) - ) + def __deserialize_datetime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. - self.__validate_inputs(kwargs) + :param string: str. + :return: datetime. + """ + try: + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) + ) - params = self.__gather_params(kwargs) + def __deserialize_enum(self, data, klass): + """Deserializes primitive type to enum. - # Remove None values from query parameters - query_to_keep = [] - for key, value in params['query']: - if value is not None: - query_to_keep = query_to_keep + [(key, value)] + :param data: primitive type. + :param klass: class literal. + :return: enum value. + """ + try: + return klass(data) + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as `{1}`" + .format(data, klass) + ) + ) - params['query'] = query_to_keep + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. - accept_headers_list = self.headers_map['accept'] - if accept_headers_list: - params['header']['Accept'] = self.api_client.select_header_accept( - accept_headers_list) + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ - if kwargs.get('_content_type'): - params['header']['Content-Type'] = kwargs['_content_type'] - else: - content_type_headers_list = self.headers_map['content_type'] - if content_type_headers_list: - if len(params['form']) > 0 or ('file' in params.keys() and len(params['file']) > 0): - params['header']['Content-Type'] = 'multipart/form-data' - elif params['body'] != "": - header_list = self.api_client.select_header_content_type( - content_type_headers_list, self.settings['http_method'], - params['body']) - params['header']['Content-Type'] = header_list - - return self.api_client.call_api( - self.settings['endpoint_path'], self.settings['http_method'], - params['path'], - params['query'], - params['header'], - body=params['body'], - post_params=params['form'], - files=params['file'], - response_type=self.settings['response_type'], - auth_settings=self.settings['auth'], - async_req=kwargs['async_req'], - _check_type=kwargs['_check_return_type'], - _return_http_data_only=kwargs['_return_http_data_only'], - _preload_content=kwargs['_preload_content'], - _request_timeout=kwargs['_request_timeout'], - _host=_host, - collection_formats=params['collection_format']) + return klass.from_dict(data) diff --git a/sdks/python/dropbox_sign/api_response.py b/sdks/python/dropbox_sign/api_response.py new file mode 100644 index 000000000..9bc7c11f6 --- /dev/null +++ b/sdks/python/dropbox_sign/api_response.py @@ -0,0 +1,21 @@ +"""API response object.""" + +from __future__ import annotations +from typing import Optional, Generic, Mapping, TypeVar +from pydantic import Field, StrictInt, StrictBytes, BaseModel + +T = TypeVar("T") + +class ApiResponse(BaseModel, Generic[T]): + """ + API response object + """ + + status_code: StrictInt = Field(description="HTTP status code") + headers: Optional[Mapping[str, str]] = Field(None, description="HTTP headers") + 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 + } diff --git a/sdks/python/dropbox_sign/apis/__init__.py b/sdks/python/dropbox_sign/apis/__init__.py index 413c12aa2..16344f32d 100644 --- a/sdks/python/dropbox_sign/apis/__init__.py +++ b/sdks/python/dropbox_sign/apis/__init__.py @@ -1,18 +1,5 @@ - # flake8: noqa -# Import all APIs into this package. -# If you have many APIs here with many many models used in each API this may -# raise a `RecursionError`. -# In order to avoid this, import only the API that you directly need like: -# -# from .api.account_api import AccountApi -# -# or import this package, but before doing it, use: -# -# import sys -# sys.setrecursionlimit(n) - # Import APIs into API package: from dropbox_sign.api.account_api import AccountApi from dropbox_sign.api.api_app_api import ApiAppApi diff --git a/sdks/python/dropbox_sign/configuration.py b/sdks/python/dropbox_sign/configuration.py index 59af89232..b5a62eeaa 100644 --- a/sdks/python/dropbox_sign/configuration.py +++ b/sdks/python/dropbox_sign/configuration.py @@ -1,23 +1,27 @@ +# coding: utf-8 + """ Dropbox Sign API - Dropbox Sign v3 API # noqa: E501 + Dropbox Sign v3 API The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 import copy import logging +from logging import FileHandler import multiprocessing import sys +from typing import Optional import urllib3 -from http import client as http_client -from dropbox_sign.exceptions import ApiValueError - +import http.client as httplib JSON_SCHEMA_VALIDATION_KEYWORDS = { 'multipleOf', 'maximum', 'exclusiveMaximum', @@ -25,46 +29,23 @@ 'minLength', 'pattern', 'maxItems', 'minItems' } -class Configuration(object): - """NOTE: This class is auto generated by OpenAPI Generator - - Ref: https://openapi-generator.tech - Do not edit the class manually. +class Configuration: + """This class contains various settings of the API client. - :param host: Base url + :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) + :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 discard_unknown_keys: Boolean value indicating whether to discard - unknown properties. A server may send a response that includes additional - properties that are not known by the client in the following scenarios: - 1. The OpenAPI document is incomplete, i.e. it does not match the server - implementation. - 2. The client was generated using an older version of the OpenAPI document - and the server has been upgraded since then. - If a schema in the OpenAPI document defines the additionalProperties attribute, - then all undeclared properties received by the server are injected into the - additional properties map. In that case, there are undeclared properties, and - nothing to discard. - :param disabled_client_side_validations (string): Comma-separated list of - JSON schema validation keywords to disable JSON schema structural validation - rules. The following keywords may be specified: multipleOf, maximum, - exclusiveMaximum, minimum, exclusiveMinimum, maxLength, minLength, pattern, - maxItems, minItems. - By default, the validation is performed for data generated locally by the client - and data received from the server, independent of any validation performed by - the server side. If the input data does not satisfy the JSON schema validation - rules specified in the OpenAPI document, an exception is raised. - If disabled_client_side_validations is set, structural validation is - disabled. This can be useful to troubleshoot data validation problem, such as - when the OpenAPI document validation rules do not match the actual API data - received by the server. + :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 @@ -73,9 +54,11 @@ class Configuration(object): 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. + 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 + in PEM format. + :param retries: Number of retries for API requests. :Example: @@ -90,8 +73,7 @@ class Configuration(object): Configure API client with HTTP basic authentication: conf = dropbox_sign.Configuration( - username='the-user', - password='the-password', + username='YOUR_API_KEY', ) """ @@ -100,14 +82,16 @@ class Configuration(object): def __init__(self, host=None, api_key=None, api_key_prefix=None, - access_token=None, username=None, password=None, - discard_unknown_keys=False, - disabled_client_side_validations="", + 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 @@ -121,13 +105,15 @@ def __init__(self, host=None, self.server_operation_variables = server_operation_variables or {} """Default server variables """ + self.ignore_operation_servers = ignore_operation_servers + """Ignore operation servers + """ self.temp_folder_path = None """Temp file folder for downloading files """ # Authentication Settings - self.access_token = access_token self.api_key = {} - if api_key: + if api_key and not username: self.api_key = api_key """dict to store API key(s) """ @@ -145,8 +131,9 @@ def __init__(self, host=None, self.password = password """Password for HTTP basic authentication """ - self.discard_unknown_keys = discard_unknown_keys - self.disabled_client_side_validations = disabled_client_side_validations + self.access_token = access_token + """Access token + """ self.logger = {} """Logging Settings """ @@ -158,13 +145,16 @@ def __init__(self, host=None, self.logger_stream_handler = None """Log stream handler """ - self.logger_file_handler = None + self.logger_file_handler: Optional[FileHandler] = None """Log file handler """ self.logger_file = None """Debug file location """ - self.debug = False + if debug is not None: + self.debug = debug + else: + self.__debug = False """Debug switch """ @@ -185,6 +175,10 @@ def __init__(self, host=None, self.assert_hostname = None """Set this to True/False to enable/disable SSL hostname verification. """ + self.tls_server_name = None + """SSL/TLS Server Name Indication (SNI) + Set this to the SNI value expected by the server. + """ self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 """urllib3 connection pool's maximum number of connections saved @@ -194,26 +188,32 @@ def __init__(self, host=None, cpu_count * 5 is used as default value to increase performance. """ - self.proxy = None + self.proxy: Optional[str] = None """Proxy URL """ - self.no_proxy = None - """bypass proxy for host in the no_proxy list. - """ self.proxy_headers = None """Proxy headers """ self.safe_chars_for_path_param = '' """Safe chars for path_param """ - self.retries = None + self.retries = retries """Adding retries to override urllib3 default value 3 """ # Enable client side validation self.client_side_validation = True - # Options to pass down to the underlying urllib3 socket self.socket_options = None + """Options to pass down to the underlying urllib3 socket + """ + + self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" + """datetime format + """ + + self.date_format = "%Y-%m-%d" + """date format + """ def __deepcopy__(self, memo): cls = self.__class__ @@ -231,13 +231,6 @@ def __deepcopy__(self, memo): def __setattr__(self, name, value): object.__setattr__(self, name, value) - if name == 'disabled_client_side_validations': - s = set(filter(None, value.split(','))) - for v in s: - if v not in JSON_SCHEMA_VALIDATION_KEYWORDS: - raise ApiValueError( - "Invalid keyword: '{0}''".format(v)) - self._disabled_client_side_validations = s @classmethod def set_default(cls, default): @@ -248,21 +241,31 @@ def set_default(cls, default): :param default: object of Configuration """ - cls._default = copy.deepcopy(default) + cls._default = default @classmethod def get_default_copy(cls): - """Return new instance of configuration. + """Deprecated. Please use `get_default` instead. + + Deprecated. Please use `get_default` instead. + + :return: The configuration object. + """ + return cls.get_default() + + @classmethod + def get_default(cls): + """Return the default configuration. This method returns newly created, based on default constructor, object of Configuration class or returns a copy of default - configuration passed by the set_default method. + configuration. :return: The configuration object. """ - if cls._default is not None: - return copy.deepcopy(cls._default) - return Configuration() + if cls._default is None: + cls._default = Configuration() + return cls._default @property def logger_file(self): @@ -316,15 +319,15 @@ def debug(self, value): # if debug status is True, turn on debug logging for _, logger in self.logger.items(): logger.setLevel(logging.DEBUG) - # turn on http_client debug - http_client.HTTPConnection.debuglevel = 1 + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 else: # if debug status is False, turn off debug logging, # setting log level to default `logging.WARNING` for _, logger in self.logger.items(): logger.setLevel(logging.WARNING) - # turn off http_client debug - http_client.HTTPConnection.debuglevel = 0 + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 @property def logger_format(self): @@ -387,7 +390,7 @@ def auth_settings(self): :return: The Auth Settings information dict. """ auth = {} - if self.username is not None or self.password is not None: + if self.username is not None: auth['api_key'] = { 'type': 'basic', 'in': 'header', @@ -413,7 +416,7 @@ def to_debug_report(self): "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: 3.0.0\n"\ - "SDK Package Version: 1.5-dev".\ + "SDK Package Version: 2.0-dev".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/sdks/python/dropbox_sign/exceptions.py b/sdks/python/dropbox_sign/exceptions.py index 460c01fc9..33d13477a 100644 --- a/sdks/python/dropbox_sign/exceptions.py +++ b/sdks/python/dropbox_sign/exceptions.py @@ -1,14 +1,19 @@ +# coding: utf-8 + """ Dropbox Sign API - Dropbox Sign v3 API # noqa: E501 + Dropbox Sign v3 API The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 +from typing import Any, Optional +from typing_extensions import Self class OpenApiException(Exception): """The base exception class for all OpenAPIExceptions""" @@ -16,7 +21,7 @@ class OpenApiException(Exception): class ApiTypeError(OpenApiException, TypeError): def __init__(self, msg, path_to_item=None, valid_classes=None, - key_type=None): + key_type=None) -> None: """ Raises an exception for TypeErrors Args: @@ -44,7 +49,7 @@ def __init__(self, msg, path_to_item=None, valid_classes=None, class ApiValueError(OpenApiException, ValueError): - def __init__(self, msg, path_to_item=None): + def __init__(self, msg, path_to_item=None) -> None: """ Args: msg (str): the exception message @@ -62,7 +67,7 @@ def __init__(self, msg, path_to_item=None): class ApiAttributeError(OpenApiException, AttributeError): - def __init__(self, msg, path_to_item=None): + def __init__(self, msg, path_to_item=None) -> None: """ Raised when an attribute reference or assignment fails. @@ -81,7 +86,7 @@ def __init__(self, msg, path_to_item=None): class ApiKeyError(OpenApiException, KeyError): - def __init__(self, msg, path_to_item=None): + def __init__(self, msg, path_to_item=None) -> None: """ Args: msg (str): the exception message @@ -99,17 +104,56 @@ def __init__(self, msg, path_to_item=None): class ApiException(OpenApiException): - def __init__(self, status=None, reason=None, http_resp=None): + def __init__( + self, + status=None, + reason=None, + http_resp=None, + *, + body: Optional[str] = None, + data: Optional[Any] = None, + ) -> None: + self.status = status + self.reason = reason + self.body = body + self.data = data + self.headers = None + if http_resp: - self.status = http_resp.status - self.reason = http_resp.reason - self.body = http_resp.data + if self.status is None: + self.status = http_resp.status + if self.reason is None: + self.reason = http_resp.reason + if self.body is None: + try: + self.body = http_resp.data.decode('utf-8') + except Exception: + pass self.headers = http_resp.getheaders() - else: - self.status = status - self.reason = reason - self.body = None - self.headers = None + + @classmethod + def from_response( + cls, + *, + http_resp, + body: Optional[str], + data: Optional[Any], + ) -> Self: + if http_resp.status == 400: + raise BadRequestException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 401: + raise UnauthorizedException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 403: + raise ForbiddenException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 404: + raise NotFoundException(http_resp=http_resp, body=body, data=data) + + if 500 <= http_resp.status <= 599: + raise ServiceException(http_resp=http_resp, body=body, data=data) + raise ApiException(http_resp=http_resp, body=body, data=data) def __str__(self): """Custom error messages for exception""" @@ -119,34 +163,30 @@ def __str__(self): error_message += "HTTP response headers: {0}\n".format( self.headers) - if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) + if self.data or self.body: + error_message += "HTTP response body: {0}\n".format(self.data or self.body) return error_message -class NotFoundException(ApiException): +class BadRequestException(ApiException): + pass - def __init__(self, status=None, reason=None, http_resp=None): - super(NotFoundException, self).__init__(status, reason, http_resp) +class NotFoundException(ApiException): + pass -class UnauthorizedException(ApiException): - def __init__(self, status=None, reason=None, http_resp=None): - super(UnauthorizedException, self).__init__(status, reason, http_resp) +class UnauthorizedException(ApiException): + pass class ForbiddenException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None): - super(ForbiddenException, self).__init__(status, reason, http_resp) + pass class ServiceException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None): - super(ServiceException, self).__init__(status, reason, http_resp) + pass def render_path(path_to_item): diff --git a/sdks/python/dropbox_sign/model/__init__.py b/sdks/python/dropbox_sign/model/__init__.py deleted file mode 100644 index cfe32b784..000000000 --- a/sdks/python/dropbox_sign/model/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# we can not import model classes here because that would create a circular -# reference which would not work in python2 -# do not import all models into this module because that uses a lot of memory and stack frames -# if you need the ability to import all models from one package, import them with -# from {{packageName}.models import ModelA, ModelB diff --git a/sdks/python/dropbox_sign/model/account_create_request.py b/sdks/python/dropbox_sign/model/account_create_request.py deleted file mode 100644 index 2271c35e1..000000000 --- a/sdks/python/dropbox_sign/model/account_create_request.py +++ /dev/null @@ -1,325 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class AccountCreateRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'email_address': (str,), # noqa: E501 - 'client_id': (str,), # noqa: E501 - 'client_secret': (str,), # noqa: E501 - 'locale': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> AccountCreateRequest: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[AccountCreateRequest], - _check_type=True, - ) - - - attribute_map = { - 'email_address': 'email_address', # noqa: E501 - 'client_id': 'client_id', # noqa: E501 - 'client_secret': 'client_secret', # noqa: E501 - 'locale': 'locale', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def email_address(self) -> str: - return self.get("email_address") - - @email_address.setter - def email_address(self, value: str): - setattr(self, "email_address", value) - - @property - def client_id(self) -> str: - return self.get("client_id") - - @client_id.setter - def client_id(self, value: str): - setattr(self, "client_id", value) - - @property - def client_secret(self) -> str: - return self.get("client_secret") - - @client_secret.setter - def client_secret(self, value: str): - setattr(self, "client_secret", value) - - @property - def locale(self) -> str: - return self.get("locale") - - @locale.setter - def locale(self, value: str): - setattr(self, "locale", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, email_address, *args, **kwargs): # noqa: E501 - """AccountCreateRequest - a model defined in OpenAPI - - Args: - email_address (str): The email address which will be associated with the new Account. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - client_id (str): Used when creating a new account with OAuth authorization. See [OAuth 2.0 Authorization](https://app.hellosign.com/api/oauthWalkthrough#OAuthAuthorization). [optional] # noqa: E501 - client_secret (str): Used when creating a new account with OAuth authorization. See [OAuth 2.0 Authorization](https://app.hellosign.com/api/oauthWalkthrough#OAuthAuthorization). [optional] # noqa: E501 - locale (str): 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.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.email_address = email_address - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, email_address, *args, **kwargs): # noqa: E501 - """AccountCreateRequest - a model defined in OpenAPI - - Args: - email_address (str): The email address which will be associated with the new Account. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - client_id (str): Used when creating a new account with OAuth authorization. See [OAuth 2.0 Authorization](https://app.hellosign.com/api/oauthWalkthrough#OAuthAuthorization). [optional] # noqa: E501 - client_secret (str): Used when creating a new account with OAuth authorization. See [OAuth 2.0 Authorization](https://app.hellosign.com/api/oauthWalkthrough#OAuthAuthorization). [optional] # noqa: E501 - locale (str): 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.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.email_address = email_address - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/account_create_response.py b/sdks/python/dropbox_sign/model/account_create_response.py deleted file mode 100644 index bea340d7a..000000000 --- a/sdks/python/dropbox_sign/model/account_create_response.py +++ /dev/null @@ -1,321 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.account_response import AccountResponse - from dropbox_sign.model.o_auth_token_response import OAuthTokenResponse - from dropbox_sign.model.warning_response import WarningResponse - - -def lazy_import(): - from dropbox_sign.model.account_response import AccountResponse - from dropbox_sign.model.o_auth_token_response import OAuthTokenResponse - from dropbox_sign.model.warning_response import WarningResponse - globals()['AccountResponse'] = AccountResponse - globals()['OAuthTokenResponse'] = OAuthTokenResponse - globals()['WarningResponse'] = WarningResponse - - -class AccountCreateResponse(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'account': (AccountResponse,), # noqa: E501 - 'oauth_data': (OAuthTokenResponse,), # noqa: E501 - 'warnings': ([WarningResponse],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> AccountCreateResponse: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[AccountCreateResponse], - _check_type=True, - ) - - - attribute_map = { - 'account': 'account', # noqa: E501 - 'oauth_data': 'oauth_data', # noqa: E501 - 'warnings': 'warnings', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def account(self) -> AccountResponse: - return self.get("account") - - @account.setter - def account(self, value: AccountResponse): - setattr(self, "account", value) - - @property - def oauth_data(self) -> OAuthTokenResponse: - return self.get("oauth_data") - - @oauth_data.setter - def oauth_data(self, value: OAuthTokenResponse): - setattr(self, "oauth_data", value) - - @property - def warnings(self) -> List[WarningResponse]: - return self.get("warnings") - - @warnings.setter - def warnings(self, value: List[WarningResponse]): - setattr(self, "warnings", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """AccountCreateResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - account (AccountResponse): [optional] # noqa: E501 - oauth_data (OAuthTokenResponse): [optional] # noqa: E501 - warnings ([WarningResponse]): A list of warnings.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """AccountCreateResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - account (AccountResponse): [optional] # noqa: E501 - oauth_data (OAuthTokenResponse): [optional] # noqa: E501 - warnings ([WarningResponse]): A list of warnings.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/account_get_response.py b/sdks/python/dropbox_sign/model/account_get_response.py deleted file mode 100644 index c90fa3a77..000000000 --- a/sdks/python/dropbox_sign/model/account_get_response.py +++ /dev/null @@ -1,306 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.account_response import AccountResponse - from dropbox_sign.model.warning_response import WarningResponse - - -def lazy_import(): - from dropbox_sign.model.account_response import AccountResponse - from dropbox_sign.model.warning_response import WarningResponse - globals()['AccountResponse'] = AccountResponse - globals()['WarningResponse'] = WarningResponse - - -class AccountGetResponse(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'account': (AccountResponse,), # noqa: E501 - 'warnings': ([WarningResponse],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> AccountGetResponse: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[AccountGetResponse], - _check_type=True, - ) - - - attribute_map = { - 'account': 'account', # noqa: E501 - 'warnings': 'warnings', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def account(self) -> AccountResponse: - return self.get("account") - - @account.setter - def account(self, value: AccountResponse): - setattr(self, "account", value) - - @property - def warnings(self) -> List[WarningResponse]: - return self.get("warnings") - - @warnings.setter - def warnings(self, value: List[WarningResponse]): - setattr(self, "warnings", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """AccountGetResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - account (AccountResponse): [optional] # noqa: E501 - warnings ([WarningResponse]): A list of warnings.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """AccountGetResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - account (AccountResponse): [optional] # noqa: E501 - warnings ([WarningResponse]): A list of warnings.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/account_response.py b/sdks/python/dropbox_sign/model/account_response.py deleted file mode 100644 index 54263a9dc..000000000 --- a/sdks/python/dropbox_sign/model/account_response.py +++ /dev/null @@ -1,414 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.account_response_quotas import AccountResponseQuotas - from dropbox_sign.model.account_response_usage import AccountResponseUsage - - -def lazy_import(): - from dropbox_sign.model.account_response_quotas import AccountResponseQuotas - from dropbox_sign.model.account_response_usage import AccountResponseUsage - globals()['AccountResponseQuotas'] = AccountResponseQuotas - globals()['AccountResponseUsage'] = AccountResponseUsage - - -class AccountResponse(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'account_id': (str,), # noqa: E501 - 'email_address': (str,), # noqa: E501 - 'is_locked': (bool,), # noqa: E501 - 'is_paid_hs': (bool,), # noqa: E501 - 'is_paid_hf': (bool,), # noqa: E501 - 'quotas': (AccountResponseQuotas,), # noqa: E501 - 'callback_url': (str, none_type,), # noqa: E501 - 'role_code': (str, none_type,), # noqa: E501 - 'team_id': (str, none_type,), # noqa: E501 - 'locale': (str, none_type,), # noqa: E501 - 'usage': (AccountResponseUsage,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> AccountResponse: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[AccountResponse], - _check_type=True, - ) - - - attribute_map = { - 'account_id': 'account_id', # noqa: E501 - 'email_address': 'email_address', # noqa: E501 - 'is_locked': 'is_locked', # noqa: E501 - 'is_paid_hs': 'is_paid_hs', # noqa: E501 - 'is_paid_hf': 'is_paid_hf', # noqa: E501 - 'quotas': 'quotas', # noqa: E501 - 'callback_url': 'callback_url', # noqa: E501 - 'role_code': 'role_code', # noqa: E501 - 'team_id': 'team_id', # noqa: E501 - 'locale': 'locale', # noqa: E501 - 'usage': 'usage', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def account_id(self) -> str: - return self.get("account_id") - - @account_id.setter - def account_id(self, value: str): - setattr(self, "account_id", value) - - @property - def email_address(self) -> str: - return self.get("email_address") - - @email_address.setter - def email_address(self, value: str): - setattr(self, "email_address", value) - - @property - def is_locked(self) -> bool: - return self.get("is_locked") - - @is_locked.setter - def is_locked(self, value: bool): - setattr(self, "is_locked", value) - - @property - def is_paid_hs(self) -> bool: - return self.get("is_paid_hs") - - @is_paid_hs.setter - def is_paid_hs(self, value: bool): - setattr(self, "is_paid_hs", value) - - @property - def is_paid_hf(self) -> bool: - return self.get("is_paid_hf") - - @is_paid_hf.setter - def is_paid_hf(self, value: bool): - setattr(self, "is_paid_hf", value) - - @property - def quotas(self) -> AccountResponseQuotas: - return self.get("quotas") - - @quotas.setter - def quotas(self, value: AccountResponseQuotas): - setattr(self, "quotas", value) - - @property - def callback_url(self) -> Optional[str]: - return self.get("callback_url") - - @callback_url.setter - def callback_url(self, value: Optional[str]): - setattr(self, "callback_url", value) - - @property - def role_code(self) -> Optional[str]: - return self.get("role_code") - - @role_code.setter - def role_code(self, value: Optional[str]): - setattr(self, "role_code", value) - - @property - def team_id(self) -> Optional[str]: - return self.get("team_id") - - @team_id.setter - def team_id(self, value: Optional[str]): - setattr(self, "team_id", value) - - @property - def locale(self) -> Optional[str]: - return self.get("locale") - - @locale.setter - def locale(self, value: Optional[str]): - setattr(self, "locale", value) - - @property - def usage(self) -> AccountResponseUsage: - return self.get("usage") - - @usage.setter - def usage(self, value: AccountResponseUsage): - setattr(self, "usage", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """AccountResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - account_id (str): The ID of the Account. [optional] # noqa: E501 - email_address (str): The email address associated with the Account.. [optional] # noqa: E501 - is_locked (bool): Returns `true` if the user has been locked out of their account by a team admin.. [optional] # noqa: E501 - is_paid_hs (bool): Returns `true` if the user has a paid Dropbox Sign account.. [optional] # noqa: E501 - is_paid_hf (bool): Returns `true` if the user has a paid HelloFax account.. [optional] # noqa: E501 - quotas (AccountResponseQuotas): [optional] # noqa: E501 - callback_url (str, none_type): The URL that Dropbox Sign events will `POST` to.. [optional] # noqa: E501 - role_code (str, none_type): The membership role for the team.. [optional] # noqa: E501 - team_id (str, none_type): The id of the team account belongs to.. [optional] # noqa: E501 - locale (str, none_type): 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.. [optional] # noqa: E501 - usage (AccountResponseUsage): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """AccountResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - account_id (str): The ID of the Account. [optional] # noqa: E501 - email_address (str): The email address associated with the Account.. [optional] # noqa: E501 - is_locked (bool): Returns `true` if the user has been locked out of their account by a team admin.. [optional] # noqa: E501 - is_paid_hs (bool): Returns `true` if the user has a paid Dropbox Sign account.. [optional] # noqa: E501 - is_paid_hf (bool): Returns `true` if the user has a paid HelloFax account.. [optional] # noqa: E501 - quotas (AccountResponseQuotas): [optional] # noqa: E501 - callback_url (str, none_type): The URL that Dropbox Sign events will `POST` to.. [optional] # noqa: E501 - role_code (str, none_type): The membership role for the team.. [optional] # noqa: E501 - team_id (str, none_type): The id of the team account belongs to.. [optional] # noqa: E501 - locale (str, none_type): 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.. [optional] # noqa: E501 - usage (AccountResponseUsage): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/account_response_quotas.py b/sdks/python/dropbox_sign/model/account_response_quotas.py deleted file mode 100644 index 1e588f3f4..000000000 --- a/sdks/python/dropbox_sign/model/account_response_quotas.py +++ /dev/null @@ -1,343 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class AccountResponseQuotas(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'api_signature_requests_left': (int, none_type,), # noqa: E501 - 'documents_left': (int, none_type,), # noqa: E501 - 'templates_total': (int, none_type,), # noqa: E501 - 'templates_left': (int, none_type,), # noqa: E501 - 'sms_verifications_left': (int, none_type,), # noqa: E501 - 'num_fax_pages_left': (int, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> AccountResponseQuotas: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[AccountResponseQuotas], - _check_type=True, - ) - - - attribute_map = { - 'api_signature_requests_left': 'api_signature_requests_left', # noqa: E501 - 'documents_left': 'documents_left', # noqa: E501 - 'templates_total': 'templates_total', # noqa: E501 - 'templates_left': 'templates_left', # noqa: E501 - 'sms_verifications_left': 'sms_verifications_left', # noqa: E501 - 'num_fax_pages_left': 'num_fax_pages_left', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def api_signature_requests_left(self) -> Optional[int]: - return self.get("api_signature_requests_left") - - @api_signature_requests_left.setter - def api_signature_requests_left(self, value: Optional[int]): - setattr(self, "api_signature_requests_left", value) - - @property - def documents_left(self) -> Optional[int]: - return self.get("documents_left") - - @documents_left.setter - def documents_left(self, value: Optional[int]): - setattr(self, "documents_left", value) - - @property - def templates_total(self) -> Optional[int]: - return self.get("templates_total") - - @templates_total.setter - def templates_total(self, value: Optional[int]): - setattr(self, "templates_total", value) - - @property - def templates_left(self) -> Optional[int]: - return self.get("templates_left") - - @templates_left.setter - def templates_left(self, value: Optional[int]): - setattr(self, "templates_left", value) - - @property - def sms_verifications_left(self) -> Optional[int]: - return self.get("sms_verifications_left") - - @sms_verifications_left.setter - def sms_verifications_left(self, value: Optional[int]): - setattr(self, "sms_verifications_left", value) - - @property - def num_fax_pages_left(self) -> Optional[int]: - return self.get("num_fax_pages_left") - - @num_fax_pages_left.setter - def num_fax_pages_left(self, value: Optional[int]): - setattr(self, "num_fax_pages_left", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """AccountResponseQuotas - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - api_signature_requests_left (int, none_type): API signature requests remaining.. [optional] # noqa: E501 - documents_left (int, none_type): Signature requests remaining.. [optional] # noqa: E501 - templates_total (int, none_type): Total API templates allowed.. [optional] # noqa: E501 - templates_left (int, none_type): API templates remaining.. [optional] # noqa: E501 - sms_verifications_left (int, none_type): SMS verifications remaining.. [optional] # noqa: E501 - num_fax_pages_left (int, none_type): Number of fax pages left. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """AccountResponseQuotas - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - api_signature_requests_left (int, none_type): API signature requests remaining.. [optional] # noqa: E501 - documents_left (int, none_type): Signature requests remaining.. [optional] # noqa: E501 - templates_total (int, none_type): Total API templates allowed.. [optional] # noqa: E501 - templates_left (int, none_type): API templates remaining.. [optional] # noqa: E501 - sms_verifications_left (int, none_type): SMS verifications remaining.. [optional] # noqa: E501 - num_fax_pages_left (int, none_type): Number of fax pages left. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/account_response_usage.py b/sdks/python/dropbox_sign/model/account_response_usage.py deleted file mode 100644 index c1c6bfa52..000000000 --- a/sdks/python/dropbox_sign/model/account_response_usage.py +++ /dev/null @@ -1,283 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class AccountResponseUsage(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'fax_pages_sent': (int, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> AccountResponseUsage: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[AccountResponseUsage], - _check_type=True, - ) - - - attribute_map = { - 'fax_pages_sent': 'fax_pages_sent', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def fax_pages_sent(self) -> Optional[int]: - return self.get("fax_pages_sent") - - @fax_pages_sent.setter - def fax_pages_sent(self, value: Optional[int]): - setattr(self, "fax_pages_sent", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """AccountResponseUsage - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - fax_pages_sent (int, none_type): Number of fax pages sent. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """AccountResponseUsage - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - fax_pages_sent (int, none_type): Number of fax pages sent. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/account_update_request.py b/sdks/python/dropbox_sign/model/account_update_request.py deleted file mode 100644 index 3693e56b6..000000000 --- a/sdks/python/dropbox_sign/model/account_update_request.py +++ /dev/null @@ -1,307 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class AccountUpdateRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'account_id': (str, none_type,), # noqa: E501 - 'callback_url': (str,), # noqa: E501 - 'locale': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> AccountUpdateRequest: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[AccountUpdateRequest], - _check_type=True, - ) - - - attribute_map = { - 'account_id': 'account_id', # noqa: E501 - 'callback_url': 'callback_url', # noqa: E501 - 'locale': 'locale', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def account_id(self) -> Optional[str]: - return self.get("account_id") - - @account_id.setter - def account_id(self, value: Optional[str]): - setattr(self, "account_id", value) - - @property - def callback_url(self) -> str: - return self.get("callback_url") - - @callback_url.setter - def callback_url(self, value: str): - setattr(self, "callback_url", value) - - @property - def locale(self) -> str: - return self.get("locale") - - @locale.setter - def locale(self, value: str): - setattr(self, "locale", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """AccountUpdateRequest - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - account_id (str, none_type): The ID of the Account. [optional] # noqa: E501 - callback_url (str): The URL that Dropbox Sign should POST events to.. [optional] # noqa: E501 - locale (str): 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.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """AccountUpdateRequest - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - account_id (str, none_type): The ID of the Account. [optional] # noqa: E501 - callback_url (str): The URL that Dropbox Sign should POST events to.. [optional] # noqa: E501 - locale (str): 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.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/account_verify_request.py b/sdks/python/dropbox_sign/model/account_verify_request.py deleted file mode 100644 index 1d9096149..000000000 --- a/sdks/python/dropbox_sign/model/account_verify_request.py +++ /dev/null @@ -1,289 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class AccountVerifyRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'email_address': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> AccountVerifyRequest: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[AccountVerifyRequest], - _check_type=True, - ) - - - attribute_map = { - 'email_address': 'email_address', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def email_address(self) -> str: - return self.get("email_address") - - @email_address.setter - def email_address(self, value: str): - setattr(self, "email_address", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, email_address, *args, **kwargs): # noqa: E501 - """AccountVerifyRequest - a model defined in OpenAPI - - Args: - email_address (str): Email address to run the verification for. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.email_address = email_address - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, email_address, *args, **kwargs): # noqa: E501 - """AccountVerifyRequest - a model defined in OpenAPI - - Args: - email_address (str): Email address to run the verification for. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.email_address = email_address - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/account_verify_response.py b/sdks/python/dropbox_sign/model/account_verify_response.py deleted file mode 100644 index 520d4f728..000000000 --- a/sdks/python/dropbox_sign/model/account_verify_response.py +++ /dev/null @@ -1,306 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.account_verify_response_account import AccountVerifyResponseAccount - from dropbox_sign.model.warning_response import WarningResponse - - -def lazy_import(): - from dropbox_sign.model.account_verify_response_account import AccountVerifyResponseAccount - from dropbox_sign.model.warning_response import WarningResponse - globals()['AccountVerifyResponseAccount'] = AccountVerifyResponseAccount - globals()['WarningResponse'] = WarningResponse - - -class AccountVerifyResponse(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'account': (AccountVerifyResponseAccount,), # noqa: E501 - 'warnings': ([WarningResponse],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> AccountVerifyResponse: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[AccountVerifyResponse], - _check_type=True, - ) - - - attribute_map = { - 'account': 'account', # noqa: E501 - 'warnings': 'warnings', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def account(self) -> AccountVerifyResponseAccount: - return self.get("account") - - @account.setter - def account(self, value: AccountVerifyResponseAccount): - setattr(self, "account", value) - - @property - def warnings(self) -> List[WarningResponse]: - return self.get("warnings") - - @warnings.setter - def warnings(self, value: List[WarningResponse]): - setattr(self, "warnings", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """AccountVerifyResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - account (AccountVerifyResponseAccount): [optional] # noqa: E501 - warnings ([WarningResponse]): A list of warnings.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """AccountVerifyResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - account (AccountVerifyResponseAccount): [optional] # noqa: E501 - warnings ([WarningResponse]): A list of warnings.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/account_verify_response_account.py b/sdks/python/dropbox_sign/model/account_verify_response_account.py deleted file mode 100644 index 64d9e5a78..000000000 --- a/sdks/python/dropbox_sign/model/account_verify_response_account.py +++ /dev/null @@ -1,283 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class AccountVerifyResponseAccount(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'email_address': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> AccountVerifyResponseAccount: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[AccountVerifyResponseAccount], - _check_type=True, - ) - - - attribute_map = { - 'email_address': 'email_address', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def email_address(self) -> str: - return self.get("email_address") - - @email_address.setter - def email_address(self, value: str): - setattr(self, "email_address", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """AccountVerifyResponseAccount - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - email_address (str): The email address associated with the Account.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """AccountVerifyResponseAccount - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - email_address (str): The email address associated with the Account.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/api_app_create_request.py b/sdks/python/dropbox_sign/model/api_app_create_request.py deleted file mode 100644 index dcd165b39..000000000 --- a/sdks/python/dropbox_sign/model/api_app_create_request.py +++ /dev/null @@ -1,381 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.sub_o_auth import SubOAuth - from dropbox_sign.model.sub_options import SubOptions - from dropbox_sign.model.sub_white_labeling_options import SubWhiteLabelingOptions - - -def lazy_import(): - from dropbox_sign.model.sub_o_auth import SubOAuth - from dropbox_sign.model.sub_options import SubOptions - from dropbox_sign.model.sub_white_labeling_options import SubWhiteLabelingOptions - globals()['SubOAuth'] = SubOAuth - globals()['SubOptions'] = SubOptions - globals()['SubWhiteLabelingOptions'] = SubWhiteLabelingOptions - - -class ApiAppCreateRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - ('domains',): { - 'max_items': 2, - 'min_items': 1, - }, - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'domains': ([str],), # noqa: E501 - 'name': (str,), # noqa: E501 - 'callback_url': (str,), # noqa: E501 - 'custom_logo_file': (file_type,), # noqa: E501 - 'oauth': (SubOAuth,), # noqa: E501 - 'options': (SubOptions,), # noqa: E501 - 'white_labeling_options': (SubWhiteLabelingOptions,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> ApiAppCreateRequest: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[ApiAppCreateRequest], - _check_type=True, - ) - - - attribute_map = { - 'domains': 'domains', # noqa: E501 - 'name': 'name', # noqa: E501 - 'callback_url': 'callback_url', # noqa: E501 - 'custom_logo_file': 'custom_logo_file', # noqa: E501 - 'oauth': 'oauth', # noqa: E501 - 'options': 'options', # noqa: E501 - 'white_labeling_options': 'white_labeling_options', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def domains(self) -> List[str]: - return self.get("domains") - - @domains.setter - def domains(self, value: List[str]): - setattr(self, "domains", value) - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def callback_url(self) -> str: - return self.get("callback_url") - - @callback_url.setter - def callback_url(self, value: str): - setattr(self, "callback_url", value) - - @property - def custom_logo_file(self) -> file_type: - return self.get("custom_logo_file") - - @custom_logo_file.setter - def custom_logo_file(self, value: file_type): - setattr(self, "custom_logo_file", value) - - @property - def oauth(self) -> SubOAuth: - return self.get("oauth") - - @oauth.setter - def oauth(self, value: SubOAuth): - setattr(self, "oauth", value) - - @property - def options(self) -> SubOptions: - return self.get("options") - - @options.setter - def options(self, value: SubOptions): - setattr(self, "options", value) - - @property - def white_labeling_options(self) -> SubWhiteLabelingOptions: - return self.get("white_labeling_options") - - @white_labeling_options.setter - def white_labeling_options(self, value: SubWhiteLabelingOptions): - setattr(self, "white_labeling_options", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, domains, name, *args, **kwargs): # noqa: E501 - """ApiAppCreateRequest - a model defined in OpenAPI - - Args: - domains ([str]): The domain names the ApiApp will be associated with. - name (str): The name you want to assign to the ApiApp. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - callback_url (str): The URL at which the ApiApp should receive event callbacks.. [optional] # noqa: E501 - custom_logo_file (file_type): An image file to use as a custom logo in embedded contexts. (Only applies to some API plans). [optional] # noqa: E501 - oauth (SubOAuth): [optional] # noqa: E501 - options (SubOptions): [optional] # noqa: E501 - white_labeling_options (SubWhiteLabelingOptions): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.domains = domains - self.name = name - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, domains, name, *args, **kwargs): # noqa: E501 - """ApiAppCreateRequest - a model defined in OpenAPI - - Args: - domains ([str]): The domain names the ApiApp will be associated with. - name (str): The name you want to assign to the ApiApp. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - callback_url (str): The URL at which the ApiApp should receive event callbacks.. [optional] # noqa: E501 - custom_logo_file (file_type): An image file to use as a custom logo in embedded contexts. (Only applies to some API plans). [optional] # noqa: E501 - oauth (SubOAuth): [optional] # noqa: E501 - options (SubOptions): [optional] # noqa: E501 - white_labeling_options (SubWhiteLabelingOptions): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.domains = domains - self.name = name - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/api_app_get_response.py b/sdks/python/dropbox_sign/model/api_app_get_response.py deleted file mode 100644 index 3ab6bd00a..000000000 --- a/sdks/python/dropbox_sign/model/api_app_get_response.py +++ /dev/null @@ -1,306 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.api_app_response import ApiAppResponse - from dropbox_sign.model.warning_response import WarningResponse - - -def lazy_import(): - from dropbox_sign.model.api_app_response import ApiAppResponse - from dropbox_sign.model.warning_response import WarningResponse - globals()['ApiAppResponse'] = ApiAppResponse - globals()['WarningResponse'] = WarningResponse - - -class ApiAppGetResponse(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'api_app': (ApiAppResponse,), # noqa: E501 - 'warnings': ([WarningResponse],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> ApiAppGetResponse: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[ApiAppGetResponse], - _check_type=True, - ) - - - attribute_map = { - 'api_app': 'api_app', # noqa: E501 - 'warnings': 'warnings', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def api_app(self) -> ApiAppResponse: - return self.get("api_app") - - @api_app.setter - def api_app(self, value: ApiAppResponse): - setattr(self, "api_app", value) - - @property - def warnings(self) -> List[WarningResponse]: - return self.get("warnings") - - @warnings.setter - def warnings(self, value: List[WarningResponse]): - setattr(self, "warnings", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ApiAppGetResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - api_app (ApiAppResponse): [optional] # noqa: E501 - warnings ([WarningResponse]): A list of warnings.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ApiAppGetResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - api_app (ApiAppResponse): [optional] # noqa: E501 - warnings ([WarningResponse]): A list of warnings.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/api_app_list_response.py b/sdks/python/dropbox_sign/model/api_app_list_response.py deleted file mode 100644 index 62bd5a75c..000000000 --- a/sdks/python/dropbox_sign/model/api_app_list_response.py +++ /dev/null @@ -1,321 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.api_app_response import ApiAppResponse - from dropbox_sign.model.list_info_response import ListInfoResponse - from dropbox_sign.model.warning_response import WarningResponse - - -def lazy_import(): - from dropbox_sign.model.api_app_response import ApiAppResponse - from dropbox_sign.model.list_info_response import ListInfoResponse - from dropbox_sign.model.warning_response import WarningResponse - globals()['ApiAppResponse'] = ApiAppResponse - globals()['ListInfoResponse'] = ListInfoResponse - globals()['WarningResponse'] = WarningResponse - - -class ApiAppListResponse(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'api_apps': ([ApiAppResponse],), # noqa: E501 - 'list_info': (ListInfoResponse,), # noqa: E501 - 'warnings': ([WarningResponse],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> ApiAppListResponse: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[ApiAppListResponse], - _check_type=True, - ) - - - attribute_map = { - 'api_apps': 'api_apps', # noqa: E501 - 'list_info': 'list_info', # noqa: E501 - 'warnings': 'warnings', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def api_apps(self) -> List[ApiAppResponse]: - return self.get("api_apps") - - @api_apps.setter - def api_apps(self, value: List[ApiAppResponse]): - setattr(self, "api_apps", value) - - @property - def list_info(self) -> ListInfoResponse: - return self.get("list_info") - - @list_info.setter - def list_info(self, value: ListInfoResponse): - setattr(self, "list_info", value) - - @property - def warnings(self) -> List[WarningResponse]: - return self.get("warnings") - - @warnings.setter - def warnings(self, value: List[WarningResponse]): - setattr(self, "warnings", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ApiAppListResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - api_apps ([ApiAppResponse]): Contains information about API Apps.. [optional] # noqa: E501 - list_info (ListInfoResponse): [optional] # noqa: E501 - warnings ([WarningResponse]): A list of warnings.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ApiAppListResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - api_apps ([ApiAppResponse]): Contains information about API Apps.. [optional] # noqa: E501 - list_info (ListInfoResponse): [optional] # noqa: E501 - warnings ([WarningResponse]): A list of warnings.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/api_app_response.py b/sdks/python/dropbox_sign/model/api_app_response.py deleted file mode 100644 index 7d5852732..000000000 --- a/sdks/python/dropbox_sign/model/api_app_response.py +++ /dev/null @@ -1,408 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.api_app_response_o_auth import ApiAppResponseOAuth - from dropbox_sign.model.api_app_response_options import ApiAppResponseOptions - from dropbox_sign.model.api_app_response_owner_account import ApiAppResponseOwnerAccount - from dropbox_sign.model.api_app_response_white_labeling_options import ApiAppResponseWhiteLabelingOptions - - -def lazy_import(): - from dropbox_sign.model.api_app_response_o_auth import ApiAppResponseOAuth - from dropbox_sign.model.api_app_response_options import ApiAppResponseOptions - from dropbox_sign.model.api_app_response_owner_account import ApiAppResponseOwnerAccount - from dropbox_sign.model.api_app_response_white_labeling_options import ApiAppResponseWhiteLabelingOptions - globals()['ApiAppResponseOAuth'] = ApiAppResponseOAuth - globals()['ApiAppResponseOptions'] = ApiAppResponseOptions - globals()['ApiAppResponseOwnerAccount'] = ApiAppResponseOwnerAccount - globals()['ApiAppResponseWhiteLabelingOptions'] = ApiAppResponseWhiteLabelingOptions - - -class ApiAppResponse(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'callback_url': (str, none_type,), # noqa: E501 - 'client_id': (str,), # noqa: E501 - 'created_at': (int,), # noqa: E501 - 'domains': ([str],), # noqa: E501 - 'name': (str,), # noqa: E501 - 'is_approved': (bool,), # noqa: E501 - 'oauth': (ApiAppResponseOAuth,), # noqa: E501 - 'options': (ApiAppResponseOptions,), # noqa: E501 - 'owner_account': (ApiAppResponseOwnerAccount,), # noqa: E501 - 'white_labeling_options': (ApiAppResponseWhiteLabelingOptions,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> ApiAppResponse: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[ApiAppResponse], - _check_type=True, - ) - - - attribute_map = { - 'callback_url': 'callback_url', # noqa: E501 - 'client_id': 'client_id', # noqa: E501 - 'created_at': 'created_at', # noqa: E501 - 'domains': 'domains', # noqa: E501 - 'name': 'name', # noqa: E501 - 'is_approved': 'is_approved', # noqa: E501 - 'oauth': 'oauth', # noqa: E501 - 'options': 'options', # noqa: E501 - 'owner_account': 'owner_account', # noqa: E501 - 'white_labeling_options': 'white_labeling_options', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def callback_url(self) -> Optional[str]: - return self.get("callback_url") - - @callback_url.setter - def callback_url(self, value: Optional[str]): - setattr(self, "callback_url", value) - - @property - def client_id(self) -> str: - return self.get("client_id") - - @client_id.setter - def client_id(self, value: str): - setattr(self, "client_id", value) - - @property - def created_at(self) -> int: - return self.get("created_at") - - @created_at.setter - def created_at(self, value: int): - setattr(self, "created_at", value) - - @property - def domains(self) -> List[str]: - return self.get("domains") - - @domains.setter - def domains(self, value: List[str]): - setattr(self, "domains", value) - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def is_approved(self) -> bool: - return self.get("is_approved") - - @is_approved.setter - def is_approved(self, value: bool): - setattr(self, "is_approved", value) - - @property - def oauth(self) -> ApiAppResponseOAuth: - return self.get("oauth") - - @oauth.setter - def oauth(self, value: ApiAppResponseOAuth): - setattr(self, "oauth", value) - - @property - def options(self) -> ApiAppResponseOptions: - return self.get("options") - - @options.setter - def options(self, value: ApiAppResponseOptions): - setattr(self, "options", value) - - @property - def owner_account(self) -> ApiAppResponseOwnerAccount: - return self.get("owner_account") - - @owner_account.setter - def owner_account(self, value: ApiAppResponseOwnerAccount): - setattr(self, "owner_account", value) - - @property - def white_labeling_options(self) -> ApiAppResponseWhiteLabelingOptions: - return self.get("white_labeling_options") - - @white_labeling_options.setter - def white_labeling_options(self, value: ApiAppResponseWhiteLabelingOptions): - setattr(self, "white_labeling_options", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ApiAppResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - callback_url (str, none_type): The app's callback URL (for events). [optional] # noqa: E501 - client_id (str): The app's client id. [optional] # noqa: E501 - created_at (int): The time that the app was created. [optional] # noqa: E501 - domains ([str]): The domain name(s) associated with the app. [optional] # noqa: E501 - name (str): The name of the app. [optional] # noqa: E501 - is_approved (bool): Boolean to indicate if the app has been approved. [optional] # noqa: E501 - oauth (ApiAppResponseOAuth): [optional] # noqa: E501 - options (ApiAppResponseOptions): [optional] # noqa: E501 - owner_account (ApiAppResponseOwnerAccount): [optional] # noqa: E501 - white_labeling_options (ApiAppResponseWhiteLabelingOptions): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ApiAppResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - callback_url (str, none_type): The app's callback URL (for events). [optional] # noqa: E501 - client_id (str): The app's client id. [optional] # noqa: E501 - created_at (int): The time that the app was created. [optional] # noqa: E501 - domains ([str]): The domain name(s) associated with the app. [optional] # noqa: E501 - name (str): The name of the app. [optional] # noqa: E501 - is_approved (bool): Boolean to indicate if the app has been approved. [optional] # noqa: E501 - oauth (ApiAppResponseOAuth): [optional] # noqa: E501 - options (ApiAppResponseOptions): [optional] # noqa: E501 - owner_account (ApiAppResponseOwnerAccount): [optional] # noqa: E501 - white_labeling_options (ApiAppResponseWhiteLabelingOptions): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/api_app_response_o_auth.py b/sdks/python/dropbox_sign/model/api_app_response_o_auth.py deleted file mode 100644 index 26d525b28..000000000 --- a/sdks/python/dropbox_sign/model/api_app_response_o_auth.py +++ /dev/null @@ -1,319 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class ApiAppResponseOAuth(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = True - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'callback_url': (str,), # noqa: E501 - 'secret': (str,), # noqa: E501 - 'scopes': ([str],), # noqa: E501 - 'charges_users': (bool,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> ApiAppResponseOAuth: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[ApiAppResponseOAuth], - _check_type=True, - ) - - - attribute_map = { - 'callback_url': 'callback_url', # noqa: E501 - 'secret': 'secret', # noqa: E501 - 'scopes': 'scopes', # noqa: E501 - 'charges_users': 'charges_users', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def callback_url(self) -> str: - return self.get("callback_url") - - @callback_url.setter - def callback_url(self, value: str): - setattr(self, "callback_url", value) - - @property - def secret(self) -> str: - return self.get("secret") - - @secret.setter - def secret(self, value: str): - setattr(self, "secret", value) - - @property - def scopes(self) -> List[str]: - return self.get("scopes") - - @scopes.setter - def scopes(self, value: List[str]): - setattr(self, "scopes", value) - - @property - def charges_users(self) -> bool: - return self.get("charges_users") - - @charges_users.setter - def charges_users(self, value: bool): - setattr(self, "charges_users", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ApiAppResponseOAuth - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - callback_url (str): The app's OAuth callback URL.. [optional] # noqa: E501 - secret (str): The app's OAuth secret, or null if the app does not belong to user.. [optional] # noqa: E501 - scopes ([str]): Array of OAuth scopes used by the app.. [optional] # noqa: E501 - charges_users (bool): Boolean indicating whether the app owner or the account granting permission is billed for OAuth requests.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ApiAppResponseOAuth - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - callback_url (str): The app's OAuth callback URL.. [optional] # noqa: E501 - secret (str): The app's OAuth secret, or null if the app does not belong to user.. [optional] # noqa: E501 - scopes ([str]): Array of OAuth scopes used by the app.. [optional] # noqa: E501 - charges_users (bool): Boolean indicating whether the app owner or the account granting permission is billed for OAuth requests.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/api_app_response_options.py b/sdks/python/dropbox_sign/model/api_app_response_options.py deleted file mode 100644 index 0a81a6b95..000000000 --- a/sdks/python/dropbox_sign/model/api_app_response_options.py +++ /dev/null @@ -1,283 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class ApiAppResponseOptions(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = True - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'can_insert_everywhere': (bool,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> ApiAppResponseOptions: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[ApiAppResponseOptions], - _check_type=True, - ) - - - attribute_map = { - 'can_insert_everywhere': 'can_insert_everywhere', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def can_insert_everywhere(self) -> bool: - return self.get("can_insert_everywhere") - - @can_insert_everywhere.setter - def can_insert_everywhere(self, value: bool): - setattr(self, "can_insert_everywhere", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ApiAppResponseOptions - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - can_insert_everywhere (bool): Boolean denoting if signers can \"Insert Everywhere\" in one click while signing a document. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ApiAppResponseOptions - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - can_insert_everywhere (bool): Boolean denoting if signers can \"Insert Everywhere\" in one click while signing a document. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/api_app_response_owner_account.py b/sdks/python/dropbox_sign/model/api_app_response_owner_account.py deleted file mode 100644 index 765381b57..000000000 --- a/sdks/python/dropbox_sign/model/api_app_response_owner_account.py +++ /dev/null @@ -1,295 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class ApiAppResponseOwnerAccount(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'account_id': (str,), # noqa: E501 - 'email_address': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> ApiAppResponseOwnerAccount: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[ApiAppResponseOwnerAccount], - _check_type=True, - ) - - - attribute_map = { - 'account_id': 'account_id', # noqa: E501 - 'email_address': 'email_address', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def account_id(self) -> str: - return self.get("account_id") - - @account_id.setter - def account_id(self, value: str): - setattr(self, "account_id", value) - - @property - def email_address(self) -> str: - return self.get("email_address") - - @email_address.setter - def email_address(self, value: str): - setattr(self, "email_address", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ApiAppResponseOwnerAccount - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - account_id (str): The owner account's ID. [optional] # noqa: E501 - email_address (str): The owner account's email address. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ApiAppResponseOwnerAccount - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - account_id (str): The owner account's ID. [optional] # noqa: E501 - email_address (str): The owner account's email address. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/api_app_response_white_labeling_options.py b/sdks/python/dropbox_sign/model/api_app_response_white_labeling_options.py deleted file mode 100644 index 0319f9e43..000000000 --- a/sdks/python/dropbox_sign/model/api_app_response_white_labeling_options.py +++ /dev/null @@ -1,439 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class ApiAppResponseWhiteLabelingOptions(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = True - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'header_background_color': (str,), # noqa: E501 - 'legal_version': (str,), # noqa: E501 - 'link_color': (str,), # noqa: E501 - 'page_background_color': (str,), # noqa: E501 - 'primary_button_color': (str,), # noqa: E501 - 'primary_button_color_hover': (str,), # noqa: E501 - 'primary_button_text_color': (str,), # noqa: E501 - 'primary_button_text_color_hover': (str,), # noqa: E501 - 'secondary_button_color': (str,), # noqa: E501 - 'secondary_button_color_hover': (str,), # noqa: E501 - 'secondary_button_text_color': (str,), # noqa: E501 - 'secondary_button_text_color_hover': (str,), # noqa: E501 - 'text_color1': (str,), # noqa: E501 - 'text_color2': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> ApiAppResponseWhiteLabelingOptions: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[ApiAppResponseWhiteLabelingOptions], - _check_type=True, - ) - - - attribute_map = { - 'header_background_color': 'header_background_color', # noqa: E501 - 'legal_version': 'legal_version', # noqa: E501 - 'link_color': 'link_color', # noqa: E501 - 'page_background_color': 'page_background_color', # noqa: E501 - 'primary_button_color': 'primary_button_color', # noqa: E501 - 'primary_button_color_hover': 'primary_button_color_hover', # noqa: E501 - 'primary_button_text_color': 'primary_button_text_color', # noqa: E501 - 'primary_button_text_color_hover': 'primary_button_text_color_hover', # noqa: E501 - 'secondary_button_color': 'secondary_button_color', # noqa: E501 - 'secondary_button_color_hover': 'secondary_button_color_hover', # noqa: E501 - 'secondary_button_text_color': 'secondary_button_text_color', # noqa: E501 - 'secondary_button_text_color_hover': 'secondary_button_text_color_hover', # noqa: E501 - 'text_color1': 'text_color1', # noqa: E501 - 'text_color2': 'text_color2', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def header_background_color(self) -> str: - return self.get("header_background_color") - - @header_background_color.setter - def header_background_color(self, value: str): - setattr(self, "header_background_color", value) - - @property - def legal_version(self) -> str: - return self.get("legal_version") - - @legal_version.setter - def legal_version(self, value: str): - setattr(self, "legal_version", value) - - @property - def link_color(self) -> str: - return self.get("link_color") - - @link_color.setter - def link_color(self, value: str): - setattr(self, "link_color", value) - - @property - def page_background_color(self) -> str: - return self.get("page_background_color") - - @page_background_color.setter - def page_background_color(self, value: str): - setattr(self, "page_background_color", value) - - @property - def primary_button_color(self) -> str: - return self.get("primary_button_color") - - @primary_button_color.setter - def primary_button_color(self, value: str): - setattr(self, "primary_button_color", value) - - @property - def primary_button_color_hover(self) -> str: - return self.get("primary_button_color_hover") - - @primary_button_color_hover.setter - def primary_button_color_hover(self, value: str): - setattr(self, "primary_button_color_hover", value) - - @property - def primary_button_text_color(self) -> str: - return self.get("primary_button_text_color") - - @primary_button_text_color.setter - def primary_button_text_color(self, value: str): - setattr(self, "primary_button_text_color", value) - - @property - def primary_button_text_color_hover(self) -> str: - return self.get("primary_button_text_color_hover") - - @primary_button_text_color_hover.setter - def primary_button_text_color_hover(self, value: str): - setattr(self, "primary_button_text_color_hover", value) - - @property - def secondary_button_color(self) -> str: - return self.get("secondary_button_color") - - @secondary_button_color.setter - def secondary_button_color(self, value: str): - setattr(self, "secondary_button_color", value) - - @property - def secondary_button_color_hover(self) -> str: - return self.get("secondary_button_color_hover") - - @secondary_button_color_hover.setter - def secondary_button_color_hover(self, value: str): - setattr(self, "secondary_button_color_hover", value) - - @property - def secondary_button_text_color(self) -> str: - return self.get("secondary_button_text_color") - - @secondary_button_text_color.setter - def secondary_button_text_color(self, value: str): - setattr(self, "secondary_button_text_color", value) - - @property - def secondary_button_text_color_hover(self) -> str: - return self.get("secondary_button_text_color_hover") - - @secondary_button_text_color_hover.setter - def secondary_button_text_color_hover(self, value: str): - setattr(self, "secondary_button_text_color_hover", value) - - @property - def text_color1(self) -> str: - return self.get("text_color1") - - @text_color1.setter - def text_color1(self, value: str): - setattr(self, "text_color1", value) - - @property - def text_color2(self) -> str: - return self.get("text_color2") - - @text_color2.setter - def text_color2(self, value: str): - setattr(self, "text_color2", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ApiAppResponseWhiteLabelingOptions - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - header_background_color (str): [optional] # noqa: E501 - legal_version (str): [optional] # noqa: E501 - link_color (str): [optional] # noqa: E501 - page_background_color (str): [optional] # noqa: E501 - primary_button_color (str): [optional] # noqa: E501 - primary_button_color_hover (str): [optional] # noqa: E501 - primary_button_text_color (str): [optional] # noqa: E501 - primary_button_text_color_hover (str): [optional] # noqa: E501 - secondary_button_color (str): [optional] # noqa: E501 - secondary_button_color_hover (str): [optional] # noqa: E501 - secondary_button_text_color (str): [optional] # noqa: E501 - secondary_button_text_color_hover (str): [optional] # noqa: E501 - text_color1 (str): [optional] # noqa: E501 - text_color2 (str): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ApiAppResponseWhiteLabelingOptions - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - header_background_color (str): [optional] # noqa: E501 - legal_version (str): [optional] # noqa: E501 - link_color (str): [optional] # noqa: E501 - page_background_color (str): [optional] # noqa: E501 - primary_button_color (str): [optional] # noqa: E501 - primary_button_color_hover (str): [optional] # noqa: E501 - primary_button_text_color (str): [optional] # noqa: E501 - primary_button_text_color_hover (str): [optional] # noqa: E501 - secondary_button_color (str): [optional] # noqa: E501 - secondary_button_color_hover (str): [optional] # noqa: E501 - secondary_button_text_color (str): [optional] # noqa: E501 - secondary_button_text_color_hover (str): [optional] # noqa: E501 - text_color1 (str): [optional] # noqa: E501 - text_color2 (str): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/api_app_update_request.py b/sdks/python/dropbox_sign/model/api_app_update_request.py deleted file mode 100644 index 656c0edc6..000000000 --- a/sdks/python/dropbox_sign/model/api_app_update_request.py +++ /dev/null @@ -1,372 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.sub_o_auth import SubOAuth - from dropbox_sign.model.sub_options import SubOptions - from dropbox_sign.model.sub_white_labeling_options import SubWhiteLabelingOptions - - -def lazy_import(): - from dropbox_sign.model.sub_o_auth import SubOAuth - from dropbox_sign.model.sub_options import SubOptions - from dropbox_sign.model.sub_white_labeling_options import SubWhiteLabelingOptions - globals()['SubOAuth'] = SubOAuth - globals()['SubOptions'] = SubOptions - globals()['SubWhiteLabelingOptions'] = SubWhiteLabelingOptions - - -class ApiAppUpdateRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - ('domains',): { - 'max_items': 2, - }, - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'callback_url': (str,), # noqa: E501 - 'custom_logo_file': (file_type,), # noqa: E501 - 'domains': ([str],), # noqa: E501 - 'name': (str,), # noqa: E501 - 'oauth': (SubOAuth,), # noqa: E501 - 'options': (SubOptions,), # noqa: E501 - 'white_labeling_options': (SubWhiteLabelingOptions,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> ApiAppUpdateRequest: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[ApiAppUpdateRequest], - _check_type=True, - ) - - - attribute_map = { - 'callback_url': 'callback_url', # noqa: E501 - 'custom_logo_file': 'custom_logo_file', # noqa: E501 - 'domains': 'domains', # noqa: E501 - 'name': 'name', # noqa: E501 - 'oauth': 'oauth', # noqa: E501 - 'options': 'options', # noqa: E501 - 'white_labeling_options': 'white_labeling_options', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def callback_url(self) -> str: - return self.get("callback_url") - - @callback_url.setter - def callback_url(self, value: str): - setattr(self, "callback_url", value) - - @property - def custom_logo_file(self) -> file_type: - return self.get("custom_logo_file") - - @custom_logo_file.setter - def custom_logo_file(self, value: file_type): - setattr(self, "custom_logo_file", value) - - @property - def domains(self) -> List[str]: - return self.get("domains") - - @domains.setter - def domains(self, value: List[str]): - setattr(self, "domains", value) - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def oauth(self) -> SubOAuth: - return self.get("oauth") - - @oauth.setter - def oauth(self, value: SubOAuth): - setattr(self, "oauth", value) - - @property - def options(self) -> SubOptions: - return self.get("options") - - @options.setter - def options(self, value: SubOptions): - setattr(self, "options", value) - - @property - def white_labeling_options(self) -> SubWhiteLabelingOptions: - return self.get("white_labeling_options") - - @white_labeling_options.setter - def white_labeling_options(self, value: SubWhiteLabelingOptions): - setattr(self, "white_labeling_options", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ApiAppUpdateRequest - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - callback_url (str): The URL at which the API App should receive event callbacks.. [optional] # noqa: E501 - custom_logo_file (file_type): An image file to use as a custom logo in embedded contexts. (Only applies to some API plans). [optional] # noqa: E501 - domains ([str]): The domain names the ApiApp will be associated with.. [optional] # noqa: E501 - name (str): The name you want to assign to the ApiApp.. [optional] # noqa: E501 - oauth (SubOAuth): [optional] # noqa: E501 - options (SubOptions): [optional] # noqa: E501 - white_labeling_options (SubWhiteLabelingOptions): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ApiAppUpdateRequest - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - callback_url (str): The URL at which the API App should receive event callbacks.. [optional] # noqa: E501 - custom_logo_file (file_type): An image file to use as a custom logo in embedded contexts. (Only applies to some API plans). [optional] # noqa: E501 - domains ([str]): The domain names the ApiApp will be associated with.. [optional] # noqa: E501 - name (str): The name you want to assign to the ApiApp.. [optional] # noqa: E501 - oauth (SubOAuth): [optional] # noqa: E501 - options (SubOptions): [optional] # noqa: E501 - white_labeling_options (SubWhiteLabelingOptions): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/bulk_send_job_get_response.py b/sdks/python/dropbox_sign/model/bulk_send_job_get_response.py deleted file mode 100644 index 89f1559be..000000000 --- a/sdks/python/dropbox_sign/model/bulk_send_job_get_response.py +++ /dev/null @@ -1,336 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.bulk_send_job_get_response_signature_requests import BulkSendJobGetResponseSignatureRequests - from dropbox_sign.model.bulk_send_job_response import BulkSendJobResponse - from dropbox_sign.model.list_info_response import ListInfoResponse - from dropbox_sign.model.warning_response import WarningResponse - - -def lazy_import(): - from dropbox_sign.model.bulk_send_job_get_response_signature_requests import BulkSendJobGetResponseSignatureRequests - from dropbox_sign.model.bulk_send_job_response import BulkSendJobResponse - from dropbox_sign.model.list_info_response import ListInfoResponse - from dropbox_sign.model.warning_response import WarningResponse - globals()['BulkSendJobGetResponseSignatureRequests'] = BulkSendJobGetResponseSignatureRequests - globals()['BulkSendJobResponse'] = BulkSendJobResponse - globals()['ListInfoResponse'] = ListInfoResponse - globals()['WarningResponse'] = WarningResponse - - -class BulkSendJobGetResponse(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'bulk_send_job': (BulkSendJobResponse,), # noqa: E501 - 'list_info': (ListInfoResponse,), # noqa: E501 - 'signature_requests': ([BulkSendJobGetResponseSignatureRequests],), # noqa: E501 - 'warnings': ([WarningResponse],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> BulkSendJobGetResponse: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[BulkSendJobGetResponse], - _check_type=True, - ) - - - attribute_map = { - 'bulk_send_job': 'bulk_send_job', # noqa: E501 - 'list_info': 'list_info', # noqa: E501 - 'signature_requests': 'signature_requests', # noqa: E501 - 'warnings': 'warnings', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def bulk_send_job(self) -> BulkSendJobResponse: - return self.get("bulk_send_job") - - @bulk_send_job.setter - def bulk_send_job(self, value: BulkSendJobResponse): - setattr(self, "bulk_send_job", value) - - @property - def list_info(self) -> ListInfoResponse: - return self.get("list_info") - - @list_info.setter - def list_info(self, value: ListInfoResponse): - setattr(self, "list_info", value) - - @property - def signature_requests(self) -> List[BulkSendJobGetResponseSignatureRequests]: - return self.get("signature_requests") - - @signature_requests.setter - def signature_requests(self, value: List[BulkSendJobGetResponseSignatureRequests]): - setattr(self, "signature_requests", value) - - @property - def warnings(self) -> List[WarningResponse]: - return self.get("warnings") - - @warnings.setter - def warnings(self, value: List[WarningResponse]): - setattr(self, "warnings", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """BulkSendJobGetResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - bulk_send_job (BulkSendJobResponse): [optional] # noqa: E501 - list_info (ListInfoResponse): [optional] # noqa: E501 - signature_requests ([BulkSendJobGetResponseSignatureRequests]): Contains information about the Signature Requests sent in bulk.. [optional] # noqa: E501 - warnings ([WarningResponse]): A list of warnings.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """BulkSendJobGetResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - bulk_send_job (BulkSendJobResponse): [optional] # noqa: E501 - list_info (ListInfoResponse): [optional] # noqa: E501 - signature_requests ([BulkSendJobGetResponseSignatureRequests]): Contains information about the Signature Requests sent in bulk.. [optional] # noqa: E501 - warnings ([WarningResponse]): A list of warnings.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/bulk_send_job_get_response_signature_requests.py b/sdks/python/dropbox_sign/model/bulk_send_job_get_response_signature_requests.py deleted file mode 100644 index aa0b75c0b..000000000 --- a/sdks/python/dropbox_sign/model/bulk_send_job_get_response_signature_requests.py +++ /dev/null @@ -1,638 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.signature_request_response import SignatureRequestResponse - from dropbox_sign.model.signature_request_response_attachment import SignatureRequestResponseAttachment - from dropbox_sign.model.signature_request_response_custom_field_base import SignatureRequestResponseCustomFieldBase - from dropbox_sign.model.signature_request_response_data_base import SignatureRequestResponseDataBase - from dropbox_sign.model.signature_request_response_signatures import SignatureRequestResponseSignatures - - -def lazy_import(): - from dropbox_sign.model.signature_request_response import SignatureRequestResponse - from dropbox_sign.model.signature_request_response_attachment import SignatureRequestResponseAttachment - from dropbox_sign.model.signature_request_response_custom_field_base import SignatureRequestResponseCustomFieldBase - from dropbox_sign.model.signature_request_response_data_base import SignatureRequestResponseDataBase - from dropbox_sign.model.signature_request_response_signatures import SignatureRequestResponseSignatures - globals()['SignatureRequestResponse'] = SignatureRequestResponse - globals()['SignatureRequestResponseAttachment'] = SignatureRequestResponseAttachment - globals()['SignatureRequestResponseCustomFieldBase'] = SignatureRequestResponseCustomFieldBase - globals()['SignatureRequestResponseDataBase'] = SignatureRequestResponseDataBase - globals()['SignatureRequestResponseSignatures'] = SignatureRequestResponseSignatures - - -class BulkSendJobGetResponseSignatureRequests(ModelComposed): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'test_mode': (bool, none_type,), # noqa: E501 - 'signature_request_id': (str,), # noqa: E501 - 'requester_email_address': (str,), # noqa: E501 - 'title': (str,), # noqa: E501 - 'original_title': (str,), # noqa: E501 - 'subject': (str, none_type,), # noqa: E501 - 'message': (str, none_type,), # noqa: E501 - 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 - 'created_at': (int,), # noqa: E501 - 'expires_at': (int,), # noqa: E501 - 'is_complete': (bool,), # noqa: E501 - 'is_declined': (bool,), # noqa: E501 - 'has_error': (bool,), # noqa: E501 - 'files_url': (str,), # noqa: E501 - 'signing_url': (str, none_type,), # noqa: E501 - 'details_url': (str,), # noqa: E501 - 'cc_email_addresses': ([str],), # noqa: E501 - 'signing_redirect_url': (str, none_type,), # noqa: E501 - 'final_copy_uri': (str, none_type,), # noqa: E501 - 'template_ids': ([str], none_type,), # noqa: E501 - 'custom_fields': ([SignatureRequestResponseCustomFieldBase], none_type,), # noqa: E501 - 'attachments': ([SignatureRequestResponseAttachment], none_type,), # noqa: E501 - 'response_data': ([SignatureRequestResponseDataBase], none_type,), # noqa: E501 - 'signatures': ([SignatureRequestResponseSignatures],), # noqa: E501 - 'bulk_send_job_id': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> BulkSendJobGetResponseSignatureRequests: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[BulkSendJobGetResponseSignatureRequests], - _check_type=True, - ) - - - attribute_map = { - 'test_mode': 'test_mode', # noqa: E501 - 'signature_request_id': 'signature_request_id', # noqa: E501 - 'requester_email_address': 'requester_email_address', # noqa: E501 - 'title': 'title', # noqa: E501 - 'original_title': 'original_title', # noqa: E501 - 'subject': 'subject', # noqa: E501 - 'message': 'message', # noqa: E501 - 'metadata': 'metadata', # noqa: E501 - 'created_at': 'created_at', # noqa: E501 - 'expires_at': 'expires_at', # noqa: E501 - 'is_complete': 'is_complete', # noqa: E501 - 'is_declined': 'is_declined', # noqa: E501 - 'has_error': 'has_error', # noqa: E501 - 'files_url': 'files_url', # noqa: E501 - 'signing_url': 'signing_url', # noqa: E501 - 'details_url': 'details_url', # noqa: E501 - 'cc_email_addresses': 'cc_email_addresses', # noqa: E501 - 'signing_redirect_url': 'signing_redirect_url', # noqa: E501 - 'final_copy_uri': 'final_copy_uri', # noqa: E501 - 'template_ids': 'template_ids', # noqa: E501 - 'custom_fields': 'custom_fields', # noqa: E501 - 'attachments': 'attachments', # noqa: E501 - 'response_data': 'response_data', # noqa: E501 - 'signatures': 'signatures', # noqa: E501 - 'bulk_send_job_id': 'bulk_send_job_id', # noqa: E501 - } - - read_only_vars = { - } - - @property - def test_mode(self) -> Optional[bool]: - return self.get("test_mode") - - @test_mode.setter - def test_mode(self, value: Optional[bool]): - setattr(self, "test_mode", value) - - @property - def signature_request_id(self) -> str: - return self.get("signature_request_id") - - @signature_request_id.setter - def signature_request_id(self, value: str): - setattr(self, "signature_request_id", value) - - @property - def requester_email_address(self) -> str: - return self.get("requester_email_address") - - @requester_email_address.setter - def requester_email_address(self, value: str): - setattr(self, "requester_email_address", value) - - @property - def title(self) -> str: - return self.get("title") - - @title.setter - def title(self, value: str): - setattr(self, "title", value) - - @property - def original_title(self) -> str: - return self.get("original_title") - - @original_title.setter - def original_title(self, value: str): - setattr(self, "original_title", value) - - @property - def subject(self) -> Optional[str]: - return self.get("subject") - - @subject.setter - def subject(self, value: Optional[str]): - setattr(self, "subject", value) - - @property - def message(self) -> Optional[str]: - return self.get("message") - - @message.setter - def message(self, value: Optional[str]): - setattr(self, "message", value) - - @property - def metadata(self) -> Dict[str, Union[bool, date, datetime, dict, float, int, list, str, none_type]]: - return self.get("metadata") - - @metadata.setter - def metadata(self, value: Dict[str, Union[bool, date, datetime, dict, float, int, list, str, none_type]]): - setattr(self, "metadata", value) - - @property - def created_at(self) -> int: - return self.get("created_at") - - @created_at.setter - def created_at(self, value: int): - setattr(self, "created_at", value) - - @property - def expires_at(self) -> int: - return self.get("expires_at") - - @expires_at.setter - def expires_at(self, value: int): - setattr(self, "expires_at", value) - - @property - def is_complete(self) -> bool: - return self.get("is_complete") - - @is_complete.setter - def is_complete(self, value: bool): - setattr(self, "is_complete", value) - - @property - def is_declined(self) -> bool: - return self.get("is_declined") - - @is_declined.setter - def is_declined(self, value: bool): - setattr(self, "is_declined", value) - - @property - def has_error(self) -> bool: - return self.get("has_error") - - @has_error.setter - def has_error(self, value: bool): - setattr(self, "has_error", value) - - @property - def files_url(self) -> str: - return self.get("files_url") - - @files_url.setter - def files_url(self, value: str): - setattr(self, "files_url", value) - - @property - def signing_url(self) -> Optional[str]: - return self.get("signing_url") - - @signing_url.setter - def signing_url(self, value: Optional[str]): - setattr(self, "signing_url", value) - - @property - def details_url(self) -> str: - return self.get("details_url") - - @details_url.setter - def details_url(self, value: str): - setattr(self, "details_url", value) - - @property - def cc_email_addresses(self) -> List[str]: - return self.get("cc_email_addresses") - - @cc_email_addresses.setter - def cc_email_addresses(self, value: List[str]): - setattr(self, "cc_email_addresses", value) - - @property - def signing_redirect_url(self) -> Optional[str]: - return self.get("signing_redirect_url") - - @signing_redirect_url.setter - def signing_redirect_url(self, value: Optional[str]): - setattr(self, "signing_redirect_url", value) - - @property - def final_copy_uri(self) -> Optional[str]: - return self.get("final_copy_uri") - - @final_copy_uri.setter - def final_copy_uri(self, value: Optional[str]): - setattr(self, "final_copy_uri", value) - - @property - def template_ids(self) -> Optional[List[str]]: - return self.get("template_ids") - - @template_ids.setter - def template_ids(self, value: Optional[List[str]]): - setattr(self, "template_ids", value) - - @property - def custom_fields(self) -> Optional[List[SignatureRequestResponseCustomFieldBase]]: - return self.get("custom_fields") - - @custom_fields.setter - def custom_fields(self, value: Optional[List[SignatureRequestResponseCustomFieldBase]]): - setattr(self, "custom_fields", value) - - @property - def attachments(self) -> Optional[List[SignatureRequestResponseAttachment]]: - return self.get("attachments") - - @attachments.setter - def attachments(self, value: Optional[List[SignatureRequestResponseAttachment]]): - setattr(self, "attachments", value) - - @property - def response_data(self) -> Optional[List[SignatureRequestResponseDataBase]]: - return self.get("response_data") - - @response_data.setter - def response_data(self, value: Optional[List[SignatureRequestResponseDataBase]]): - setattr(self, "response_data", value) - - @property - def signatures(self) -> List[SignatureRequestResponseSignatures]: - return self.get("signatures") - - @signatures.setter - def signatures(self, value: List[SignatureRequestResponseSignatures]): - setattr(self, "signatures", value) - - @property - def bulk_send_job_id(self) -> str: - return self.get("bulk_send_job_id") - - @bulk_send_job_id.setter - def bulk_send_job_id(self, value: str): - setattr(self, "bulk_send_job_id", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """BulkSendJobGetResponseSignatureRequests - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - test_mode (bool, none_type): Whether this is a test signature request. Test requests have no legal value. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - signature_request_id (str): The id of the SignatureRequest.. [optional] # noqa: E501 - requester_email_address (str): The email address of the initiator of the SignatureRequest.. [optional] # noqa: E501 - title (str): The title the specified Account uses for the SignatureRequest.. [optional] # noqa: E501 - original_title (str): Default Label for account.. [optional] # noqa: E501 - subject (str, none_type): The subject in the email that was initially sent to the signers.. [optional] # noqa: E501 - message (str, none_type): The custom message in the email that was initially sent to the signers.. [optional] # noqa: E501 - metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): The metadata attached to the signature request.. [optional] # noqa: E501 - created_at (int): Time the signature request was created.. [optional] # noqa: E501 - expires_at (int): 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.. [optional] # noqa: E501 - is_complete (bool): Whether or not the SignatureRequest has been fully executed by all signers.. [optional] # noqa: E501 - is_declined (bool): Whether or not the SignatureRequest has been declined by a signer.. [optional] # noqa: E501 - has_error (bool): Whether or not an error occurred (either during the creation of the SignatureRequest or during one of the signings).. [optional] # noqa: E501 - files_url (str): The URL where a copy of the request's documents can be downloaded.. [optional] # noqa: E501 - signing_url (str, none_type): 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.. [optional] # noqa: E501 - details_url (str): The URL where the requester and the signers can view the current status of the SignatureRequest.. [optional] # noqa: E501 - cc_email_addresses ([str]): 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.. [optional] # noqa: E501 - signing_redirect_url (str, none_type): The URL you want the signer redirected to after they successfully sign.. [optional] # noqa: E501 - final_copy_uri (str, none_type): The path where the completed document can be downloaded. [optional] # noqa: E501 - template_ids ([str], none_type): Templates IDs used in this SignatureRequest (if any).. [optional] # noqa: E501 - custom_fields ([SignatureRequestResponseCustomFieldBase], none_type): An array of Custom Field objects containing the name and type of each custom field. * Text Field uses `SignatureRequestResponseCustomFieldText` * Checkbox Field uses `SignatureRequestResponseCustomFieldCheckbox`. [optional] # noqa: E501 - attachments ([SignatureRequestResponseAttachment], none_type): Signer attachments.. [optional] # noqa: E501 - response_data ([SignatureRequestResponseDataBase], none_type): An array of form field objects containing the name, value, and type of each textbox or checkmark field filled in by the signers.. [optional] # noqa: E501 - signatures ([SignatureRequestResponseSignatures]): An array of signature objects, 1 for each signer.. [optional] # noqa: E501 - bulk_send_job_id (str): The id of the BulkSendJob.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """BulkSendJobGetResponseSignatureRequests - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - test_mode (bool, none_type): Whether this is a test signature request. Test requests have no legal value. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - signature_request_id (str): The id of the SignatureRequest.. [optional] # noqa: E501 - requester_email_address (str): The email address of the initiator of the SignatureRequest.. [optional] # noqa: E501 - title (str): The title the specified Account uses for the SignatureRequest.. [optional] # noqa: E501 - original_title (str): Default Label for account.. [optional] # noqa: E501 - subject (str, none_type): The subject in the email that was initially sent to the signers.. [optional] # noqa: E501 - message (str, none_type): The custom message in the email that was initially sent to the signers.. [optional] # noqa: E501 - metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): The metadata attached to the signature request.. [optional] # noqa: E501 - created_at (int): Time the signature request was created.. [optional] # noqa: E501 - expires_at (int): 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.. [optional] # noqa: E501 - is_complete (bool): Whether or not the SignatureRequest has been fully executed by all signers.. [optional] # noqa: E501 - is_declined (bool): Whether or not the SignatureRequest has been declined by a signer.. [optional] # noqa: E501 - has_error (bool): Whether or not an error occurred (either during the creation of the SignatureRequest or during one of the signings).. [optional] # noqa: E501 - files_url (str): The URL where a copy of the request's documents can be downloaded.. [optional] # noqa: E501 - signing_url (str, none_type): 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.. [optional] # noqa: E501 - details_url (str): The URL where the requester and the signers can view the current status of the SignatureRequest.. [optional] # noqa: E501 - cc_email_addresses ([str]): 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.. [optional] # noqa: E501 - signing_redirect_url (str, none_type): The URL you want the signer redirected to after they successfully sign.. [optional] # noqa: E501 - final_copy_uri (str, none_type): The path where the completed document can be downloaded. [optional] # noqa: E501 - template_ids ([str], none_type): Templates IDs used in this SignatureRequest (if any).. [optional] # noqa: E501 - custom_fields ([SignatureRequestResponseCustomFieldBase], none_type): An array of Custom Field objects containing the name and type of each custom field. * Text Field uses `SignatureRequestResponseCustomFieldText` * Checkbox Field uses `SignatureRequestResponseCustomFieldCheckbox`. [optional] # noqa: E501 - attachments ([SignatureRequestResponseAttachment], none_type): Signer attachments.. [optional] # noqa: E501 - response_data ([SignatureRequestResponseDataBase], none_type): An array of form field objects containing the name, value, and type of each textbox or checkmark field filled in by the signers.. [optional] # noqa: E501 - signatures ([SignatureRequestResponseSignatures]): An array of signature objects, 1 for each signer.. [optional] # noqa: E501 - bulk_send_job_id (str): The id of the BulkSendJob.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'oneOf': [ - ], - } diff --git a/sdks/python/dropbox_sign/model/bulk_send_job_list_response.py b/sdks/python/dropbox_sign/model/bulk_send_job_list_response.py deleted file mode 100644 index bbd7975b7..000000000 --- a/sdks/python/dropbox_sign/model/bulk_send_job_list_response.py +++ /dev/null @@ -1,321 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.bulk_send_job_response import BulkSendJobResponse - from dropbox_sign.model.list_info_response import ListInfoResponse - from dropbox_sign.model.warning_response import WarningResponse - - -def lazy_import(): - from dropbox_sign.model.bulk_send_job_response import BulkSendJobResponse - from dropbox_sign.model.list_info_response import ListInfoResponse - from dropbox_sign.model.warning_response import WarningResponse - globals()['BulkSendJobResponse'] = BulkSendJobResponse - globals()['ListInfoResponse'] = ListInfoResponse - globals()['WarningResponse'] = WarningResponse - - -class BulkSendJobListResponse(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'bulk_send_jobs': ([BulkSendJobResponse],), # noqa: E501 - 'list_info': (ListInfoResponse,), # noqa: E501 - 'warnings': ([WarningResponse],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> BulkSendJobListResponse: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[BulkSendJobListResponse], - _check_type=True, - ) - - - attribute_map = { - 'bulk_send_jobs': 'bulk_send_jobs', # noqa: E501 - 'list_info': 'list_info', # noqa: E501 - 'warnings': 'warnings', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def bulk_send_jobs(self) -> List[BulkSendJobResponse]: - return self.get("bulk_send_jobs") - - @bulk_send_jobs.setter - def bulk_send_jobs(self, value: List[BulkSendJobResponse]): - setattr(self, "bulk_send_jobs", value) - - @property - def list_info(self) -> ListInfoResponse: - return self.get("list_info") - - @list_info.setter - def list_info(self, value: ListInfoResponse): - setattr(self, "list_info", value) - - @property - def warnings(self) -> List[WarningResponse]: - return self.get("warnings") - - @warnings.setter - def warnings(self, value: List[WarningResponse]): - setattr(self, "warnings", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """BulkSendJobListResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - bulk_send_jobs ([BulkSendJobResponse]): Contains a list of BulkSendJobs that the API caller has access to.. [optional] # noqa: E501 - list_info (ListInfoResponse): [optional] # noqa: E501 - warnings ([WarningResponse]): A list of warnings.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """BulkSendJobListResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - bulk_send_jobs ([BulkSendJobResponse]): Contains a list of BulkSendJobs that the API caller has access to.. [optional] # noqa: E501 - list_info (ListInfoResponse): [optional] # noqa: E501 - warnings ([WarningResponse]): A list of warnings.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/bulk_send_job_response.py b/sdks/python/dropbox_sign/model/bulk_send_job_response.py deleted file mode 100644 index 34788ce5f..000000000 --- a/sdks/python/dropbox_sign/model/bulk_send_job_response.py +++ /dev/null @@ -1,319 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class BulkSendJobResponse(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'bulk_send_job_id': (str, none_type,), # noqa: E501 - 'total': (int,), # noqa: E501 - 'is_creator': (bool,), # noqa: E501 - 'created_at': (int,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> BulkSendJobResponse: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[BulkSendJobResponse], - _check_type=True, - ) - - - attribute_map = { - 'bulk_send_job_id': 'bulk_send_job_id', # noqa: E501 - 'total': 'total', # noqa: E501 - 'is_creator': 'is_creator', # noqa: E501 - 'created_at': 'created_at', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def bulk_send_job_id(self) -> Optional[str]: - return self.get("bulk_send_job_id") - - @bulk_send_job_id.setter - def bulk_send_job_id(self, value: Optional[str]): - setattr(self, "bulk_send_job_id", value) - - @property - def total(self) -> int: - return self.get("total") - - @total.setter - def total(self, value: int): - setattr(self, "total", value) - - @property - def is_creator(self) -> bool: - return self.get("is_creator") - - @is_creator.setter - def is_creator(self, value: bool): - setattr(self, "is_creator", value) - - @property - def created_at(self) -> int: - return self.get("created_at") - - @created_at.setter - def created_at(self, value: int): - setattr(self, "created_at", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """BulkSendJobResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - bulk_send_job_id (str, none_type): The id of the BulkSendJob.. [optional] # noqa: E501 - total (int): The total amount of Signature Requests queued for sending.. [optional] # noqa: E501 - is_creator (bool): True if you are the owner of this BulkSendJob, false if it's been shared with you by a team member.. [optional] # noqa: E501 - created_at (int): Time that the BulkSendJob was created.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """BulkSendJobResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - bulk_send_job_id (str, none_type): The id of the BulkSendJob.. [optional] # noqa: E501 - total (int): The total amount of Signature Requests queued for sending.. [optional] # noqa: E501 - is_creator (bool): True if you are the owner of this BulkSendJob, false if it's been shared with you by a team member.. [optional] # noqa: E501 - created_at (int): Time that the BulkSendJob was created.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/bulk_send_job_send_response.py b/sdks/python/dropbox_sign/model/bulk_send_job_send_response.py deleted file mode 100644 index d08752a14..000000000 --- a/sdks/python/dropbox_sign/model/bulk_send_job_send_response.py +++ /dev/null @@ -1,306 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.bulk_send_job_response import BulkSendJobResponse - from dropbox_sign.model.warning_response import WarningResponse - - -def lazy_import(): - from dropbox_sign.model.bulk_send_job_response import BulkSendJobResponse - from dropbox_sign.model.warning_response import WarningResponse - globals()['BulkSendJobResponse'] = BulkSendJobResponse - globals()['WarningResponse'] = WarningResponse - - -class BulkSendJobSendResponse(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'bulk_send_job': (BulkSendJobResponse,), # noqa: E501 - 'warnings': ([WarningResponse],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> BulkSendJobSendResponse: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[BulkSendJobSendResponse], - _check_type=True, - ) - - - attribute_map = { - 'bulk_send_job': 'bulk_send_job', # noqa: E501 - 'warnings': 'warnings', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def bulk_send_job(self) -> BulkSendJobResponse: - return self.get("bulk_send_job") - - @bulk_send_job.setter - def bulk_send_job(self, value: BulkSendJobResponse): - setattr(self, "bulk_send_job", value) - - @property - def warnings(self) -> List[WarningResponse]: - return self.get("warnings") - - @warnings.setter - def warnings(self, value: List[WarningResponse]): - setattr(self, "warnings", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """BulkSendJobSendResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - bulk_send_job (BulkSendJobResponse): [optional] # noqa: E501 - warnings ([WarningResponse]): A list of warnings.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """BulkSendJobSendResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - bulk_send_job (BulkSendJobResponse): [optional] # noqa: E501 - warnings ([WarningResponse]): A list of warnings.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/embedded_edit_url_request.py b/sdks/python/dropbox_sign/model/embedded_edit_url_request.py deleted file mode 100644 index a265c6a60..000000000 --- a/sdks/python/dropbox_sign/model/embedded_edit_url_request.py +++ /dev/null @@ -1,402 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.sub_editor_options import SubEditorOptions - from dropbox_sign.model.sub_merge_field import SubMergeField - - -def lazy_import(): - from dropbox_sign.model.sub_editor_options import SubEditorOptions - from dropbox_sign.model.sub_merge_field import SubMergeField - globals()['SubEditorOptions'] = SubEditorOptions - globals()['SubMergeField'] = SubMergeField - - -class EmbeddedEditUrlRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'allow_edit_ccs': (bool,), # noqa: E501 - 'cc_roles': ([str],), # noqa: E501 - 'editor_options': (SubEditorOptions,), # noqa: E501 - 'force_signer_roles': (bool,), # noqa: E501 - 'force_subject_message': (bool,), # noqa: E501 - 'merge_fields': ([SubMergeField],), # noqa: E501 - 'preview_only': (bool,), # noqa: E501 - 'show_preview': (bool,), # noqa: E501 - 'show_progress_stepper': (bool,), # noqa: E501 - 'test_mode': (bool,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> EmbeddedEditUrlRequest: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[EmbeddedEditUrlRequest], - _check_type=True, - ) - - - attribute_map = { - 'allow_edit_ccs': 'allow_edit_ccs', # noqa: E501 - 'cc_roles': 'cc_roles', # noqa: E501 - 'editor_options': 'editor_options', # noqa: E501 - 'force_signer_roles': 'force_signer_roles', # noqa: E501 - 'force_subject_message': 'force_subject_message', # noqa: E501 - 'merge_fields': 'merge_fields', # noqa: E501 - 'preview_only': 'preview_only', # noqa: E501 - 'show_preview': 'show_preview', # noqa: E501 - 'show_progress_stepper': 'show_progress_stepper', # noqa: E501 - 'test_mode': 'test_mode', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def allow_edit_ccs(self) -> bool: - return self.get("allow_edit_ccs") - - @allow_edit_ccs.setter - def allow_edit_ccs(self, value: bool): - setattr(self, "allow_edit_ccs", value) - - @property - def cc_roles(self) -> List[str]: - return self.get("cc_roles") - - @cc_roles.setter - def cc_roles(self, value: List[str]): - setattr(self, "cc_roles", value) - - @property - def editor_options(self) -> SubEditorOptions: - return self.get("editor_options") - - @editor_options.setter - def editor_options(self, value: SubEditorOptions): - setattr(self, "editor_options", value) - - @property - def force_signer_roles(self) -> bool: - return self.get("force_signer_roles") - - @force_signer_roles.setter - def force_signer_roles(self, value: bool): - setattr(self, "force_signer_roles", value) - - @property - def force_subject_message(self) -> bool: - return self.get("force_subject_message") - - @force_subject_message.setter - def force_subject_message(self, value: bool): - setattr(self, "force_subject_message", value) - - @property - def merge_fields(self) -> List[SubMergeField]: - return self.get("merge_fields") - - @merge_fields.setter - def merge_fields(self, value: List[SubMergeField]): - setattr(self, "merge_fields", value) - - @property - def preview_only(self) -> bool: - return self.get("preview_only") - - @preview_only.setter - def preview_only(self, value: bool): - setattr(self, "preview_only", value) - - @property - def show_preview(self) -> bool: - return self.get("show_preview") - - @show_preview.setter - def show_preview(self, value: bool): - setattr(self, "show_preview", value) - - @property - def show_progress_stepper(self) -> bool: - return self.get("show_progress_stepper") - - @show_progress_stepper.setter - def show_progress_stepper(self, value: bool): - setattr(self, "show_progress_stepper", value) - - @property - def test_mode(self) -> bool: - return self.get("test_mode") - - @test_mode.setter - def test_mode(self, value: bool): - setattr(self, "test_mode", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """EmbeddedEditUrlRequest - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - allow_edit_ccs (bool): This allows the requester to enable/disable to add or change CC roles when editing the template.. [optional] if omitted the server will use the default value of False # noqa: E501 - cc_roles ([str]): 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.. [optional] # noqa: E501 - editor_options (SubEditorOptions): [optional] # noqa: E501 - force_signer_roles (bool): Provide users the ability to review/edit the template signer roles.. [optional] if omitted the server will use the default value of False # noqa: E501 - force_subject_message (bool): Provide users the ability to review/edit the template subject and message.. [optional] if omitted the server will use the default value of False # noqa: E501 - merge_fields ([SubMergeField]): 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 `[]`.. [optional] # noqa: E501 - preview_only (bool): 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).. [optional] if omitted the server will use the default value of False # noqa: E501 - show_preview (bool): This allows the requester to enable the editor/preview experience.. [optional] if omitted the server will use the default value of False # noqa: E501 - show_progress_stepper (bool): When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden.. [optional] if omitted the server will use the default value of True # noqa: E501 - test_mode (bool): Whether this is a test, locked templates will only be available for editing if this is set to `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """EmbeddedEditUrlRequest - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - allow_edit_ccs (bool): This allows the requester to enable/disable to add or change CC roles when editing the template.. [optional] if omitted the server will use the default value of False # noqa: E501 - cc_roles ([str]): 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.. [optional] # noqa: E501 - editor_options (SubEditorOptions): [optional] # noqa: E501 - force_signer_roles (bool): Provide users the ability to review/edit the template signer roles.. [optional] if omitted the server will use the default value of False # noqa: E501 - force_subject_message (bool): Provide users the ability to review/edit the template subject and message.. [optional] if omitted the server will use the default value of False # noqa: E501 - merge_fields ([SubMergeField]): 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 `[]`.. [optional] # noqa: E501 - preview_only (bool): 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).. [optional] if omitted the server will use the default value of False # noqa: E501 - show_preview (bool): This allows the requester to enable the editor/preview experience.. [optional] if omitted the server will use the default value of False # noqa: E501 - show_progress_stepper (bool): When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden.. [optional] if omitted the server will use the default value of True # noqa: E501 - test_mode (bool): Whether this is a test, locked templates will only be available for editing if this is set to `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/embedded_edit_url_response.py b/sdks/python/dropbox_sign/model/embedded_edit_url_response.py deleted file mode 100644 index c8b0e9b65..000000000 --- a/sdks/python/dropbox_sign/model/embedded_edit_url_response.py +++ /dev/null @@ -1,306 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.embedded_edit_url_response_embedded import EmbeddedEditUrlResponseEmbedded - from dropbox_sign.model.warning_response import WarningResponse - - -def lazy_import(): - from dropbox_sign.model.embedded_edit_url_response_embedded import EmbeddedEditUrlResponseEmbedded - from dropbox_sign.model.warning_response import WarningResponse - globals()['EmbeddedEditUrlResponseEmbedded'] = EmbeddedEditUrlResponseEmbedded - globals()['WarningResponse'] = WarningResponse - - -class EmbeddedEditUrlResponse(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'embedded': (EmbeddedEditUrlResponseEmbedded,), # noqa: E501 - 'warnings': ([WarningResponse],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> EmbeddedEditUrlResponse: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[EmbeddedEditUrlResponse], - _check_type=True, - ) - - - attribute_map = { - 'embedded': 'embedded', # noqa: E501 - 'warnings': 'warnings', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def embedded(self) -> EmbeddedEditUrlResponseEmbedded: - return self.get("embedded") - - @embedded.setter - def embedded(self, value: EmbeddedEditUrlResponseEmbedded): - setattr(self, "embedded", value) - - @property - def warnings(self) -> List[WarningResponse]: - return self.get("warnings") - - @warnings.setter - def warnings(self, value: List[WarningResponse]): - setattr(self, "warnings", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """EmbeddedEditUrlResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - embedded (EmbeddedEditUrlResponseEmbedded): [optional] # noqa: E501 - warnings ([WarningResponse]): A list of warnings.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """EmbeddedEditUrlResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - embedded (EmbeddedEditUrlResponseEmbedded): [optional] # noqa: E501 - warnings ([WarningResponse]): A list of warnings.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/embedded_edit_url_response_embedded.py b/sdks/python/dropbox_sign/model/embedded_edit_url_response_embedded.py deleted file mode 100644 index 427e0310f..000000000 --- a/sdks/python/dropbox_sign/model/embedded_edit_url_response_embedded.py +++ /dev/null @@ -1,295 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class EmbeddedEditUrlResponseEmbedded(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'edit_url': (str,), # noqa: E501 - 'expires_at': (int,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> EmbeddedEditUrlResponseEmbedded: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[EmbeddedEditUrlResponseEmbedded], - _check_type=True, - ) - - - attribute_map = { - 'edit_url': 'edit_url', # noqa: E501 - 'expires_at': 'expires_at', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def edit_url(self) -> str: - return self.get("edit_url") - - @edit_url.setter - def edit_url(self, value: str): - setattr(self, "edit_url", value) - - @property - def expires_at(self) -> int: - return self.get("expires_at") - - @expires_at.setter - def expires_at(self, value: int): - setattr(self, "expires_at", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """EmbeddedEditUrlResponseEmbedded - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - edit_url (str): A template url that can be opened in an iFrame.. [optional] # noqa: E501 - expires_at (int): The specific time that the the `edit_url` link expires, in epoch.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """EmbeddedEditUrlResponseEmbedded - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - edit_url (str): A template url that can be opened in an iFrame.. [optional] # noqa: E501 - expires_at (int): The specific time that the the `edit_url` link expires, in epoch.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/embedded_sign_url_response.py b/sdks/python/dropbox_sign/model/embedded_sign_url_response.py deleted file mode 100644 index 3b16faa4e..000000000 --- a/sdks/python/dropbox_sign/model/embedded_sign_url_response.py +++ /dev/null @@ -1,306 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.embedded_sign_url_response_embedded import EmbeddedSignUrlResponseEmbedded - from dropbox_sign.model.warning_response import WarningResponse - - -def lazy_import(): - from dropbox_sign.model.embedded_sign_url_response_embedded import EmbeddedSignUrlResponseEmbedded - from dropbox_sign.model.warning_response import WarningResponse - globals()['EmbeddedSignUrlResponseEmbedded'] = EmbeddedSignUrlResponseEmbedded - globals()['WarningResponse'] = WarningResponse - - -class EmbeddedSignUrlResponse(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'embedded': (EmbeddedSignUrlResponseEmbedded,), # noqa: E501 - 'warnings': ([WarningResponse],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> EmbeddedSignUrlResponse: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[EmbeddedSignUrlResponse], - _check_type=True, - ) - - - attribute_map = { - 'embedded': 'embedded', # noqa: E501 - 'warnings': 'warnings', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def embedded(self) -> EmbeddedSignUrlResponseEmbedded: - return self.get("embedded") - - @embedded.setter - def embedded(self, value: EmbeddedSignUrlResponseEmbedded): - setattr(self, "embedded", value) - - @property - def warnings(self) -> List[WarningResponse]: - return self.get("warnings") - - @warnings.setter - def warnings(self, value: List[WarningResponse]): - setattr(self, "warnings", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """EmbeddedSignUrlResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - embedded (EmbeddedSignUrlResponseEmbedded): [optional] # noqa: E501 - warnings ([WarningResponse]): A list of warnings.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """EmbeddedSignUrlResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - embedded (EmbeddedSignUrlResponseEmbedded): [optional] # noqa: E501 - warnings ([WarningResponse]): A list of warnings.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/embedded_sign_url_response_embedded.py b/sdks/python/dropbox_sign/model/embedded_sign_url_response_embedded.py deleted file mode 100644 index 73640656c..000000000 --- a/sdks/python/dropbox_sign/model/embedded_sign_url_response_embedded.py +++ /dev/null @@ -1,295 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class EmbeddedSignUrlResponseEmbedded(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'sign_url': (str,), # noqa: E501 - 'expires_at': (int,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> EmbeddedSignUrlResponseEmbedded: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[EmbeddedSignUrlResponseEmbedded], - _check_type=True, - ) - - - attribute_map = { - 'sign_url': 'sign_url', # noqa: E501 - 'expires_at': 'expires_at', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def sign_url(self) -> str: - return self.get("sign_url") - - @sign_url.setter - def sign_url(self, value: str): - setattr(self, "sign_url", value) - - @property - def expires_at(self) -> int: - return self.get("expires_at") - - @expires_at.setter - def expires_at(self, value: int): - setattr(self, "expires_at", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """EmbeddedSignUrlResponseEmbedded - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - sign_url (str): A signature url that can be opened in an iFrame.. [optional] # noqa: E501 - expires_at (int): The specific time that the the `sign_url` link expires, in epoch.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """EmbeddedSignUrlResponseEmbedded - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - sign_url (str): A signature url that can be opened in an iFrame.. [optional] # noqa: E501 - expires_at (int): The specific time that the the `sign_url` link expires, in epoch.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/error_response.py b/sdks/python/dropbox_sign/model/error_response.py deleted file mode 100644 index 3d07ad02e..000000000 --- a/sdks/python/dropbox_sign/model/error_response.py +++ /dev/null @@ -1,297 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.error_response_error import ErrorResponseError - - -def lazy_import(): - from dropbox_sign.model.error_response_error import ErrorResponseError - globals()['ErrorResponseError'] = ErrorResponseError - - -class ErrorResponse(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'error': (ErrorResponseError,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> ErrorResponse: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[ErrorResponse], - _check_type=True, - ) - - - attribute_map = { - 'error': 'error', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def error(self) -> ErrorResponseError: - return self.get("error") - - @error.setter - def error(self, value: ErrorResponseError): - setattr(self, "error", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, error, *args, **kwargs): # noqa: E501 - """ErrorResponse - a model defined in OpenAPI - - Args: - error (ErrorResponseError): - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.error = error - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, error, *args, **kwargs): # noqa: E501 - """ErrorResponse - a model defined in OpenAPI - - Args: - error (ErrorResponseError): - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.error = error - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/error_response_error.py b/sdks/python/dropbox_sign/model/error_response_error.py deleted file mode 100644 index db093f573..000000000 --- a/sdks/python/dropbox_sign/model/error_response_error.py +++ /dev/null @@ -1,315 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class ErrorResponseError(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'error_msg': (str,), # noqa: E501 - 'error_name': (str,), # noqa: E501 - 'error_path': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> ErrorResponseError: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[ErrorResponseError], - _check_type=True, - ) - - - attribute_map = { - 'error_msg': 'error_msg', # noqa: E501 - 'error_name': 'error_name', # noqa: E501 - 'error_path': 'error_path', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def error_msg(self) -> str: - return self.get("error_msg") - - @error_msg.setter - def error_msg(self, value: str): - setattr(self, "error_msg", value) - - @property - def error_name(self) -> str: - return self.get("error_name") - - @error_name.setter - def error_name(self, value: str): - setattr(self, "error_name", value) - - @property - def error_path(self) -> str: - return self.get("error_path") - - @error_path.setter - def error_path(self, value: str): - setattr(self, "error_path", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, error_msg, error_name, *args, **kwargs): # noqa: E501 - """ErrorResponseError - a model defined in OpenAPI - - Args: - error_msg (str): Message describing an error. - error_name (str): Name of the error. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - error_path (str): Path at which an error occurred.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.error_msg = error_msg - self.error_name = error_name - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, error_msg, error_name, *args, **kwargs): # noqa: E501 - """ErrorResponseError - a model defined in OpenAPI - - Args: - error_msg (str): Message describing an error. - error_name (str): Name of the error. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - error_path (str): Path at which an error occurred.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.error_msg = error_msg - self.error_name = error_name - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/event_callback_request.py b/sdks/python/dropbox_sign/model/event_callback_request.py deleted file mode 100644 index 12c1d3bdd..000000000 --- a/sdks/python/dropbox_sign/model/event_callback_request.py +++ /dev/null @@ -1,342 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.account_response import AccountResponse - from dropbox_sign.model.event_callback_request_event import EventCallbackRequestEvent - from dropbox_sign.model.signature_request_response import SignatureRequestResponse - from dropbox_sign.model.template_response import TemplateResponse - - -def lazy_import(): - from dropbox_sign.model.account_response import AccountResponse - from dropbox_sign.model.event_callback_request_event import EventCallbackRequestEvent - from dropbox_sign.model.signature_request_response import SignatureRequestResponse - from dropbox_sign.model.template_response import TemplateResponse - globals()['AccountResponse'] = AccountResponse - globals()['EventCallbackRequestEvent'] = EventCallbackRequestEvent - globals()['SignatureRequestResponse'] = SignatureRequestResponse - globals()['TemplateResponse'] = TemplateResponse - - -class EventCallbackRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'event': (EventCallbackRequestEvent,), # noqa: E501 - 'account': (AccountResponse,), # noqa: E501 - 'signature_request': (SignatureRequestResponse,), # noqa: E501 - 'template': (TemplateResponse,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> EventCallbackRequest: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[EventCallbackRequest], - _check_type=True, - ) - - - attribute_map = { - 'event': 'event', # noqa: E501 - 'account': 'account', # noqa: E501 - 'signature_request': 'signature_request', # noqa: E501 - 'template': 'template', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def event(self) -> EventCallbackRequestEvent: - return self.get("event") - - @event.setter - def event(self, value: EventCallbackRequestEvent): - setattr(self, "event", value) - - @property - def account(self) -> AccountResponse: - return self.get("account") - - @account.setter - def account(self, value: AccountResponse): - setattr(self, "account", value) - - @property - def signature_request(self) -> SignatureRequestResponse: - return self.get("signature_request") - - @signature_request.setter - def signature_request(self, value: SignatureRequestResponse): - setattr(self, "signature_request", value) - - @property - def template(self) -> TemplateResponse: - return self.get("template") - - @template.setter - def template(self, value: TemplateResponse): - setattr(self, "template", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, event, *args, **kwargs): # noqa: E501 - """EventCallbackRequest - a model defined in OpenAPI - - Args: - event (EventCallbackRequestEvent): - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - account (AccountResponse): [optional] # noqa: E501 - signature_request (SignatureRequestResponse): [optional] # noqa: E501 - template (TemplateResponse): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.event = event - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, event, *args, **kwargs): # noqa: E501 - """EventCallbackRequest - a model defined in OpenAPI - - Args: - event (EventCallbackRequestEvent): - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - account (AccountResponse): [optional] # noqa: E501 - signature_request (SignatureRequestResponse): [optional] # noqa: E501 - template (TemplateResponse): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.event = event - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/event_callback_request_event.py b/sdks/python/dropbox_sign/model/event_callback_request_event.py deleted file mode 100644 index 28e625740..000000000 --- a/sdks/python/dropbox_sign/model/event_callback_request_event.py +++ /dev/null @@ -1,362 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.event_callback_request_event_metadata import EventCallbackRequestEventMetadata - - -def lazy_import(): - from dropbox_sign.model.event_callback_request_event_metadata import EventCallbackRequestEventMetadata - globals()['EventCallbackRequestEventMetadata'] = EventCallbackRequestEventMetadata - - -class EventCallbackRequestEvent(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('event_type',): { - 'ACCOUNT_CONFIRMED': "account_confirmed", - 'UNKNOWN_ERROR': "unknown_error", - 'FILE_ERROR': "file_error", - 'SIGN_URL_INVALID': "sign_url_invalid", - 'SIGNATURE_REQUEST_VIEWED': "signature_request_viewed", - 'SIGNATURE_REQUEST_SIGNED': "signature_request_signed", - 'SIGNATURE_REQUEST_SENT': "signature_request_sent", - 'SIGNATURE_REQUEST_ALL_SIGNED': "signature_request_all_signed", - 'SIGNATURE_REQUEST_EMAIL_BOUNCE': "signature_request_email_bounce", - 'SIGNATURE_REQUEST_REMIND': "signature_request_remind", - 'SIGNATURE_REQUEST_INCOMPLETE_QES': "signature_request_incomplete_qes", - 'SIGNATURE_REQUEST_DESTROYED': "signature_request_destroyed", - 'SIGNATURE_REQUEST_CANCELED': "signature_request_canceled", - 'SIGNATURE_REQUEST_DOWNLOADABLE': "signature_request_downloadable", - 'SIGNATURE_REQUEST_DECLINED': "signature_request_declined", - 'SIGNATURE_REQUEST_REASSIGNED': "signature_request_reassigned", - 'SIGNATURE_REQUEST_INVALID': "signature_request_invalid", - 'SIGNATURE_REQUEST_PREPARED': "signature_request_prepared", - 'SIGNATURE_REQUEST_EXPIRED': "signature_request_expired", - 'TEMPLATE_CREATED': "template_created", - 'TEMPLATE_ERROR': "template_error", - 'CALLBACK_TEST': "callback_test", - 'SIGNATURE_REQUEST_SIGNER_REMOVED': "signature_request_signer_removed", - }, - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'event_time': (str,), # noqa: E501 - 'event_type': (str,), # noqa: E501 - 'event_hash': (str,), # noqa: E501 - 'event_metadata': (EventCallbackRequestEventMetadata,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> EventCallbackRequestEvent: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[EventCallbackRequestEvent], - _check_type=True, - ) - - - attribute_map = { - 'event_time': 'event_time', # noqa: E501 - 'event_type': 'event_type', # noqa: E501 - 'event_hash': 'event_hash', # noqa: E501 - 'event_metadata': 'event_metadata', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def event_time(self) -> str: - return self.get("event_time") - - @event_time.setter - def event_time(self, value: str): - setattr(self, "event_time", value) - - @property - def event_type(self) -> str: - return self.get("event_type") - - @event_type.setter - def event_type(self, value: str): - setattr(self, "event_type", value) - - @property - def event_hash(self) -> str: - return self.get("event_hash") - - @event_hash.setter - def event_hash(self, value: str): - setattr(self, "event_hash", value) - - @property - def event_metadata(self) -> EventCallbackRequestEventMetadata: - return self.get("event_metadata") - - @event_metadata.setter - def event_metadata(self, value: EventCallbackRequestEventMetadata): - setattr(self, "event_metadata", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, event_time, event_type, event_hash, *args, **kwargs): # noqa: E501 - """EventCallbackRequestEvent - a model defined in OpenAPI - - Args: - event_time (str): Time the event was created (using Unix time). - event_type (str): Type of callback event that was triggered. - event_hash (str): Generated hash used to verify source of event data. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - event_metadata (EventCallbackRequestEventMetadata): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.event_time = event_time - self.event_type = event_type - self.event_hash = event_hash - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, event_time, event_type, event_hash, *args, **kwargs): # noqa: E501 - """EventCallbackRequestEvent - a model defined in OpenAPI - - Args: - event_time (str): Time the event was created (using Unix time). - event_type (str): Type of callback event that was triggered. - event_hash (str): Generated hash used to verify source of event data. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - event_metadata (EventCallbackRequestEventMetadata): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.event_time = event_time - self.event_type = event_type - self.event_hash = event_hash - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/event_callback_request_event_metadata.py b/sdks/python/dropbox_sign/model/event_callback_request_event_metadata.py deleted file mode 100644 index 619021379..000000000 --- a/sdks/python/dropbox_sign/model/event_callback_request_event_metadata.py +++ /dev/null @@ -1,319 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class EventCallbackRequestEventMetadata(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'related_signature_id': (str, none_type,), # noqa: E501 - 'reported_for_account_id': (str, none_type,), # noqa: E501 - 'reported_for_app_id': (str, none_type,), # noqa: E501 - 'event_message': (str, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> EventCallbackRequestEventMetadata: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[EventCallbackRequestEventMetadata], - _check_type=True, - ) - - - attribute_map = { - 'related_signature_id': 'related_signature_id', # noqa: E501 - 'reported_for_account_id': 'reported_for_account_id', # noqa: E501 - 'reported_for_app_id': 'reported_for_app_id', # noqa: E501 - 'event_message': 'event_message', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def related_signature_id(self) -> Optional[str]: - return self.get("related_signature_id") - - @related_signature_id.setter - def related_signature_id(self, value: Optional[str]): - setattr(self, "related_signature_id", value) - - @property - def reported_for_account_id(self) -> Optional[str]: - return self.get("reported_for_account_id") - - @reported_for_account_id.setter - def reported_for_account_id(self, value: Optional[str]): - setattr(self, "reported_for_account_id", value) - - @property - def reported_for_app_id(self) -> Optional[str]: - return self.get("reported_for_app_id") - - @reported_for_app_id.setter - def reported_for_app_id(self, value: Optional[str]): - setattr(self, "reported_for_app_id", value) - - @property - def event_message(self) -> Optional[str]: - return self.get("event_message") - - @event_message.setter - def event_message(self, value: Optional[str]): - setattr(self, "event_message", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """EventCallbackRequestEventMetadata - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - related_signature_id (str, none_type): Signature ID for a specific signer. Applicable to `signature_request_signed` and `signature_request_viewed` events.. [optional] # noqa: E501 - reported_for_account_id (str, none_type): Account ID the event was reported for.. [optional] # noqa: E501 - reported_for_app_id (str, none_type): App ID the event was reported for.. [optional] # noqa: E501 - event_message (str, none_type): Message about a declined or failed (due to error) signature flow.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """EventCallbackRequestEventMetadata - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - related_signature_id (str, none_type): Signature ID for a specific signer. Applicable to `signature_request_signed` and `signature_request_viewed` events.. [optional] # noqa: E501 - reported_for_account_id (str, none_type): Account ID the event was reported for.. [optional] # noqa: E501 - reported_for_app_id (str, none_type): App ID the event was reported for.. [optional] # noqa: E501 - event_message (str, none_type): Message about a declined or failed (due to error) signature flow.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/fax_line.py b/sdks/python/dropbox_sign/model/fax_line.py deleted file mode 100644 index 5c0da8910..000000000 --- a/sdks/python/dropbox_sign/model/fax_line.py +++ /dev/null @@ -1,327 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 - -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.account_response import AccountResponse - - -def lazy_import(): - from dropbox_sign.model.account_response import AccountResponse - globals()['AccountResponse'] = AccountResponse - - -class FaxLine(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'number': (str,), # noqa: E501 - 'created_at': (str,), # noqa: E501 - 'updated_at': (str,), # noqa: E501 - 'accounts': ([AccountResponse],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> FaxLine: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[FaxLine], - _check_type=True, - ) - - attribute_map = { - 'number': 'number', # noqa: E501 - 'created_at': 'created_at', # noqa: E501 - 'updated_at': 'updated_at', # noqa: E501 - 'accounts': 'accounts', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def number(self) -> str: - return self.get("number") - - @number.setter - def number(self, value: str): - setattr(self, "number", value) - - @property - def created_at(self) -> str: - return self.get("created_at") - - @created_at.setter - def created_at(self, value: str): - setattr(self, "created_at", value) - - @property - def updated_at(self) -> str: - return self.get("updated_at") - - @updated_at.setter - def updated_at(self, value: str): - setattr(self, "updated_at", value) - - @property - def accounts(self) -> List[AccountResponse]: - return self.get("accounts") - - @accounts.setter - def accounts(self, value: List[AccountResponse]): - setattr(self, "accounts", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """FaxLine - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - number (str): Number. [optional] # noqa: E501 - created_at (str): Created at. [optional] # noqa: E501 - updated_at (str): Updated at. [optional] # noqa: E501 - accounts ([AccountResponse]): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """FaxLine - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - number (str): Number. [optional] # noqa: E501 - created_at (str): Created at. [optional] # noqa: E501 - updated_at (str): Updated at. [optional] # noqa: E501 - accounts ([AccountResponse]): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/fax_line_add_user_request.py b/sdks/python/dropbox_sign/model/fax_line_add_user_request.py deleted file mode 100644 index 29e736156..000000000 --- a/sdks/python/dropbox_sign/model/fax_line_add_user_request.py +++ /dev/null @@ -1,313 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class FaxLineAddUserRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'number': (str,), # noqa: E501 - 'account_id': (str,), # noqa: E501 - 'email_address': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> FaxLineAddUserRequest: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[FaxLineAddUserRequest], - _check_type=True, - ) - - - attribute_map = { - 'number': 'number', # noqa: E501 - 'account_id': 'account_id', # noqa: E501 - 'email_address': 'email_address', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def number(self) -> str: - return self.get("number") - - @number.setter - def number(self, value: str): - setattr(self, "number", value) - - @property - def account_id(self) -> str: - return self.get("account_id") - - @account_id.setter - def account_id(self, value: str): - setattr(self, "account_id", value) - - @property - def email_address(self) -> str: - return self.get("email_address") - - @email_address.setter - def email_address(self, value: str): - setattr(self, "email_address", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, number, *args, **kwargs): # noqa: E501 - """FaxLineAddUserRequest - a model defined in OpenAPI - - Args: - number (str): The Fax Line number. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - account_id (str): Account ID. [optional] # noqa: E501 - email_address (str): Email address. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.number = number - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, number, *args, **kwargs): # noqa: E501 - """FaxLineAddUserRequest - a model defined in OpenAPI - - Args: - number (str): The Fax Line number. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - account_id (str): Account ID. [optional] # noqa: E501 - email_address (str): Email address. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.number = number - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/fax_line_area_code_get_country_enum.py b/sdks/python/dropbox_sign/model/fax_line_area_code_get_country_enum.py deleted file mode 100644 index c182f8140..000000000 --- a/sdks/python/dropbox_sign/model/fax_line_area_code_get_country_enum.py +++ /dev/null @@ -1,303 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class FaxLineAreaCodeGetCountryEnum(ModelSimple): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('value',): { - 'CA': "CA", - 'US': "US", - 'UK': "UK", - }, - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'value': (str,), - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> FaxLineAreaCodeGetCountryEnum: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[FaxLineAreaCodeGetCountryEnum], - _check_type=True, - ) - - - attribute_map = {} - - read_only_vars = set() - - _composed_schemas = None - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): - """FaxLineAreaCodeGetCountryEnum - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str):, must be one of ["CA", "US", "UK", ] # noqa: E501 - - Keyword Args: - value (str):, must be one of ["CA", "US", "UK", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """FaxLineAreaCodeGetCountryEnum - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str):, must be one of ["CA", "US", "UK", ] # noqa: E501 - - Keyword Args: - value (str):, must be one of ["CA", "US", "UK", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - return self diff --git a/sdks/python/dropbox_sign/model/fax_line_area_code_get_province_enum.py b/sdks/python/dropbox_sign/model/fax_line_area_code_get_province_enum.py deleted file mode 100644 index 5346ab6e8..000000000 --- a/sdks/python/dropbox_sign/model/fax_line_area_code_get_province_enum.py +++ /dev/null @@ -1,313 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class FaxLineAreaCodeGetProvinceEnum(ModelSimple): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('value',): { - '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", - }, - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'value': (str,), - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> FaxLineAreaCodeGetProvinceEnum: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[FaxLineAreaCodeGetProvinceEnum], - _check_type=True, - ) - - - attribute_map = {} - - read_only_vars = set() - - _composed_schemas = None - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): - """FaxLineAreaCodeGetProvinceEnum - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str):, must be one of ["AB", "BC", "MB", "NB", "NL", "NT", "NS", "NU", "ON", "PE", "QC", "SK", "YT", ] # noqa: E501 - - Keyword Args: - value (str):, must be one of ["AB", "BC", "MB", "NB", "NL", "NT", "NS", "NU", "ON", "PE", "QC", "SK", "YT", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """FaxLineAreaCodeGetProvinceEnum - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str):, must be one of ["AB", "BC", "MB", "NB", "NL", "NT", "NS", "NU", "ON", "PE", "QC", "SK", "YT", ] # noqa: E501 - - Keyword Args: - value (str):, must be one of ["AB", "BC", "MB", "NB", "NL", "NT", "NS", "NU", "ON", "PE", "QC", "SK", "YT", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - return self diff --git a/sdks/python/dropbox_sign/model/fax_line_area_code_get_response.py b/sdks/python/dropbox_sign/model/fax_line_area_code_get_response.py deleted file mode 100644 index d5c4c6c53..000000000 --- a/sdks/python/dropbox_sign/model/fax_line_area_code_get_response.py +++ /dev/null @@ -1,283 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class FaxLineAreaCodeGetResponse(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'area_codes': ([int],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> FaxLineAreaCodeGetResponse: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[FaxLineAreaCodeGetResponse], - _check_type=True, - ) - - - attribute_map = { - 'area_codes': 'area_codes', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def area_codes(self) -> List[int]: - return self.get("area_codes") - - @area_codes.setter - def area_codes(self, value: List[int]): - setattr(self, "area_codes", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """FaxLineAreaCodeGetResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - area_codes ([int]): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """FaxLineAreaCodeGetResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - area_codes ([int]): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/fax_line_area_code_get_state_enum.py b/sdks/python/dropbox_sign/model/fax_line_area_code_get_state_enum.py deleted file mode 100644 index f3d9c2454..000000000 --- a/sdks/python/dropbox_sign/model/fax_line_area_code_get_state_enum.py +++ /dev/null @@ -1,351 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class FaxLineAreaCodeGetStateEnum(ModelSimple): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('value',): { - '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", - }, - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'value': (str,), - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> FaxLineAreaCodeGetStateEnum: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[FaxLineAreaCodeGetStateEnum], - _check_type=True, - ) - - - attribute_map = {} - - read_only_vars = set() - - _composed_schemas = None - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): - """FaxLineAreaCodeGetStateEnum - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str):, must be one of ["AK", "AL", "AR", "AZ", "CA", "CO", "CT", "DC", "DE", "FL", "GA", "HI", "IA", "ID", "IL", "IN", "KS", "KY", "LA", "MA", "MD", "ME", "MI", "MN", "MO", "MS", "MT", "NC", "ND", "NE", "NH", "NJ", "NM", "NV", "NY", "OH", "OK", "OR", "PA", "RI", "SC", "SD", "TN", "TX", "UT", "VA", "VT", "WA", "WI", "WV", "WY", ] # noqa: E501 - - Keyword Args: - value (str):, must be one of ["AK", "AL", "AR", "AZ", "CA", "CO", "CT", "DC", "DE", "FL", "GA", "HI", "IA", "ID", "IL", "IN", "KS", "KY", "LA", "MA", "MD", "ME", "MI", "MN", "MO", "MS", "MT", "NC", "ND", "NE", "NH", "NJ", "NM", "NV", "NY", "OH", "OK", "OR", "PA", "RI", "SC", "SD", "TN", "TX", "UT", "VA", "VT", "WA", "WI", "WV", "WY", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """FaxLineAreaCodeGetStateEnum - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str):, must be one of ["AK", "AL", "AR", "AZ", "CA", "CO", "CT", "DC", "DE", "FL", "GA", "HI", "IA", "ID", "IL", "IN", "KS", "KY", "LA", "MA", "MD", "ME", "MI", "MN", "MO", "MS", "MT", "NC", "ND", "NE", "NH", "NJ", "NM", "NV", "NY", "OH", "OK", "OR", "PA", "RI", "SC", "SD", "TN", "TX", "UT", "VA", "VT", "WA", "WI", "WV", "WY", ] # noqa: E501 - - Keyword Args: - value (str):, must be one of ["AK", "AL", "AR", "AZ", "CA", "CO", "CT", "DC", "DE", "FL", "GA", "HI", "IA", "ID", "IL", "IN", "KS", "KY", "LA", "MA", "MD", "ME", "MI", "MN", "MO", "MS", "MT", "NC", "ND", "NE", "NH", "NJ", "NM", "NV", "NY", "OH", "OK", "OR", "PA", "RI", "SC", "SD", "TN", "TX", "UT", "VA", "VT", "WA", "WI", "WV", "WY", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - return self diff --git a/sdks/python/dropbox_sign/model/fax_line_create_request.py b/sdks/python/dropbox_sign/model/fax_line_create_request.py deleted file mode 100644 index 0d1221b75..000000000 --- a/sdks/python/dropbox_sign/model/fax_line_create_request.py +++ /dev/null @@ -1,332 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class FaxLineCreateRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('country',): { - 'CA': "CA", - 'US': "US", - 'UK': "UK", - }, - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'area_code': (int,), # noqa: E501 - 'country': (str,), # noqa: E501 - 'city': (str,), # noqa: E501 - 'account_id': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> FaxLineCreateRequest: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[FaxLineCreateRequest], - _check_type=True, - ) - - - attribute_map = { - 'area_code': 'area_code', # noqa: E501 - 'country': 'country', # noqa: E501 - 'city': 'city', # noqa: E501 - 'account_id': 'account_id', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def area_code(self) -> int: - return self.get("area_code") - - @area_code.setter - def area_code(self, value: int): - setattr(self, "area_code", value) - - @property - def country(self) -> str: - return self.get("country") - - @country.setter - def country(self, value: str): - setattr(self, "country", value) - - @property - def city(self) -> str: - return self.get("city") - - @city.setter - def city(self, value: str): - setattr(self, "city", value) - - @property - def account_id(self) -> str: - return self.get("account_id") - - @account_id.setter - def account_id(self, value: str): - setattr(self, "account_id", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, area_code, country, *args, **kwargs): # noqa: E501 - """FaxLineCreateRequest - a model defined in OpenAPI - - Args: - area_code (int): Area code - country (str): Country - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - city (str): City. [optional] # noqa: E501 - account_id (str): Account ID. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.area_code = area_code - self.country = country - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, area_code, country, *args, **kwargs): # noqa: E501 - """FaxLineCreateRequest - a model defined in OpenAPI - - Args: - area_code (int): Area code - country (str): Country - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - city (str): City. [optional] # noqa: E501 - account_id (str): Account ID. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.area_code = area_code - self.country = country - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/fax_line_delete_request.py b/sdks/python/dropbox_sign/model/fax_line_delete_request.py deleted file mode 100644 index 4a0aea281..000000000 --- a/sdks/python/dropbox_sign/model/fax_line_delete_request.py +++ /dev/null @@ -1,289 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class FaxLineDeleteRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'number': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> FaxLineDeleteRequest: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[FaxLineDeleteRequest], - _check_type=True, - ) - - - attribute_map = { - 'number': 'number', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def number(self) -> str: - return self.get("number") - - @number.setter - def number(self, value: str): - setattr(self, "number", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, number, *args, **kwargs): # noqa: E501 - """FaxLineDeleteRequest - a model defined in OpenAPI - - Args: - number (str): The Fax Line number. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.number = number - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, number, *args, **kwargs): # noqa: E501 - """FaxLineDeleteRequest - a model defined in OpenAPI - - Args: - number (str): The Fax Line number. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.number = number - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/fax_line_list_response.py b/sdks/python/dropbox_sign/model/fax_line_list_response.py deleted file mode 100644 index caa2577c0..000000000 --- a/sdks/python/dropbox_sign/model/fax_line_list_response.py +++ /dev/null @@ -1,321 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.fax_line_response_fax_line import FaxLineResponseFaxLine - from dropbox_sign.model.list_info_response import ListInfoResponse - from dropbox_sign.model.warning_response import WarningResponse - - -def lazy_import(): - from dropbox_sign.model.fax_line_response_fax_line import FaxLineResponseFaxLine - from dropbox_sign.model.list_info_response import ListInfoResponse - from dropbox_sign.model.warning_response import WarningResponse - globals()['FaxLineResponseFaxLine'] = FaxLineResponseFaxLine - globals()['ListInfoResponse'] = ListInfoResponse - globals()['WarningResponse'] = WarningResponse - - -class FaxLineListResponse(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'list_info': (ListInfoResponse,), # noqa: E501 - 'fax_lines': ([FaxLineResponseFaxLine],), # noqa: E501 - 'warnings': (WarningResponse,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> FaxLineListResponse: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[FaxLineListResponse], - _check_type=True, - ) - - - attribute_map = { - 'list_info': 'list_info', # noqa: E501 - 'fax_lines': 'fax_lines', # noqa: E501 - 'warnings': 'warnings', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def list_info(self) -> ListInfoResponse: - return self.get("list_info") - - @list_info.setter - def list_info(self, value: ListInfoResponse): - setattr(self, "list_info", value) - - @property - def fax_lines(self) -> List[FaxLineResponseFaxLine]: - return self.get("fax_lines") - - @fax_lines.setter - def fax_lines(self, value: List[FaxLineResponseFaxLine]): - setattr(self, "fax_lines", value) - - @property - def warnings(self) -> WarningResponse: - return self.get("warnings") - - @warnings.setter - def warnings(self, value: WarningResponse): - setattr(self, "warnings", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """FaxLineListResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - list_info (ListInfoResponse): [optional] # noqa: E501 - fax_lines ([FaxLineResponseFaxLine]): [optional] # noqa: E501 - warnings (WarningResponse): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """FaxLineListResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - list_info (ListInfoResponse): [optional] # noqa: E501 - fax_lines ([FaxLineResponseFaxLine]): [optional] # noqa: E501 - warnings (WarningResponse): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/fax_line_remove_user_request.py b/sdks/python/dropbox_sign/model/fax_line_remove_user_request.py deleted file mode 100644 index 979157e1a..000000000 --- a/sdks/python/dropbox_sign/model/fax_line_remove_user_request.py +++ /dev/null @@ -1,313 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class FaxLineRemoveUserRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'number': (str,), # noqa: E501 - 'account_id': (str,), # noqa: E501 - 'email_address': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> FaxLineRemoveUserRequest: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[FaxLineRemoveUserRequest], - _check_type=True, - ) - - - attribute_map = { - 'number': 'number', # noqa: E501 - 'account_id': 'account_id', # noqa: E501 - 'email_address': 'email_address', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def number(self) -> str: - return self.get("number") - - @number.setter - def number(self, value: str): - setattr(self, "number", value) - - @property - def account_id(self) -> str: - return self.get("account_id") - - @account_id.setter - def account_id(self, value: str): - setattr(self, "account_id", value) - - @property - def email_address(self) -> str: - return self.get("email_address") - - @email_address.setter - def email_address(self, value: str): - setattr(self, "email_address", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, number, *args, **kwargs): # noqa: E501 - """FaxLineRemoveUserRequest - a model defined in OpenAPI - - Args: - number (str): The Fax Line number. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - account_id (str): Account ID. [optional] # noqa: E501 - email_address (str): Email address. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.number = number - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, number, *args, **kwargs): # noqa: E501 - """FaxLineRemoveUserRequest - a model defined in OpenAPI - - Args: - number (str): The Fax Line number. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - account_id (str): Account ID. [optional] # noqa: E501 - email_address (str): Email address. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.number = number - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/fax_line_response.py b/sdks/python/dropbox_sign/model/fax_line_response.py deleted file mode 100644 index 74e9eac5c..000000000 --- a/sdks/python/dropbox_sign/model/fax_line_response.py +++ /dev/null @@ -1,306 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.fax_line_response_fax_line import FaxLineResponseFaxLine - from dropbox_sign.model.warning_response import WarningResponse - - -def lazy_import(): - from dropbox_sign.model.fax_line_response_fax_line import FaxLineResponseFaxLine - from dropbox_sign.model.warning_response import WarningResponse - globals()['FaxLineResponseFaxLine'] = FaxLineResponseFaxLine - globals()['WarningResponse'] = WarningResponse - - -class FaxLineResponse(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'fax_line': (FaxLineResponseFaxLine,), # noqa: E501 - 'warnings': (WarningResponse,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> FaxLineResponse: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[FaxLineResponse], - _check_type=True, - ) - - - attribute_map = { - 'fax_line': 'fax_line', # noqa: E501 - 'warnings': 'warnings', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def fax_line(self) -> FaxLineResponseFaxLine: - return self.get("fax_line") - - @fax_line.setter - def fax_line(self, value: FaxLineResponseFaxLine): - setattr(self, "fax_line", value) - - @property - def warnings(self) -> WarningResponse: - return self.get("warnings") - - @warnings.setter - def warnings(self, value: WarningResponse): - setattr(self, "warnings", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """FaxLineResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - fax_line (FaxLineResponseFaxLine): [optional] # noqa: E501 - warnings (WarningResponse): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """FaxLineResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - fax_line (FaxLineResponseFaxLine): [optional] # noqa: E501 - warnings (WarningResponse): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/fax_line_response_fax_line.py b/sdks/python/dropbox_sign/model/fax_line_response_fax_line.py deleted file mode 100644 index 70cb5c113..000000000 --- a/sdks/python/dropbox_sign/model/fax_line_response_fax_line.py +++ /dev/null @@ -1,327 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.account_response import AccountResponse - - -def lazy_import(): - from dropbox_sign.model.account_response import AccountResponse - globals()['AccountResponse'] = AccountResponse - - -class FaxLineResponseFaxLine(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'number': (str,), # noqa: E501 - 'created_at': (int,), # noqa: E501 - 'updated_at': (int,), # noqa: E501 - 'accounts': ([AccountResponse],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> FaxLineResponseFaxLine: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[FaxLineResponseFaxLine], - _check_type=True, - ) - - - attribute_map = { - 'number': 'number', # noqa: E501 - 'created_at': 'created_at', # noqa: E501 - 'updated_at': 'updated_at', # noqa: E501 - 'accounts': 'accounts', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def number(self) -> str: - return self.get("number") - - @number.setter - def number(self, value: str): - setattr(self, "number", value) - - @property - def created_at(self) -> int: - return self.get("created_at") - - @created_at.setter - def created_at(self, value: int): - setattr(self, "created_at", value) - - @property - def updated_at(self) -> int: - return self.get("updated_at") - - @updated_at.setter - def updated_at(self, value: int): - setattr(self, "updated_at", value) - - @property - def accounts(self) -> List[AccountResponse]: - return self.get("accounts") - - @accounts.setter - def accounts(self, value: List[AccountResponse]): - setattr(self, "accounts", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """FaxLineResponseFaxLine - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - number (str): Number. [optional] # noqa: E501 - created_at (int): Created at. [optional] # noqa: E501 - updated_at (int): Updated at. [optional] # noqa: E501 - accounts ([AccountResponse]): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """FaxLineResponseFaxLine - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - number (str): Number. [optional] # noqa: E501 - created_at (int): Created at. [optional] # noqa: E501 - updated_at (int): Updated at. [optional] # noqa: E501 - accounts ([AccountResponse]): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/file_response.py b/sdks/python/dropbox_sign/model/file_response.py deleted file mode 100644 index a6c88d9c8..000000000 --- a/sdks/python/dropbox_sign/model/file_response.py +++ /dev/null @@ -1,295 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class FileResponse(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'file_url': (str,), # noqa: E501 - 'expires_at': (int,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> FileResponse: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[FileResponse], - _check_type=True, - ) - - - attribute_map = { - 'file_url': 'file_url', # noqa: E501 - 'expires_at': 'expires_at', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def file_url(self) -> str: - return self.get("file_url") - - @file_url.setter - def file_url(self, value: str): - setattr(self, "file_url", value) - - @property - def expires_at(self) -> int: - return self.get("expires_at") - - @expires_at.setter - def expires_at(self, value: int): - setattr(self, "expires_at", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """FileResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - file_url (str): URL to the file.. [optional] # noqa: E501 - expires_at (int): When the link expires.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """FileResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - file_url (str): URL to the file.. [optional] # noqa: E501 - expires_at (int): When the link expires.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/file_response_data_uri.py b/sdks/python/dropbox_sign/model/file_response_data_uri.py deleted file mode 100644 index 6aa9c5c43..000000000 --- a/sdks/python/dropbox_sign/model/file_response_data_uri.py +++ /dev/null @@ -1,283 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class FileResponseDataUri(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'data_uri': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> FileResponseDataUri: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[FileResponseDataUri], - _check_type=True, - ) - - - attribute_map = { - 'data_uri': 'data_uri', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def data_uri(self) -> str: - return self.get("data_uri") - - @data_uri.setter - def data_uri(self, value: str): - setattr(self, "data_uri", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """FileResponseDataUri - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - data_uri (str): File as base64 encoded string.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """FileResponseDataUri - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - data_uri (str): File as base64 encoded string.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/list_info_response.py b/sdks/python/dropbox_sign/model/list_info_response.py deleted file mode 100644 index a79388d6d..000000000 --- a/sdks/python/dropbox_sign/model/list_info_response.py +++ /dev/null @@ -1,319 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class ListInfoResponse(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'num_pages': (int,), # noqa: E501 - 'num_results': (int, none_type,), # noqa: E501 - 'page': (int,), # noqa: E501 - 'page_size': (int,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> ListInfoResponse: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[ListInfoResponse], - _check_type=True, - ) - - - attribute_map = { - 'num_pages': 'num_pages', # noqa: E501 - 'num_results': 'num_results', # noqa: E501 - 'page': 'page', # noqa: E501 - 'page_size': 'page_size', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def num_pages(self) -> int: - return self.get("num_pages") - - @num_pages.setter - def num_pages(self, value: int): - setattr(self, "num_pages", value) - - @property - def num_results(self) -> Optional[int]: - return self.get("num_results") - - @num_results.setter - def num_results(self, value: Optional[int]): - setattr(self, "num_results", value) - - @property - def page(self) -> int: - return self.get("page") - - @page.setter - def page(self, value: int): - setattr(self, "page", value) - - @property - def page_size(self) -> int: - return self.get("page_size") - - @page_size.setter - def page_size(self, value: int): - setattr(self, "page_size", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ListInfoResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - num_pages (int): Total number of pages available.. [optional] # noqa: E501 - num_results (int, none_type): Total number of objects available.. [optional] # noqa: E501 - page (int): Number of the page being returned.. [optional] # noqa: E501 - page_size (int): Objects returned per page.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ListInfoResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - num_pages (int): Total number of pages available.. [optional] # noqa: E501 - num_results (int, none_type): Total number of objects available.. [optional] # noqa: E501 - page (int): Number of the page being returned.. [optional] # noqa: E501 - page_size (int): Objects returned per page.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/o_auth_token_generate_request.py b/sdks/python/dropbox_sign/model/o_auth_token_generate_request.py deleted file mode 100644 index a5c385e84..000000000 --- a/sdks/python/dropbox_sign/model/o_auth_token_generate_request.py +++ /dev/null @@ -1,347 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class OAuthTokenGenerateRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'client_id': (str,), # noqa: E501 - 'client_secret': (str,), # noqa: E501 - 'code': (str,), # noqa: E501 - 'grant_type': (str,), # noqa: E501 - 'state': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> OAuthTokenGenerateRequest: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[OAuthTokenGenerateRequest], - _check_type=True, - ) - - - attribute_map = { - 'client_id': 'client_id', # noqa: E501 - 'client_secret': 'client_secret', # noqa: E501 - 'code': 'code', # noqa: E501 - 'grant_type': 'grant_type', # noqa: E501 - 'state': 'state', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def client_id(self) -> str: - return self.get("client_id") - - @client_id.setter - def client_id(self, value: str): - setattr(self, "client_id", value) - - @property - def client_secret(self) -> str: - return self.get("client_secret") - - @client_secret.setter - def client_secret(self, value: str): - setattr(self, "client_secret", value) - - @property - def code(self) -> str: - return self.get("code") - - @code.setter - def code(self, value: str): - setattr(self, "code", value) - - @property - def grant_type(self) -> str: - return self.get("grant_type") - - @grant_type.setter - def grant_type(self, value: str): - setattr(self, "grant_type", value) - - @property - def state(self) -> str: - return self.get("state") - - @state.setter - def state(self, value: str): - setattr(self, "state", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, client_id, client_secret, code, state, *args, **kwargs): # noqa: E501 - """OAuthTokenGenerateRequest - a model defined in OpenAPI - - Args: - client_id (str): The client id of the app requesting authorization. - client_secret (str): The secret token of your app. - code (str): The code passed to your callback when the user granted access. - state (str): Same as the state you specified earlier. - - Keyword Args: - grant_type (str): When generating a new token use `authorization_code`.. defaults to "authorization_code" # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - grant_type = kwargs.get('grant_type', "authorization_code") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.client_id = client_id - self.client_secret = client_secret - self.code = code - self.grant_type = grant_type - self.state = state - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, client_id, client_secret, code, state, *args, **kwargs): # noqa: E501 - """OAuthTokenGenerateRequest - a model defined in OpenAPI - - Args: - client_id (str): The client id of the app requesting authorization. - client_secret (str): The secret token of your app. - code (str): The code passed to your callback when the user granted access. - state (str): Same as the state you specified earlier. - - Keyword Args: - grant_type (str): When generating a new token use `authorization_code`.. defaults to "authorization_code" # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - grant_type = kwargs.get('grant_type', "authorization_code") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.client_id = client_id - self.client_secret = client_secret - self.code = code - self.grant_type = grant_type - self.state = state - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/o_auth_token_refresh_request.py b/sdks/python/dropbox_sign/model/o_auth_token_refresh_request.py deleted file mode 100644 index 97ee16b03..000000000 --- a/sdks/python/dropbox_sign/model/o_auth_token_refresh_request.py +++ /dev/null @@ -1,305 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class OAuthTokenRefreshRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'grant_type': (str,), # noqa: E501 - 'refresh_token': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> OAuthTokenRefreshRequest: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[OAuthTokenRefreshRequest], - _check_type=True, - ) - - - attribute_map = { - 'grant_type': 'grant_type', # noqa: E501 - 'refresh_token': 'refresh_token', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def grant_type(self) -> str: - return self.get("grant_type") - - @grant_type.setter - def grant_type(self, value: str): - setattr(self, "grant_type", value) - - @property - def refresh_token(self) -> str: - return self.get("refresh_token") - - @refresh_token.setter - def refresh_token(self, value: str): - setattr(self, "refresh_token", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, refresh_token, *args, **kwargs): # noqa: E501 - """OAuthTokenRefreshRequest - a model defined in OpenAPI - - Args: - refresh_token (str): The token provided when you got the expired access token. - - Keyword Args: - grant_type (str): When refreshing an existing token use `refresh_token`.. defaults to "refresh_token" # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - grant_type = kwargs.get('grant_type', "refresh_token") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.grant_type = grant_type - self.refresh_token = refresh_token - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, refresh_token, *args, **kwargs): # noqa: E501 - """OAuthTokenRefreshRequest - a model defined in OpenAPI - - Args: - refresh_token (str): The token provided when you got the expired access token. - - Keyword Args: - grant_type (str): When refreshing an existing token use `refresh_token`.. defaults to "refresh_token" # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - grant_type = kwargs.get('grant_type', "refresh_token") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.grant_type = grant_type - self.refresh_token = refresh_token - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/o_auth_token_response.py b/sdks/python/dropbox_sign/model/o_auth_token_response.py deleted file mode 100644 index cfe959f0f..000000000 --- a/sdks/python/dropbox_sign/model/o_auth_token_response.py +++ /dev/null @@ -1,331 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class OAuthTokenResponse(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'access_token': (str,), # noqa: E501 - 'token_type': (str,), # noqa: E501 - 'refresh_token': (str,), # noqa: E501 - 'expires_in': (int,), # noqa: E501 - 'state': (str, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> OAuthTokenResponse: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[OAuthTokenResponse], - _check_type=True, - ) - - - attribute_map = { - 'access_token': 'access_token', # noqa: E501 - 'token_type': 'token_type', # noqa: E501 - 'refresh_token': 'refresh_token', # noqa: E501 - 'expires_in': 'expires_in', # noqa: E501 - 'state': 'state', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def access_token(self) -> str: - return self.get("access_token") - - @access_token.setter - def access_token(self, value: str): - setattr(self, "access_token", value) - - @property - def token_type(self) -> str: - return self.get("token_type") - - @token_type.setter - def token_type(self, value: str): - setattr(self, "token_type", value) - - @property - def refresh_token(self) -> str: - return self.get("refresh_token") - - @refresh_token.setter - def refresh_token(self, value: str): - setattr(self, "refresh_token", value) - - @property - def expires_in(self) -> int: - return self.get("expires_in") - - @expires_in.setter - def expires_in(self, value: int): - setattr(self, "expires_in", value) - - @property - def state(self) -> Optional[str]: - return self.get("state") - - @state.setter - def state(self, value: Optional[str]): - setattr(self, "state", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """OAuthTokenResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - access_token (str): [optional] # noqa: E501 - token_type (str): [optional] # noqa: E501 - refresh_token (str): [optional] # noqa: E501 - expires_in (int): Number of seconds until the `access_token` expires. Uses epoch time.. [optional] # noqa: E501 - state (str, none_type): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """OAuthTokenResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - access_token (str): [optional] # noqa: E501 - token_type (str): [optional] # noqa: E501 - refresh_token (str): [optional] # noqa: E501 - expires_in (int): Number of seconds until the `access_token` expires. Uses epoch time.. [optional] # noqa: E501 - state (str, none_type): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/report_create_request.py b/sdks/python/dropbox_sign/model/report_create_request.py deleted file mode 100644 index fe244800d..000000000 --- a/sdks/python/dropbox_sign/model/report_create_request.py +++ /dev/null @@ -1,325 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class ReportCreateRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('report_type',): { - 'USER_ACTIVITY': "user_activity", - 'DOCUMENT_STATUS': "document_status", - }, - } - - validations = { - ('report_type',): { - 'max_items': 2, - 'min_items': 1, - }, - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'end_date': (str,), # noqa: E501 - 'report_type': ([str],), # noqa: E501 - 'start_date': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> ReportCreateRequest: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[ReportCreateRequest], - _check_type=True, - ) - - - attribute_map = { - 'end_date': 'end_date', # noqa: E501 - 'report_type': 'report_type', # noqa: E501 - 'start_date': 'start_date', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def end_date(self) -> str: - return self.get("end_date") - - @end_date.setter - def end_date(self, value: str): - setattr(self, "end_date", value) - - @property - def report_type(self) -> List[str]: - return self.get("report_type") - - @report_type.setter - def report_type(self, value: List[str]): - setattr(self, "report_type", value) - - @property - def start_date(self) -> str: - return self.get("start_date") - - @start_date.setter - def start_date(self, value: str): - setattr(self, "start_date", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, end_date, report_type, start_date, *args, **kwargs): # noqa: E501 - """ReportCreateRequest - a model defined in OpenAPI - - Args: - end_date (str): The (inclusive) end date for the report data in `MM/DD/YYYY` format. - report_type ([str]): 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 (str): The (inclusive) start date for the report data in `MM/DD/YYYY` format. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.end_date = end_date - self.report_type = report_type - self.start_date = start_date - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, end_date, report_type, start_date, *args, **kwargs): # noqa: E501 - """ReportCreateRequest - a model defined in OpenAPI - - Args: - end_date (str): The (inclusive) end date for the report data in `MM/DD/YYYY` format. - report_type ([str]): 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 (str): The (inclusive) start date for the report data in `MM/DD/YYYY` format. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.end_date = end_date - self.report_type = report_type - self.start_date = start_date - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/report_create_response.py b/sdks/python/dropbox_sign/model/report_create_response.py deleted file mode 100644 index 899de22f0..000000000 --- a/sdks/python/dropbox_sign/model/report_create_response.py +++ /dev/null @@ -1,306 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.report_response import ReportResponse - from dropbox_sign.model.warning_response import WarningResponse - - -def lazy_import(): - from dropbox_sign.model.report_response import ReportResponse - from dropbox_sign.model.warning_response import WarningResponse - globals()['ReportResponse'] = ReportResponse - globals()['WarningResponse'] = WarningResponse - - -class ReportCreateResponse(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'report': (ReportResponse,), # noqa: E501 - 'warnings': ([WarningResponse],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> ReportCreateResponse: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[ReportCreateResponse], - _check_type=True, - ) - - - attribute_map = { - 'report': 'report', # noqa: E501 - 'warnings': 'warnings', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def report(self) -> ReportResponse: - return self.get("report") - - @report.setter - def report(self, value: ReportResponse): - setattr(self, "report", value) - - @property - def warnings(self) -> List[WarningResponse]: - return self.get("warnings") - - @warnings.setter - def warnings(self, value: List[WarningResponse]): - setattr(self, "warnings", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ReportCreateResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - report (ReportResponse): [optional] # noqa: E501 - warnings ([WarningResponse]): A list of warnings.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ReportCreateResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - report (ReportResponse): [optional] # noqa: E501 - warnings ([WarningResponse]): A list of warnings.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/report_response.py b/sdks/python/dropbox_sign/model/report_response.py deleted file mode 100644 index 3a5d2d489..000000000 --- a/sdks/python/dropbox_sign/model/report_response.py +++ /dev/null @@ -1,323 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class ReportResponse(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('report_type',): { - 'USER_ACTIVITY': "user_activity", - 'DOCUMENT_STATUS': "document_status", - }, - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'success': (str,), # noqa: E501 - 'start_date': (str,), # noqa: E501 - 'end_date': (str,), # noqa: E501 - 'report_type': ([str],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> ReportResponse: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[ReportResponse], - _check_type=True, - ) - - - attribute_map = { - 'success': 'success', # noqa: E501 - 'start_date': 'start_date', # noqa: E501 - 'end_date': 'end_date', # noqa: E501 - 'report_type': 'report_type', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def success(self) -> str: - return self.get("success") - - @success.setter - def success(self, value: str): - setattr(self, "success", value) - - @property - def start_date(self) -> str: - return self.get("start_date") - - @start_date.setter - def start_date(self, value: str): - setattr(self, "start_date", value) - - @property - def end_date(self) -> str: - return self.get("end_date") - - @end_date.setter - def end_date(self, value: str): - setattr(self, "end_date", value) - - @property - def report_type(self) -> List[str]: - return self.get("report_type") - - @report_type.setter - def report_type(self, value: List[str]): - setattr(self, "report_type", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ReportResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - success (str): A message indicating the requested operation's success. [optional] # noqa: E501 - start_date (str): The (inclusive) start date for the report data in MM/DD/YYYY format.. [optional] # noqa: E501 - end_date (str): The (inclusive) end date for the report data in MM/DD/YYYY format.. [optional] # noqa: E501 - report_type ([str]): 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).. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ReportResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - success (str): A message indicating the requested operation's success. [optional] # noqa: E501 - start_date (str): The (inclusive) start date for the report data in MM/DD/YYYY format.. [optional] # noqa: E501 - end_date (str): The (inclusive) end date for the report data in MM/DD/YYYY format.. [optional] # noqa: E501 - report_type ([str]): 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).. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/signature_request_bulk_create_embedded_with_template_request.py b/sdks/python/dropbox_sign/model/signature_request_bulk_create_embedded_with_template_request.py deleted file mode 100644 index 34772a6c1..000000000 --- a/sdks/python/dropbox_sign/model/signature_request_bulk_create_embedded_with_template_request.py +++ /dev/null @@ -1,460 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.sub_bulk_signer_list import SubBulkSignerList - from dropbox_sign.model.sub_cc import SubCC - from dropbox_sign.model.sub_custom_field import SubCustomField - - -def lazy_import(): - from dropbox_sign.model.sub_bulk_signer_list import SubBulkSignerList - from dropbox_sign.model.sub_cc import SubCC - from dropbox_sign.model.sub_custom_field import SubCustomField - globals()['SubBulkSignerList'] = SubBulkSignerList - globals()['SubCC'] = SubCC - globals()['SubCustomField'] = SubCustomField - - -class SignatureRequestBulkCreateEmbeddedWithTemplateRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - ('message',): { - 'max_length': 5000, - }, - ('metadata',): { - }, - ('subject',): { - 'max_length': 255, - }, - ('title',): { - 'max_length': 255, - }, - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'template_ids': ([str],), # noqa: E501 - 'client_id': (str,), # noqa: E501 - 'signer_file': (file_type,), # noqa: E501 - 'signer_list': ([SubBulkSignerList],), # noqa: E501 - 'allow_decline': (bool,), # noqa: E501 - 'ccs': ([SubCC],), # noqa: E501 - 'custom_fields': ([SubCustomField],), # noqa: E501 - 'message': (str,), # noqa: E501 - 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 - 'signing_redirect_url': (str,), # noqa: E501 - 'subject': (str,), # noqa: E501 - 'test_mode': (bool,), # noqa: E501 - 'title': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> SignatureRequestBulkCreateEmbeddedWithTemplateRequest: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[SignatureRequestBulkCreateEmbeddedWithTemplateRequest], - _check_type=True, - ) - - - attribute_map = { - 'template_ids': 'template_ids', # noqa: E501 - 'client_id': 'client_id', # noqa: E501 - 'signer_file': 'signer_file', # noqa: E501 - 'signer_list': 'signer_list', # noqa: E501 - 'allow_decline': 'allow_decline', # noqa: E501 - 'ccs': 'ccs', # noqa: E501 - 'custom_fields': 'custom_fields', # noqa: E501 - 'message': 'message', # noqa: E501 - 'metadata': 'metadata', # noqa: E501 - 'signing_redirect_url': 'signing_redirect_url', # noqa: E501 - 'subject': 'subject', # noqa: E501 - 'test_mode': 'test_mode', # noqa: E501 - 'title': 'title', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def template_ids(self) -> List[str]: - return self.get("template_ids") - - @template_ids.setter - def template_ids(self, value: List[str]): - setattr(self, "template_ids", value) - - @property - def client_id(self) -> str: - return self.get("client_id") - - @client_id.setter - def client_id(self, value: str): - setattr(self, "client_id", value) - - @property - def signer_file(self) -> file_type: - return self.get("signer_file") - - @signer_file.setter - def signer_file(self, value: file_type): - setattr(self, "signer_file", value) - - @property - def signer_list(self) -> List[SubBulkSignerList]: - return self.get("signer_list") - - @signer_list.setter - def signer_list(self, value: List[SubBulkSignerList]): - setattr(self, "signer_list", value) - - @property - def allow_decline(self) -> bool: - return self.get("allow_decline") - - @allow_decline.setter - def allow_decline(self, value: bool): - setattr(self, "allow_decline", value) - - @property - def ccs(self) -> List[SubCC]: - return self.get("ccs") - - @ccs.setter - def ccs(self, value: List[SubCC]): - setattr(self, "ccs", value) - - @property - def custom_fields(self) -> List[SubCustomField]: - return self.get("custom_fields") - - @custom_fields.setter - def custom_fields(self, value: List[SubCustomField]): - setattr(self, "custom_fields", value) - - @property - def message(self) -> str: - return self.get("message") - - @message.setter - def message(self, value: str): - setattr(self, "message", value) - - @property - def metadata(self) -> Dict[str, Union[bool, date, datetime, dict, float, int, list, str, none_type]]: - return self.get("metadata") - - @metadata.setter - def metadata(self, value: Dict[str, Union[bool, date, datetime, dict, float, int, list, str, none_type]]): - setattr(self, "metadata", value) - - @property - def signing_redirect_url(self) -> str: - return self.get("signing_redirect_url") - - @signing_redirect_url.setter - def signing_redirect_url(self, value: str): - setattr(self, "signing_redirect_url", value) - - @property - def subject(self) -> str: - return self.get("subject") - - @subject.setter - def subject(self, value: str): - setattr(self, "subject", value) - - @property - def test_mode(self) -> bool: - return self.get("test_mode") - - @test_mode.setter - def test_mode(self, value: bool): - setattr(self, "test_mode", value) - - @property - def title(self) -> str: - return self.get("title") - - @title.setter - def title(self, value: str): - setattr(self, "title", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, template_ids, client_id, *args, **kwargs): # noqa: E501 - """SignatureRequestBulkCreateEmbeddedWithTemplateRequest - a model defined in OpenAPI - - Args: - template_ids ([str]): Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. - client_id (str): Client id of the app you're using to create this embedded signature request. Used for security purposes. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - signer_file (file_type): `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 ```. [optional] # noqa: E501 - signer_list ([SubBulkSignerList]): `signer_list` is an array defining values and options for signer fields. Required unless a `signer_file` is used, you may not use both.. [optional] # noqa: E501 - allow_decline (bool): Allows signers to decline to sign a document if `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - ccs ([SubCC]): Add CC email recipients. Required when a CC role exists for the Template.. [optional] # noqa: E501 - custom_fields ([SubCustomField]): 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.. [optional] # noqa: E501 - message (str): The custom message in the email that will be sent to the signers.. [optional] # noqa: E501 - metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): 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.. [optional] # noqa: E501 - signing_redirect_url (str): The URL you want signers redirected to after they successfully sign.. [optional] # noqa: E501 - subject (str): The subject in the email that will be sent to the signers.. [optional] # noqa: E501 - test_mode (bool): Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - title (str): The title you want to assign to the SignatureRequest.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.template_ids = template_ids - self.client_id = client_id - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, template_ids, client_id, *args, **kwargs): # noqa: E501 - """SignatureRequestBulkCreateEmbeddedWithTemplateRequest - a model defined in OpenAPI - - Args: - template_ids ([str]): Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. - client_id (str): Client id of the app you're using to create this embedded signature request. Used for security purposes. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - signer_file (file_type): `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 ```. [optional] # noqa: E501 - signer_list ([SubBulkSignerList]): `signer_list` is an array defining values and options for signer fields. Required unless a `signer_file` is used, you may not use both.. [optional] # noqa: E501 - allow_decline (bool): Allows signers to decline to sign a document if `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - ccs ([SubCC]): Add CC email recipients. Required when a CC role exists for the Template.. [optional] # noqa: E501 - custom_fields ([SubCustomField]): 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.. [optional] # noqa: E501 - message (str): The custom message in the email that will be sent to the signers.. [optional] # noqa: E501 - metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): 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.. [optional] # noqa: E501 - signing_redirect_url (str): The URL you want signers redirected to after they successfully sign.. [optional] # noqa: E501 - subject (str): The subject in the email that will be sent to the signers.. [optional] # noqa: E501 - test_mode (bool): Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - title (str): The title you want to assign to the SignatureRequest.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.template_ids = template_ids - self.client_id = client_id - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/signature_request_bulk_send_with_template_request.py b/sdks/python/dropbox_sign/model/signature_request_bulk_send_with_template_request.py deleted file mode 100644 index 8e6db6fab..000000000 --- a/sdks/python/dropbox_sign/model/signature_request_bulk_send_with_template_request.py +++ /dev/null @@ -1,458 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.sub_bulk_signer_list import SubBulkSignerList - from dropbox_sign.model.sub_cc import SubCC - from dropbox_sign.model.sub_custom_field import SubCustomField - - -def lazy_import(): - from dropbox_sign.model.sub_bulk_signer_list import SubBulkSignerList - from dropbox_sign.model.sub_cc import SubCC - from dropbox_sign.model.sub_custom_field import SubCustomField - globals()['SubBulkSignerList'] = SubBulkSignerList - globals()['SubCC'] = SubCC - globals()['SubCustomField'] = SubCustomField - - -class SignatureRequestBulkSendWithTemplateRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - ('message',): { - 'max_length': 5000, - }, - ('metadata',): { - }, - ('subject',): { - 'max_length': 255, - }, - ('title',): { - 'max_length': 255, - }, - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'template_ids': ([str],), # noqa: E501 - 'signer_file': (file_type,), # noqa: E501 - 'signer_list': ([SubBulkSignerList],), # noqa: E501 - 'allow_decline': (bool,), # noqa: E501 - 'ccs': ([SubCC],), # noqa: E501 - 'client_id': (str,), # noqa: E501 - 'custom_fields': ([SubCustomField],), # noqa: E501 - 'message': (str,), # noqa: E501 - 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 - 'signing_redirect_url': (str,), # noqa: E501 - 'subject': (str,), # noqa: E501 - 'test_mode': (bool,), # noqa: E501 - 'title': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> SignatureRequestBulkSendWithTemplateRequest: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[SignatureRequestBulkSendWithTemplateRequest], - _check_type=True, - ) - - - attribute_map = { - 'template_ids': 'template_ids', # noqa: E501 - 'signer_file': 'signer_file', # noqa: E501 - 'signer_list': 'signer_list', # noqa: E501 - 'allow_decline': 'allow_decline', # noqa: E501 - 'ccs': 'ccs', # noqa: E501 - 'client_id': 'client_id', # noqa: E501 - 'custom_fields': 'custom_fields', # noqa: E501 - 'message': 'message', # noqa: E501 - 'metadata': 'metadata', # noqa: E501 - 'signing_redirect_url': 'signing_redirect_url', # noqa: E501 - 'subject': 'subject', # noqa: E501 - 'test_mode': 'test_mode', # noqa: E501 - 'title': 'title', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def template_ids(self) -> List[str]: - return self.get("template_ids") - - @template_ids.setter - def template_ids(self, value: List[str]): - setattr(self, "template_ids", value) - - @property - def signer_file(self) -> file_type: - return self.get("signer_file") - - @signer_file.setter - def signer_file(self, value: file_type): - setattr(self, "signer_file", value) - - @property - def signer_list(self) -> List[SubBulkSignerList]: - return self.get("signer_list") - - @signer_list.setter - def signer_list(self, value: List[SubBulkSignerList]): - setattr(self, "signer_list", value) - - @property - def allow_decline(self) -> bool: - return self.get("allow_decline") - - @allow_decline.setter - def allow_decline(self, value: bool): - setattr(self, "allow_decline", value) - - @property - def ccs(self) -> List[SubCC]: - return self.get("ccs") - - @ccs.setter - def ccs(self, value: List[SubCC]): - setattr(self, "ccs", value) - - @property - def client_id(self) -> str: - return self.get("client_id") - - @client_id.setter - def client_id(self, value: str): - setattr(self, "client_id", value) - - @property - def custom_fields(self) -> List[SubCustomField]: - return self.get("custom_fields") - - @custom_fields.setter - def custom_fields(self, value: List[SubCustomField]): - setattr(self, "custom_fields", value) - - @property - def message(self) -> str: - return self.get("message") - - @message.setter - def message(self, value: str): - setattr(self, "message", value) - - @property - def metadata(self) -> Dict[str, Union[bool, date, datetime, dict, float, int, list, str, none_type]]: - return self.get("metadata") - - @metadata.setter - def metadata(self, value: Dict[str, Union[bool, date, datetime, dict, float, int, list, str, none_type]]): - setattr(self, "metadata", value) - - @property - def signing_redirect_url(self) -> str: - return self.get("signing_redirect_url") - - @signing_redirect_url.setter - def signing_redirect_url(self, value: str): - setattr(self, "signing_redirect_url", value) - - @property - def subject(self) -> str: - return self.get("subject") - - @subject.setter - def subject(self, value: str): - setattr(self, "subject", value) - - @property - def test_mode(self) -> bool: - return self.get("test_mode") - - @test_mode.setter - def test_mode(self, value: bool): - setattr(self, "test_mode", value) - - @property - def title(self) -> str: - return self.get("title") - - @title.setter - def title(self, value: str): - setattr(self, "title", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, template_ids, *args, **kwargs): # noqa: E501 - """SignatureRequestBulkSendWithTemplateRequest - a model defined in OpenAPI - - Args: - template_ids ([str]): Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - signer_file (file_type): `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 ```. [optional] # noqa: E501 - signer_list ([SubBulkSignerList]): `signer_list` is an array defining values and options for signer fields. Required unless a `signer_file` is used, you may not use both.. [optional] # noqa: E501 - allow_decline (bool): Allows signers to decline to sign a document if `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - ccs ([SubCC]): Add CC email recipients. Required when a CC role exists for the Template.. [optional] # noqa: E501 - client_id (str): 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.. [optional] # noqa: E501 - custom_fields ([SubCustomField]): 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.. [optional] # noqa: E501 - message (str): The custom message in the email that will be sent to the signers.. [optional] # noqa: E501 - metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): 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.. [optional] # noqa: E501 - signing_redirect_url (str): The URL you want signers redirected to after they successfully sign.. [optional] # noqa: E501 - subject (str): The subject in the email that will be sent to the signers.. [optional] # noqa: E501 - test_mode (bool): Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - title (str): The title you want to assign to the SignatureRequest.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.template_ids = template_ids - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, template_ids, *args, **kwargs): # noqa: E501 - """SignatureRequestBulkSendWithTemplateRequest - a model defined in OpenAPI - - Args: - template_ids ([str]): Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - signer_file (file_type): `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 ```. [optional] # noqa: E501 - signer_list ([SubBulkSignerList]): `signer_list` is an array defining values and options for signer fields. Required unless a `signer_file` is used, you may not use both.. [optional] # noqa: E501 - allow_decline (bool): Allows signers to decline to sign a document if `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - ccs ([SubCC]): Add CC email recipients. Required when a CC role exists for the Template.. [optional] # noqa: E501 - client_id (str): 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.. [optional] # noqa: E501 - custom_fields ([SubCustomField]): 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.. [optional] # noqa: E501 - message (str): The custom message in the email that will be sent to the signers.. [optional] # noqa: E501 - metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): 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.. [optional] # noqa: E501 - signing_redirect_url (str): The URL you want signers redirected to after they successfully sign.. [optional] # noqa: E501 - subject (str): The subject in the email that will be sent to the signers.. [optional] # noqa: E501 - test_mode (bool): Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - title (str): The title you want to assign to the SignatureRequest.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.template_ids = template_ids - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/signature_request_create_embedded_request.py b/sdks/python/dropbox_sign/model/signature_request_create_embedded_request.py deleted file mode 100644 index 1652e2201..000000000 --- a/sdks/python/dropbox_sign/model/signature_request_create_embedded_request.py +++ /dev/null @@ -1,608 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.sub_attachment import SubAttachment - from dropbox_sign.model.sub_custom_field import SubCustomField - from dropbox_sign.model.sub_field_options import SubFieldOptions - from dropbox_sign.model.sub_form_field_group import SubFormFieldGroup - from dropbox_sign.model.sub_form_field_rule import SubFormFieldRule - from dropbox_sign.model.sub_form_fields_per_document_base import SubFormFieldsPerDocumentBase - from dropbox_sign.model.sub_signature_request_grouped_signers import SubSignatureRequestGroupedSigners - from dropbox_sign.model.sub_signature_request_signer import SubSignatureRequestSigner - from dropbox_sign.model.sub_signing_options import SubSigningOptions - - -def lazy_import(): - from dropbox_sign.model.sub_attachment import SubAttachment - from dropbox_sign.model.sub_custom_field import SubCustomField - from dropbox_sign.model.sub_field_options import SubFieldOptions - from dropbox_sign.model.sub_form_field_group import SubFormFieldGroup - from dropbox_sign.model.sub_form_field_rule import SubFormFieldRule - from dropbox_sign.model.sub_form_fields_per_document_base import SubFormFieldsPerDocumentBase - from dropbox_sign.model.sub_signature_request_grouped_signers import SubSignatureRequestGroupedSigners - from dropbox_sign.model.sub_signature_request_signer import SubSignatureRequestSigner - from dropbox_sign.model.sub_signing_options import SubSigningOptions - globals()['SubAttachment'] = SubAttachment - globals()['SubCustomField'] = SubCustomField - globals()['SubFieldOptions'] = SubFieldOptions - globals()['SubFormFieldGroup'] = SubFormFieldGroup - globals()['SubFormFieldRule'] = SubFormFieldRule - globals()['SubFormFieldsPerDocumentBase'] = SubFormFieldsPerDocumentBase - globals()['SubSignatureRequestGroupedSigners'] = SubSignatureRequestGroupedSigners - globals()['SubSignatureRequestSigner'] = SubSignatureRequestSigner - globals()['SubSigningOptions'] = SubSigningOptions - - -class SignatureRequestCreateEmbeddedRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - ('message',): { - 'max_length': 5000, - }, - ('metadata',): { - }, - ('subject',): { - 'max_length': 255, - }, - ('title',): { - 'max_length': 255, - }, - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'client_id': (str,), # noqa: E501 - 'files': ([file_type],), # noqa: E501 - 'file_urls': ([str],), # noqa: E501 - 'signers': ([SubSignatureRequestSigner],), # noqa: E501 - 'grouped_signers': ([SubSignatureRequestGroupedSigners],), # noqa: E501 - 'allow_decline': (bool,), # noqa: E501 - 'allow_reassign': (bool,), # noqa: E501 - 'attachments': ([SubAttachment],), # noqa: E501 - 'cc_email_addresses': ([str],), # noqa: E501 - 'custom_fields': ([SubCustomField],), # noqa: E501 - 'field_options': (SubFieldOptions,), # noqa: E501 - 'form_field_groups': ([SubFormFieldGroup],), # noqa: E501 - 'form_field_rules': ([SubFormFieldRule],), # noqa: E501 - 'form_fields_per_document': ([SubFormFieldsPerDocumentBase],), # noqa: E501 - 'hide_text_tags': (bool,), # noqa: E501 - 'message': (str,), # noqa: E501 - 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 - 'signing_options': (SubSigningOptions,), # noqa: E501 - 'subject': (str,), # noqa: E501 - 'test_mode': (bool,), # noqa: E501 - 'title': (str,), # noqa: E501 - 'use_text_tags': (bool,), # noqa: E501 - 'populate_auto_fill_fields': (bool,), # noqa: E501 - 'expires_at': (int, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> SignatureRequestCreateEmbeddedRequest: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[SignatureRequestCreateEmbeddedRequest], - _check_type=True, - ) - - - attribute_map = { - 'client_id': 'client_id', # noqa: E501 - 'files': 'files', # noqa: E501 - 'file_urls': 'file_urls', # noqa: E501 - 'signers': 'signers', # noqa: E501 - 'grouped_signers': 'grouped_signers', # noqa: E501 - 'allow_decline': 'allow_decline', # noqa: E501 - 'allow_reassign': 'allow_reassign', # noqa: E501 - 'attachments': 'attachments', # noqa: E501 - 'cc_email_addresses': 'cc_email_addresses', # noqa: E501 - 'custom_fields': 'custom_fields', # noqa: E501 - 'field_options': 'field_options', # noqa: E501 - 'form_field_groups': 'form_field_groups', # noqa: E501 - 'form_field_rules': 'form_field_rules', # noqa: E501 - 'form_fields_per_document': 'form_fields_per_document', # noqa: E501 - 'hide_text_tags': 'hide_text_tags', # noqa: E501 - 'message': 'message', # noqa: E501 - 'metadata': 'metadata', # noqa: E501 - 'signing_options': 'signing_options', # noqa: E501 - 'subject': 'subject', # noqa: E501 - 'test_mode': 'test_mode', # noqa: E501 - 'title': 'title', # noqa: E501 - 'use_text_tags': 'use_text_tags', # noqa: E501 - 'populate_auto_fill_fields': 'populate_auto_fill_fields', # noqa: E501 - 'expires_at': 'expires_at', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def client_id(self) -> str: - return self.get("client_id") - - @client_id.setter - def client_id(self, value: str): - setattr(self, "client_id", value) - - @property - def files(self) -> List[file_type]: - return self.get("files") - - @files.setter - def files(self, value: List[file_type]): - setattr(self, "files", value) - - @property - def file_urls(self) -> List[str]: - return self.get("file_urls") - - @file_urls.setter - def file_urls(self, value: List[str]): - setattr(self, "file_urls", value) - - @property - def signers(self) -> List[SubSignatureRequestSigner]: - return self.get("signers") - - @signers.setter - def signers(self, value: List[SubSignatureRequestSigner]): - setattr(self, "signers", value) - - @property - def grouped_signers(self) -> List[SubSignatureRequestGroupedSigners]: - return self.get("grouped_signers") - - @grouped_signers.setter - def grouped_signers(self, value: List[SubSignatureRequestGroupedSigners]): - setattr(self, "grouped_signers", value) - - @property - def allow_decline(self) -> bool: - return self.get("allow_decline") - - @allow_decline.setter - def allow_decline(self, value: bool): - setattr(self, "allow_decline", value) - - @property - def allow_reassign(self) -> bool: - return self.get("allow_reassign") - - @allow_reassign.setter - def allow_reassign(self, value: bool): - setattr(self, "allow_reassign", value) - - @property - def attachments(self) -> List[SubAttachment]: - return self.get("attachments") - - @attachments.setter - def attachments(self, value: List[SubAttachment]): - setattr(self, "attachments", value) - - @property - def cc_email_addresses(self) -> List[str]: - return self.get("cc_email_addresses") - - @cc_email_addresses.setter - def cc_email_addresses(self, value: List[str]): - setattr(self, "cc_email_addresses", value) - - @property - def custom_fields(self) -> List[SubCustomField]: - return self.get("custom_fields") - - @custom_fields.setter - def custom_fields(self, value: List[SubCustomField]): - setattr(self, "custom_fields", value) - - @property - def field_options(self) -> SubFieldOptions: - return self.get("field_options") - - @field_options.setter - def field_options(self, value: SubFieldOptions): - setattr(self, "field_options", value) - - @property - def form_field_groups(self) -> List[SubFormFieldGroup]: - return self.get("form_field_groups") - - @form_field_groups.setter - def form_field_groups(self, value: List[SubFormFieldGroup]): - setattr(self, "form_field_groups", value) - - @property - def form_field_rules(self) -> List[SubFormFieldRule]: - return self.get("form_field_rules") - - @form_field_rules.setter - def form_field_rules(self, value: List[SubFormFieldRule]): - setattr(self, "form_field_rules", value) - - @property - def form_fields_per_document(self) -> List[SubFormFieldsPerDocumentBase]: - return self.get("form_fields_per_document") - - @form_fields_per_document.setter - def form_fields_per_document(self, value: List[SubFormFieldsPerDocumentBase]): - setattr(self, "form_fields_per_document", value) - - @property - def hide_text_tags(self) -> bool: - return self.get("hide_text_tags") - - @hide_text_tags.setter - def hide_text_tags(self, value: bool): - setattr(self, "hide_text_tags", value) - - @property - def message(self) -> str: - return self.get("message") - - @message.setter - def message(self, value: str): - setattr(self, "message", value) - - @property - def metadata(self) -> Dict[str, Union[bool, date, datetime, dict, float, int, list, str, none_type]]: - return self.get("metadata") - - @metadata.setter - def metadata(self, value: Dict[str, Union[bool, date, datetime, dict, float, int, list, str, none_type]]): - setattr(self, "metadata", value) - - @property - def signing_options(self) -> SubSigningOptions: - return self.get("signing_options") - - @signing_options.setter - def signing_options(self, value: SubSigningOptions): - setattr(self, "signing_options", value) - - @property - def subject(self) -> str: - return self.get("subject") - - @subject.setter - def subject(self, value: str): - setattr(self, "subject", value) - - @property - def test_mode(self) -> bool: - return self.get("test_mode") - - @test_mode.setter - def test_mode(self, value: bool): - setattr(self, "test_mode", value) - - @property - def title(self) -> str: - return self.get("title") - - @title.setter - def title(self, value: str): - setattr(self, "title", value) - - @property - def use_text_tags(self) -> bool: - return self.get("use_text_tags") - - @use_text_tags.setter - def use_text_tags(self, value: bool): - setattr(self, "use_text_tags", value) - - @property - def populate_auto_fill_fields(self) -> bool: - return self.get("populate_auto_fill_fields") - - @populate_auto_fill_fields.setter - def populate_auto_fill_fields(self, value: bool): - setattr(self, "populate_auto_fill_fields", value) - - @property - def expires_at(self) -> Optional[int]: - return self.get("expires_at") - - @expires_at.setter - def expires_at(self, value: Optional[int]): - setattr(self, "expires_at", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, client_id, *args, **kwargs): # noqa: E501 - """SignatureRequestCreateEmbeddedRequest - a model defined in OpenAPI - - Args: - client_id (str): Client id of the app you're using to create this embedded signature request. Used for security purposes. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - files ([file_type]): Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.. [optional] # noqa: E501 - file_urls ([str]): 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.. [optional] # noqa: E501 - signers ([SubSignatureRequestSigner]): Add Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both.. [optional] # noqa: E501 - grouped_signers ([SubSignatureRequestGroupedSigners]): Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both.. [optional] # noqa: E501 - allow_decline (bool): Allows signers to decline to sign a document if `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - allow_reassign (bool): Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan.. [optional] if omitted the server will use the default value of False # noqa: E501 - attachments ([SubAttachment]): A list describing the attachments. [optional] # noqa: E501 - cc_email_addresses ([str]): The email addresses that should be CCed.. [optional] # noqa: E501 - custom_fields ([SubCustomField]): 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.. [optional] # noqa: E501 - field_options (SubFieldOptions): [optional] # noqa: E501 - form_field_groups ([SubFormFieldGroup]): 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`.. [optional] # noqa: E501 - form_field_rules ([SubFormFieldRule]): Conditional Logic rules for fields defined in `form_fields_per_document`.. [optional] # noqa: E501 - form_fields_per_document ([SubFormFieldsPerDocumentBase]): 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`. [optional] # noqa: E501 - hide_text_tags (bool): 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.. [optional] if omitted the server will use the default value of False # noqa: E501 - message (str): The custom message in the email that will be sent to the signers.. [optional] # noqa: E501 - metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): 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.. [optional] # noqa: E501 - signing_options (SubSigningOptions): [optional] # noqa: E501 - subject (str): The subject in the email that will be sent to the signers.. [optional] # noqa: E501 - test_mode (bool): Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - title (str): The title you want to assign to the SignatureRequest.. [optional] # noqa: E501 - use_text_tags (bool): 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`.. [optional] if omitted the server will use the default value of False # noqa: E501 - populate_auto_fill_fields (bool): 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.. [optional] if omitted the server will use the default value of False # noqa: E501 - expires_at (int, none_type): 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.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.client_id = client_id - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, client_id, *args, **kwargs): # noqa: E501 - """SignatureRequestCreateEmbeddedRequest - a model defined in OpenAPI - - Args: - client_id (str): Client id of the app you're using to create this embedded signature request. Used for security purposes. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - files ([file_type]): Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.. [optional] # noqa: E501 - file_urls ([str]): 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.. [optional] # noqa: E501 - signers ([SubSignatureRequestSigner]): Add Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both.. [optional] # noqa: E501 - grouped_signers ([SubSignatureRequestGroupedSigners]): Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both.. [optional] # noqa: E501 - allow_decline (bool): Allows signers to decline to sign a document if `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - allow_reassign (bool): Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan.. [optional] if omitted the server will use the default value of False # noqa: E501 - attachments ([SubAttachment]): A list describing the attachments. [optional] # noqa: E501 - cc_email_addresses ([str]): The email addresses that should be CCed.. [optional] # noqa: E501 - custom_fields ([SubCustomField]): 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.. [optional] # noqa: E501 - field_options (SubFieldOptions): [optional] # noqa: E501 - form_field_groups ([SubFormFieldGroup]): 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`.. [optional] # noqa: E501 - form_field_rules ([SubFormFieldRule]): Conditional Logic rules for fields defined in `form_fields_per_document`.. [optional] # noqa: E501 - form_fields_per_document ([SubFormFieldsPerDocumentBase]): 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`. [optional] # noqa: E501 - hide_text_tags (bool): 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.. [optional] if omitted the server will use the default value of False # noqa: E501 - message (str): The custom message in the email that will be sent to the signers.. [optional] # noqa: E501 - metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): 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.. [optional] # noqa: E501 - signing_options (SubSigningOptions): [optional] # noqa: E501 - subject (str): The subject in the email that will be sent to the signers.. [optional] # noqa: E501 - test_mode (bool): Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - title (str): The title you want to assign to the SignatureRequest.. [optional] # noqa: E501 - use_text_tags (bool): 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`.. [optional] if omitted the server will use the default value of False # noqa: E501 - populate_auto_fill_fields (bool): 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.. [optional] if omitted the server will use the default value of False # noqa: E501 - expires_at (int, none_type): 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.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.client_id = client_id - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/signature_request_create_embedded_with_template_request.py b/sdks/python/dropbox_sign/model/signature_request_create_embedded_with_template_request.py deleted file mode 100644 index 1de11ec8c..000000000 --- a/sdks/python/dropbox_sign/model/signature_request_create_embedded_with_template_request.py +++ /dev/null @@ -1,489 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.sub_cc import SubCC - from dropbox_sign.model.sub_custom_field import SubCustomField - from dropbox_sign.model.sub_signature_request_template_signer import SubSignatureRequestTemplateSigner - from dropbox_sign.model.sub_signing_options import SubSigningOptions - - -def lazy_import(): - from dropbox_sign.model.sub_cc import SubCC - from dropbox_sign.model.sub_custom_field import SubCustomField - from dropbox_sign.model.sub_signature_request_template_signer import SubSignatureRequestTemplateSigner - from dropbox_sign.model.sub_signing_options import SubSigningOptions - globals()['SubCC'] = SubCC - globals()['SubCustomField'] = SubCustomField - globals()['SubSignatureRequestTemplateSigner'] = SubSignatureRequestTemplateSigner - globals()['SubSigningOptions'] = SubSigningOptions - - -class SignatureRequestCreateEmbeddedWithTemplateRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - ('message',): { - 'max_length': 5000, - }, - ('metadata',): { - }, - ('subject',): { - 'max_length': 255, - }, - ('title',): { - 'max_length': 255, - }, - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'template_ids': ([str],), # noqa: E501 - 'client_id': (str,), # noqa: E501 - 'signers': ([SubSignatureRequestTemplateSigner],), # noqa: E501 - 'allow_decline': (bool,), # noqa: E501 - 'ccs': ([SubCC],), # noqa: E501 - 'custom_fields': ([SubCustomField],), # noqa: E501 - 'files': ([file_type],), # noqa: E501 - 'file_urls': ([str],), # noqa: E501 - 'message': (str,), # noqa: E501 - 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 - 'signing_options': (SubSigningOptions,), # noqa: E501 - 'subject': (str,), # noqa: E501 - 'test_mode': (bool,), # noqa: E501 - 'title': (str,), # noqa: E501 - 'populate_auto_fill_fields': (bool,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> SignatureRequestCreateEmbeddedWithTemplateRequest: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[SignatureRequestCreateEmbeddedWithTemplateRequest], - _check_type=True, - ) - - - attribute_map = { - 'template_ids': 'template_ids', # noqa: E501 - 'client_id': 'client_id', # noqa: E501 - 'signers': 'signers', # noqa: E501 - 'allow_decline': 'allow_decline', # noqa: E501 - 'ccs': 'ccs', # noqa: E501 - 'custom_fields': 'custom_fields', # noqa: E501 - 'files': 'files', # noqa: E501 - 'file_urls': 'file_urls', # noqa: E501 - 'message': 'message', # noqa: E501 - 'metadata': 'metadata', # noqa: E501 - 'signing_options': 'signing_options', # noqa: E501 - 'subject': 'subject', # noqa: E501 - 'test_mode': 'test_mode', # noqa: E501 - 'title': 'title', # noqa: E501 - 'populate_auto_fill_fields': 'populate_auto_fill_fields', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def template_ids(self) -> List[str]: - return self.get("template_ids") - - @template_ids.setter - def template_ids(self, value: List[str]): - setattr(self, "template_ids", value) - - @property - def client_id(self) -> str: - return self.get("client_id") - - @client_id.setter - def client_id(self, value: str): - setattr(self, "client_id", value) - - @property - def signers(self) -> List[SubSignatureRequestTemplateSigner]: - return self.get("signers") - - @signers.setter - def signers(self, value: List[SubSignatureRequestTemplateSigner]): - setattr(self, "signers", value) - - @property - def allow_decline(self) -> bool: - return self.get("allow_decline") - - @allow_decline.setter - def allow_decline(self, value: bool): - setattr(self, "allow_decline", value) - - @property - def ccs(self) -> List[SubCC]: - return self.get("ccs") - - @ccs.setter - def ccs(self, value: List[SubCC]): - setattr(self, "ccs", value) - - @property - def custom_fields(self) -> List[SubCustomField]: - return self.get("custom_fields") - - @custom_fields.setter - def custom_fields(self, value: List[SubCustomField]): - setattr(self, "custom_fields", value) - - @property - def files(self) -> List[file_type]: - return self.get("files") - - @files.setter - def files(self, value: List[file_type]): - setattr(self, "files", value) - - @property - def file_urls(self) -> List[str]: - return self.get("file_urls") - - @file_urls.setter - def file_urls(self, value: List[str]): - setattr(self, "file_urls", value) - - @property - def message(self) -> str: - return self.get("message") - - @message.setter - def message(self, value: str): - setattr(self, "message", value) - - @property - def metadata(self) -> Dict[str, Union[bool, date, datetime, dict, float, int, list, str, none_type]]: - return self.get("metadata") - - @metadata.setter - def metadata(self, value: Dict[str, Union[bool, date, datetime, dict, float, int, list, str, none_type]]): - setattr(self, "metadata", value) - - @property - def signing_options(self) -> SubSigningOptions: - return self.get("signing_options") - - @signing_options.setter - def signing_options(self, value: SubSigningOptions): - setattr(self, "signing_options", value) - - @property - def subject(self) -> str: - return self.get("subject") - - @subject.setter - def subject(self, value: str): - setattr(self, "subject", value) - - @property - def test_mode(self) -> bool: - return self.get("test_mode") - - @test_mode.setter - def test_mode(self, value: bool): - setattr(self, "test_mode", value) - - @property - def title(self) -> str: - return self.get("title") - - @title.setter - def title(self, value: str): - setattr(self, "title", value) - - @property - def populate_auto_fill_fields(self) -> bool: - return self.get("populate_auto_fill_fields") - - @populate_auto_fill_fields.setter - def populate_auto_fill_fields(self, value: bool): - setattr(self, "populate_auto_fill_fields", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, template_ids, client_id, signers, *args, **kwargs): # noqa: E501 - """SignatureRequestCreateEmbeddedWithTemplateRequest - a model defined in OpenAPI - - Args: - template_ids ([str]): Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. - client_id (str): Client id of the app you're using to create this embedded signature request. Used for security purposes. - signers ([SubSignatureRequestTemplateSigner]): Add Signers to your Templated-based Signature Request. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - allow_decline (bool): Allows signers to decline to sign a document if `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - ccs ([SubCC]): Add CC email recipients. Required when a CC role exists for the Template.. [optional] # noqa: E501 - custom_fields ([SubCustomField]): An array defining values and options for custom fields. Required when a custom field exists in the Template.. [optional] # noqa: E501 - files ([file_type]): Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.. [optional] # noqa: E501 - file_urls ([str]): 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.. [optional] # noqa: E501 - message (str): The custom message in the email that will be sent to the signers.. [optional] # noqa: E501 - metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): 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.. [optional] # noqa: E501 - signing_options (SubSigningOptions): [optional] # noqa: E501 - subject (str): The subject in the email that will be sent to the signers.. [optional] # noqa: E501 - test_mode (bool): Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - title (str): The title you want to assign to the SignatureRequest.. [optional] # noqa: E501 - populate_auto_fill_fields (bool): 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.. [optional] if omitted the server will use the default value of False # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.template_ids = template_ids - self.client_id = client_id - self.signers = signers - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, template_ids, client_id, signers, *args, **kwargs): # noqa: E501 - """SignatureRequestCreateEmbeddedWithTemplateRequest - a model defined in OpenAPI - - Args: - template_ids ([str]): Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. - client_id (str): Client id of the app you're using to create this embedded signature request. Used for security purposes. - signers ([SubSignatureRequestTemplateSigner]): Add Signers to your Templated-based Signature Request. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - allow_decline (bool): Allows signers to decline to sign a document if `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - ccs ([SubCC]): Add CC email recipients. Required when a CC role exists for the Template.. [optional] # noqa: E501 - custom_fields ([SubCustomField]): An array defining values and options for custom fields. Required when a custom field exists in the Template.. [optional] # noqa: E501 - files ([file_type]): Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.. [optional] # noqa: E501 - file_urls ([str]): 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.. [optional] # noqa: E501 - message (str): The custom message in the email that will be sent to the signers.. [optional] # noqa: E501 - metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): 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.. [optional] # noqa: E501 - signing_options (SubSigningOptions): [optional] # noqa: E501 - subject (str): The subject in the email that will be sent to the signers.. [optional] # noqa: E501 - test_mode (bool): Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - title (str): The title you want to assign to the SignatureRequest.. [optional] # noqa: E501 - populate_auto_fill_fields (bool): 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.. [optional] if omitted the server will use the default value of False # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.template_ids = template_ids - self.client_id = client_id - self.signers = signers - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/signature_request_edit_embedded_request.py b/sdks/python/dropbox_sign/model/signature_request_edit_embedded_request.py deleted file mode 100644 index 831290ef4..000000000 --- a/sdks/python/dropbox_sign/model/signature_request_edit_embedded_request.py +++ /dev/null @@ -1,608 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 - -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.sub_attachment import SubAttachment - from dropbox_sign.model.sub_custom_field import SubCustomField - from dropbox_sign.model.sub_field_options import SubFieldOptions - from dropbox_sign.model.sub_form_field_group import SubFormFieldGroup - from dropbox_sign.model.sub_form_field_rule import SubFormFieldRule - from dropbox_sign.model.sub_form_fields_per_document_base import SubFormFieldsPerDocumentBase - from dropbox_sign.model.sub_signature_request_grouped_signers import SubSignatureRequestGroupedSigners - from dropbox_sign.model.sub_signature_request_signer import SubSignatureRequestSigner - from dropbox_sign.model.sub_signing_options import SubSigningOptions - - -def lazy_import(): - from dropbox_sign.model.sub_attachment import SubAttachment - from dropbox_sign.model.sub_custom_field import SubCustomField - from dropbox_sign.model.sub_field_options import SubFieldOptions - from dropbox_sign.model.sub_form_field_group import SubFormFieldGroup - from dropbox_sign.model.sub_form_field_rule import SubFormFieldRule - from dropbox_sign.model.sub_form_fields_per_document_base import SubFormFieldsPerDocumentBase - from dropbox_sign.model.sub_signature_request_grouped_signers import SubSignatureRequestGroupedSigners - from dropbox_sign.model.sub_signature_request_signer import SubSignatureRequestSigner - from dropbox_sign.model.sub_signing_options import SubSigningOptions - globals()['SubAttachment'] = SubAttachment - globals()['SubCustomField'] = SubCustomField - globals()['SubFieldOptions'] = SubFieldOptions - globals()['SubFormFieldGroup'] = SubFormFieldGroup - globals()['SubFormFieldRule'] = SubFormFieldRule - globals()['SubFormFieldsPerDocumentBase'] = SubFormFieldsPerDocumentBase - globals()['SubSignatureRequestGroupedSigners'] = SubSignatureRequestGroupedSigners - globals()['SubSignatureRequestSigner'] = SubSignatureRequestSigner - globals()['SubSigningOptions'] = SubSigningOptions - - -class SignatureRequestEditEmbeddedRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - ('message',): { - 'max_length': 5000, - }, - ('metadata',): { - }, - ('subject',): { - 'max_length': 255, - }, - ('title',): { - 'max_length': 255, - }, - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'client_id': (str,), # noqa: E501 - 'files': ([file_type],), # noqa: E501 - 'file_urls': ([str],), # noqa: E501 - 'signers': ([SubSignatureRequestSigner],), # noqa: E501 - 'grouped_signers': ([SubSignatureRequestGroupedSigners],), # noqa: E501 - 'allow_decline': (bool,), # noqa: E501 - 'allow_reassign': (bool,), # noqa: E501 - 'attachments': ([SubAttachment],), # noqa: E501 - 'cc_email_addresses': ([str],), # noqa: E501 - 'custom_fields': ([SubCustomField],), # noqa: E501 - 'field_options': (SubFieldOptions,), # noqa: E501 - 'form_field_groups': ([SubFormFieldGroup],), # noqa: E501 - 'form_field_rules': ([SubFormFieldRule],), # noqa: E501 - 'form_fields_per_document': ([SubFormFieldsPerDocumentBase],), # noqa: E501 - 'hide_text_tags': (bool,), # noqa: E501 - 'message': (str,), # noqa: E501 - 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 - 'signing_options': (SubSigningOptions,), # noqa: E501 - 'subject': (str,), # noqa: E501 - 'test_mode': (bool,), # noqa: E501 - 'title': (str,), # noqa: E501 - 'use_text_tags': (bool,), # noqa: E501 - 'populate_auto_fill_fields': (bool,), # noqa: E501 - 'expires_at': (int, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> SignatureRequestEditEmbeddedRequest: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[SignatureRequestEditEmbeddedRequest], - _check_type=True, - ) - - attribute_map = { - 'client_id': 'client_id', # noqa: E501 - 'files': 'files', # noqa: E501 - 'file_urls': 'file_urls', # noqa: E501 - 'signers': 'signers', # noqa: E501 - 'grouped_signers': 'grouped_signers', # noqa: E501 - 'allow_decline': 'allow_decline', # noqa: E501 - 'allow_reassign': 'allow_reassign', # noqa: E501 - 'attachments': 'attachments', # noqa: E501 - 'cc_email_addresses': 'cc_email_addresses', # noqa: E501 - 'custom_fields': 'custom_fields', # noqa: E501 - 'field_options': 'field_options', # noqa: E501 - 'form_field_groups': 'form_field_groups', # noqa: E501 - 'form_field_rules': 'form_field_rules', # noqa: E501 - 'form_fields_per_document': 'form_fields_per_document', # noqa: E501 - 'hide_text_tags': 'hide_text_tags', # noqa: E501 - 'message': 'message', # noqa: E501 - 'metadata': 'metadata', # noqa: E501 - 'signing_options': 'signing_options', # noqa: E501 - 'subject': 'subject', # noqa: E501 - 'test_mode': 'test_mode', # noqa: E501 - 'title': 'title', # noqa: E501 - 'use_text_tags': 'use_text_tags', # noqa: E501 - 'populate_auto_fill_fields': 'populate_auto_fill_fields', # noqa: E501 - 'expires_at': 'expires_at', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def client_id(self) -> str: - return self.get("client_id") - - @client_id.setter - def client_id(self, value: str): - setattr(self, "client_id", value) - - @property - def files(self) -> List[file_type]: - return self.get("files") - - @files.setter - def files(self, value: List[file_type]): - setattr(self, "files", value) - - @property - def file_urls(self) -> List[str]: - return self.get("file_urls") - - @file_urls.setter - def file_urls(self, value: List[str]): - setattr(self, "file_urls", value) - - @property - def signers(self) -> List[SubSignatureRequestSigner]: - return self.get("signers") - - @signers.setter - def signers(self, value: List[SubSignatureRequestSigner]): - setattr(self, "signers", value) - - @property - def grouped_signers(self) -> List[SubSignatureRequestGroupedSigners]: - return self.get("grouped_signers") - - @grouped_signers.setter - def grouped_signers(self, value: List[SubSignatureRequestGroupedSigners]): - setattr(self, "grouped_signers", value) - - @property - def allow_decline(self) -> bool: - return self.get("allow_decline") - - @allow_decline.setter - def allow_decline(self, value: bool): - setattr(self, "allow_decline", value) - - @property - def allow_reassign(self) -> bool: - return self.get("allow_reassign") - - @allow_reassign.setter - def allow_reassign(self, value: bool): - setattr(self, "allow_reassign", value) - - @property - def attachments(self) -> List[SubAttachment]: - return self.get("attachments") - - @attachments.setter - def attachments(self, value: List[SubAttachment]): - setattr(self, "attachments", value) - - @property - def cc_email_addresses(self) -> List[str]: - return self.get("cc_email_addresses") - - @cc_email_addresses.setter - def cc_email_addresses(self, value: List[str]): - setattr(self, "cc_email_addresses", value) - - @property - def custom_fields(self) -> List[SubCustomField]: - return self.get("custom_fields") - - @custom_fields.setter - def custom_fields(self, value: List[SubCustomField]): - setattr(self, "custom_fields", value) - - @property - def field_options(self) -> SubFieldOptions: - return self.get("field_options") - - @field_options.setter - def field_options(self, value: SubFieldOptions): - setattr(self, "field_options", value) - - @property - def form_field_groups(self) -> List[SubFormFieldGroup]: - return self.get("form_field_groups") - - @form_field_groups.setter - def form_field_groups(self, value: List[SubFormFieldGroup]): - setattr(self, "form_field_groups", value) - - @property - def form_field_rules(self) -> List[SubFormFieldRule]: - return self.get("form_field_rules") - - @form_field_rules.setter - def form_field_rules(self, value: List[SubFormFieldRule]): - setattr(self, "form_field_rules", value) - - @property - def form_fields_per_document(self) -> List[SubFormFieldsPerDocumentBase]: - return self.get("form_fields_per_document") - - @form_fields_per_document.setter - def form_fields_per_document(self, value: List[SubFormFieldsPerDocumentBase]): - setattr(self, "form_fields_per_document", value) - - @property - def hide_text_tags(self) -> bool: - return self.get("hide_text_tags") - - @hide_text_tags.setter - def hide_text_tags(self, value: bool): - setattr(self, "hide_text_tags", value) - - @property - def message(self) -> str: - return self.get("message") - - @message.setter - def message(self, value: str): - setattr(self, "message", value) - - @property - def metadata(self) -> Dict[str, Union[bool, date, datetime, dict, float, int, list, str, none_type]]: - return self.get("metadata") - - @metadata.setter - def metadata(self, value: Dict[str, Union[bool, date, datetime, dict, float, int, list, str, none_type]]): - setattr(self, "metadata", value) - - @property - def signing_options(self) -> SubSigningOptions: - return self.get("signing_options") - - @signing_options.setter - def signing_options(self, value: SubSigningOptions): - setattr(self, "signing_options", value) - - @property - def subject(self) -> str: - return self.get("subject") - - @subject.setter - def subject(self, value: str): - setattr(self, "subject", value) - - @property - def test_mode(self) -> bool: - return self.get("test_mode") - - @test_mode.setter - def test_mode(self, value: bool): - setattr(self, "test_mode", value) - - @property - def title(self) -> str: - return self.get("title") - - @title.setter - def title(self, value: str): - setattr(self, "title", value) - - @property - def use_text_tags(self) -> bool: - return self.get("use_text_tags") - - @use_text_tags.setter - def use_text_tags(self, value: bool): - setattr(self, "use_text_tags", value) - - @property - def populate_auto_fill_fields(self) -> bool: - return self.get("populate_auto_fill_fields") - - @populate_auto_fill_fields.setter - def populate_auto_fill_fields(self, value: bool): - setattr(self, "populate_auto_fill_fields", value) - - @property - def expires_at(self) -> Optional[int]: - return self.get("expires_at") - - @expires_at.setter - def expires_at(self, value: Optional[int]): - setattr(self, "expires_at", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, client_id, *args, **kwargs): # noqa: E501 - """SignatureRequestEditEmbeddedRequest - a model defined in OpenAPI - - Args: - client_id (str): Client id of the app you're using to create this embedded signature request. Used for security purposes. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - files ([file_type]): Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.. [optional] # noqa: E501 - file_urls ([str]): 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.. [optional] # noqa: E501 - signers ([SubSignatureRequestSigner]): Add Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both.. [optional] # noqa: E501 - grouped_signers ([SubSignatureRequestGroupedSigners]): Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both.. [optional] # noqa: E501 - allow_decline (bool): Allows signers to decline to sign a document if `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - allow_reassign (bool): Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan.. [optional] if omitted the server will use the default value of False # noqa: E501 - attachments ([SubAttachment]): A list describing the attachments. [optional] # noqa: E501 - cc_email_addresses ([str]): The email addresses that should be CCed.. [optional] # noqa: E501 - custom_fields ([SubCustomField]): 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.. [optional] # noqa: E501 - field_options (SubFieldOptions): [optional] # noqa: E501 - form_field_groups ([SubFormFieldGroup]): 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`.. [optional] # noqa: E501 - form_field_rules ([SubFormFieldRule]): Conditional Logic rules for fields defined in `form_fields_per_document`.. [optional] # noqa: E501 - form_fields_per_document ([SubFormFieldsPerDocumentBase]): 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`. [optional] # noqa: E501 - hide_text_tags (bool): 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.. [optional] if omitted the server will use the default value of False # noqa: E501 - message (str): The custom message in the email that will be sent to the signers.. [optional] # noqa: E501 - metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): 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.. [optional] # noqa: E501 - signing_options (SubSigningOptions): [optional] # noqa: E501 - subject (str): The subject in the email that will be sent to the signers.. [optional] # noqa: E501 - test_mode (bool): Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - title (str): The title you want to assign to the SignatureRequest.. [optional] # noqa: E501 - use_text_tags (bool): 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`.. [optional] if omitted the server will use the default value of False # noqa: E501 - populate_auto_fill_fields (bool): 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.. [optional] if omitted the server will use the default value of False # noqa: E501 - expires_at (int, none_type): 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.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.client_id = client_id - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, client_id, *args, **kwargs): # noqa: E501 - """SignatureRequestEditEmbeddedRequest - a model defined in OpenAPI - - Args: - client_id (str): Client id of the app you're using to create this embedded signature request. Used for security purposes. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - files ([file_type]): Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.. [optional] # noqa: E501 - file_urls ([str]): 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.. [optional] # noqa: E501 - signers ([SubSignatureRequestSigner]): Add Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both.. [optional] # noqa: E501 - grouped_signers ([SubSignatureRequestGroupedSigners]): Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both.. [optional] # noqa: E501 - allow_decline (bool): Allows signers to decline to sign a document if `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - allow_reassign (bool): Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan.. [optional] if omitted the server will use the default value of False # noqa: E501 - attachments ([SubAttachment]): A list describing the attachments. [optional] # noqa: E501 - cc_email_addresses ([str]): The email addresses that should be CCed.. [optional] # noqa: E501 - custom_fields ([SubCustomField]): 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.. [optional] # noqa: E501 - field_options (SubFieldOptions): [optional] # noqa: E501 - form_field_groups ([SubFormFieldGroup]): 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`.. [optional] # noqa: E501 - form_field_rules ([SubFormFieldRule]): Conditional Logic rules for fields defined in `form_fields_per_document`.. [optional] # noqa: E501 - form_fields_per_document ([SubFormFieldsPerDocumentBase]): 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`. [optional] # noqa: E501 - hide_text_tags (bool): 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.. [optional] if omitted the server will use the default value of False # noqa: E501 - message (str): The custom message in the email that will be sent to the signers.. [optional] # noqa: E501 - metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): 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.. [optional] # noqa: E501 - signing_options (SubSigningOptions): [optional] # noqa: E501 - subject (str): The subject in the email that will be sent to the signers.. [optional] # noqa: E501 - test_mode (bool): Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - title (str): The title you want to assign to the SignatureRequest.. [optional] # noqa: E501 - use_text_tags (bool): 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`.. [optional] if omitted the server will use the default value of False # noqa: E501 - populate_auto_fill_fields (bool): 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.. [optional] if omitted the server will use the default value of False # noqa: E501 - expires_at (int, none_type): 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.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.client_id = client_id - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/signature_request_edit_embedded_with_template_request.py b/sdks/python/dropbox_sign/model/signature_request_edit_embedded_with_template_request.py deleted file mode 100644 index 8e3e2cb63..000000000 --- a/sdks/python/dropbox_sign/model/signature_request_edit_embedded_with_template_request.py +++ /dev/null @@ -1,489 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 - -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.sub_cc import SubCC - from dropbox_sign.model.sub_custom_field import SubCustomField - from dropbox_sign.model.sub_signature_request_template_signer import SubSignatureRequestTemplateSigner - from dropbox_sign.model.sub_signing_options import SubSigningOptions - - -def lazy_import(): - from dropbox_sign.model.sub_cc import SubCC - from dropbox_sign.model.sub_custom_field import SubCustomField - from dropbox_sign.model.sub_signature_request_template_signer import SubSignatureRequestTemplateSigner - from dropbox_sign.model.sub_signing_options import SubSigningOptions - globals()['SubCC'] = SubCC - globals()['SubCustomField'] = SubCustomField - globals()['SubSignatureRequestTemplateSigner'] = SubSignatureRequestTemplateSigner - globals()['SubSigningOptions'] = SubSigningOptions - - -class SignatureRequestEditEmbeddedWithTemplateRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - ('message',): { - 'max_length': 5000, - }, - ('metadata',): { - }, - ('subject',): { - 'max_length': 255, - }, - ('title',): { - 'max_length': 255, - }, - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'template_ids': ([str],), # noqa: E501 - 'client_id': (str,), # noqa: E501 - 'signers': ([SubSignatureRequestTemplateSigner],), # noqa: E501 - 'allow_decline': (bool,), # noqa: E501 - 'ccs': ([SubCC],), # noqa: E501 - 'custom_fields': ([SubCustomField],), # noqa: E501 - 'files': ([file_type],), # noqa: E501 - 'file_urls': ([str],), # noqa: E501 - 'message': (str,), # noqa: E501 - 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 - 'signing_options': (SubSigningOptions,), # noqa: E501 - 'subject': (str,), # noqa: E501 - 'test_mode': (bool,), # noqa: E501 - 'title': (str,), # noqa: E501 - 'populate_auto_fill_fields': (bool,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> SignatureRequestEditEmbeddedWithTemplateRequest: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[SignatureRequestEditEmbeddedWithTemplateRequest], - _check_type=True, - ) - - attribute_map = { - 'template_ids': 'template_ids', # noqa: E501 - 'client_id': 'client_id', # noqa: E501 - 'signers': 'signers', # noqa: E501 - 'allow_decline': 'allow_decline', # noqa: E501 - 'ccs': 'ccs', # noqa: E501 - 'custom_fields': 'custom_fields', # noqa: E501 - 'files': 'files', # noqa: E501 - 'file_urls': 'file_urls', # noqa: E501 - 'message': 'message', # noqa: E501 - 'metadata': 'metadata', # noqa: E501 - 'signing_options': 'signing_options', # noqa: E501 - 'subject': 'subject', # noqa: E501 - 'test_mode': 'test_mode', # noqa: E501 - 'title': 'title', # noqa: E501 - 'populate_auto_fill_fields': 'populate_auto_fill_fields', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def template_ids(self) -> List[str]: - return self.get("template_ids") - - @template_ids.setter - def template_ids(self, value: List[str]): - setattr(self, "template_ids", value) - - @property - def client_id(self) -> str: - return self.get("client_id") - - @client_id.setter - def client_id(self, value: str): - setattr(self, "client_id", value) - - @property - def signers(self) -> List[SubSignatureRequestTemplateSigner]: - return self.get("signers") - - @signers.setter - def signers(self, value: List[SubSignatureRequestTemplateSigner]): - setattr(self, "signers", value) - - @property - def allow_decline(self) -> bool: - return self.get("allow_decline") - - @allow_decline.setter - def allow_decline(self, value: bool): - setattr(self, "allow_decline", value) - - @property - def ccs(self) -> List[SubCC]: - return self.get("ccs") - - @ccs.setter - def ccs(self, value: List[SubCC]): - setattr(self, "ccs", value) - - @property - def custom_fields(self) -> List[SubCustomField]: - return self.get("custom_fields") - - @custom_fields.setter - def custom_fields(self, value: List[SubCustomField]): - setattr(self, "custom_fields", value) - - @property - def files(self) -> List[file_type]: - return self.get("files") - - @files.setter - def files(self, value: List[file_type]): - setattr(self, "files", value) - - @property - def file_urls(self) -> List[str]: - return self.get("file_urls") - - @file_urls.setter - def file_urls(self, value: List[str]): - setattr(self, "file_urls", value) - - @property - def message(self) -> str: - return self.get("message") - - @message.setter - def message(self, value: str): - setattr(self, "message", value) - - @property - def metadata(self) -> Dict[str, Union[bool, date, datetime, dict, float, int, list, str, none_type]]: - return self.get("metadata") - - @metadata.setter - def metadata(self, value: Dict[str, Union[bool, date, datetime, dict, float, int, list, str, none_type]]): - setattr(self, "metadata", value) - - @property - def signing_options(self) -> SubSigningOptions: - return self.get("signing_options") - - @signing_options.setter - def signing_options(self, value: SubSigningOptions): - setattr(self, "signing_options", value) - - @property - def subject(self) -> str: - return self.get("subject") - - @subject.setter - def subject(self, value: str): - setattr(self, "subject", value) - - @property - def test_mode(self) -> bool: - return self.get("test_mode") - - @test_mode.setter - def test_mode(self, value: bool): - setattr(self, "test_mode", value) - - @property - def title(self) -> str: - return self.get("title") - - @title.setter - def title(self, value: str): - setattr(self, "title", value) - - @property - def populate_auto_fill_fields(self) -> bool: - return self.get("populate_auto_fill_fields") - - @populate_auto_fill_fields.setter - def populate_auto_fill_fields(self, value: bool): - setattr(self, "populate_auto_fill_fields", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, template_ids, client_id, signers, *args, **kwargs): # noqa: E501 - """SignatureRequestEditEmbeddedWithTemplateRequest - a model defined in OpenAPI - - Args: - template_ids ([str]): Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. - client_id (str): Client id of the app you're using to create this embedded signature request. Used for security purposes. - signers ([SubSignatureRequestTemplateSigner]): Add Signers to your Templated-based Signature Request. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - allow_decline (bool): Allows signers to decline to sign a document if `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - ccs ([SubCC]): Add CC email recipients. Required when a CC role exists for the Template.. [optional] # noqa: E501 - custom_fields ([SubCustomField]): An array defining values and options for custom fields. Required when a custom field exists in the Template.. [optional] # noqa: E501 - files ([file_type]): Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.. [optional] # noqa: E501 - file_urls ([str]): 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.. [optional] # noqa: E501 - message (str): The custom message in the email that will be sent to the signers.. [optional] # noqa: E501 - metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): 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.. [optional] # noqa: E501 - signing_options (SubSigningOptions): [optional] # noqa: E501 - subject (str): The subject in the email that will be sent to the signers.. [optional] # noqa: E501 - test_mode (bool): Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - title (str): The title you want to assign to the SignatureRequest.. [optional] # noqa: E501 - populate_auto_fill_fields (bool): 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.. [optional] if omitted the server will use the default value of False # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.template_ids = template_ids - self.client_id = client_id - self.signers = signers - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, template_ids, client_id, signers, *args, **kwargs): # noqa: E501 - """SignatureRequestEditEmbeddedWithTemplateRequest - a model defined in OpenAPI - - Args: - template_ids ([str]): Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. - client_id (str): Client id of the app you're using to create this embedded signature request. Used for security purposes. - signers ([SubSignatureRequestTemplateSigner]): Add Signers to your Templated-based Signature Request. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - allow_decline (bool): Allows signers to decline to sign a document if `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - ccs ([SubCC]): Add CC email recipients. Required when a CC role exists for the Template.. [optional] # noqa: E501 - custom_fields ([SubCustomField]): An array defining values and options for custom fields. Required when a custom field exists in the Template.. [optional] # noqa: E501 - files ([file_type]): Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.. [optional] # noqa: E501 - file_urls ([str]): 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.. [optional] # noqa: E501 - message (str): The custom message in the email that will be sent to the signers.. [optional] # noqa: E501 - metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): 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.. [optional] # noqa: E501 - signing_options (SubSigningOptions): [optional] # noqa: E501 - subject (str): The subject in the email that will be sent to the signers.. [optional] # noqa: E501 - test_mode (bool): Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - title (str): The title you want to assign to the SignatureRequest.. [optional] # noqa: E501 - populate_auto_fill_fields (bool): 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.. [optional] if omitted the server will use the default value of False # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.template_ids = template_ids - self.client_id = client_id - self.signers = signers - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/signature_request_edit_request.py b/sdks/python/dropbox_sign/model/signature_request_edit_request.py deleted file mode 100644 index 42d01ad86..000000000 --- a/sdks/python/dropbox_sign/model/signature_request_edit_request.py +++ /dev/null @@ -1,626 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 - -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.sub_attachment import SubAttachment - from dropbox_sign.model.sub_custom_field import SubCustomField - from dropbox_sign.model.sub_field_options import SubFieldOptions - from dropbox_sign.model.sub_form_field_group import SubFormFieldGroup - from dropbox_sign.model.sub_form_field_rule import SubFormFieldRule - from dropbox_sign.model.sub_form_fields_per_document_base import SubFormFieldsPerDocumentBase - from dropbox_sign.model.sub_signature_request_grouped_signers import SubSignatureRequestGroupedSigners - from dropbox_sign.model.sub_signature_request_signer import SubSignatureRequestSigner - from dropbox_sign.model.sub_signing_options import SubSigningOptions - - -def lazy_import(): - from dropbox_sign.model.sub_attachment import SubAttachment - from dropbox_sign.model.sub_custom_field import SubCustomField - from dropbox_sign.model.sub_field_options import SubFieldOptions - from dropbox_sign.model.sub_form_field_group import SubFormFieldGroup - from dropbox_sign.model.sub_form_field_rule import SubFormFieldRule - from dropbox_sign.model.sub_form_fields_per_document_base import SubFormFieldsPerDocumentBase - from dropbox_sign.model.sub_signature_request_grouped_signers import SubSignatureRequestGroupedSigners - from dropbox_sign.model.sub_signature_request_signer import SubSignatureRequestSigner - from dropbox_sign.model.sub_signing_options import SubSigningOptions - globals()['SubAttachment'] = SubAttachment - globals()['SubCustomField'] = SubCustomField - globals()['SubFieldOptions'] = SubFieldOptions - globals()['SubFormFieldGroup'] = SubFormFieldGroup - globals()['SubFormFieldRule'] = SubFormFieldRule - globals()['SubFormFieldsPerDocumentBase'] = SubFormFieldsPerDocumentBase - globals()['SubSignatureRequestGroupedSigners'] = SubSignatureRequestGroupedSigners - globals()['SubSignatureRequestSigner'] = SubSignatureRequestSigner - globals()['SubSigningOptions'] = SubSigningOptions - - -class SignatureRequestEditRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - ('message',): { - 'max_length': 5000, - }, - ('metadata',): { - }, - ('subject',): { - 'max_length': 255, - }, - ('title',): { - 'max_length': 255, - }, - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'files': ([file_type],), # noqa: E501 - 'file_urls': ([str],), # noqa: E501 - 'signers': ([SubSignatureRequestSigner],), # noqa: E501 - 'grouped_signers': ([SubSignatureRequestGroupedSigners],), # noqa: E501 - 'allow_decline': (bool,), # noqa: E501 - 'allow_reassign': (bool,), # noqa: E501 - 'attachments': ([SubAttachment],), # noqa: E501 - 'cc_email_addresses': ([str],), # noqa: E501 - 'client_id': (str,), # noqa: E501 - 'custom_fields': ([SubCustomField],), # noqa: E501 - 'field_options': (SubFieldOptions,), # noqa: E501 - 'form_field_groups': ([SubFormFieldGroup],), # noqa: E501 - 'form_field_rules': ([SubFormFieldRule],), # noqa: E501 - 'form_fields_per_document': ([SubFormFieldsPerDocumentBase],), # noqa: E501 - 'hide_text_tags': (bool,), # noqa: E501 - 'is_qualified_signature': (bool,), # noqa: E501 - 'is_eid': (bool,), # noqa: E501 - 'message': (str,), # noqa: E501 - 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 - 'signing_options': (SubSigningOptions,), # noqa: E501 - 'signing_redirect_url': (str,), # noqa: E501 - 'subject': (str,), # noqa: E501 - 'test_mode': (bool,), # noqa: E501 - 'title': (str,), # noqa: E501 - 'use_text_tags': (bool,), # noqa: E501 - 'expires_at': (int, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> SignatureRequestEditRequest: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[SignatureRequestEditRequest], - _check_type=True, - ) - - attribute_map = { - 'files': 'files', # noqa: E501 - 'file_urls': 'file_urls', # noqa: E501 - 'signers': 'signers', # noqa: E501 - 'grouped_signers': 'grouped_signers', # noqa: E501 - 'allow_decline': 'allow_decline', # noqa: E501 - 'allow_reassign': 'allow_reassign', # noqa: E501 - 'attachments': 'attachments', # noqa: E501 - 'cc_email_addresses': 'cc_email_addresses', # noqa: E501 - 'client_id': 'client_id', # noqa: E501 - 'custom_fields': 'custom_fields', # noqa: E501 - 'field_options': 'field_options', # noqa: E501 - 'form_field_groups': 'form_field_groups', # noqa: E501 - 'form_field_rules': 'form_field_rules', # noqa: E501 - 'form_fields_per_document': 'form_fields_per_document', # noqa: E501 - 'hide_text_tags': 'hide_text_tags', # noqa: E501 - 'is_qualified_signature': 'is_qualified_signature', # noqa: E501 - 'is_eid': 'is_eid', # noqa: E501 - 'message': 'message', # noqa: E501 - 'metadata': 'metadata', # noqa: E501 - 'signing_options': 'signing_options', # noqa: E501 - 'signing_redirect_url': 'signing_redirect_url', # noqa: E501 - 'subject': 'subject', # noqa: E501 - 'test_mode': 'test_mode', # noqa: E501 - 'title': 'title', # noqa: E501 - 'use_text_tags': 'use_text_tags', # noqa: E501 - 'expires_at': 'expires_at', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def files(self) -> List[file_type]: - return self.get("files") - - @files.setter - def files(self, value: List[file_type]): - setattr(self, "files", value) - - @property - def file_urls(self) -> List[str]: - return self.get("file_urls") - - @file_urls.setter - def file_urls(self, value: List[str]): - setattr(self, "file_urls", value) - - @property - def signers(self) -> List[SubSignatureRequestSigner]: - return self.get("signers") - - @signers.setter - def signers(self, value: List[SubSignatureRequestSigner]): - setattr(self, "signers", value) - - @property - def grouped_signers(self) -> List[SubSignatureRequestGroupedSigners]: - return self.get("grouped_signers") - - @grouped_signers.setter - def grouped_signers(self, value: List[SubSignatureRequestGroupedSigners]): - setattr(self, "grouped_signers", value) - - @property - def allow_decline(self) -> bool: - return self.get("allow_decline") - - @allow_decline.setter - def allow_decline(self, value: bool): - setattr(self, "allow_decline", value) - - @property - def allow_reassign(self) -> bool: - return self.get("allow_reassign") - - @allow_reassign.setter - def allow_reassign(self, value: bool): - setattr(self, "allow_reassign", value) - - @property - def attachments(self) -> List[SubAttachment]: - return self.get("attachments") - - @attachments.setter - def attachments(self, value: List[SubAttachment]): - setattr(self, "attachments", value) - - @property - def cc_email_addresses(self) -> List[str]: - return self.get("cc_email_addresses") - - @cc_email_addresses.setter - def cc_email_addresses(self, value: List[str]): - setattr(self, "cc_email_addresses", value) - - @property - def client_id(self) -> str: - return self.get("client_id") - - @client_id.setter - def client_id(self, value: str): - setattr(self, "client_id", value) - - @property - def custom_fields(self) -> List[SubCustomField]: - return self.get("custom_fields") - - @custom_fields.setter - def custom_fields(self, value: List[SubCustomField]): - setattr(self, "custom_fields", value) - - @property - def field_options(self) -> SubFieldOptions: - return self.get("field_options") - - @field_options.setter - def field_options(self, value: SubFieldOptions): - setattr(self, "field_options", value) - - @property - def form_field_groups(self) -> List[SubFormFieldGroup]: - return self.get("form_field_groups") - - @form_field_groups.setter - def form_field_groups(self, value: List[SubFormFieldGroup]): - setattr(self, "form_field_groups", value) - - @property - def form_field_rules(self) -> List[SubFormFieldRule]: - return self.get("form_field_rules") - - @form_field_rules.setter - def form_field_rules(self, value: List[SubFormFieldRule]): - setattr(self, "form_field_rules", value) - - @property - def form_fields_per_document(self) -> List[SubFormFieldsPerDocumentBase]: - return self.get("form_fields_per_document") - - @form_fields_per_document.setter - def form_fields_per_document(self, value: List[SubFormFieldsPerDocumentBase]): - setattr(self, "form_fields_per_document", value) - - @property - def hide_text_tags(self) -> bool: - return self.get("hide_text_tags") - - @hide_text_tags.setter - def hide_text_tags(self, value: bool): - setattr(self, "hide_text_tags", value) - - @property - def is_qualified_signature(self) -> bool: - return self.get("is_qualified_signature") - - @is_qualified_signature.setter - def is_qualified_signature(self, value: bool): - setattr(self, "is_qualified_signature", value) - - @property - def is_eid(self) -> bool: - return self.get("is_eid") - - @is_eid.setter - def is_eid(self, value: bool): - setattr(self, "is_eid", value) - - @property - def message(self) -> str: - return self.get("message") - - @message.setter - def message(self, value: str): - setattr(self, "message", value) - - @property - def metadata(self) -> Dict[str, Union[bool, date, datetime, dict, float, int, list, str, none_type]]: - return self.get("metadata") - - @metadata.setter - def metadata(self, value: Dict[str, Union[bool, date, datetime, dict, float, int, list, str, none_type]]): - setattr(self, "metadata", value) - - @property - def signing_options(self) -> SubSigningOptions: - return self.get("signing_options") - - @signing_options.setter - def signing_options(self, value: SubSigningOptions): - setattr(self, "signing_options", value) - - @property - def signing_redirect_url(self) -> str: - return self.get("signing_redirect_url") - - @signing_redirect_url.setter - def signing_redirect_url(self, value: str): - setattr(self, "signing_redirect_url", value) - - @property - def subject(self) -> str: - return self.get("subject") - - @subject.setter - def subject(self, value: str): - setattr(self, "subject", value) - - @property - def test_mode(self) -> bool: - return self.get("test_mode") - - @test_mode.setter - def test_mode(self, value: bool): - setattr(self, "test_mode", value) - - @property - def title(self) -> str: - return self.get("title") - - @title.setter - def title(self, value: str): - setattr(self, "title", value) - - @property - def use_text_tags(self) -> bool: - return self.get("use_text_tags") - - @use_text_tags.setter - def use_text_tags(self, value: bool): - setattr(self, "use_text_tags", value) - - @property - def expires_at(self) -> Optional[int]: - return self.get("expires_at") - - @expires_at.setter - def expires_at(self, value: Optional[int]): - setattr(self, "expires_at", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """SignatureRequestEditRequest - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - files ([file_type]): Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.. [optional] # noqa: E501 - file_urls ([str]): 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.. [optional] # noqa: E501 - signers ([SubSignatureRequestSigner]): Add Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both.. [optional] # noqa: E501 - grouped_signers ([SubSignatureRequestGroupedSigners]): Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both.. [optional] # noqa: E501 - allow_decline (bool): Allows signers to decline to sign a document if `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - allow_reassign (bool): 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.. [optional] if omitted the server will use the default value of False # noqa: E501 - attachments ([SubAttachment]): A list describing the attachments. [optional] # noqa: E501 - cc_email_addresses ([str]): The email addresses that should be CCed.. [optional] # noqa: E501 - client_id (str): 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.. [optional] # noqa: E501 - custom_fields ([SubCustomField]): 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.. [optional] # noqa: E501 - field_options (SubFieldOptions): [optional] # noqa: E501 - form_field_groups ([SubFormFieldGroup]): 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`.. [optional] # noqa: E501 - form_field_rules ([SubFormFieldRule]): Conditional Logic rules for fields defined in `form_fields_per_document`.. [optional] # noqa: E501 - form_fields_per_document ([SubFormFieldsPerDocumentBase]): 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`. [optional] # noqa: E501 - hide_text_tags (bool): 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.. [optional] if omitted the server will use the default value of False # noqa: E501 - is_qualified_signature (bool): 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.. [optional] if omitted the server will use the default value of False # noqa: E501 - is_eid (bool): 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.. [optional] if omitted the server will use the default value of False # noqa: E501 - message (str): The custom message in the email that will be sent to the signers.. [optional] # noqa: E501 - metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): 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.. [optional] # noqa: E501 - signing_options (SubSigningOptions): [optional] # noqa: E501 - signing_redirect_url (str): The URL you want signers redirected to after they successfully sign.. [optional] # noqa: E501 - subject (str): The subject in the email that will be sent to the signers.. [optional] # noqa: E501 - test_mode (bool): Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - title (str): The title you want to assign to the SignatureRequest.. [optional] # noqa: E501 - use_text_tags (bool): 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`.. [optional] if omitted the server will use the default value of False # noqa: E501 - expires_at (int, none_type): 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.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """SignatureRequestEditRequest - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - files ([file_type]): Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.. [optional] # noqa: E501 - file_urls ([str]): 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.. [optional] # noqa: E501 - signers ([SubSignatureRequestSigner]): Add Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both.. [optional] # noqa: E501 - grouped_signers ([SubSignatureRequestGroupedSigners]): Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both.. [optional] # noqa: E501 - allow_decline (bool): Allows signers to decline to sign a document if `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - allow_reassign (bool): 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.. [optional] if omitted the server will use the default value of False # noqa: E501 - attachments ([SubAttachment]): A list describing the attachments. [optional] # noqa: E501 - cc_email_addresses ([str]): The email addresses that should be CCed.. [optional] # noqa: E501 - client_id (str): 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.. [optional] # noqa: E501 - custom_fields ([SubCustomField]): 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.. [optional] # noqa: E501 - field_options (SubFieldOptions): [optional] # noqa: E501 - form_field_groups ([SubFormFieldGroup]): 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`.. [optional] # noqa: E501 - form_field_rules ([SubFormFieldRule]): Conditional Logic rules for fields defined in `form_fields_per_document`.. [optional] # noqa: E501 - form_fields_per_document ([SubFormFieldsPerDocumentBase]): 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`. [optional] # noqa: E501 - hide_text_tags (bool): 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.. [optional] if omitted the server will use the default value of False # noqa: E501 - is_qualified_signature (bool): 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.. [optional] if omitted the server will use the default value of False # noqa: E501 - is_eid (bool): 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.. [optional] if omitted the server will use the default value of False # noqa: E501 - message (str): The custom message in the email that will be sent to the signers.. [optional] # noqa: E501 - metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): 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.. [optional] # noqa: E501 - signing_options (SubSigningOptions): [optional] # noqa: E501 - signing_redirect_url (str): The URL you want signers redirected to after they successfully sign.. [optional] # noqa: E501 - subject (str): The subject in the email that will be sent to the signers.. [optional] # noqa: E501 - test_mode (bool): Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - title (str): The title you want to assign to the SignatureRequest.. [optional] # noqa: E501 - use_text_tags (bool): 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`.. [optional] if omitted the server will use the default value of False # noqa: E501 - expires_at (int, none_type): 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.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/signature_request_edit_with_template_request.py b/sdks/python/dropbox_sign/model/signature_request_edit_with_template_request.py deleted file mode 100644 index 380a06bae..000000000 --- a/sdks/python/dropbox_sign/model/signature_request_edit_with_template_request.py +++ /dev/null @@ -1,511 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 - -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.sub_cc import SubCC - from dropbox_sign.model.sub_custom_field import SubCustomField - from dropbox_sign.model.sub_signature_request_template_signer import SubSignatureRequestTemplateSigner - from dropbox_sign.model.sub_signing_options import SubSigningOptions - - -def lazy_import(): - from dropbox_sign.model.sub_cc import SubCC - from dropbox_sign.model.sub_custom_field import SubCustomField - from dropbox_sign.model.sub_signature_request_template_signer import SubSignatureRequestTemplateSigner - from dropbox_sign.model.sub_signing_options import SubSigningOptions - globals()['SubCC'] = SubCC - globals()['SubCustomField'] = SubCustomField - globals()['SubSignatureRequestTemplateSigner'] = SubSignatureRequestTemplateSigner - globals()['SubSigningOptions'] = SubSigningOptions - - -class SignatureRequestEditWithTemplateRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - ('message',): { - 'max_length': 5000, - }, - ('metadata',): { - }, - ('subject',): { - 'max_length': 255, - }, - ('title',): { - 'max_length': 255, - }, - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'template_ids': ([str],), # noqa: E501 - 'signers': ([SubSignatureRequestTemplateSigner],), # noqa: E501 - 'allow_decline': (bool,), # noqa: E501 - 'ccs': ([SubCC],), # noqa: E501 - 'client_id': (str,), # noqa: E501 - 'custom_fields': ([SubCustomField],), # noqa: E501 - 'files': ([file_type],), # noqa: E501 - 'file_urls': ([str],), # noqa: E501 - 'is_qualified_signature': (bool,), # noqa: E501 - 'is_eid': (bool,), # noqa: E501 - 'message': (str,), # noqa: E501 - 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 - 'signing_options': (SubSigningOptions,), # noqa: E501 - 'signing_redirect_url': (str,), # noqa: E501 - 'subject': (str,), # noqa: E501 - 'test_mode': (bool,), # noqa: E501 - 'title': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> SignatureRequestEditWithTemplateRequest: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[SignatureRequestEditWithTemplateRequest], - _check_type=True, - ) - - attribute_map = { - 'template_ids': 'template_ids', # noqa: E501 - 'signers': 'signers', # noqa: E501 - 'allow_decline': 'allow_decline', # noqa: E501 - 'ccs': 'ccs', # noqa: E501 - 'client_id': 'client_id', # noqa: E501 - 'custom_fields': 'custom_fields', # noqa: E501 - 'files': 'files', # noqa: E501 - 'file_urls': 'file_urls', # noqa: E501 - 'is_qualified_signature': 'is_qualified_signature', # noqa: E501 - 'is_eid': 'is_eid', # noqa: E501 - 'message': 'message', # noqa: E501 - 'metadata': 'metadata', # noqa: E501 - 'signing_options': 'signing_options', # noqa: E501 - 'signing_redirect_url': 'signing_redirect_url', # noqa: E501 - 'subject': 'subject', # noqa: E501 - 'test_mode': 'test_mode', # noqa: E501 - 'title': 'title', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def template_ids(self) -> List[str]: - return self.get("template_ids") - - @template_ids.setter - def template_ids(self, value: List[str]): - setattr(self, "template_ids", value) - - @property - def signers(self) -> List[SubSignatureRequestTemplateSigner]: - return self.get("signers") - - @signers.setter - def signers(self, value: List[SubSignatureRequestTemplateSigner]): - setattr(self, "signers", value) - - @property - def allow_decline(self) -> bool: - return self.get("allow_decline") - - @allow_decline.setter - def allow_decline(self, value: bool): - setattr(self, "allow_decline", value) - - @property - def ccs(self) -> List[SubCC]: - return self.get("ccs") - - @ccs.setter - def ccs(self, value: List[SubCC]): - setattr(self, "ccs", value) - - @property - def client_id(self) -> str: - return self.get("client_id") - - @client_id.setter - def client_id(self, value: str): - setattr(self, "client_id", value) - - @property - def custom_fields(self) -> List[SubCustomField]: - return self.get("custom_fields") - - @custom_fields.setter - def custom_fields(self, value: List[SubCustomField]): - setattr(self, "custom_fields", value) - - @property - def files(self) -> List[file_type]: - return self.get("files") - - @files.setter - def files(self, value: List[file_type]): - setattr(self, "files", value) - - @property - def file_urls(self) -> List[str]: - return self.get("file_urls") - - @file_urls.setter - def file_urls(self, value: List[str]): - setattr(self, "file_urls", value) - - @property - def is_qualified_signature(self) -> bool: - return self.get("is_qualified_signature") - - @is_qualified_signature.setter - def is_qualified_signature(self, value: bool): - setattr(self, "is_qualified_signature", value) - - @property - def is_eid(self) -> bool: - return self.get("is_eid") - - @is_eid.setter - def is_eid(self, value: bool): - setattr(self, "is_eid", value) - - @property - def message(self) -> str: - return self.get("message") - - @message.setter - def message(self, value: str): - setattr(self, "message", value) - - @property - def metadata(self) -> Dict[str, Union[bool, date, datetime, dict, float, int, list, str, none_type]]: - return self.get("metadata") - - @metadata.setter - def metadata(self, value: Dict[str, Union[bool, date, datetime, dict, float, int, list, str, none_type]]): - setattr(self, "metadata", value) - - @property - def signing_options(self) -> SubSigningOptions: - return self.get("signing_options") - - @signing_options.setter - def signing_options(self, value: SubSigningOptions): - setattr(self, "signing_options", value) - - @property - def signing_redirect_url(self) -> str: - return self.get("signing_redirect_url") - - @signing_redirect_url.setter - def signing_redirect_url(self, value: str): - setattr(self, "signing_redirect_url", value) - - @property - def subject(self) -> str: - return self.get("subject") - - @subject.setter - def subject(self, value: str): - setattr(self, "subject", value) - - @property - def test_mode(self) -> bool: - return self.get("test_mode") - - @test_mode.setter - def test_mode(self, value: bool): - setattr(self, "test_mode", value) - - @property - def title(self) -> str: - return self.get("title") - - @title.setter - def title(self, value: str): - setattr(self, "title", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, template_ids, signers, *args, **kwargs): # noqa: E501 - """SignatureRequestEditWithTemplateRequest - a model defined in OpenAPI - - Args: - template_ids ([str]): Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. - signers ([SubSignatureRequestTemplateSigner]): Add Signers to your Templated-based Signature Request. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - allow_decline (bool): Allows signers to decline to sign a document if `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - ccs ([SubCC]): Add CC email recipients. Required when a CC role exists for the Template.. [optional] # noqa: E501 - client_id (str): Client id of the app to associate with the signature request. Used to apply the branding and callback url defined for the app.. [optional] # noqa: E501 - custom_fields ([SubCustomField]): An array defining values and options for custom fields. Required when a custom field exists in the Template.. [optional] # noqa: E501 - files ([file_type]): Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.. [optional] # noqa: E501 - file_urls ([str]): 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.. [optional] # noqa: E501 - is_qualified_signature (bool): 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.. [optional] if omitted the server will use the default value of False # noqa: E501 - is_eid (bool): 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.. [optional] if omitted the server will use the default value of False # noqa: E501 - message (str): The custom message in the email that will be sent to the signers.. [optional] # noqa: E501 - metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): 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.. [optional] # noqa: E501 - signing_options (SubSigningOptions): [optional] # noqa: E501 - signing_redirect_url (str): The URL you want signers redirected to after they successfully sign.. [optional] # noqa: E501 - subject (str): The subject in the email that will be sent to the signers.. [optional] # noqa: E501 - test_mode (bool): Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - title (str): The title you want to assign to the SignatureRequest.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.template_ids = template_ids - self.signers = signers - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, template_ids, signers, *args, **kwargs): # noqa: E501 - """SignatureRequestEditWithTemplateRequest - a model defined in OpenAPI - - Args: - template_ids ([str]): Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. - signers ([SubSignatureRequestTemplateSigner]): Add Signers to your Templated-based Signature Request. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - allow_decline (bool): Allows signers to decline to sign a document if `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - ccs ([SubCC]): Add CC email recipients. Required when a CC role exists for the Template.. [optional] # noqa: E501 - client_id (str): Client id of the app to associate with the signature request. Used to apply the branding and callback url defined for the app.. [optional] # noqa: E501 - custom_fields ([SubCustomField]): An array defining values and options for custom fields. Required when a custom field exists in the Template.. [optional] # noqa: E501 - files ([file_type]): Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.. [optional] # noqa: E501 - file_urls ([str]): 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.. [optional] # noqa: E501 - is_qualified_signature (bool): 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.. [optional] if omitted the server will use the default value of False # noqa: E501 - is_eid (bool): 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.. [optional] if omitted the server will use the default value of False # noqa: E501 - message (str): The custom message in the email that will be sent to the signers.. [optional] # noqa: E501 - metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): 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.. [optional] # noqa: E501 - signing_options (SubSigningOptions): [optional] # noqa: E501 - signing_redirect_url (str): The URL you want signers redirected to after they successfully sign.. [optional] # noqa: E501 - subject (str): The subject in the email that will be sent to the signers.. [optional] # noqa: E501 - test_mode (bool): Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - title (str): The title you want to assign to the SignatureRequest.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.template_ids = template_ids - self.signers = signers - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/signature_request_get_response.py b/sdks/python/dropbox_sign/model/signature_request_get_response.py deleted file mode 100644 index 3431f8055..000000000 --- a/sdks/python/dropbox_sign/model/signature_request_get_response.py +++ /dev/null @@ -1,306 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.signature_request_response import SignatureRequestResponse - from dropbox_sign.model.warning_response import WarningResponse - - -def lazy_import(): - from dropbox_sign.model.signature_request_response import SignatureRequestResponse - from dropbox_sign.model.warning_response import WarningResponse - globals()['SignatureRequestResponse'] = SignatureRequestResponse - globals()['WarningResponse'] = WarningResponse - - -class SignatureRequestGetResponse(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'signature_request': (SignatureRequestResponse,), # noqa: E501 - 'warnings': ([WarningResponse],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> SignatureRequestGetResponse: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[SignatureRequestGetResponse], - _check_type=True, - ) - - - attribute_map = { - 'signature_request': 'signature_request', # noqa: E501 - 'warnings': 'warnings', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def signature_request(self) -> SignatureRequestResponse: - return self.get("signature_request") - - @signature_request.setter - def signature_request(self, value: SignatureRequestResponse): - setattr(self, "signature_request", value) - - @property - def warnings(self) -> List[WarningResponse]: - return self.get("warnings") - - @warnings.setter - def warnings(self, value: List[WarningResponse]): - setattr(self, "warnings", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """SignatureRequestGetResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - signature_request (SignatureRequestResponse): [optional] # noqa: E501 - warnings ([WarningResponse]): A list of warnings.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """SignatureRequestGetResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - signature_request (SignatureRequestResponse): [optional] # noqa: E501 - warnings ([WarningResponse]): A list of warnings.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/signature_request_list_response.py b/sdks/python/dropbox_sign/model/signature_request_list_response.py deleted file mode 100644 index 770d9d1e2..000000000 --- a/sdks/python/dropbox_sign/model/signature_request_list_response.py +++ /dev/null @@ -1,321 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.list_info_response import ListInfoResponse - from dropbox_sign.model.signature_request_response import SignatureRequestResponse - from dropbox_sign.model.warning_response import WarningResponse - - -def lazy_import(): - from dropbox_sign.model.list_info_response import ListInfoResponse - from dropbox_sign.model.signature_request_response import SignatureRequestResponse - from dropbox_sign.model.warning_response import WarningResponse - globals()['ListInfoResponse'] = ListInfoResponse - globals()['SignatureRequestResponse'] = SignatureRequestResponse - globals()['WarningResponse'] = WarningResponse - - -class SignatureRequestListResponse(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'signature_requests': ([SignatureRequestResponse],), # noqa: E501 - 'list_info': (ListInfoResponse,), # noqa: E501 - 'warnings': ([WarningResponse],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> SignatureRequestListResponse: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[SignatureRequestListResponse], - _check_type=True, - ) - - - attribute_map = { - 'signature_requests': 'signature_requests', # noqa: E501 - 'list_info': 'list_info', # noqa: E501 - 'warnings': 'warnings', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def signature_requests(self) -> List[SignatureRequestResponse]: - return self.get("signature_requests") - - @signature_requests.setter - def signature_requests(self, value: List[SignatureRequestResponse]): - setattr(self, "signature_requests", value) - - @property - def list_info(self) -> ListInfoResponse: - return self.get("list_info") - - @list_info.setter - def list_info(self, value: ListInfoResponse): - setattr(self, "list_info", value) - - @property - def warnings(self) -> List[WarningResponse]: - return self.get("warnings") - - @warnings.setter - def warnings(self, value: List[WarningResponse]): - setattr(self, "warnings", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """SignatureRequestListResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - signature_requests ([SignatureRequestResponse]): Contains information about signature requests.. [optional] # noqa: E501 - list_info (ListInfoResponse): [optional] # noqa: E501 - warnings ([WarningResponse]): A list of warnings.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """SignatureRequestListResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - signature_requests ([SignatureRequestResponse]): Contains information about signature requests.. [optional] # noqa: E501 - list_info (ListInfoResponse): [optional] # noqa: E501 - warnings ([WarningResponse]): A list of warnings.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/signature_request_remind_request.py b/sdks/python/dropbox_sign/model/signature_request_remind_request.py deleted file mode 100644 index dd9c6e42a..000000000 --- a/sdks/python/dropbox_sign/model/signature_request_remind_request.py +++ /dev/null @@ -1,301 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class SignatureRequestRemindRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'email_address': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> SignatureRequestRemindRequest: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[SignatureRequestRemindRequest], - _check_type=True, - ) - - - attribute_map = { - 'email_address': 'email_address', # noqa: E501 - 'name': 'name', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def email_address(self) -> str: - return self.get("email_address") - - @email_address.setter - def email_address(self, value: str): - setattr(self, "email_address", value) - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, email_address, *args, **kwargs): # noqa: E501 - """SignatureRequestRemindRequest - a model defined in OpenAPI - - Args: - email_address (str): The email address of the signer to send a reminder to. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - name (str): The name of the signer to send a reminder to. Include if two or more signers share an email address.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.email_address = email_address - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, email_address, *args, **kwargs): # noqa: E501 - """SignatureRequestRemindRequest - a model defined in OpenAPI - - Args: - email_address (str): The email address of the signer to send a reminder to. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - name (str): The name of the signer to send a reminder to. Include if two or more signers share an email address.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.email_address = email_address - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/signature_request_response.py b/sdks/python/dropbox_sign/model/signature_request_response.py deleted file mode 100644 index c5f197b29..000000000 --- a/sdks/python/dropbox_sign/model/signature_request_response.py +++ /dev/null @@ -1,588 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.signature_request_response_attachment import SignatureRequestResponseAttachment - from dropbox_sign.model.signature_request_response_custom_field_base import SignatureRequestResponseCustomFieldBase - from dropbox_sign.model.signature_request_response_data_base import SignatureRequestResponseDataBase - from dropbox_sign.model.signature_request_response_signatures import SignatureRequestResponseSignatures - - -def lazy_import(): - from dropbox_sign.model.signature_request_response_attachment import SignatureRequestResponseAttachment - from dropbox_sign.model.signature_request_response_custom_field_base import SignatureRequestResponseCustomFieldBase - from dropbox_sign.model.signature_request_response_data_base import SignatureRequestResponseDataBase - from dropbox_sign.model.signature_request_response_signatures import SignatureRequestResponseSignatures - globals()['SignatureRequestResponseAttachment'] = SignatureRequestResponseAttachment - globals()['SignatureRequestResponseCustomFieldBase'] = SignatureRequestResponseCustomFieldBase - globals()['SignatureRequestResponseDataBase'] = SignatureRequestResponseDataBase - globals()['SignatureRequestResponseSignatures'] = SignatureRequestResponseSignatures - - -class SignatureRequestResponse(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'test_mode': (bool, none_type,), # noqa: E501 - 'signature_request_id': (str,), # noqa: E501 - 'requester_email_address': (str,), # noqa: E501 - 'title': (str,), # noqa: E501 - 'original_title': (str,), # noqa: E501 - 'subject': (str, none_type,), # noqa: E501 - 'message': (str, none_type,), # noqa: E501 - 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 - 'created_at': (int,), # noqa: E501 - 'expires_at': (int,), # noqa: E501 - 'is_complete': (bool,), # noqa: E501 - 'is_declined': (bool,), # noqa: E501 - 'has_error': (bool,), # noqa: E501 - 'files_url': (str,), # noqa: E501 - 'signing_url': (str, none_type,), # noqa: E501 - 'details_url': (str,), # noqa: E501 - 'cc_email_addresses': ([str],), # noqa: E501 - 'signing_redirect_url': (str, none_type,), # noqa: E501 - 'final_copy_uri': (str, none_type,), # noqa: E501 - 'template_ids': ([str], none_type,), # noqa: E501 - 'custom_fields': ([SignatureRequestResponseCustomFieldBase], none_type,), # noqa: E501 - 'attachments': ([SignatureRequestResponseAttachment], none_type,), # noqa: E501 - 'response_data': ([SignatureRequestResponseDataBase], none_type,), # noqa: E501 - 'signatures': ([SignatureRequestResponseSignatures],), # noqa: E501 - 'bulk_send_job_id': (str, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> SignatureRequestResponse: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[SignatureRequestResponse], - _check_type=True, - ) - - - attribute_map = { - 'test_mode': 'test_mode', # noqa: E501 - 'signature_request_id': 'signature_request_id', # noqa: E501 - 'requester_email_address': 'requester_email_address', # noqa: E501 - 'title': 'title', # noqa: E501 - 'original_title': 'original_title', # noqa: E501 - 'subject': 'subject', # noqa: E501 - 'message': 'message', # noqa: E501 - 'metadata': 'metadata', # noqa: E501 - 'created_at': 'created_at', # noqa: E501 - 'expires_at': 'expires_at', # noqa: E501 - 'is_complete': 'is_complete', # noqa: E501 - 'is_declined': 'is_declined', # noqa: E501 - 'has_error': 'has_error', # noqa: E501 - 'files_url': 'files_url', # noqa: E501 - 'signing_url': 'signing_url', # noqa: E501 - 'details_url': 'details_url', # noqa: E501 - 'cc_email_addresses': 'cc_email_addresses', # noqa: E501 - 'signing_redirect_url': 'signing_redirect_url', # noqa: E501 - 'final_copy_uri': 'final_copy_uri', # noqa: E501 - 'template_ids': 'template_ids', # noqa: E501 - 'custom_fields': 'custom_fields', # noqa: E501 - 'attachments': 'attachments', # noqa: E501 - 'response_data': 'response_data', # noqa: E501 - 'signatures': 'signatures', # noqa: E501 - 'bulk_send_job_id': 'bulk_send_job_id', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def test_mode(self) -> Optional[bool]: - return self.get("test_mode") - - @test_mode.setter - def test_mode(self, value: Optional[bool]): - setattr(self, "test_mode", value) - - @property - def signature_request_id(self) -> str: - return self.get("signature_request_id") - - @signature_request_id.setter - def signature_request_id(self, value: str): - setattr(self, "signature_request_id", value) - - @property - def requester_email_address(self) -> str: - return self.get("requester_email_address") - - @requester_email_address.setter - def requester_email_address(self, value: str): - setattr(self, "requester_email_address", value) - - @property - def title(self) -> str: - return self.get("title") - - @title.setter - def title(self, value: str): - setattr(self, "title", value) - - @property - def original_title(self) -> str: - return self.get("original_title") - - @original_title.setter - def original_title(self, value: str): - setattr(self, "original_title", value) - - @property - def subject(self) -> Optional[str]: - return self.get("subject") - - @subject.setter - def subject(self, value: Optional[str]): - setattr(self, "subject", value) - - @property - def message(self) -> Optional[str]: - return self.get("message") - - @message.setter - def message(self, value: Optional[str]): - setattr(self, "message", value) - - @property - def metadata(self) -> Dict[str, Union[bool, date, datetime, dict, float, int, list, str, none_type]]: - return self.get("metadata") - - @metadata.setter - def metadata(self, value: Dict[str, Union[bool, date, datetime, dict, float, int, list, str, none_type]]): - setattr(self, "metadata", value) - - @property - def created_at(self) -> int: - return self.get("created_at") - - @created_at.setter - def created_at(self, value: int): - setattr(self, "created_at", value) - - @property - def expires_at(self) -> int: - return self.get("expires_at") - - @expires_at.setter - def expires_at(self, value: int): - setattr(self, "expires_at", value) - - @property - def is_complete(self) -> bool: - return self.get("is_complete") - - @is_complete.setter - def is_complete(self, value: bool): - setattr(self, "is_complete", value) - - @property - def is_declined(self) -> bool: - return self.get("is_declined") - - @is_declined.setter - def is_declined(self, value: bool): - setattr(self, "is_declined", value) - - @property - def has_error(self) -> bool: - return self.get("has_error") - - @has_error.setter - def has_error(self, value: bool): - setattr(self, "has_error", value) - - @property - def files_url(self) -> str: - return self.get("files_url") - - @files_url.setter - def files_url(self, value: str): - setattr(self, "files_url", value) - - @property - def signing_url(self) -> Optional[str]: - return self.get("signing_url") - - @signing_url.setter - def signing_url(self, value: Optional[str]): - setattr(self, "signing_url", value) - - @property - def details_url(self) -> str: - return self.get("details_url") - - @details_url.setter - def details_url(self, value: str): - setattr(self, "details_url", value) - - @property - def cc_email_addresses(self) -> List[str]: - return self.get("cc_email_addresses") - - @cc_email_addresses.setter - def cc_email_addresses(self, value: List[str]): - setattr(self, "cc_email_addresses", value) - - @property - def signing_redirect_url(self) -> Optional[str]: - return self.get("signing_redirect_url") - - @signing_redirect_url.setter - def signing_redirect_url(self, value: Optional[str]): - setattr(self, "signing_redirect_url", value) - - @property - def final_copy_uri(self) -> Optional[str]: - return self.get("final_copy_uri") - - @final_copy_uri.setter - def final_copy_uri(self, value: Optional[str]): - setattr(self, "final_copy_uri", value) - - @property - def template_ids(self) -> Optional[List[str]]: - return self.get("template_ids") - - @template_ids.setter - def template_ids(self, value: Optional[List[str]]): - setattr(self, "template_ids", value) - - @property - def custom_fields(self) -> Optional[List[SignatureRequestResponseCustomFieldBase]]: - return self.get("custom_fields") - - @custom_fields.setter - def custom_fields(self, value: Optional[List[SignatureRequestResponseCustomFieldBase]]): - setattr(self, "custom_fields", value) - - @property - def attachments(self) -> Optional[List[SignatureRequestResponseAttachment]]: - return self.get("attachments") - - @attachments.setter - def attachments(self, value: Optional[List[SignatureRequestResponseAttachment]]): - setattr(self, "attachments", value) - - @property - def response_data(self) -> Optional[List[SignatureRequestResponseDataBase]]: - return self.get("response_data") - - @response_data.setter - def response_data(self, value: Optional[List[SignatureRequestResponseDataBase]]): - setattr(self, "response_data", value) - - @property - def signatures(self) -> List[SignatureRequestResponseSignatures]: - return self.get("signatures") - - @signatures.setter - def signatures(self, value: List[SignatureRequestResponseSignatures]): - setattr(self, "signatures", value) - - @property - def bulk_send_job_id(self) -> Optional[str]: - return self.get("bulk_send_job_id") - - @bulk_send_job_id.setter - def bulk_send_job_id(self, value: Optional[str]): - setattr(self, "bulk_send_job_id", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """SignatureRequestResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - test_mode (bool, none_type): Whether this is a test signature request. Test requests have no legal value. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - signature_request_id (str): The id of the SignatureRequest.. [optional] # noqa: E501 - requester_email_address (str): The email address of the initiator of the SignatureRequest.. [optional] # noqa: E501 - title (str): The title the specified Account uses for the SignatureRequest.. [optional] # noqa: E501 - original_title (str): Default Label for account.. [optional] # noqa: E501 - subject (str, none_type): The subject in the email that was initially sent to the signers.. [optional] # noqa: E501 - message (str, none_type): The custom message in the email that was initially sent to the signers.. [optional] # noqa: E501 - metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): The metadata attached to the signature request.. [optional] # noqa: E501 - created_at (int): Time the signature request was created.. [optional] # noqa: E501 - expires_at (int): 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.. [optional] # noqa: E501 - is_complete (bool): Whether or not the SignatureRequest has been fully executed by all signers.. [optional] # noqa: E501 - is_declined (bool): Whether or not the SignatureRequest has been declined by a signer.. [optional] # noqa: E501 - has_error (bool): Whether or not an error occurred (either during the creation of the SignatureRequest or during one of the signings).. [optional] # noqa: E501 - files_url (str): The URL where a copy of the request's documents can be downloaded.. [optional] # noqa: E501 - signing_url (str, none_type): 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.. [optional] # noqa: E501 - details_url (str): The URL where the requester and the signers can view the current status of the SignatureRequest.. [optional] # noqa: E501 - cc_email_addresses ([str]): 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.. [optional] # noqa: E501 - signing_redirect_url (str, none_type): The URL you want the signer redirected to after they successfully sign.. [optional] # noqa: E501 - final_copy_uri (str, none_type): The path where the completed document can be downloaded. [optional] # noqa: E501 - template_ids ([str], none_type): Templates IDs used in this SignatureRequest (if any).. [optional] # noqa: E501 - custom_fields ([SignatureRequestResponseCustomFieldBase], none_type): An array of Custom Field objects containing the name and type of each custom field. * Text Field uses `SignatureRequestResponseCustomFieldText` * Checkbox Field uses `SignatureRequestResponseCustomFieldCheckbox`. [optional] # noqa: E501 - attachments ([SignatureRequestResponseAttachment], none_type): Signer attachments.. [optional] # noqa: E501 - response_data ([SignatureRequestResponseDataBase], none_type): An array of form field objects containing the name, value, and type of each textbox or checkmark field filled in by the signers.. [optional] # noqa: E501 - signatures ([SignatureRequestResponseSignatures]): An array of signature objects, 1 for each signer.. [optional] # noqa: E501 - bulk_send_job_id (str, none_type): The ID of the Bulk Send job which sent the signature request, if applicable.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """SignatureRequestResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - test_mode (bool, none_type): Whether this is a test signature request. Test requests have no legal value. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - signature_request_id (str): The id of the SignatureRequest.. [optional] # noqa: E501 - requester_email_address (str): The email address of the initiator of the SignatureRequest.. [optional] # noqa: E501 - title (str): The title the specified Account uses for the SignatureRequest.. [optional] # noqa: E501 - original_title (str): Default Label for account.. [optional] # noqa: E501 - subject (str, none_type): The subject in the email that was initially sent to the signers.. [optional] # noqa: E501 - message (str, none_type): The custom message in the email that was initially sent to the signers.. [optional] # noqa: E501 - metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): The metadata attached to the signature request.. [optional] # noqa: E501 - created_at (int): Time the signature request was created.. [optional] # noqa: E501 - expires_at (int): 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.. [optional] # noqa: E501 - is_complete (bool): Whether or not the SignatureRequest has been fully executed by all signers.. [optional] # noqa: E501 - is_declined (bool): Whether or not the SignatureRequest has been declined by a signer.. [optional] # noqa: E501 - has_error (bool): Whether or not an error occurred (either during the creation of the SignatureRequest or during one of the signings).. [optional] # noqa: E501 - files_url (str): The URL where a copy of the request's documents can be downloaded.. [optional] # noqa: E501 - signing_url (str, none_type): 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.. [optional] # noqa: E501 - details_url (str): The URL where the requester and the signers can view the current status of the SignatureRequest.. [optional] # noqa: E501 - cc_email_addresses ([str]): 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.. [optional] # noqa: E501 - signing_redirect_url (str, none_type): The URL you want the signer redirected to after they successfully sign.. [optional] # noqa: E501 - final_copy_uri (str, none_type): The path where the completed document can be downloaded. [optional] # noqa: E501 - template_ids ([str], none_type): Templates IDs used in this SignatureRequest (if any).. [optional] # noqa: E501 - custom_fields ([SignatureRequestResponseCustomFieldBase], none_type): An array of Custom Field objects containing the name and type of each custom field. * Text Field uses `SignatureRequestResponseCustomFieldText` * Checkbox Field uses `SignatureRequestResponseCustomFieldCheckbox`. [optional] # noqa: E501 - attachments ([SignatureRequestResponseAttachment], none_type): Signer attachments.. [optional] # noqa: E501 - response_data ([SignatureRequestResponseDataBase], none_type): An array of form field objects containing the name, value, and type of each textbox or checkmark field filled in by the signers.. [optional] # noqa: E501 - signatures ([SignatureRequestResponseSignatures]): An array of signature objects, 1 for each signer.. [optional] # noqa: E501 - bulk_send_job_id (str, none_type): The ID of the Bulk Send job which sent the signature request, if applicable.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/signature_request_response_attachment.py b/sdks/python/dropbox_sign/model/signature_request_response_attachment.py deleted file mode 100644 index 3dc417b65..000000000 --- a/sdks/python/dropbox_sign/model/signature_request_response_attachment.py +++ /dev/null @@ -1,355 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class SignatureRequestResponseAttachment(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'id': (str,), # noqa: E501 - 'signer': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'required': (bool,), # noqa: E501 - 'instructions': (str, none_type,), # noqa: E501 - 'uploaded_at': (int, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> SignatureRequestResponseAttachment: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[SignatureRequestResponseAttachment], - _check_type=True, - ) - - - attribute_map = { - 'id': 'id', # noqa: E501 - 'signer': 'signer', # noqa: E501 - 'name': 'name', # noqa: E501 - 'required': 'required', # noqa: E501 - 'instructions': 'instructions', # noqa: E501 - 'uploaded_at': 'uploaded_at', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def id(self) -> str: - return self.get("id") - - @id.setter - def id(self, value: str): - setattr(self, "id", value) - - @property - def signer(self) -> str: - return self.get("signer") - - @signer.setter - def signer(self, value: str): - setattr(self, "signer", value) - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def required(self) -> bool: - return self.get("required") - - @required.setter - def required(self, value: bool): - setattr(self, "required", value) - - @property - def instructions(self) -> Optional[str]: - return self.get("instructions") - - @instructions.setter - def instructions(self, value: Optional[str]): - setattr(self, "instructions", value) - - @property - def uploaded_at(self) -> Optional[int]: - return self.get("uploaded_at") - - @uploaded_at.setter - def uploaded_at(self, value: Optional[int]): - setattr(self, "uploaded_at", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, id, signer, name, required, *args, **kwargs): # noqa: E501 - """SignatureRequestResponseAttachment - a model defined in OpenAPI - - Args: - id (str): The unique ID for this attachment. - signer (str): The Signer this attachment is assigned to. - name (str): The name of this attachment. - required (bool): A boolean value denoting if this attachment is required. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - instructions (str, none_type): Instructions for Signer.. [optional] # noqa: E501 - uploaded_at (int, none_type): Timestamp when attachment was uploaded by Signer.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.id = id - self.signer = signer - self.name = name - self.required = required - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, id, signer, name, required, *args, **kwargs): # noqa: E501 - """SignatureRequestResponseAttachment - a model defined in OpenAPI - - Args: - id (str): The unique ID for this attachment. - signer (str): The Signer this attachment is assigned to. - name (str): The name of this attachment. - required (bool): A boolean value denoting if this attachment is required. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - instructions (str, none_type): Instructions for Signer.. [optional] # noqa: E501 - uploaded_at (int, none_type): Timestamp when attachment was uploaded by Signer.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.id = id - self.signer = signer - self.name = name - self.required = required - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/signature_request_response_custom_field_base.py b/sdks/python/dropbox_sign/model/signature_request_response_custom_field_base.py deleted file mode 100644 index fcc4f198a..000000000 --- a/sdks/python/dropbox_sign/model/signature_request_response_custom_field_base.py +++ /dev/null @@ -1,342 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - -if TYPE_CHECKING: - from dropbox_sign.models import SignatureRequestResponseCustomFieldCheckbox - from dropbox_sign.models import SignatureRequestResponseCustomFieldText - - -def lazy_import(): - from dropbox_sign.models import SignatureRequestResponseCustomFieldCheckbox - from dropbox_sign.models import SignatureRequestResponseCustomFieldText - globals()['SignatureRequestResponseCustomFieldCheckbox'] = SignatureRequestResponseCustomFieldCheckbox - globals()['SignatureRequestResponseCustomFieldText'] = SignatureRequestResponseCustomFieldText - - -class SignatureRequestResponseCustomFieldBase(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'type': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'required': (bool,), # noqa: E501 - 'api_id': (str,), # noqa: E501 - 'editor': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - lazy_import() - val = { - 'checkbox': SignatureRequestResponseCustomFieldCheckbox, - 'text': SignatureRequestResponseCustomFieldText, - } - if not val: - return None - return {'type': val} - - - attribute_map = { - 'type': 'type', # noqa: E501 - 'name': 'name', # noqa: E501 - 'required': 'required', # noqa: E501 - 'api_id': 'api_id', # noqa: E501 - 'editor': 'editor', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def type(self) -> str: - return self.get("type") - - @type.setter - def type(self, value: str): - setattr(self, "type", value) - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def required(self) -> bool: - return self.get("required") - - @required.setter - def required(self, value: bool): - setattr(self, "required", value) - - @property - def api_id(self) -> str: - return self.get("api_id") - - @api_id.setter - def api_id(self, value: str): - setattr(self, "api_id", value) - - @property - def editor(self) -> str: - return self.get("editor") - - @editor.setter - def editor(self, value: str): - setattr(self, "editor", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, type, name, *args, **kwargs): # noqa: E501 - """SignatureRequestResponseCustomFieldBase - a model defined in OpenAPI - - Args: - type (str): The type of this Custom Field. Only 'text' and 'checkbox' are currently supported. - name (str): The name of the Custom Field. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - required (bool): A boolean value denoting if this field is required.. [optional] # noqa: E501 - api_id (str): The unique ID for this field.. [optional] # noqa: E501 - editor (str): The name of the Role that is able to edit this field.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.type = type - self.name = name - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, type, name, *args, **kwargs): # noqa: E501 - """SignatureRequestResponseCustomFieldBase - a model defined in OpenAPI - - Args: - type (str): The type of this Custom Field. Only 'text' and 'checkbox' are currently supported. - name (str): The name of the Custom Field. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - required (bool): A boolean value denoting if this field is required.. [optional] # noqa: E501 - api_id (str): The unique ID for this field.. [optional] # noqa: E501 - editor (str): The name of the Role that is able to edit this field.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.type = type - self.name = name - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/signature_request_response_custom_field_checkbox.py b/sdks/python/dropbox_sign/model/signature_request_response_custom_field_checkbox.py deleted file mode 100644 index ca531adc3..000000000 --- a/sdks/python/dropbox_sign/model/signature_request_response_custom_field_checkbox.py +++ /dev/null @@ -1,400 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.signature_request_response_custom_field_base import SignatureRequestResponseCustomFieldBase - - -def lazy_import(): - from dropbox_sign.model.signature_request_response_custom_field_base import SignatureRequestResponseCustomFieldBase - globals()['SignatureRequestResponseCustomFieldBase'] = SignatureRequestResponseCustomFieldBase - - -class SignatureRequestResponseCustomFieldCheckbox(ModelComposed): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'type': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'value': (bool,), # noqa: E501 - 'required': (bool,), # noqa: E501 - 'api_id': (str,), # noqa: E501 - 'editor': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> SignatureRequestResponseCustomFieldCheckbox: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[SignatureRequestResponseCustomFieldCheckbox], - _check_type=True, - ) - - - attribute_map = { - 'type': 'type', # noqa: E501 - 'name': 'name', # noqa: E501 - 'value': 'value', # noqa: E501 - 'required': 'required', # noqa: E501 - 'api_id': 'api_id', # noqa: E501 - 'editor': 'editor', # noqa: E501 - } - - read_only_vars = { - } - - @property - def type(self) -> str: - return self.get("type") - - @type.setter - def type(self, value: str): - setattr(self, "type", value) - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def value(self) -> bool: - return self.get("value") - - @value.setter - def value(self, value: bool): - setattr(self, "value", value) - - @property - def required(self) -> bool: - return self.get("required") - - @required.setter - def required(self, value: bool): - setattr(self, "required", value) - - @property - def api_id(self) -> str: - return self.get("api_id") - - @api_id.setter - def api_id(self, value: str): - setattr(self, "api_id", value) - - @property - def editor(self) -> str: - return self.get("editor") - - @editor.setter - def editor(self, value: str): - setattr(self, "editor", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """SignatureRequestResponseCustomFieldCheckbox - a model defined in OpenAPI - - Keyword Args: - type (str): The type of this Custom Field. Only 'text' and 'checkbox' are currently supported.. defaults to "checkbox" # noqa: E501 - name (str): The name of the Custom Field. - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - value (bool): A true/false for checkbox fields. [optional] # noqa: E501 - required (bool): A boolean value denoting if this field is required.. [optional] # noqa: E501 - api_id (str): The unique ID for this field.. [optional] # noqa: E501 - editor (str): The name of the Role that is able to edit this field.. [optional] # noqa: E501 - """ - - type = kwargs.get('type', "checkbox") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """SignatureRequestResponseCustomFieldCheckbox - a model defined in OpenAPI - - Keyword Args: - type (str): The type of this Custom Field. Only 'text' and 'checkbox' are currently supported.. defaults to "checkbox" # noqa: E501 - name (str): The name of the Custom Field. - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - value (bool): A true/false for checkbox fields. [optional] # noqa: E501 - required (bool): A boolean value denoting if this field is required.. [optional] # noqa: E501 - api_id (str): The unique ID for this field.. [optional] # noqa: E501 - editor (str): The name of the Role that is able to edit this field.. [optional] # noqa: E501 - """ - - type = kwargs.get('type', "checkbox") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'oneOf': [ - ], - } diff --git a/sdks/python/dropbox_sign/model/signature_request_response_custom_field_text.py b/sdks/python/dropbox_sign/model/signature_request_response_custom_field_text.py deleted file mode 100644 index e33652f1b..000000000 --- a/sdks/python/dropbox_sign/model/signature_request_response_custom_field_text.py +++ /dev/null @@ -1,400 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.signature_request_response_custom_field_base import SignatureRequestResponseCustomFieldBase - - -def lazy_import(): - from dropbox_sign.model.signature_request_response_custom_field_base import SignatureRequestResponseCustomFieldBase - globals()['SignatureRequestResponseCustomFieldBase'] = SignatureRequestResponseCustomFieldBase - - -class SignatureRequestResponseCustomFieldText(ModelComposed): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'type': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'value': (str,), # noqa: E501 - 'required': (bool,), # noqa: E501 - 'api_id': (str,), # noqa: E501 - 'editor': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> SignatureRequestResponseCustomFieldText: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[SignatureRequestResponseCustomFieldText], - _check_type=True, - ) - - - attribute_map = { - 'type': 'type', # noqa: E501 - 'name': 'name', # noqa: E501 - 'value': 'value', # noqa: E501 - 'required': 'required', # noqa: E501 - 'api_id': 'api_id', # noqa: E501 - 'editor': 'editor', # noqa: E501 - } - - read_only_vars = { - } - - @property - def type(self) -> str: - return self.get("type") - - @type.setter - def type(self, value: str): - setattr(self, "type", value) - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def value(self) -> str: - return self.get("value") - - @value.setter - def value(self, value: str): - setattr(self, "value", value) - - @property - def required(self) -> bool: - return self.get("required") - - @required.setter - def required(self, value: bool): - setattr(self, "required", value) - - @property - def api_id(self) -> str: - return self.get("api_id") - - @api_id.setter - def api_id(self, value: str): - setattr(self, "api_id", value) - - @property - def editor(self) -> str: - return self.get("editor") - - @editor.setter - def editor(self, value: str): - setattr(self, "editor", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """SignatureRequestResponseCustomFieldText - a model defined in OpenAPI - - Keyword Args: - type (str): The type of this Custom Field. Only 'text' and 'checkbox' are currently supported.. defaults to "text" # noqa: E501 - name (str): The name of the Custom Field. - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - value (str): A text string for text fields. [optional] # noqa: E501 - required (bool): A boolean value denoting if this field is required.. [optional] # noqa: E501 - api_id (str): The unique ID for this field.. [optional] # noqa: E501 - editor (str): The name of the Role that is able to edit this field.. [optional] # noqa: E501 - """ - - type = kwargs.get('type', "text") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """SignatureRequestResponseCustomFieldText - a model defined in OpenAPI - - Keyword Args: - type (str): The type of this Custom Field. Only 'text' and 'checkbox' are currently supported.. defaults to "text" # noqa: E501 - name (str): The name of the Custom Field. - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - value (str): A text string for text fields. [optional] # noqa: E501 - required (bool): A boolean value denoting if this field is required.. [optional] # noqa: E501 - api_id (str): The unique ID for this field.. [optional] # noqa: E501 - editor (str): The name of the Role that is able to edit this field.. [optional] # noqa: E501 - """ - - type = kwargs.get('type', "text") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'oneOf': [ - ], - } diff --git a/sdks/python/dropbox_sign/model/signature_request_response_custom_field_type_enum.py b/sdks/python/dropbox_sign/model/signature_request_response_custom_field_type_enum.py deleted file mode 100644 index 1de85eeab..000000000 --- a/sdks/python/dropbox_sign/model/signature_request_response_custom_field_type_enum.py +++ /dev/null @@ -1,302 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class SignatureRequestResponseCustomFieldTypeEnum(ModelSimple): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('value',): { - 'TEXT': "text", - 'CHECKBOX': "checkbox", - }, - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'value': (str,), - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> SignatureRequestResponseCustomFieldTypeEnum: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[SignatureRequestResponseCustomFieldTypeEnum], - _check_type=True, - ) - - - attribute_map = {} - - read_only_vars = set() - - _composed_schemas = None - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): - """SignatureRequestResponseCustomFieldTypeEnum - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str):, must be one of ["text", "checkbox", ] # noqa: E501 - - Keyword Args: - value (str):, must be one of ["text", "checkbox", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """SignatureRequestResponseCustomFieldTypeEnum - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str):, must be one of ["text", "checkbox", ] # noqa: E501 - - Keyword Args: - value (str):, must be one of ["text", "checkbox", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - return self diff --git a/sdks/python/dropbox_sign/model/signature_request_response_data_base.py b/sdks/python/dropbox_sign/model/signature_request_response_data_base.py deleted file mode 100644 index 18b5e97df..000000000 --- a/sdks/python/dropbox_sign/model/signature_request_response_data_base.py +++ /dev/null @@ -1,362 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - -if TYPE_CHECKING: - from dropbox_sign.models import SignatureRequestResponseDataValueCheckbox - from dropbox_sign.models import SignatureRequestResponseDataValueCheckboxMerge - from dropbox_sign.models import SignatureRequestResponseDataValueDateSigned - from dropbox_sign.models import SignatureRequestResponseDataValueDropdown - from dropbox_sign.models import SignatureRequestResponseDataValueInitials - from dropbox_sign.models import SignatureRequestResponseDataValueRadio - from dropbox_sign.models import SignatureRequestResponseDataValueSignature - from dropbox_sign.models import SignatureRequestResponseDataValueText - from dropbox_sign.models import SignatureRequestResponseDataValueTextMerge - - -def lazy_import(): - from dropbox_sign.models import SignatureRequestResponseDataValueCheckbox - from dropbox_sign.models import SignatureRequestResponseDataValueCheckboxMerge - from dropbox_sign.models import SignatureRequestResponseDataValueDateSigned - from dropbox_sign.models import SignatureRequestResponseDataValueDropdown - from dropbox_sign.models import SignatureRequestResponseDataValueInitials - from dropbox_sign.models import SignatureRequestResponseDataValueRadio - from dropbox_sign.models import SignatureRequestResponseDataValueSignature - from dropbox_sign.models import SignatureRequestResponseDataValueText - from dropbox_sign.models import SignatureRequestResponseDataValueTextMerge - globals()['SignatureRequestResponseDataValueCheckbox'] = SignatureRequestResponseDataValueCheckbox - globals()['SignatureRequestResponseDataValueCheckboxMerge'] = SignatureRequestResponseDataValueCheckboxMerge - globals()['SignatureRequestResponseDataValueDateSigned'] = SignatureRequestResponseDataValueDateSigned - globals()['SignatureRequestResponseDataValueDropdown'] = SignatureRequestResponseDataValueDropdown - globals()['SignatureRequestResponseDataValueInitials'] = SignatureRequestResponseDataValueInitials - globals()['SignatureRequestResponseDataValueRadio'] = SignatureRequestResponseDataValueRadio - globals()['SignatureRequestResponseDataValueSignature'] = SignatureRequestResponseDataValueSignature - globals()['SignatureRequestResponseDataValueText'] = SignatureRequestResponseDataValueText - globals()['SignatureRequestResponseDataValueTextMerge'] = SignatureRequestResponseDataValueTextMerge - - -class SignatureRequestResponseDataBase(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'api_id': (str,), # noqa: E501 - 'signature_id': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'required': (bool,), # noqa: E501 - 'type': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - lazy_import() - val = { - 'checkbox': SignatureRequestResponseDataValueCheckbox, - 'checkbox-merge': SignatureRequestResponseDataValueCheckboxMerge, - 'date_signed': SignatureRequestResponseDataValueDateSigned, - 'dropdown': SignatureRequestResponseDataValueDropdown, - 'initials': SignatureRequestResponseDataValueInitials, - 'radio': SignatureRequestResponseDataValueRadio, - 'signature': SignatureRequestResponseDataValueSignature, - 'text': SignatureRequestResponseDataValueText, - 'text-merge': SignatureRequestResponseDataValueTextMerge, - } - if not val: - return None - return {'type': val} - - - attribute_map = { - 'api_id': 'api_id', # noqa: E501 - 'signature_id': 'signature_id', # noqa: E501 - 'name': 'name', # noqa: E501 - 'required': 'required', # noqa: E501 - 'type': 'type', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def api_id(self) -> str: - return self.get("api_id") - - @api_id.setter - def api_id(self, value: str): - setattr(self, "api_id", value) - - @property - def signature_id(self) -> str: - return self.get("signature_id") - - @signature_id.setter - def signature_id(self, value: str): - setattr(self, "signature_id", value) - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def required(self) -> bool: - return self.get("required") - - @required.setter - def required(self, value: bool): - setattr(self, "required", value) - - @property - def type(self) -> str: - return self.get("type") - - @type.setter - def type(self, value: str): - setattr(self, "type", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """SignatureRequestResponseDataBase - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - api_id (str): The unique ID for this field.. [optional] # noqa: E501 - signature_id (str): The ID of the signature to which this response is linked.. [optional] # noqa: E501 - name (str): The name of the form field.. [optional] # noqa: E501 - required (bool): A boolean value denoting if this field is required.. [optional] # noqa: E501 - type (str): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """SignatureRequestResponseDataBase - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - api_id (str): The unique ID for this field.. [optional] # noqa: E501 - signature_id (str): The ID of the signature to which this response is linked.. [optional] # noqa: E501 - name (str): The name of the form field.. [optional] # noqa: E501 - required (bool): A boolean value denoting if this field is required.. [optional] # noqa: E501 - type (str): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/signature_request_response_data_type_enum.py b/sdks/python/dropbox_sign/model/signature_request_response_data_type_enum.py deleted file mode 100644 index f24633d27..000000000 --- a/sdks/python/dropbox_sign/model/signature_request_response_data_type_enum.py +++ /dev/null @@ -1,309 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class SignatureRequestResponseDataTypeEnum(ModelSimple): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('value',): { - 'TEXT': "text", - 'CHECKBOX': "checkbox", - 'DATE_SIGNED': "date_signed", - 'DROPDOWN': "dropdown", - 'INITIALS': "initials", - 'RADIO': "radio", - 'SIGNATURE': "signature", - 'TEXT-MERGE': "text-merge", - 'CHECKBOX-MERGE': "checkbox-merge", - }, - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'value': (str,), - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> SignatureRequestResponseDataTypeEnum: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[SignatureRequestResponseDataTypeEnum], - _check_type=True, - ) - - - attribute_map = {} - - read_only_vars = set() - - _composed_schemas = None - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): - """SignatureRequestResponseDataTypeEnum - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str):, must be one of ["text", "checkbox", "date_signed", "dropdown", "initials", "radio", "signature", "text-merge", "checkbox-merge", ] # noqa: E501 - - Keyword Args: - value (str):, must be one of ["text", "checkbox", "date_signed", "dropdown", "initials", "radio", "signature", "text-merge", "checkbox-merge", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """SignatureRequestResponseDataTypeEnum - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str):, must be one of ["text", "checkbox", "date_signed", "dropdown", "initials", "radio", "signature", "text-merge", "checkbox-merge", ] # noqa: E501 - - Keyword Args: - value (str):, must be one of ["text", "checkbox", "date_signed", "dropdown", "initials", "radio", "signature", "text-merge", "checkbox-merge", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - return self diff --git a/sdks/python/dropbox_sign/model/signature_request_response_data_value_checkbox.py b/sdks/python/dropbox_sign/model/signature_request_response_data_value_checkbox.py deleted file mode 100644 index 5723404ef..000000000 --- a/sdks/python/dropbox_sign/model/signature_request_response_data_value_checkbox.py +++ /dev/null @@ -1,398 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.signature_request_response_data_base import SignatureRequestResponseDataBase - - -def lazy_import(): - from dropbox_sign.model.signature_request_response_data_base import SignatureRequestResponseDataBase - globals()['SignatureRequestResponseDataBase'] = SignatureRequestResponseDataBase - - -class SignatureRequestResponseDataValueCheckbox(ModelComposed): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'type': (str,), # noqa: E501 - 'value': (bool,), # noqa: E501 - 'api_id': (str,), # noqa: E501 - 'signature_id': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'required': (bool,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> SignatureRequestResponseDataValueCheckbox: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[SignatureRequestResponseDataValueCheckbox], - _check_type=True, - ) - - - attribute_map = { - 'type': 'type', # noqa: E501 - 'value': 'value', # noqa: E501 - 'api_id': 'api_id', # noqa: E501 - 'signature_id': 'signature_id', # noqa: E501 - 'name': 'name', # noqa: E501 - 'required': 'required', # noqa: E501 - } - - read_only_vars = { - } - - @property - def type(self) -> str: - return self.get("type") - - @type.setter - def type(self, value: str): - setattr(self, "type", value) - - @property - def value(self) -> bool: - return self.get("value") - - @value.setter - def value(self, value: bool): - setattr(self, "value", value) - - @property - def api_id(self) -> str: - return self.get("api_id") - - @api_id.setter - def api_id(self, value: str): - setattr(self, "api_id", value) - - @property - def signature_id(self) -> str: - return self.get("signature_id") - - @signature_id.setter - def signature_id(self, value: str): - setattr(self, "signature_id", value) - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def required(self) -> bool: - return self.get("required") - - @required.setter - def required(self, value: bool): - setattr(self, "required", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """SignatureRequestResponseDataValueCheckbox - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - type (str): A yes/no checkbox. [optional] if omitted the server will use the default value of "checkbox" # noqa: E501 - value (bool): The value of the form field.. [optional] # noqa: E501 - api_id (str): The unique ID for this field.. [optional] # noqa: E501 - signature_id (str): The ID of the signature to which this response is linked.. [optional] # noqa: E501 - name (str): The name of the form field.. [optional] # noqa: E501 - required (bool): A boolean value denoting if this field is required.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """SignatureRequestResponseDataValueCheckbox - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - type (str): A yes/no checkbox. [optional] if omitted the server will use the default value of "checkbox" # noqa: E501 - value (bool): The value of the form field.. [optional] # noqa: E501 - api_id (str): The unique ID for this field.. [optional] # noqa: E501 - signature_id (str): The ID of the signature to which this response is linked.. [optional] # noqa: E501 - name (str): The name of the form field.. [optional] # noqa: E501 - required (bool): A boolean value denoting if this field is required.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'oneOf': [ - ], - } diff --git a/sdks/python/dropbox_sign/model/signature_request_response_data_value_checkbox_merge.py b/sdks/python/dropbox_sign/model/signature_request_response_data_value_checkbox_merge.py deleted file mode 100644 index 41190b9ac..000000000 --- a/sdks/python/dropbox_sign/model/signature_request_response_data_value_checkbox_merge.py +++ /dev/null @@ -1,398 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.signature_request_response_data_base import SignatureRequestResponseDataBase - - -def lazy_import(): - from dropbox_sign.model.signature_request_response_data_base import SignatureRequestResponseDataBase - globals()['SignatureRequestResponseDataBase'] = SignatureRequestResponseDataBase - - -class SignatureRequestResponseDataValueCheckboxMerge(ModelComposed): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'type': (str,), # noqa: E501 - 'value': (str,), # noqa: E501 - 'api_id': (str,), # noqa: E501 - 'signature_id': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'required': (bool,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> SignatureRequestResponseDataValueCheckboxMerge: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[SignatureRequestResponseDataValueCheckboxMerge], - _check_type=True, - ) - - - attribute_map = { - 'type': 'type', # noqa: E501 - 'value': 'value', # noqa: E501 - 'api_id': 'api_id', # noqa: E501 - 'signature_id': 'signature_id', # noqa: E501 - 'name': 'name', # noqa: E501 - 'required': 'required', # noqa: E501 - } - - read_only_vars = { - } - - @property - def type(self) -> str: - return self.get("type") - - @type.setter - def type(self, value: str): - setattr(self, "type", value) - - @property - def value(self) -> str: - return self.get("value") - - @value.setter - def value(self, value: str): - setattr(self, "value", value) - - @property - def api_id(self) -> str: - return self.get("api_id") - - @api_id.setter - def api_id(self, value: str): - setattr(self, "api_id", value) - - @property - def signature_id(self) -> str: - return self.get("signature_id") - - @signature_id.setter - def signature_id(self, value: str): - setattr(self, "signature_id", value) - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def required(self) -> bool: - return self.get("required") - - @required.setter - def required(self, value: bool): - setattr(self, "required", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """SignatureRequestResponseDataValueCheckboxMerge - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - type (str): A checkbox field that has default value set by the api. [optional] if omitted the server will use the default value of "checkbox-merge" # noqa: E501 - value (str): The value of the form field.. [optional] # noqa: E501 - api_id (str): The unique ID for this field.. [optional] # noqa: E501 - signature_id (str): The ID of the signature to which this response is linked.. [optional] # noqa: E501 - name (str): The name of the form field.. [optional] # noqa: E501 - required (bool): A boolean value denoting if this field is required.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """SignatureRequestResponseDataValueCheckboxMerge - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - type (str): A checkbox field that has default value set by the api. [optional] if omitted the server will use the default value of "checkbox-merge" # noqa: E501 - value (str): The value of the form field.. [optional] # noqa: E501 - api_id (str): The unique ID for this field.. [optional] # noqa: E501 - signature_id (str): The ID of the signature to which this response is linked.. [optional] # noqa: E501 - name (str): The name of the form field.. [optional] # noqa: E501 - required (bool): A boolean value denoting if this field is required.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'oneOf': [ - ], - } diff --git a/sdks/python/dropbox_sign/model/signature_request_response_data_value_date_signed.py b/sdks/python/dropbox_sign/model/signature_request_response_data_value_date_signed.py deleted file mode 100644 index 80ed96c36..000000000 --- a/sdks/python/dropbox_sign/model/signature_request_response_data_value_date_signed.py +++ /dev/null @@ -1,398 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.signature_request_response_data_base import SignatureRequestResponseDataBase - - -def lazy_import(): - from dropbox_sign.model.signature_request_response_data_base import SignatureRequestResponseDataBase - globals()['SignatureRequestResponseDataBase'] = SignatureRequestResponseDataBase - - -class SignatureRequestResponseDataValueDateSigned(ModelComposed): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'type': (str,), # noqa: E501 - 'value': (str,), # noqa: E501 - 'api_id': (str,), # noqa: E501 - 'signature_id': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'required': (bool,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> SignatureRequestResponseDataValueDateSigned: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[SignatureRequestResponseDataValueDateSigned], - _check_type=True, - ) - - - attribute_map = { - 'type': 'type', # noqa: E501 - 'value': 'value', # noqa: E501 - 'api_id': 'api_id', # noqa: E501 - 'signature_id': 'signature_id', # noqa: E501 - 'name': 'name', # noqa: E501 - 'required': 'required', # noqa: E501 - } - - read_only_vars = { - } - - @property - def type(self) -> str: - return self.get("type") - - @type.setter - def type(self, value: str): - setattr(self, "type", value) - - @property - def value(self) -> str: - return self.get("value") - - @value.setter - def value(self, value: str): - setattr(self, "value", value) - - @property - def api_id(self) -> str: - return self.get("api_id") - - @api_id.setter - def api_id(self, value: str): - setattr(self, "api_id", value) - - @property - def signature_id(self) -> str: - return self.get("signature_id") - - @signature_id.setter - def signature_id(self, value: str): - setattr(self, "signature_id", value) - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def required(self) -> bool: - return self.get("required") - - @required.setter - def required(self, value: bool): - setattr(self, "required", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """SignatureRequestResponseDataValueDateSigned - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - type (str): A date. [optional] if omitted the server will use the default value of "date_signed" # noqa: E501 - value (str): The value of the form field.. [optional] # noqa: E501 - api_id (str): The unique ID for this field.. [optional] # noqa: E501 - signature_id (str): The ID of the signature to which this response is linked.. [optional] # noqa: E501 - name (str): The name of the form field.. [optional] # noqa: E501 - required (bool): A boolean value denoting if this field is required.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """SignatureRequestResponseDataValueDateSigned - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - type (str): A date. [optional] if omitted the server will use the default value of "date_signed" # noqa: E501 - value (str): The value of the form field.. [optional] # noqa: E501 - api_id (str): The unique ID for this field.. [optional] # noqa: E501 - signature_id (str): The ID of the signature to which this response is linked.. [optional] # noqa: E501 - name (str): The name of the form field.. [optional] # noqa: E501 - required (bool): A boolean value denoting if this field is required.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'oneOf': [ - ], - } diff --git a/sdks/python/dropbox_sign/model/signature_request_response_data_value_dropdown.py b/sdks/python/dropbox_sign/model/signature_request_response_data_value_dropdown.py deleted file mode 100644 index 946710f2c..000000000 --- a/sdks/python/dropbox_sign/model/signature_request_response_data_value_dropdown.py +++ /dev/null @@ -1,398 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.signature_request_response_data_base import SignatureRequestResponseDataBase - - -def lazy_import(): - from dropbox_sign.model.signature_request_response_data_base import SignatureRequestResponseDataBase - globals()['SignatureRequestResponseDataBase'] = SignatureRequestResponseDataBase - - -class SignatureRequestResponseDataValueDropdown(ModelComposed): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'type': (str,), # noqa: E501 - 'value': (str,), # noqa: E501 - 'api_id': (str,), # noqa: E501 - 'signature_id': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'required': (bool,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> SignatureRequestResponseDataValueDropdown: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[SignatureRequestResponseDataValueDropdown], - _check_type=True, - ) - - - attribute_map = { - 'type': 'type', # noqa: E501 - 'value': 'value', # noqa: E501 - 'api_id': 'api_id', # noqa: E501 - 'signature_id': 'signature_id', # noqa: E501 - 'name': 'name', # noqa: E501 - 'required': 'required', # noqa: E501 - } - - read_only_vars = { - } - - @property - def type(self) -> str: - return self.get("type") - - @type.setter - def type(self, value: str): - setattr(self, "type", value) - - @property - def value(self) -> str: - return self.get("value") - - @value.setter - def value(self, value: str): - setattr(self, "value", value) - - @property - def api_id(self) -> str: - return self.get("api_id") - - @api_id.setter - def api_id(self, value: str): - setattr(self, "api_id", value) - - @property - def signature_id(self) -> str: - return self.get("signature_id") - - @signature_id.setter - def signature_id(self, value: str): - setattr(self, "signature_id", value) - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def required(self) -> bool: - return self.get("required") - - @required.setter - def required(self, value: bool): - setattr(self, "required", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """SignatureRequestResponseDataValueDropdown - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - type (str): An input field for dropdowns. [optional] if omitted the server will use the default value of "dropdown" # noqa: E501 - value (str): The value of the form field.. [optional] # noqa: E501 - api_id (str): The unique ID for this field.. [optional] # noqa: E501 - signature_id (str): The ID of the signature to which this response is linked.. [optional] # noqa: E501 - name (str): The name of the form field.. [optional] # noqa: E501 - required (bool): A boolean value denoting if this field is required.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """SignatureRequestResponseDataValueDropdown - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - type (str): An input field for dropdowns. [optional] if omitted the server will use the default value of "dropdown" # noqa: E501 - value (str): The value of the form field.. [optional] # noqa: E501 - api_id (str): The unique ID for this field.. [optional] # noqa: E501 - signature_id (str): The ID of the signature to which this response is linked.. [optional] # noqa: E501 - name (str): The name of the form field.. [optional] # noqa: E501 - required (bool): A boolean value denoting if this field is required.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'oneOf': [ - ], - } diff --git a/sdks/python/dropbox_sign/model/signature_request_response_data_value_initials.py b/sdks/python/dropbox_sign/model/signature_request_response_data_value_initials.py deleted file mode 100644 index 6bff3865b..000000000 --- a/sdks/python/dropbox_sign/model/signature_request_response_data_value_initials.py +++ /dev/null @@ -1,398 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.signature_request_response_data_base import SignatureRequestResponseDataBase - - -def lazy_import(): - from dropbox_sign.model.signature_request_response_data_base import SignatureRequestResponseDataBase - globals()['SignatureRequestResponseDataBase'] = SignatureRequestResponseDataBase - - -class SignatureRequestResponseDataValueInitials(ModelComposed): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'type': (str,), # noqa: E501 - 'value': (str,), # noqa: E501 - 'api_id': (str,), # noqa: E501 - 'signature_id': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'required': (bool,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> SignatureRequestResponseDataValueInitials: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[SignatureRequestResponseDataValueInitials], - _check_type=True, - ) - - - attribute_map = { - 'type': 'type', # noqa: E501 - 'value': 'value', # noqa: E501 - 'api_id': 'api_id', # noqa: E501 - 'signature_id': 'signature_id', # noqa: E501 - 'name': 'name', # noqa: E501 - 'required': 'required', # noqa: E501 - } - - read_only_vars = { - } - - @property - def type(self) -> str: - return self.get("type") - - @type.setter - def type(self, value: str): - setattr(self, "type", value) - - @property - def value(self) -> str: - return self.get("value") - - @value.setter - def value(self, value: str): - setattr(self, "value", value) - - @property - def api_id(self) -> str: - return self.get("api_id") - - @api_id.setter - def api_id(self, value: str): - setattr(self, "api_id", value) - - @property - def signature_id(self) -> str: - return self.get("signature_id") - - @signature_id.setter - def signature_id(self, value: str): - setattr(self, "signature_id", value) - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def required(self) -> bool: - return self.get("required") - - @required.setter - def required(self, value: bool): - setattr(self, "required", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """SignatureRequestResponseDataValueInitials - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - type (str): An input field for initials. [optional] if omitted the server will use the default value of "initials" # noqa: E501 - value (str): The value of the form field.. [optional] # noqa: E501 - api_id (str): The unique ID for this field.. [optional] # noqa: E501 - signature_id (str): The ID of the signature to which this response is linked.. [optional] # noqa: E501 - name (str): The name of the form field.. [optional] # noqa: E501 - required (bool): A boolean value denoting if this field is required.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """SignatureRequestResponseDataValueInitials - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - type (str): An input field for initials. [optional] if omitted the server will use the default value of "initials" # noqa: E501 - value (str): The value of the form field.. [optional] # noqa: E501 - api_id (str): The unique ID for this field.. [optional] # noqa: E501 - signature_id (str): The ID of the signature to which this response is linked.. [optional] # noqa: E501 - name (str): The name of the form field.. [optional] # noqa: E501 - required (bool): A boolean value denoting if this field is required.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'oneOf': [ - ], - } diff --git a/sdks/python/dropbox_sign/model/signature_request_response_data_value_radio.py b/sdks/python/dropbox_sign/model/signature_request_response_data_value_radio.py deleted file mode 100644 index 7eb534e6c..000000000 --- a/sdks/python/dropbox_sign/model/signature_request_response_data_value_radio.py +++ /dev/null @@ -1,398 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.signature_request_response_data_base import SignatureRequestResponseDataBase - - -def lazy_import(): - from dropbox_sign.model.signature_request_response_data_base import SignatureRequestResponseDataBase - globals()['SignatureRequestResponseDataBase'] = SignatureRequestResponseDataBase - - -class SignatureRequestResponseDataValueRadio(ModelComposed): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'type': (str,), # noqa: E501 - 'value': (bool,), # noqa: E501 - 'api_id': (str,), # noqa: E501 - 'signature_id': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'required': (bool,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> SignatureRequestResponseDataValueRadio: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[SignatureRequestResponseDataValueRadio], - _check_type=True, - ) - - - attribute_map = { - 'type': 'type', # noqa: E501 - 'value': 'value', # noqa: E501 - 'api_id': 'api_id', # noqa: E501 - 'signature_id': 'signature_id', # noqa: E501 - 'name': 'name', # noqa: E501 - 'required': 'required', # noqa: E501 - } - - read_only_vars = { - } - - @property - def type(self) -> str: - return self.get("type") - - @type.setter - def type(self, value: str): - setattr(self, "type", value) - - @property - def value(self) -> bool: - return self.get("value") - - @value.setter - def value(self, value: bool): - setattr(self, "value", value) - - @property - def api_id(self) -> str: - return self.get("api_id") - - @api_id.setter - def api_id(self, value: str): - setattr(self, "api_id", value) - - @property - def signature_id(self) -> str: - return self.get("signature_id") - - @signature_id.setter - def signature_id(self, value: str): - setattr(self, "signature_id", value) - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def required(self) -> bool: - return self.get("required") - - @required.setter - def required(self, value: bool): - setattr(self, "required", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """SignatureRequestResponseDataValueRadio - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - type (str): An input field for radios. [optional] if omitted the server will use the default value of "radio" # noqa: E501 - value (bool): The value of the form field.. [optional] # noqa: E501 - api_id (str): The unique ID for this field.. [optional] # noqa: E501 - signature_id (str): The ID of the signature to which this response is linked.. [optional] # noqa: E501 - name (str): The name of the form field.. [optional] # noqa: E501 - required (bool): A boolean value denoting if this field is required.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """SignatureRequestResponseDataValueRadio - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - type (str): An input field for radios. [optional] if omitted the server will use the default value of "radio" # noqa: E501 - value (bool): The value of the form field.. [optional] # noqa: E501 - api_id (str): The unique ID for this field.. [optional] # noqa: E501 - signature_id (str): The ID of the signature to which this response is linked.. [optional] # noqa: E501 - name (str): The name of the form field.. [optional] # noqa: E501 - required (bool): A boolean value denoting if this field is required.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'oneOf': [ - ], - } diff --git a/sdks/python/dropbox_sign/model/signature_request_response_data_value_signature.py b/sdks/python/dropbox_sign/model/signature_request_response_data_value_signature.py deleted file mode 100644 index cc2dc16ca..000000000 --- a/sdks/python/dropbox_sign/model/signature_request_response_data_value_signature.py +++ /dev/null @@ -1,398 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.signature_request_response_data_base import SignatureRequestResponseDataBase - - -def lazy_import(): - from dropbox_sign.model.signature_request_response_data_base import SignatureRequestResponseDataBase - globals()['SignatureRequestResponseDataBase'] = SignatureRequestResponseDataBase - - -class SignatureRequestResponseDataValueSignature(ModelComposed): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'type': (str,), # noqa: E501 - 'value': (str,), # noqa: E501 - 'api_id': (str,), # noqa: E501 - 'signature_id': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'required': (bool,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> SignatureRequestResponseDataValueSignature: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[SignatureRequestResponseDataValueSignature], - _check_type=True, - ) - - - attribute_map = { - 'type': 'type', # noqa: E501 - 'value': 'value', # noqa: E501 - 'api_id': 'api_id', # noqa: E501 - 'signature_id': 'signature_id', # noqa: E501 - 'name': 'name', # noqa: E501 - 'required': 'required', # noqa: E501 - } - - read_only_vars = { - } - - @property - def type(self) -> str: - return self.get("type") - - @type.setter - def type(self, value: str): - setattr(self, "type", value) - - @property - def value(self) -> str: - return self.get("value") - - @value.setter - def value(self, value: str): - setattr(self, "value", value) - - @property - def api_id(self) -> str: - return self.get("api_id") - - @api_id.setter - def api_id(self, value: str): - setattr(self, "api_id", value) - - @property - def signature_id(self) -> str: - return self.get("signature_id") - - @signature_id.setter - def signature_id(self, value: str): - setattr(self, "signature_id", value) - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def required(self) -> bool: - return self.get("required") - - @required.setter - def required(self, value: bool): - setattr(self, "required", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """SignatureRequestResponseDataValueSignature - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - type (str): A signature input field. [optional] if omitted the server will use the default value of "signature" # noqa: E501 - value (str): The value of the form field.. [optional] # noqa: E501 - api_id (str): The unique ID for this field.. [optional] # noqa: E501 - signature_id (str): The ID of the signature to which this response is linked.. [optional] # noqa: E501 - name (str): The name of the form field.. [optional] # noqa: E501 - required (bool): A boolean value denoting if this field is required.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """SignatureRequestResponseDataValueSignature - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - type (str): A signature input field. [optional] if omitted the server will use the default value of "signature" # noqa: E501 - value (str): The value of the form field.. [optional] # noqa: E501 - api_id (str): The unique ID for this field.. [optional] # noqa: E501 - signature_id (str): The ID of the signature to which this response is linked.. [optional] # noqa: E501 - name (str): The name of the form field.. [optional] # noqa: E501 - required (bool): A boolean value denoting if this field is required.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'oneOf': [ - ], - } diff --git a/sdks/python/dropbox_sign/model/signature_request_response_data_value_text.py b/sdks/python/dropbox_sign/model/signature_request_response_data_value_text.py deleted file mode 100644 index 18c48d523..000000000 --- a/sdks/python/dropbox_sign/model/signature_request_response_data_value_text.py +++ /dev/null @@ -1,398 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.signature_request_response_data_base import SignatureRequestResponseDataBase - - -def lazy_import(): - from dropbox_sign.model.signature_request_response_data_base import SignatureRequestResponseDataBase - globals()['SignatureRequestResponseDataBase'] = SignatureRequestResponseDataBase - - -class SignatureRequestResponseDataValueText(ModelComposed): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'type': (str,), # noqa: E501 - 'value': (str,), # noqa: E501 - 'api_id': (str,), # noqa: E501 - 'signature_id': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'required': (bool,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> SignatureRequestResponseDataValueText: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[SignatureRequestResponseDataValueText], - _check_type=True, - ) - - - attribute_map = { - 'type': 'type', # noqa: E501 - 'value': 'value', # noqa: E501 - 'api_id': 'api_id', # noqa: E501 - 'signature_id': 'signature_id', # noqa: E501 - 'name': 'name', # noqa: E501 - 'required': 'required', # noqa: E501 - } - - read_only_vars = { - } - - @property - def type(self) -> str: - return self.get("type") - - @type.setter - def type(self, value: str): - setattr(self, "type", value) - - @property - def value(self) -> str: - return self.get("value") - - @value.setter - def value(self, value: str): - setattr(self, "value", value) - - @property - def api_id(self) -> str: - return self.get("api_id") - - @api_id.setter - def api_id(self, value: str): - setattr(self, "api_id", value) - - @property - def signature_id(self) -> str: - return self.get("signature_id") - - @signature_id.setter - def signature_id(self, value: str): - setattr(self, "signature_id", value) - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def required(self) -> bool: - return self.get("required") - - @required.setter - def required(self, value: bool): - setattr(self, "required", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """SignatureRequestResponseDataValueText - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - type (str): A text input field. [optional] if omitted the server will use the default value of "text" # noqa: E501 - value (str): The value of the form field.. [optional] # noqa: E501 - api_id (str): The unique ID for this field.. [optional] # noqa: E501 - signature_id (str): The ID of the signature to which this response is linked.. [optional] # noqa: E501 - name (str): The name of the form field.. [optional] # noqa: E501 - required (bool): A boolean value denoting if this field is required.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """SignatureRequestResponseDataValueText - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - type (str): A text input field. [optional] if omitted the server will use the default value of "text" # noqa: E501 - value (str): The value of the form field.. [optional] # noqa: E501 - api_id (str): The unique ID for this field.. [optional] # noqa: E501 - signature_id (str): The ID of the signature to which this response is linked.. [optional] # noqa: E501 - name (str): The name of the form field.. [optional] # noqa: E501 - required (bool): A boolean value denoting if this field is required.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'oneOf': [ - ], - } diff --git a/sdks/python/dropbox_sign/model/signature_request_response_data_value_text_merge.py b/sdks/python/dropbox_sign/model/signature_request_response_data_value_text_merge.py deleted file mode 100644 index afb0a0dd2..000000000 --- a/sdks/python/dropbox_sign/model/signature_request_response_data_value_text_merge.py +++ /dev/null @@ -1,398 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.signature_request_response_data_base import SignatureRequestResponseDataBase - - -def lazy_import(): - from dropbox_sign.model.signature_request_response_data_base import SignatureRequestResponseDataBase - globals()['SignatureRequestResponseDataBase'] = SignatureRequestResponseDataBase - - -class SignatureRequestResponseDataValueTextMerge(ModelComposed): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'type': (str,), # noqa: E501 - 'value': (str,), # noqa: E501 - 'api_id': (str,), # noqa: E501 - 'signature_id': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'required': (bool,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> SignatureRequestResponseDataValueTextMerge: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[SignatureRequestResponseDataValueTextMerge], - _check_type=True, - ) - - - attribute_map = { - 'type': 'type', # noqa: E501 - 'value': 'value', # noqa: E501 - 'api_id': 'api_id', # noqa: E501 - 'signature_id': 'signature_id', # noqa: E501 - 'name': 'name', # noqa: E501 - 'required': 'required', # noqa: E501 - } - - read_only_vars = { - } - - @property - def type(self) -> str: - return self.get("type") - - @type.setter - def type(self, value: str): - setattr(self, "type", value) - - @property - def value(self) -> str: - return self.get("value") - - @value.setter - def value(self, value: str): - setattr(self, "value", value) - - @property - def api_id(self) -> str: - return self.get("api_id") - - @api_id.setter - def api_id(self, value: str): - setattr(self, "api_id", value) - - @property - def signature_id(self) -> str: - return self.get("signature_id") - - @signature_id.setter - def signature_id(self, value: str): - setattr(self, "signature_id", value) - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def required(self) -> bool: - return self.get("required") - - @required.setter - def required(self, value: bool): - setattr(self, "required", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """SignatureRequestResponseDataValueTextMerge - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - type (str): A text field that has default text set by the api. [optional] if omitted the server will use the default value of "text-merge" # noqa: E501 - value (str): The value of the form field.. [optional] # noqa: E501 - api_id (str): The unique ID for this field.. [optional] # noqa: E501 - signature_id (str): The ID of the signature to which this response is linked.. [optional] # noqa: E501 - name (str): The name of the form field.. [optional] # noqa: E501 - required (bool): A boolean value denoting if this field is required.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """SignatureRequestResponseDataValueTextMerge - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - type (str): A text field that has default text set by the api. [optional] if omitted the server will use the default value of "text-merge" # noqa: E501 - value (str): The value of the form field.. [optional] # noqa: E501 - api_id (str): The unique ID for this field.. [optional] # noqa: E501 - signature_id (str): The ID of the signature to which this response is linked.. [optional] # noqa: E501 - name (str): The name of the form field.. [optional] # noqa: E501 - required (bool): A boolean value denoting if this field is required.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'oneOf': [ - ], - } diff --git a/sdks/python/dropbox_sign/model/signature_request_response_signatures.py b/sdks/python/dropbox_sign/model/signature_request_response_signatures.py deleted file mode 100644 index f4da2d44a..000000000 --- a/sdks/python/dropbox_sign/model/signature_request_response_signatures.py +++ /dev/null @@ -1,499 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class SignatureRequestResponseSignatures(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'signature_id': (str,), # noqa: E501 - 'signer_group_guid': (str, none_type,), # noqa: E501 - 'signer_email_address': (str,), # noqa: E501 - 'signer_name': (str, none_type,), # noqa: E501 - 'signer_role': (str, none_type,), # noqa: E501 - 'order': (int, none_type,), # noqa: E501 - 'status_code': (str,), # noqa: E501 - 'decline_reason': (str, none_type,), # noqa: E501 - 'signed_at': (int, none_type,), # noqa: E501 - 'last_viewed_at': (int, none_type,), # noqa: E501 - 'last_reminded_at': (int, none_type,), # noqa: E501 - 'has_pin': (bool,), # noqa: E501 - 'has_sms_auth': (bool, none_type,), # noqa: E501 - 'has_sms_delivery': (bool, none_type,), # noqa: E501 - 'sms_phone_number': (str, none_type,), # noqa: E501 - 'reassigned_by': (str, none_type,), # noqa: E501 - 'reassignment_reason': (str, none_type,), # noqa: E501 - 'reassigned_from': (str, none_type,), # noqa: E501 - 'error': (str, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> SignatureRequestResponseSignatures: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[SignatureRequestResponseSignatures], - _check_type=True, - ) - - - attribute_map = { - 'signature_id': 'signature_id', # noqa: E501 - 'signer_group_guid': 'signer_group_guid', # noqa: E501 - 'signer_email_address': 'signer_email_address', # noqa: E501 - 'signer_name': 'signer_name', # noqa: E501 - 'signer_role': 'signer_role', # noqa: E501 - 'order': 'order', # noqa: E501 - 'status_code': 'status_code', # noqa: E501 - 'decline_reason': 'decline_reason', # noqa: E501 - 'signed_at': 'signed_at', # noqa: E501 - 'last_viewed_at': 'last_viewed_at', # noqa: E501 - 'last_reminded_at': 'last_reminded_at', # noqa: E501 - 'has_pin': 'has_pin', # noqa: E501 - 'has_sms_auth': 'has_sms_auth', # noqa: E501 - 'has_sms_delivery': 'has_sms_delivery', # noqa: E501 - 'sms_phone_number': 'sms_phone_number', # noqa: E501 - 'reassigned_by': 'reassigned_by', # noqa: E501 - 'reassignment_reason': 'reassignment_reason', # noqa: E501 - 'reassigned_from': 'reassigned_from', # noqa: E501 - 'error': 'error', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def signature_id(self) -> str: - return self.get("signature_id") - - @signature_id.setter - def signature_id(self, value: str): - setattr(self, "signature_id", value) - - @property - def signer_group_guid(self) -> Optional[str]: - return self.get("signer_group_guid") - - @signer_group_guid.setter - def signer_group_guid(self, value: Optional[str]): - setattr(self, "signer_group_guid", value) - - @property - def signer_email_address(self) -> str: - return self.get("signer_email_address") - - @signer_email_address.setter - def signer_email_address(self, value: str): - setattr(self, "signer_email_address", value) - - @property - def signer_name(self) -> Optional[str]: - return self.get("signer_name") - - @signer_name.setter - def signer_name(self, value: Optional[str]): - setattr(self, "signer_name", value) - - @property - def signer_role(self) -> Optional[str]: - return self.get("signer_role") - - @signer_role.setter - def signer_role(self, value: Optional[str]): - setattr(self, "signer_role", value) - - @property - def order(self) -> Optional[int]: - return self.get("order") - - @order.setter - def order(self, value: Optional[int]): - setattr(self, "order", value) - - @property - def status_code(self) -> str: - return self.get("status_code") - - @status_code.setter - def status_code(self, value: str): - setattr(self, "status_code", value) - - @property - def decline_reason(self) -> Optional[str]: - return self.get("decline_reason") - - @decline_reason.setter - def decline_reason(self, value: Optional[str]): - setattr(self, "decline_reason", value) - - @property - def signed_at(self) -> Optional[int]: - return self.get("signed_at") - - @signed_at.setter - def signed_at(self, value: Optional[int]): - setattr(self, "signed_at", value) - - @property - def last_viewed_at(self) -> Optional[int]: - return self.get("last_viewed_at") - - @last_viewed_at.setter - def last_viewed_at(self, value: Optional[int]): - setattr(self, "last_viewed_at", value) - - @property - def last_reminded_at(self) -> Optional[int]: - return self.get("last_reminded_at") - - @last_reminded_at.setter - def last_reminded_at(self, value: Optional[int]): - setattr(self, "last_reminded_at", value) - - @property - def has_pin(self) -> bool: - return self.get("has_pin") - - @has_pin.setter - def has_pin(self, value: bool): - setattr(self, "has_pin", value) - - @property - def has_sms_auth(self) -> Optional[bool]: - return self.get("has_sms_auth") - - @has_sms_auth.setter - def has_sms_auth(self, value: Optional[bool]): - setattr(self, "has_sms_auth", value) - - @property - def has_sms_delivery(self) -> Optional[bool]: - return self.get("has_sms_delivery") - - @has_sms_delivery.setter - def has_sms_delivery(self, value: Optional[bool]): - setattr(self, "has_sms_delivery", value) - - @property - def sms_phone_number(self) -> Optional[str]: - return self.get("sms_phone_number") - - @sms_phone_number.setter - def sms_phone_number(self, value: Optional[str]): - setattr(self, "sms_phone_number", value) - - @property - def reassigned_by(self) -> Optional[str]: - return self.get("reassigned_by") - - @reassigned_by.setter - def reassigned_by(self, value: Optional[str]): - setattr(self, "reassigned_by", value) - - @property - def reassignment_reason(self) -> Optional[str]: - return self.get("reassignment_reason") - - @reassignment_reason.setter - def reassignment_reason(self, value: Optional[str]): - setattr(self, "reassignment_reason", value) - - @property - def reassigned_from(self) -> Optional[str]: - return self.get("reassigned_from") - - @reassigned_from.setter - def reassigned_from(self, value: Optional[str]): - setattr(self, "reassigned_from", value) - - @property - def error(self) -> Optional[str]: - return self.get("error") - - @error.setter - def error(self, value: Optional[str]): - setattr(self, "error", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """SignatureRequestResponseSignatures - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - signature_id (str): Signature identifier.. [optional] # noqa: E501 - signer_group_guid (str, none_type): Signer Group GUID. [optional] # noqa: E501 - signer_email_address (str): The email address of the signer.. [optional] # noqa: E501 - signer_name (str, none_type): The name of the signer.. [optional] # noqa: E501 - signer_role (str, none_type): The role of the signer.. [optional] # noqa: E501 - order (int, none_type): If signer order is assigned this is the 0-based index for this signer.. [optional] # noqa: E501 - status_code (str): The current status of the signature. eg: awaiting_signature, signed, declined.. [optional] # noqa: E501 - decline_reason (str, none_type): The reason provided by the signer for declining the request.. [optional] # noqa: E501 - signed_at (int, none_type): Time that the document was signed or null.. [optional] # noqa: E501 - last_viewed_at (int, none_type): The time that the document was last viewed by this signer or null.. [optional] # noqa: E501 - last_reminded_at (int, none_type): The time the last reminder email was sent to the signer or null.. [optional] # noqa: E501 - has_pin (bool): Boolean to indicate whether this signature requires a PIN to access.. [optional] # noqa: E501 - has_sms_auth (bool, none_type): Boolean to indicate whether this signature has SMS authentication enabled.. [optional] # noqa: E501 - has_sms_delivery (bool, none_type): Boolean to indicate whether this signature has SMS delivery enabled.. [optional] # noqa: E501 - sms_phone_number (str, none_type): The SMS phone number used for authentication or signature request delivery.. [optional] # noqa: E501 - reassigned_by (str, none_type): Email address of original signer who reassigned to this signer.. [optional] # noqa: E501 - reassignment_reason (str, none_type): Reason provided by original signer who reassigned to this signer.. [optional] # noqa: E501 - reassigned_from (str, none_type): Previous signature identifier.. [optional] # noqa: E501 - error (str, none_type): Error message pertaining to this signer, or null.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """SignatureRequestResponseSignatures - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - signature_id (str): Signature identifier.. [optional] # noqa: E501 - signer_group_guid (str, none_type): Signer Group GUID. [optional] # noqa: E501 - signer_email_address (str): The email address of the signer.. [optional] # noqa: E501 - signer_name (str, none_type): The name of the signer.. [optional] # noqa: E501 - signer_role (str, none_type): The role of the signer.. [optional] # noqa: E501 - order (int, none_type): If signer order is assigned this is the 0-based index for this signer.. [optional] # noqa: E501 - status_code (str): The current status of the signature. eg: awaiting_signature, signed, declined.. [optional] # noqa: E501 - decline_reason (str, none_type): The reason provided by the signer for declining the request.. [optional] # noqa: E501 - signed_at (int, none_type): Time that the document was signed or null.. [optional] # noqa: E501 - last_viewed_at (int, none_type): The time that the document was last viewed by this signer or null.. [optional] # noqa: E501 - last_reminded_at (int, none_type): The time the last reminder email was sent to the signer or null.. [optional] # noqa: E501 - has_pin (bool): Boolean to indicate whether this signature requires a PIN to access.. [optional] # noqa: E501 - has_sms_auth (bool, none_type): Boolean to indicate whether this signature has SMS authentication enabled.. [optional] # noqa: E501 - has_sms_delivery (bool, none_type): Boolean to indicate whether this signature has SMS delivery enabled.. [optional] # noqa: E501 - sms_phone_number (str, none_type): The SMS phone number used for authentication or signature request delivery.. [optional] # noqa: E501 - reassigned_by (str, none_type): Email address of original signer who reassigned to this signer.. [optional] # noqa: E501 - reassignment_reason (str, none_type): Reason provided by original signer who reassigned to this signer.. [optional] # noqa: E501 - reassigned_from (str, none_type): Previous signature identifier.. [optional] # noqa: E501 - error (str, none_type): Error message pertaining to this signer, or null.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/signature_request_send_request.py b/sdks/python/dropbox_sign/model/signature_request_send_request.py deleted file mode 100644 index 1fa91bc49..000000000 --- a/sdks/python/dropbox_sign/model/signature_request_send_request.py +++ /dev/null @@ -1,626 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.sub_attachment import SubAttachment - from dropbox_sign.model.sub_custom_field import SubCustomField - from dropbox_sign.model.sub_field_options import SubFieldOptions - from dropbox_sign.model.sub_form_field_group import SubFormFieldGroup - from dropbox_sign.model.sub_form_field_rule import SubFormFieldRule - from dropbox_sign.model.sub_form_fields_per_document_base import SubFormFieldsPerDocumentBase - from dropbox_sign.model.sub_signature_request_grouped_signers import SubSignatureRequestGroupedSigners - from dropbox_sign.model.sub_signature_request_signer import SubSignatureRequestSigner - from dropbox_sign.model.sub_signing_options import SubSigningOptions - - -def lazy_import(): - from dropbox_sign.model.sub_attachment import SubAttachment - from dropbox_sign.model.sub_custom_field import SubCustomField - from dropbox_sign.model.sub_field_options import SubFieldOptions - from dropbox_sign.model.sub_form_field_group import SubFormFieldGroup - from dropbox_sign.model.sub_form_field_rule import SubFormFieldRule - from dropbox_sign.model.sub_form_fields_per_document_base import SubFormFieldsPerDocumentBase - from dropbox_sign.model.sub_signature_request_grouped_signers import SubSignatureRequestGroupedSigners - from dropbox_sign.model.sub_signature_request_signer import SubSignatureRequestSigner - from dropbox_sign.model.sub_signing_options import SubSigningOptions - globals()['SubAttachment'] = SubAttachment - globals()['SubCustomField'] = SubCustomField - globals()['SubFieldOptions'] = SubFieldOptions - globals()['SubFormFieldGroup'] = SubFormFieldGroup - globals()['SubFormFieldRule'] = SubFormFieldRule - globals()['SubFormFieldsPerDocumentBase'] = SubFormFieldsPerDocumentBase - globals()['SubSignatureRequestGroupedSigners'] = SubSignatureRequestGroupedSigners - globals()['SubSignatureRequestSigner'] = SubSignatureRequestSigner - globals()['SubSigningOptions'] = SubSigningOptions - - -class SignatureRequestSendRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - ('message',): { - 'max_length': 5000, - }, - ('metadata',): { - }, - ('subject',): { - 'max_length': 255, - }, - ('title',): { - 'max_length': 255, - }, - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'files': ([file_type],), # noqa: E501 - 'file_urls': ([str],), # noqa: E501 - 'signers': ([SubSignatureRequestSigner],), # noqa: E501 - 'grouped_signers': ([SubSignatureRequestGroupedSigners],), # noqa: E501 - 'allow_decline': (bool,), # noqa: E501 - 'allow_reassign': (bool,), # noqa: E501 - 'attachments': ([SubAttachment],), # noqa: E501 - 'cc_email_addresses': ([str],), # noqa: E501 - 'client_id': (str,), # noqa: E501 - 'custom_fields': ([SubCustomField],), # noqa: E501 - 'field_options': (SubFieldOptions,), # noqa: E501 - 'form_field_groups': ([SubFormFieldGroup],), # noqa: E501 - 'form_field_rules': ([SubFormFieldRule],), # noqa: E501 - 'form_fields_per_document': ([SubFormFieldsPerDocumentBase],), # noqa: E501 - 'hide_text_tags': (bool,), # noqa: E501 - 'is_qualified_signature': (bool,), # noqa: E501 - 'is_eid': (bool,), # noqa: E501 - 'message': (str,), # noqa: E501 - 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 - 'signing_options': (SubSigningOptions,), # noqa: E501 - 'signing_redirect_url': (str,), # noqa: E501 - 'subject': (str,), # noqa: E501 - 'test_mode': (bool,), # noqa: E501 - 'title': (str,), # noqa: E501 - 'use_text_tags': (bool,), # noqa: E501 - 'expires_at': (int, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> SignatureRequestSendRequest: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[SignatureRequestSendRequest], - _check_type=True, - ) - - - attribute_map = { - 'files': 'files', # noqa: E501 - 'file_urls': 'file_urls', # noqa: E501 - 'signers': 'signers', # noqa: E501 - 'grouped_signers': 'grouped_signers', # noqa: E501 - 'allow_decline': 'allow_decline', # noqa: E501 - 'allow_reassign': 'allow_reassign', # noqa: E501 - 'attachments': 'attachments', # noqa: E501 - 'cc_email_addresses': 'cc_email_addresses', # noqa: E501 - 'client_id': 'client_id', # noqa: E501 - 'custom_fields': 'custom_fields', # noqa: E501 - 'field_options': 'field_options', # noqa: E501 - 'form_field_groups': 'form_field_groups', # noqa: E501 - 'form_field_rules': 'form_field_rules', # noqa: E501 - 'form_fields_per_document': 'form_fields_per_document', # noqa: E501 - 'hide_text_tags': 'hide_text_tags', # noqa: E501 - 'is_qualified_signature': 'is_qualified_signature', # noqa: E501 - 'is_eid': 'is_eid', # noqa: E501 - 'message': 'message', # noqa: E501 - 'metadata': 'metadata', # noqa: E501 - 'signing_options': 'signing_options', # noqa: E501 - 'signing_redirect_url': 'signing_redirect_url', # noqa: E501 - 'subject': 'subject', # noqa: E501 - 'test_mode': 'test_mode', # noqa: E501 - 'title': 'title', # noqa: E501 - 'use_text_tags': 'use_text_tags', # noqa: E501 - 'expires_at': 'expires_at', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def files(self) -> List[file_type]: - return self.get("files") - - @files.setter - def files(self, value: List[file_type]): - setattr(self, "files", value) - - @property - def file_urls(self) -> List[str]: - return self.get("file_urls") - - @file_urls.setter - def file_urls(self, value: List[str]): - setattr(self, "file_urls", value) - - @property - def signers(self) -> List[SubSignatureRequestSigner]: - return self.get("signers") - - @signers.setter - def signers(self, value: List[SubSignatureRequestSigner]): - setattr(self, "signers", value) - - @property - def grouped_signers(self) -> List[SubSignatureRequestGroupedSigners]: - return self.get("grouped_signers") - - @grouped_signers.setter - def grouped_signers(self, value: List[SubSignatureRequestGroupedSigners]): - setattr(self, "grouped_signers", value) - - @property - def allow_decline(self) -> bool: - return self.get("allow_decline") - - @allow_decline.setter - def allow_decline(self, value: bool): - setattr(self, "allow_decline", value) - - @property - def allow_reassign(self) -> bool: - return self.get("allow_reassign") - - @allow_reassign.setter - def allow_reassign(self, value: bool): - setattr(self, "allow_reassign", value) - - @property - def attachments(self) -> List[SubAttachment]: - return self.get("attachments") - - @attachments.setter - def attachments(self, value: List[SubAttachment]): - setattr(self, "attachments", value) - - @property - def cc_email_addresses(self) -> List[str]: - return self.get("cc_email_addresses") - - @cc_email_addresses.setter - def cc_email_addresses(self, value: List[str]): - setattr(self, "cc_email_addresses", value) - - @property - def client_id(self) -> str: - return self.get("client_id") - - @client_id.setter - def client_id(self, value: str): - setattr(self, "client_id", value) - - @property - def custom_fields(self) -> List[SubCustomField]: - return self.get("custom_fields") - - @custom_fields.setter - def custom_fields(self, value: List[SubCustomField]): - setattr(self, "custom_fields", value) - - @property - def field_options(self) -> SubFieldOptions: - return self.get("field_options") - - @field_options.setter - def field_options(self, value: SubFieldOptions): - setattr(self, "field_options", value) - - @property - def form_field_groups(self) -> List[SubFormFieldGroup]: - return self.get("form_field_groups") - - @form_field_groups.setter - def form_field_groups(self, value: List[SubFormFieldGroup]): - setattr(self, "form_field_groups", value) - - @property - def form_field_rules(self) -> List[SubFormFieldRule]: - return self.get("form_field_rules") - - @form_field_rules.setter - def form_field_rules(self, value: List[SubFormFieldRule]): - setattr(self, "form_field_rules", value) - - @property - def form_fields_per_document(self) -> List[SubFormFieldsPerDocumentBase]: - return self.get("form_fields_per_document") - - @form_fields_per_document.setter - def form_fields_per_document(self, value: List[SubFormFieldsPerDocumentBase]): - setattr(self, "form_fields_per_document", value) - - @property - def hide_text_tags(self) -> bool: - return self.get("hide_text_tags") - - @hide_text_tags.setter - def hide_text_tags(self, value: bool): - setattr(self, "hide_text_tags", value) - - @property - def is_qualified_signature(self) -> bool: - return self.get("is_qualified_signature") - - @is_qualified_signature.setter - def is_qualified_signature(self, value: bool): - setattr(self, "is_qualified_signature", value) - - @property - def is_eid(self) -> bool: - return self.get("is_eid") - - @is_eid.setter - def is_eid(self, value: bool): - setattr(self, "is_eid", value) - - @property - def message(self) -> str: - return self.get("message") - - @message.setter - def message(self, value: str): - setattr(self, "message", value) - - @property - def metadata(self) -> Dict[str, Union[bool, date, datetime, dict, float, int, list, str, none_type]]: - return self.get("metadata") - - @metadata.setter - def metadata(self, value: Dict[str, Union[bool, date, datetime, dict, float, int, list, str, none_type]]): - setattr(self, "metadata", value) - - @property - def signing_options(self) -> SubSigningOptions: - return self.get("signing_options") - - @signing_options.setter - def signing_options(self, value: SubSigningOptions): - setattr(self, "signing_options", value) - - @property - def signing_redirect_url(self) -> str: - return self.get("signing_redirect_url") - - @signing_redirect_url.setter - def signing_redirect_url(self, value: str): - setattr(self, "signing_redirect_url", value) - - @property - def subject(self) -> str: - return self.get("subject") - - @subject.setter - def subject(self, value: str): - setattr(self, "subject", value) - - @property - def test_mode(self) -> bool: - return self.get("test_mode") - - @test_mode.setter - def test_mode(self, value: bool): - setattr(self, "test_mode", value) - - @property - def title(self) -> str: - return self.get("title") - - @title.setter - def title(self, value: str): - setattr(self, "title", value) - - @property - def use_text_tags(self) -> bool: - return self.get("use_text_tags") - - @use_text_tags.setter - def use_text_tags(self, value: bool): - setattr(self, "use_text_tags", value) - - @property - def expires_at(self) -> Optional[int]: - return self.get("expires_at") - - @expires_at.setter - def expires_at(self, value: Optional[int]): - setattr(self, "expires_at", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """SignatureRequestSendRequest - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - files ([file_type]): Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.. [optional] # noqa: E501 - file_urls ([str]): 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.. [optional] # noqa: E501 - signers ([SubSignatureRequestSigner]): Add Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both.. [optional] # noqa: E501 - grouped_signers ([SubSignatureRequestGroupedSigners]): Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both.. [optional] # noqa: E501 - allow_decline (bool): Allows signers to decline to sign a document if `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - allow_reassign (bool): 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.. [optional] if omitted the server will use the default value of False # noqa: E501 - attachments ([SubAttachment]): A list describing the attachments. [optional] # noqa: E501 - cc_email_addresses ([str]): The email addresses that should be CCed.. [optional] # noqa: E501 - client_id (str): 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.. [optional] # noqa: E501 - custom_fields ([SubCustomField]): 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.. [optional] # noqa: E501 - field_options (SubFieldOptions): [optional] # noqa: E501 - form_field_groups ([SubFormFieldGroup]): 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`.. [optional] # noqa: E501 - form_field_rules ([SubFormFieldRule]): Conditional Logic rules for fields defined in `form_fields_per_document`.. [optional] # noqa: E501 - form_fields_per_document ([SubFormFieldsPerDocumentBase]): 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`. [optional] # noqa: E501 - hide_text_tags (bool): 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.. [optional] if omitted the server will use the default value of False # noqa: E501 - is_qualified_signature (bool): 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.. [optional] if omitted the server will use the default value of False # noqa: E501 - is_eid (bool): 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.. [optional] if omitted the server will use the default value of False # noqa: E501 - message (str): The custom message in the email that will be sent to the signers.. [optional] # noqa: E501 - metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): 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.. [optional] # noqa: E501 - signing_options (SubSigningOptions): [optional] # noqa: E501 - signing_redirect_url (str): The URL you want signers redirected to after they successfully sign.. [optional] # noqa: E501 - subject (str): The subject in the email that will be sent to the signers.. [optional] # noqa: E501 - test_mode (bool): Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - title (str): The title you want to assign to the SignatureRequest.. [optional] # noqa: E501 - use_text_tags (bool): 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`.. [optional] if omitted the server will use the default value of False # noqa: E501 - expires_at (int, none_type): 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.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """SignatureRequestSendRequest - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - files ([file_type]): Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.. [optional] # noqa: E501 - file_urls ([str]): 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.. [optional] # noqa: E501 - signers ([SubSignatureRequestSigner]): Add Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both.. [optional] # noqa: E501 - grouped_signers ([SubSignatureRequestGroupedSigners]): Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both.. [optional] # noqa: E501 - allow_decline (bool): Allows signers to decline to sign a document if `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - allow_reassign (bool): 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.. [optional] if omitted the server will use the default value of False # noqa: E501 - attachments ([SubAttachment]): A list describing the attachments. [optional] # noqa: E501 - cc_email_addresses ([str]): The email addresses that should be CCed.. [optional] # noqa: E501 - client_id (str): 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.. [optional] # noqa: E501 - custom_fields ([SubCustomField]): 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.. [optional] # noqa: E501 - field_options (SubFieldOptions): [optional] # noqa: E501 - form_field_groups ([SubFormFieldGroup]): 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`.. [optional] # noqa: E501 - form_field_rules ([SubFormFieldRule]): Conditional Logic rules for fields defined in `form_fields_per_document`.. [optional] # noqa: E501 - form_fields_per_document ([SubFormFieldsPerDocumentBase]): 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`. [optional] # noqa: E501 - hide_text_tags (bool): 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.. [optional] if omitted the server will use the default value of False # noqa: E501 - is_qualified_signature (bool): 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.. [optional] if omitted the server will use the default value of False # noqa: E501 - is_eid (bool): 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.. [optional] if omitted the server will use the default value of False # noqa: E501 - message (str): The custom message in the email that will be sent to the signers.. [optional] # noqa: E501 - metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): 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.. [optional] # noqa: E501 - signing_options (SubSigningOptions): [optional] # noqa: E501 - signing_redirect_url (str): The URL you want signers redirected to after they successfully sign.. [optional] # noqa: E501 - subject (str): The subject in the email that will be sent to the signers.. [optional] # noqa: E501 - test_mode (bool): Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - title (str): The title you want to assign to the SignatureRequest.. [optional] # noqa: E501 - use_text_tags (bool): 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`.. [optional] if omitted the server will use the default value of False # noqa: E501 - expires_at (int, none_type): 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.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/signature_request_send_with_template_request.py b/sdks/python/dropbox_sign/model/signature_request_send_with_template_request.py deleted file mode 100644 index 10a3c0c25..000000000 --- a/sdks/python/dropbox_sign/model/signature_request_send_with_template_request.py +++ /dev/null @@ -1,511 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.sub_cc import SubCC - from dropbox_sign.model.sub_custom_field import SubCustomField - from dropbox_sign.model.sub_signature_request_template_signer import SubSignatureRequestTemplateSigner - from dropbox_sign.model.sub_signing_options import SubSigningOptions - - -def lazy_import(): - from dropbox_sign.model.sub_cc import SubCC - from dropbox_sign.model.sub_custom_field import SubCustomField - from dropbox_sign.model.sub_signature_request_template_signer import SubSignatureRequestTemplateSigner - from dropbox_sign.model.sub_signing_options import SubSigningOptions - globals()['SubCC'] = SubCC - globals()['SubCustomField'] = SubCustomField - globals()['SubSignatureRequestTemplateSigner'] = SubSignatureRequestTemplateSigner - globals()['SubSigningOptions'] = SubSigningOptions - - -class SignatureRequestSendWithTemplateRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - ('message',): { - 'max_length': 5000, - }, - ('metadata',): { - }, - ('subject',): { - 'max_length': 255, - }, - ('title',): { - 'max_length': 255, - }, - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'template_ids': ([str],), # noqa: E501 - 'signers': ([SubSignatureRequestTemplateSigner],), # noqa: E501 - 'allow_decline': (bool,), # noqa: E501 - 'ccs': ([SubCC],), # noqa: E501 - 'client_id': (str,), # noqa: E501 - 'custom_fields': ([SubCustomField],), # noqa: E501 - 'files': ([file_type],), # noqa: E501 - 'file_urls': ([str],), # noqa: E501 - 'is_qualified_signature': (bool,), # noqa: E501 - 'is_eid': (bool,), # noqa: E501 - 'message': (str,), # noqa: E501 - 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 - 'signing_options': (SubSigningOptions,), # noqa: E501 - 'signing_redirect_url': (str,), # noqa: E501 - 'subject': (str,), # noqa: E501 - 'test_mode': (bool,), # noqa: E501 - 'title': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> SignatureRequestSendWithTemplateRequest: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[SignatureRequestSendWithTemplateRequest], - _check_type=True, - ) - - - attribute_map = { - 'template_ids': 'template_ids', # noqa: E501 - 'signers': 'signers', # noqa: E501 - 'allow_decline': 'allow_decline', # noqa: E501 - 'ccs': 'ccs', # noqa: E501 - 'client_id': 'client_id', # noqa: E501 - 'custom_fields': 'custom_fields', # noqa: E501 - 'files': 'files', # noqa: E501 - 'file_urls': 'file_urls', # noqa: E501 - 'is_qualified_signature': 'is_qualified_signature', # noqa: E501 - 'is_eid': 'is_eid', # noqa: E501 - 'message': 'message', # noqa: E501 - 'metadata': 'metadata', # noqa: E501 - 'signing_options': 'signing_options', # noqa: E501 - 'signing_redirect_url': 'signing_redirect_url', # noqa: E501 - 'subject': 'subject', # noqa: E501 - 'test_mode': 'test_mode', # noqa: E501 - 'title': 'title', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def template_ids(self) -> List[str]: - return self.get("template_ids") - - @template_ids.setter - def template_ids(self, value: List[str]): - setattr(self, "template_ids", value) - - @property - def signers(self) -> List[SubSignatureRequestTemplateSigner]: - return self.get("signers") - - @signers.setter - def signers(self, value: List[SubSignatureRequestTemplateSigner]): - setattr(self, "signers", value) - - @property - def allow_decline(self) -> bool: - return self.get("allow_decline") - - @allow_decline.setter - def allow_decline(self, value: bool): - setattr(self, "allow_decline", value) - - @property - def ccs(self) -> List[SubCC]: - return self.get("ccs") - - @ccs.setter - def ccs(self, value: List[SubCC]): - setattr(self, "ccs", value) - - @property - def client_id(self) -> str: - return self.get("client_id") - - @client_id.setter - def client_id(self, value: str): - setattr(self, "client_id", value) - - @property - def custom_fields(self) -> List[SubCustomField]: - return self.get("custom_fields") - - @custom_fields.setter - def custom_fields(self, value: List[SubCustomField]): - setattr(self, "custom_fields", value) - - @property - def files(self) -> List[file_type]: - return self.get("files") - - @files.setter - def files(self, value: List[file_type]): - setattr(self, "files", value) - - @property - def file_urls(self) -> List[str]: - return self.get("file_urls") - - @file_urls.setter - def file_urls(self, value: List[str]): - setattr(self, "file_urls", value) - - @property - def is_qualified_signature(self) -> bool: - return self.get("is_qualified_signature") - - @is_qualified_signature.setter - def is_qualified_signature(self, value: bool): - setattr(self, "is_qualified_signature", value) - - @property - def is_eid(self) -> bool: - return self.get("is_eid") - - @is_eid.setter - def is_eid(self, value: bool): - setattr(self, "is_eid", value) - - @property - def message(self) -> str: - return self.get("message") - - @message.setter - def message(self, value: str): - setattr(self, "message", value) - - @property - def metadata(self) -> Dict[str, Union[bool, date, datetime, dict, float, int, list, str, none_type]]: - return self.get("metadata") - - @metadata.setter - def metadata(self, value: Dict[str, Union[bool, date, datetime, dict, float, int, list, str, none_type]]): - setattr(self, "metadata", value) - - @property - def signing_options(self) -> SubSigningOptions: - return self.get("signing_options") - - @signing_options.setter - def signing_options(self, value: SubSigningOptions): - setattr(self, "signing_options", value) - - @property - def signing_redirect_url(self) -> str: - return self.get("signing_redirect_url") - - @signing_redirect_url.setter - def signing_redirect_url(self, value: str): - setattr(self, "signing_redirect_url", value) - - @property - def subject(self) -> str: - return self.get("subject") - - @subject.setter - def subject(self, value: str): - setattr(self, "subject", value) - - @property - def test_mode(self) -> bool: - return self.get("test_mode") - - @test_mode.setter - def test_mode(self, value: bool): - setattr(self, "test_mode", value) - - @property - def title(self) -> str: - return self.get("title") - - @title.setter - def title(self, value: str): - setattr(self, "title", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, template_ids, signers, *args, **kwargs): # noqa: E501 - """SignatureRequestSendWithTemplateRequest - a model defined in OpenAPI - - Args: - template_ids ([str]): Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. - signers ([SubSignatureRequestTemplateSigner]): Add Signers to your Templated-based Signature Request. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - allow_decline (bool): Allows signers to decline to sign a document if `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - ccs ([SubCC]): Add CC email recipients. Required when a CC role exists for the Template.. [optional] # noqa: E501 - client_id (str): Client id of the app to associate with the signature request. Used to apply the branding and callback url defined for the app.. [optional] # noqa: E501 - custom_fields ([SubCustomField]): An array defining values and options for custom fields. Required when a custom field exists in the Template.. [optional] # noqa: E501 - files ([file_type]): Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.. [optional] # noqa: E501 - file_urls ([str]): 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.. [optional] # noqa: E501 - is_qualified_signature (bool): 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.. [optional] if omitted the server will use the default value of False # noqa: E501 - is_eid (bool): 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.. [optional] if omitted the server will use the default value of False # noqa: E501 - message (str): The custom message in the email that will be sent to the signers.. [optional] # noqa: E501 - metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): 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.. [optional] # noqa: E501 - signing_options (SubSigningOptions): [optional] # noqa: E501 - signing_redirect_url (str): The URL you want signers redirected to after they successfully sign.. [optional] # noqa: E501 - subject (str): The subject in the email that will be sent to the signers.. [optional] # noqa: E501 - test_mode (bool): Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - title (str): The title you want to assign to the SignatureRequest.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.template_ids = template_ids - self.signers = signers - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, template_ids, signers, *args, **kwargs): # noqa: E501 - """SignatureRequestSendWithTemplateRequest - a model defined in OpenAPI - - Args: - template_ids ([str]): Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. - signers ([SubSignatureRequestTemplateSigner]): Add Signers to your Templated-based Signature Request. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - allow_decline (bool): Allows signers to decline to sign a document if `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - ccs ([SubCC]): Add CC email recipients. Required when a CC role exists for the Template.. [optional] # noqa: E501 - client_id (str): Client id of the app to associate with the signature request. Used to apply the branding and callback url defined for the app.. [optional] # noqa: E501 - custom_fields ([SubCustomField]): An array defining values and options for custom fields. Required when a custom field exists in the Template.. [optional] # noqa: E501 - files ([file_type]): Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.. [optional] # noqa: E501 - file_urls ([str]): 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.. [optional] # noqa: E501 - is_qualified_signature (bool): 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.. [optional] if omitted the server will use the default value of False # noqa: E501 - is_eid (bool): 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.. [optional] if omitted the server will use the default value of False # noqa: E501 - message (str): The custom message in the email that will be sent to the signers.. [optional] # noqa: E501 - metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): 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.. [optional] # noqa: E501 - signing_options (SubSigningOptions): [optional] # noqa: E501 - signing_redirect_url (str): The URL you want signers redirected to after they successfully sign.. [optional] # noqa: E501 - subject (str): The subject in the email that will be sent to the signers.. [optional] # noqa: E501 - test_mode (bool): Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - title (str): The title you want to assign to the SignatureRequest.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.template_ids = template_ids - self.signers = signers - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/signature_request_update_request.py b/sdks/python/dropbox_sign/model/signature_request_update_request.py deleted file mode 100644 index 5dbb48586..000000000 --- a/sdks/python/dropbox_sign/model/signature_request_update_request.py +++ /dev/null @@ -1,325 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class SignatureRequestUpdateRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'signature_id': (str,), # noqa: E501 - 'email_address': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'expires_at': (int, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> SignatureRequestUpdateRequest: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[SignatureRequestUpdateRequest], - _check_type=True, - ) - - - attribute_map = { - 'signature_id': 'signature_id', # noqa: E501 - 'email_address': 'email_address', # noqa: E501 - 'name': 'name', # noqa: E501 - 'expires_at': 'expires_at', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def signature_id(self) -> str: - return self.get("signature_id") - - @signature_id.setter - def signature_id(self, value: str): - setattr(self, "signature_id", value) - - @property - def email_address(self) -> str: - return self.get("email_address") - - @email_address.setter - def email_address(self, value: str): - setattr(self, "email_address", value) - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def expires_at(self) -> Optional[int]: - return self.get("expires_at") - - @expires_at.setter - def expires_at(self, value: Optional[int]): - setattr(self, "expires_at", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, signature_id, *args, **kwargs): # noqa: E501 - """SignatureRequestUpdateRequest - a model defined in OpenAPI - - Args: - signature_id (str): The signature ID for the recipient. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - email_address (str): The new email address for the recipient. This will generate a new `signature_id` value. **NOTE:** Optional if `name` is provided.. [optional] # noqa: E501 - name (str): The new name for the recipient. **NOTE:** Optional if `email_address` is provided.. [optional] # noqa: E501 - expires_at (int, none_type): 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.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.signature_id = signature_id - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, signature_id, *args, **kwargs): # noqa: E501 - """SignatureRequestUpdateRequest - a model defined in OpenAPI - - Args: - signature_id (str): The signature ID for the recipient. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - email_address (str): The new email address for the recipient. This will generate a new `signature_id` value. **NOTE:** Optional if `name` is provided.. [optional] # noqa: E501 - name (str): The new name for the recipient. **NOTE:** Optional if `email_address` is provided.. [optional] # noqa: E501 - expires_at (int, none_type): 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.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.signature_id = signature_id - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/sub_attachment.py b/sdks/python/dropbox_sign/model/sub_attachment.py deleted file mode 100644 index 0f5e6f408..000000000 --- a/sdks/python/dropbox_sign/model/sub_attachment.py +++ /dev/null @@ -1,327 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class SubAttachment(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'name': (str,), # noqa: E501 - 'signer_index': (int,), # noqa: E501 - 'instructions': (str,), # noqa: E501 - 'required': (bool,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> SubAttachment: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[SubAttachment], - _check_type=True, - ) - - - attribute_map = { - 'name': 'name', # noqa: E501 - 'signer_index': 'signer_index', # noqa: E501 - 'instructions': 'instructions', # noqa: E501 - 'required': 'required', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def signer_index(self) -> int: - return self.get("signer_index") - - @signer_index.setter - def signer_index(self, value: int): - setattr(self, "signer_index", value) - - @property - def instructions(self) -> str: - return self.get("instructions") - - @instructions.setter - def instructions(self, value: str): - setattr(self, "instructions", value) - - @property - def required(self) -> bool: - return self.get("required") - - @required.setter - def required(self, value: bool): - setattr(self, "required", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, name, signer_index, *args, **kwargs): # noqa: E501 - """SubAttachment - a model defined in OpenAPI - - Args: - name (str): The name of attachment. - signer_index (int): The signer's index in the `signers` parameter (0-based indexing). **NOTE:** Only one signer can be assigned per attachment. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - instructions (str): The instructions for uploading the attachment.. [optional] # noqa: E501 - required (bool): Determines if the attachment must be uploaded.. [optional] if omitted the server will use the default value of False # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.name = name - self.signer_index = signer_index - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, name, signer_index, *args, **kwargs): # noqa: E501 - """SubAttachment - a model defined in OpenAPI - - Args: - name (str): The name of attachment. - signer_index (int): The signer's index in the `signers` parameter (0-based indexing). **NOTE:** Only one signer can be assigned per attachment. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - instructions (str): The instructions for uploading the attachment.. [optional] # noqa: E501 - required (bool): Determines if the attachment must be uploaded.. [optional] if omitted the server will use the default value of False # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.name = name - self.signer_index = signer_index - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/sub_bulk_signer_list.py b/sdks/python/dropbox_sign/model/sub_bulk_signer_list.py deleted file mode 100644 index acd664551..000000000 --- a/sdks/python/dropbox_sign/model/sub_bulk_signer_list.py +++ /dev/null @@ -1,306 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.sub_bulk_signer_list_custom_field import SubBulkSignerListCustomField - from dropbox_sign.model.sub_signature_request_template_signer import SubSignatureRequestTemplateSigner - - -def lazy_import(): - from dropbox_sign.model.sub_bulk_signer_list_custom_field import SubBulkSignerListCustomField - from dropbox_sign.model.sub_signature_request_template_signer import SubSignatureRequestTemplateSigner - globals()['SubBulkSignerListCustomField'] = SubBulkSignerListCustomField - globals()['SubSignatureRequestTemplateSigner'] = SubSignatureRequestTemplateSigner - - -class SubBulkSignerList(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'custom_fields': ([SubBulkSignerListCustomField],), # noqa: E501 - 'signers': ([SubSignatureRequestTemplateSigner],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> SubBulkSignerList: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[SubBulkSignerList], - _check_type=True, - ) - - - attribute_map = { - 'custom_fields': 'custom_fields', # noqa: E501 - 'signers': 'signers', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def custom_fields(self) -> List[SubBulkSignerListCustomField]: - return self.get("custom_fields") - - @custom_fields.setter - def custom_fields(self, value: List[SubBulkSignerListCustomField]): - setattr(self, "custom_fields", value) - - @property - def signers(self) -> List[SubSignatureRequestTemplateSigner]: - return self.get("signers") - - @signers.setter - def signers(self, value: List[SubSignatureRequestTemplateSigner]): - setattr(self, "signers", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """SubBulkSignerList - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - custom_fields ([SubBulkSignerListCustomField]): An array of custom field values.. [optional] # noqa: E501 - signers ([SubSignatureRequestTemplateSigner]): 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.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """SubBulkSignerList - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - custom_fields ([SubBulkSignerListCustomField]): An array of custom field values.. [optional] # noqa: E501 - signers ([SubSignatureRequestTemplateSigner]): 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.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/sub_bulk_signer_list_custom_field.py b/sdks/python/dropbox_sign/model/sub_bulk_signer_list_custom_field.py deleted file mode 100644 index ebedaed25..000000000 --- a/sdks/python/dropbox_sign/model/sub_bulk_signer_list_custom_field.py +++ /dev/null @@ -1,303 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class SubBulkSignerListCustomField(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'name': (str,), # noqa: E501 - 'value': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> SubBulkSignerListCustomField: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[SubBulkSignerListCustomField], - _check_type=True, - ) - - - attribute_map = { - 'name': 'name', # noqa: E501 - 'value': 'value', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def value(self) -> str: - return self.get("value") - - @value.setter - def value(self, value: str): - setattr(self, "value", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, name, value, *args, **kwargs): # noqa: E501 - """SubBulkSignerListCustomField - a model defined in OpenAPI - - Args: - name (str): The name of the custom field. Must be the field's `name` or `api_id`. - value (str): The value of the custom field. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.name = name - self.value = value - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, name, value, *args, **kwargs): # noqa: E501 - """SubBulkSignerListCustomField - a model defined in OpenAPI - - Args: - name (str): The name of the custom field. Must be the field's `name` or `api_id`. - value (str): The value of the custom field. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.name = name - self.value = value - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/sub_cc.py b/sdks/python/dropbox_sign/model/sub_cc.py deleted file mode 100644 index 5fbf0178a..000000000 --- a/sdks/python/dropbox_sign/model/sub_cc.py +++ /dev/null @@ -1,303 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class SubCC(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'role': (str,), # noqa: E501 - 'email_address': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> SubCC: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[SubCC], - _check_type=True, - ) - - - attribute_map = { - 'role': 'role', # noqa: E501 - 'email_address': 'email_address', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def role(self) -> str: - return self.get("role") - - @role.setter - def role(self, value: str): - setattr(self, "role", value) - - @property - def email_address(self) -> str: - return self.get("email_address") - - @email_address.setter - def email_address(self, value: str): - setattr(self, "email_address", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, role, email_address, *args, **kwargs): # noqa: E501 - """SubCC - a model defined in OpenAPI - - Args: - role (str): Must match an existing CC role in chosen Template(s). Multiple CC recipients cannot share the same CC role. - email_address (str): The email address of the CC recipient. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.role = role - self.email_address = email_address - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, role, email_address, *args, **kwargs): # noqa: E501 - """SubCC - a model defined in OpenAPI - - Args: - role (str): Must match an existing CC role in chosen Template(s). Multiple CC recipients cannot share the same CC role. - email_address (str): The email address of the CC recipient. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.role = role - self.email_address = email_address - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/sub_custom_field.py b/sdks/python/dropbox_sign/model/sub_custom_field.py deleted file mode 100644 index d04411fd0..000000000 --- a/sdks/python/dropbox_sign/model/sub_custom_field.py +++ /dev/null @@ -1,325 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class SubCustomField(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'name': (str,), # noqa: E501 - 'editor': (str,), # noqa: E501 - 'required': (bool,), # noqa: E501 - 'value': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> SubCustomField: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[SubCustomField], - _check_type=True, - ) - - - attribute_map = { - 'name': 'name', # noqa: E501 - 'editor': 'editor', # noqa: E501 - 'required': 'required', # noqa: E501 - 'value': 'value', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def editor(self) -> str: - return self.get("editor") - - @editor.setter - def editor(self, value: str): - setattr(self, "editor", value) - - @property - def required(self) -> bool: - return self.get("required") - - @required.setter - def required(self, value: bool): - setattr(self, "required", value) - - @property - def value(self) -> str: - return self.get("value") - - @value.setter - def value(self, value: str): - setattr(self, "value", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, name, *args, **kwargs): # noqa: E501 - """SubCustomField - a model defined in OpenAPI - - Args: - name (str): 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. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - editor (str): 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.. [optional] # noqa: E501 - required (bool): 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`.. [optional] if omitted the server will use the default value of False # noqa: E501 - value (str): The string that resolves (aka \"pre-fills\") to the merge field on the final document(s) used for signing.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.name = name - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, name, *args, **kwargs): # noqa: E501 - """SubCustomField - a model defined in OpenAPI - - Args: - name (str): 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. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - editor (str): 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.. [optional] # noqa: E501 - required (bool): 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`.. [optional] if omitted the server will use the default value of False # noqa: E501 - value (str): The string that resolves (aka \"pre-fills\") to the merge field on the final document(s) used for signing.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.name = name - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/sub_editor_options.py b/sdks/python/dropbox_sign/model/sub_editor_options.py deleted file mode 100644 index 3b2efff22..000000000 --- a/sdks/python/dropbox_sign/model/sub_editor_options.py +++ /dev/null @@ -1,295 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class SubEditorOptions(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'allow_edit_signers': (bool,), # noqa: E501 - 'allow_edit_documents': (bool,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> SubEditorOptions: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[SubEditorOptions], - _check_type=True, - ) - - - attribute_map = { - 'allow_edit_signers': 'allow_edit_signers', # noqa: E501 - 'allow_edit_documents': 'allow_edit_documents', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def allow_edit_signers(self) -> bool: - return self.get("allow_edit_signers") - - @allow_edit_signers.setter - def allow_edit_signers(self, value: bool): - setattr(self, "allow_edit_signers", value) - - @property - def allow_edit_documents(self) -> bool: - return self.get("allow_edit_documents") - - @allow_edit_documents.setter - def allow_edit_documents(self, value: bool): - setattr(self, "allow_edit_documents", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """SubEditorOptions - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - allow_edit_signers (bool): Allows requesters to edit the list of signers. [optional] if omitted the server will use the default value of False # noqa: E501 - allow_edit_documents (bool): Allows requesters to edit documents, including delete and add. [optional] if omitted the server will use the default value of False # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """SubEditorOptions - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - allow_edit_signers (bool): Allows requesters to edit the list of signers. [optional] if omitted the server will use the default value of False # noqa: E501 - allow_edit_documents (bool): Allows requesters to edit documents, including delete and add. [optional] if omitted the server will use the default value of False # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/sub_field_options.py b/sdks/python/dropbox_sign/model/sub_field_options.py deleted file mode 100644 index e54fecdc1..000000000 --- a/sdks/python/dropbox_sign/model/sub_field_options.py +++ /dev/null @@ -1,297 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class SubFieldOptions(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('date_format',): { - 'MMDDYYYY': "MM / DD / YYYY", - 'MM_DD_YYYY': "MM - DD - YYYY", - 'DDMMYYYY': "DD / MM / YYYY", - 'DD_MM_YYYY': "DD - MM - YYYY", - 'YYYYMMDD': "YYYY / MM / DD", - 'YYYY_MM_DD': "YYYY - MM - DD", - }, - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'date_format': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> SubFieldOptions: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[SubFieldOptions], - _check_type=True, - ) - - - attribute_map = { - 'date_format': 'date_format', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def date_format(self) -> str: - return self.get("date_format") - - @date_format.setter - def date_format(self, value: str): - setattr(self, "date_format", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, date_format, *args, **kwargs): # noqa: E501 - """SubFieldOptions - a model defined in OpenAPI - - Args: - date_format (str): Allows requester to specify the date format (see list of allowed [formats](/api/reference/constants/#date-formats)) **NOTE:** Only available for Premium and higher. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.date_format = date_format - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, date_format, *args, **kwargs): # noqa: E501 - """SubFieldOptions - a model defined in OpenAPI - - Args: - date_format (str): Allows requester to specify the date format (see list of allowed [formats](/api/reference/constants/#date-formats)) **NOTE:** Only available for Premium and higher. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.date_format = date_format - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/sub_form_field_group.py b/sdks/python/dropbox_sign/model/sub_form_field_group.py deleted file mode 100644 index e4ac2e3f0..000000000 --- a/sdks/python/dropbox_sign/model/sub_form_field_group.py +++ /dev/null @@ -1,317 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class SubFormFieldGroup(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'group_id': (str,), # noqa: E501 - 'group_label': (str,), # noqa: E501 - 'requirement': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> SubFormFieldGroup: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[SubFormFieldGroup], - _check_type=True, - ) - - - attribute_map = { - 'group_id': 'group_id', # noqa: E501 - 'group_label': 'group_label', # noqa: E501 - 'requirement': 'requirement', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def group_id(self) -> str: - return self.get("group_id") - - @group_id.setter - def group_id(self, value: str): - setattr(self, "group_id", value) - - @property - def group_label(self) -> str: - return self.get("group_label") - - @group_label.setter - def group_label(self, value: str): - setattr(self, "group_label", value) - - @property - def requirement(self) -> str: - return self.get("requirement") - - @requirement.setter - def requirement(self, value: str): - setattr(self, "requirement", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, group_id, group_label, requirement, *args, **kwargs): # noqa: E501 - """SubFormFieldGroup - a model defined in OpenAPI - - Args: - group_id (str): ID of group. Use this to reference a specific group from the `group` value in `form_fields_per_document`. - group_label (str): Name of the group - requirement (str): 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. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.group_id = group_id - self.group_label = group_label - self.requirement = requirement - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, group_id, group_label, requirement, *args, **kwargs): # noqa: E501 - """SubFormFieldGroup - a model defined in OpenAPI - - Args: - group_id (str): ID of group. Use this to reference a specific group from the `group` value in `form_fields_per_document`. - group_label (str): Name of the group - requirement (str): 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. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.group_id = group_id - self.group_label = group_label - self.requirement = requirement - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/sub_form_field_rule.py b/sdks/python/dropbox_sign/model/sub_form_field_rule.py deleted file mode 100644 index bf8ccf540..000000000 --- a/sdks/python/dropbox_sign/model/sub_form_field_rule.py +++ /dev/null @@ -1,351 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.sub_form_field_rule_action import SubFormFieldRuleAction - from dropbox_sign.model.sub_form_field_rule_trigger import SubFormFieldRuleTrigger - - -def lazy_import(): - from dropbox_sign.model.sub_form_field_rule_action import SubFormFieldRuleAction - from dropbox_sign.model.sub_form_field_rule_trigger import SubFormFieldRuleTrigger - globals()['SubFormFieldRuleAction'] = SubFormFieldRuleAction - globals()['SubFormFieldRuleTrigger'] = SubFormFieldRuleTrigger - - -class SubFormFieldRule(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - ('triggers',): { - 'max_items': 1, - 'min_items': 1, - }, - ('actions',): { - 'min_items': 1, - }, - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'id': (str,), # noqa: E501 - 'trigger_operator': (str,), # noqa: E501 - 'triggers': ([SubFormFieldRuleTrigger],), # noqa: E501 - 'actions': ([SubFormFieldRuleAction],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> SubFormFieldRule: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[SubFormFieldRule], - _check_type=True, - ) - - - attribute_map = { - 'id': 'id', # noqa: E501 - 'trigger_operator': 'trigger_operator', # noqa: E501 - 'triggers': 'triggers', # noqa: E501 - 'actions': 'actions', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def id(self) -> str: - return self.get("id") - - @id.setter - def id(self, value: str): - setattr(self, "id", value) - - @property - def trigger_operator(self) -> str: - return self.get("trigger_operator") - - @trigger_operator.setter - def trigger_operator(self, value: str): - setattr(self, "trigger_operator", value) - - @property - def triggers(self) -> List[SubFormFieldRuleTrigger]: - return self.get("triggers") - - @triggers.setter - def triggers(self, value: List[SubFormFieldRuleTrigger]): - setattr(self, "triggers", value) - - @property - def actions(self) -> List[SubFormFieldRuleAction]: - return self.get("actions") - - @actions.setter - def actions(self, value: List[SubFormFieldRuleAction]): - setattr(self, "actions", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, id, triggers, actions, *args, **kwargs): # noqa: E501 - """SubFormFieldRule - a model defined in OpenAPI - - Args: - id (str): Must be unique across all defined rules. - triggers ([SubFormFieldRuleTrigger]): An array of trigger definitions, the \"if this\" part of \"**if this**, then that\". Currently only a single trigger per rule is allowed. - actions ([SubFormFieldRuleAction]): 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. - - Keyword Args: - trigger_operator (str): Currently only `AND` is supported. Support for `OR` is being worked on.. defaults to "AND" # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - trigger_operator = kwargs.get('trigger_operator', "AND") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.id = id - self.trigger_operator = trigger_operator - self.triggers = triggers - self.actions = actions - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, id, triggers, actions, *args, **kwargs): # noqa: E501 - """SubFormFieldRule - a model defined in OpenAPI - - Args: - id (str): Must be unique across all defined rules. - triggers ([SubFormFieldRuleTrigger]): An array of trigger definitions, the \"if this\" part of \"**if this**, then that\". Currently only a single trigger per rule is allowed. - actions ([SubFormFieldRuleAction]): 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. - - Keyword Args: - trigger_operator (str): Currently only `AND` is supported. Support for `OR` is being worked on.. defaults to "AND" # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - trigger_operator = kwargs.get('trigger_operator', "AND") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.id = id - self.trigger_operator = trigger_operator - self.triggers = triggers - self.actions = actions - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/sub_form_field_rule_action.py b/sdks/python/dropbox_sign/model/sub_form_field_rule_action.py deleted file mode 100644 index b1aa3b39d..000000000 --- a/sdks/python/dropbox_sign/model/sub_form_field_rule_action.py +++ /dev/null @@ -1,331 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class SubFormFieldRuleAction(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('type',): { - 'FIELD-VISIBILITY': "change-field-visibility", - 'GROUP-VISIBILITY': "change-group-visibility", - }, - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'hidden': (bool,), # noqa: E501 - 'type': (str,), # noqa: E501 - 'field_id': (str,), # noqa: E501 - 'group_id': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> SubFormFieldRuleAction: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[SubFormFieldRuleAction], - _check_type=True, - ) - - - attribute_map = { - 'hidden': 'hidden', # noqa: E501 - 'type': 'type', # noqa: E501 - 'field_id': 'field_id', # noqa: E501 - 'group_id': 'group_id', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def hidden(self) -> bool: - return self.get("hidden") - - @hidden.setter - def hidden(self, value: bool): - setattr(self, "hidden", value) - - @property - def type(self) -> str: - return self.get("type") - - @type.setter - def type(self, value: str): - setattr(self, "type", value) - - @property - def field_id(self) -> str: - return self.get("field_id") - - @field_id.setter - def field_id(self, value: str): - setattr(self, "field_id", value) - - @property - def group_id(self) -> str: - return self.get("group_id") - - @group_id.setter - def group_id(self, value: str): - setattr(self, "group_id", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, hidden, type, *args, **kwargs): # noqa: E501 - """SubFormFieldRuleAction - a model defined in OpenAPI - - Args: - hidden (bool): `true` to hide the target field when rule is satisfied, otherwise `false`. - type (str): - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - field_id (str): **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.. [optional] # noqa: E501 - group_id (str): **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.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.hidden = hidden - self.type = type - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, hidden, type, *args, **kwargs): # noqa: E501 - """SubFormFieldRuleAction - a model defined in OpenAPI - - Args: - hidden (bool): `true` to hide the target field when rule is satisfied, otherwise `false`. - type (str): - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - field_id (str): **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.. [optional] # noqa: E501 - group_id (str): **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.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.hidden = hidden - self.type = type - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/sub_form_field_rule_trigger.py b/sdks/python/dropbox_sign/model/sub_form_field_rule_trigger.py deleted file mode 100644 index 6edb1eeb7..000000000 --- a/sdks/python/dropbox_sign/model/sub_form_field_rule_trigger.py +++ /dev/null @@ -1,334 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class SubFormFieldRuleTrigger(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('operator',): { - 'ANY': "any", - 'IS': "is", - 'MATCH': "match", - 'NONE': "none", - 'NOT': "not", - }, - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'id': (str,), # noqa: E501 - 'operator': (str,), # noqa: E501 - 'value': (str,), # noqa: E501 - 'values': ([str],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> SubFormFieldRuleTrigger: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[SubFormFieldRuleTrigger], - _check_type=True, - ) - - - attribute_map = { - 'id': 'id', # noqa: E501 - 'operator': 'operator', # noqa: E501 - 'value': 'value', # noqa: E501 - 'values': 'values', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def id(self) -> str: - return self.get("id") - - @id.setter - def id(self, value: str): - setattr(self, "id", value) - - @property - def operator(self) -> str: - return self.get("operator") - - @operator.setter - def operator(self, value: str): - setattr(self, "operator", value) - - @property - def value(self) -> str: - return self.get("value") - - @value.setter - def value(self, value: str): - setattr(self, "value", value) - - @property - def values(self) -> List[str]: - return self.get("values") - - @values.setter - def values(self, value: List[str]): - setattr(self, "values", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, id, operator, *args, **kwargs): # noqa: E501 - """SubFormFieldRuleTrigger - a model defined in OpenAPI - - Args: - id (str): 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 (str): 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 - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - value (str): **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`. [optional] # noqa: E501 - values ([str]): **values** or **value** is required, but not both. The values to match against **operator** when it is one of the following: - `any` - `none`. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.id = id - self.operator = operator - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, id, operator, *args, **kwargs): # noqa: E501 - """SubFormFieldRuleTrigger - a model defined in OpenAPI - - Args: - id (str): 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 (str): 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 - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - value (str): **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`. [optional] # noqa: E501 - values ([str]): **values** or **value** is required, but not both. The values to match against **operator** when it is one of the following: - `any` - `none`. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.id = id - self.operator = operator - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/sub_form_fields_per_document_base.py b/sdks/python/dropbox_sign/model/sub_form_fields_per_document_base.py deleted file mode 100644 index c36655584..000000000 --- a/sdks/python/dropbox_sign/model/sub_form_fields_per_document_base.py +++ /dev/null @@ -1,460 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - -if TYPE_CHECKING: - from dropbox_sign.models import SubFormFieldsPerDocumentCheckbox - from dropbox_sign.models import SubFormFieldsPerDocumentCheckboxMerge - from dropbox_sign.models import SubFormFieldsPerDocumentDateSigned - from dropbox_sign.models import SubFormFieldsPerDocumentDropdown - from dropbox_sign.models import SubFormFieldsPerDocumentHyperlink - from dropbox_sign.models import SubFormFieldsPerDocumentInitials - from dropbox_sign.models import SubFormFieldsPerDocumentRadio - from dropbox_sign.models import SubFormFieldsPerDocumentSignature - from dropbox_sign.models import SubFormFieldsPerDocumentText - from dropbox_sign.models import SubFormFieldsPerDocumentTextMerge - - -def lazy_import(): - from dropbox_sign.models import SubFormFieldsPerDocumentCheckbox - from dropbox_sign.models import SubFormFieldsPerDocumentCheckboxMerge - from dropbox_sign.models import SubFormFieldsPerDocumentDateSigned - from dropbox_sign.models import SubFormFieldsPerDocumentDropdown - from dropbox_sign.models import SubFormFieldsPerDocumentHyperlink - from dropbox_sign.models import SubFormFieldsPerDocumentInitials - from dropbox_sign.models import SubFormFieldsPerDocumentRadio - from dropbox_sign.models import SubFormFieldsPerDocumentSignature - from dropbox_sign.models import SubFormFieldsPerDocumentText - from dropbox_sign.models import SubFormFieldsPerDocumentTextMerge - globals()['SubFormFieldsPerDocumentCheckbox'] = SubFormFieldsPerDocumentCheckbox - globals()['SubFormFieldsPerDocumentCheckboxMerge'] = SubFormFieldsPerDocumentCheckboxMerge - globals()['SubFormFieldsPerDocumentDateSigned'] = SubFormFieldsPerDocumentDateSigned - globals()['SubFormFieldsPerDocumentDropdown'] = SubFormFieldsPerDocumentDropdown - globals()['SubFormFieldsPerDocumentHyperlink'] = SubFormFieldsPerDocumentHyperlink - globals()['SubFormFieldsPerDocumentInitials'] = SubFormFieldsPerDocumentInitials - globals()['SubFormFieldsPerDocumentRadio'] = SubFormFieldsPerDocumentRadio - globals()['SubFormFieldsPerDocumentSignature'] = SubFormFieldsPerDocumentSignature - globals()['SubFormFieldsPerDocumentText'] = SubFormFieldsPerDocumentText - globals()['SubFormFieldsPerDocumentTextMerge'] = SubFormFieldsPerDocumentTextMerge - - -class SubFormFieldsPerDocumentBase(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'document_index': (int,), # noqa: E501 - 'api_id': (str,), # noqa: E501 - 'height': (int,), # noqa: E501 - 'required': (bool,), # noqa: E501 - 'signer': (int, str,), # noqa: E501 - 'type': (str,), # noqa: E501 - 'width': (int,), # noqa: E501 - 'x': (int,), # noqa: E501 - 'y': (int,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'page': (int, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - lazy_import() - val = { - 'checkbox': SubFormFieldsPerDocumentCheckbox, - 'checkbox-merge': SubFormFieldsPerDocumentCheckboxMerge, - 'date_signed': SubFormFieldsPerDocumentDateSigned, - 'dropdown': SubFormFieldsPerDocumentDropdown, - 'hyperlink': SubFormFieldsPerDocumentHyperlink, - 'initials': SubFormFieldsPerDocumentInitials, - 'radio': SubFormFieldsPerDocumentRadio, - 'signature': SubFormFieldsPerDocumentSignature, - 'text': SubFormFieldsPerDocumentText, - 'text-merge': SubFormFieldsPerDocumentTextMerge, - } - if not val: - return None - return {'type': val} - - - attribute_map = { - 'document_index': 'document_index', # noqa: E501 - 'api_id': 'api_id', # noqa: E501 - 'height': 'height', # noqa: E501 - 'required': 'required', # noqa: E501 - 'signer': 'signer', # noqa: E501 - 'type': 'type', # noqa: E501 - 'width': 'width', # noqa: E501 - 'x': 'x', # noqa: E501 - 'y': 'y', # noqa: E501 - 'name': 'name', # noqa: E501 - 'page': 'page', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def document_index(self) -> int: - return self.get("document_index") - - @document_index.setter - def document_index(self, value: int): - setattr(self, "document_index", value) - - @property - def api_id(self) -> str: - return self.get("api_id") - - @api_id.setter - def api_id(self, value: str): - setattr(self, "api_id", value) - - @property - def height(self) -> int: - return self.get("height") - - @height.setter - def height(self, value: int): - setattr(self, "height", value) - - @property - def required(self) -> bool: - return self.get("required") - - @required.setter - def required(self, value: bool): - setattr(self, "required", value) - - @property - def signer(self) -> Union[int, str]: - return self.get("signer") - - @signer.setter - def signer(self, value: Union[int, str]): - setattr(self, "signer", value) - - @property - def type(self) -> str: - return self.get("type") - - @type.setter - def type(self, value: str): - setattr(self, "type", value) - - @property - def width(self) -> int: - return self.get("width") - - @width.setter - def width(self, value: int): - setattr(self, "width", value) - - @property - def x(self) -> int: - return self.get("x") - - @x.setter - def x(self, value: int): - setattr(self, "x", value) - - @property - def y(self) -> int: - return self.get("y") - - @y.setter - def y(self, value: int): - setattr(self, "y", value) - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def page(self) -> Optional[int]: - return self.get("page") - - @page.setter - def page(self, value: Optional[int]): - setattr(self, "page", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, document_index, api_id, height, required, signer, type, width, x, y, *args, **kwargs): # noqa: E501 - """SubFormFieldsPerDocumentBase - a model defined in OpenAPI - - Args: - document_index (int): Represents the integer index of the `file` or `file_url` document the field should be attached to. - api_id (str): An identifier for the field that is unique across all documents in the request. - height (int): Size of the field in pixels. - required (bool): Whether this field is required. - signer (str|int): 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 (str): - width (int): Size of the field in pixels. - x (int): Location coordinates of the field in pixels. - y (int): Location coordinates of the field in pixels. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - name (str): Display name for the field.. [optional] # noqa: E501 - page (int, none_type): 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.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.document_index = document_index - self.api_id = api_id - self.height = height - self.required = required - self.signer = signer - self.type = type - self.width = width - self.x = x - self.y = y - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, document_index, api_id, height, required, signer, type, width, x, y, *args, **kwargs): # noqa: E501 - """SubFormFieldsPerDocumentBase - a model defined in OpenAPI - - Args: - document_index (int): Represents the integer index of the `file` or `file_url` document the field should be attached to. - api_id (str): An identifier for the field that is unique across all documents in the request. - height (int): Size of the field in pixels. - required (bool): Whether this field is required. - signer (str|int): 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 (str): - width (int): Size of the field in pixels. - x (int): Location coordinates of the field in pixels. - y (int): Location coordinates of the field in pixels. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - name (str): Display name for the field.. [optional] # noqa: E501 - page (int, none_type): 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.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.document_index = document_index - self.api_id = api_id - self.height = height - self.required = required - self.signer = signer - self.type = type - self.width = width - self.x = x - self.y = y - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/sub_form_fields_per_document_checkbox.py b/sdks/python/dropbox_sign/model/sub_form_fields_per_document_checkbox.py deleted file mode 100644 index 22533826a..000000000 --- a/sdks/python/dropbox_sign/model/sub_form_fields_per_document_checkbox.py +++ /dev/null @@ -1,484 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.sub_form_fields_per_document_base import SubFormFieldsPerDocumentBase - - -def lazy_import(): - from dropbox_sign.model.sub_form_fields_per_document_base import SubFormFieldsPerDocumentBase - globals()['SubFormFieldsPerDocumentBase'] = SubFormFieldsPerDocumentBase - - -class SubFormFieldsPerDocumentCheckbox(ModelComposed): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'type': (str,), # noqa: E501 - 'is_checked': (bool,), # noqa: E501 - 'document_index': (int,), # noqa: E501 - 'api_id': (str,), # noqa: E501 - 'height': (int,), # noqa: E501 - 'required': (bool,), # noqa: E501 - 'signer': (int, str,), # noqa: E501 - 'width': (int,), # noqa: E501 - 'x': (int,), # noqa: E501 - 'y': (int,), # noqa: E501 - 'group': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'page': (int, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> SubFormFieldsPerDocumentCheckbox: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[SubFormFieldsPerDocumentCheckbox], - _check_type=True, - ) - - - attribute_map = { - 'type': 'type', # noqa: E501 - 'is_checked': 'is_checked', # noqa: E501 - 'document_index': 'document_index', # noqa: E501 - 'api_id': 'api_id', # noqa: E501 - 'height': 'height', # noqa: E501 - 'required': 'required', # noqa: E501 - 'signer': 'signer', # noqa: E501 - 'width': 'width', # noqa: E501 - 'x': 'x', # noqa: E501 - 'y': 'y', # noqa: E501 - 'group': 'group', # noqa: E501 - 'name': 'name', # noqa: E501 - 'page': 'page', # noqa: E501 - } - - read_only_vars = { - } - - @property - def type(self) -> str: - return self.get("type") - - @type.setter - def type(self, value: str): - setattr(self, "type", value) - - @property - def is_checked(self) -> bool: - return self.get("is_checked") - - @is_checked.setter - def is_checked(self, value: bool): - setattr(self, "is_checked", value) - - @property - def document_index(self) -> int: - return self.get("document_index") - - @document_index.setter - def document_index(self, value: int): - setattr(self, "document_index", value) - - @property - def api_id(self) -> str: - return self.get("api_id") - - @api_id.setter - def api_id(self, value: str): - setattr(self, "api_id", value) - - @property - def height(self) -> int: - return self.get("height") - - @height.setter - def height(self, value: int): - setattr(self, "height", value) - - @property - def required(self) -> bool: - return self.get("required") - - @required.setter - def required(self, value: bool): - setattr(self, "required", value) - - @property - def signer(self) -> Union[int, str]: - return self.get("signer") - - @signer.setter - def signer(self, value: Union[int, str]): - setattr(self, "signer", value) - - @property - def width(self) -> int: - return self.get("width") - - @width.setter - def width(self, value: int): - setattr(self, "width", value) - - @property - def x(self) -> int: - return self.get("x") - - @x.setter - def x(self, value: int): - setattr(self, "x", value) - - @property - def y(self) -> int: - return self.get("y") - - @y.setter - def y(self, value: int): - setattr(self, "y", value) - - @property - def group(self) -> str: - return self.get("group") - - @group.setter - def group(self, value: str): - setattr(self, "group", value) - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def page(self) -> Optional[int]: - return self.get("page") - - @page.setter - def page(self, value: Optional[int]): - setattr(self, "page", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """SubFormFieldsPerDocumentCheckbox - a model defined in OpenAPI - - Keyword Args: - type (str): A yes/no checkbox. Use the `SubFormFieldsPerDocumentCheckbox` class.. defaults to "checkbox" # noqa: E501 - is_checked (bool): `true` for checking the checkbox field by default, otherwise `false`. - document_index (int): Represents the integer index of the `file` or `file_url` document the field should be attached to. - api_id (str): An identifier for the field that is unique across all documents in the request. - height (int): Size of the field in pixels. - required (bool): Whether this field is required. - signer (str|int): 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. - width (int): Size of the field in pixels. - x (int): Location coordinates of the field in pixels. - y (int): Location coordinates of the field in pixels. - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - group (str): String referencing group defined in `form_field_groups` parameter.. [optional] # noqa: E501 - name (str): Display name for the field.. [optional] # noqa: E501 - page (int, none_type): 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.. [optional] # noqa: E501 - """ - - type = kwargs.get('type', "checkbox") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """SubFormFieldsPerDocumentCheckbox - a model defined in OpenAPI - - Keyword Args: - type (str): A yes/no checkbox. Use the `SubFormFieldsPerDocumentCheckbox` class.. defaults to "checkbox" # noqa: E501 - is_checked (bool): `true` for checking the checkbox field by default, otherwise `false`. - document_index (int): Represents the integer index of the `file` or `file_url` document the field should be attached to. - api_id (str): An identifier for the field that is unique across all documents in the request. - height (int): Size of the field in pixels. - required (bool): Whether this field is required. - signer (str|int): 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. - width (int): Size of the field in pixels. - x (int): Location coordinates of the field in pixels. - y (int): Location coordinates of the field in pixels. - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - group (str): String referencing group defined in `form_field_groups` parameter.. [optional] # noqa: E501 - name (str): Display name for the field.. [optional] # noqa: E501 - page (int, none_type): 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.. [optional] # noqa: E501 - """ - - type = kwargs.get('type', "checkbox") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'oneOf': [ - ], - } diff --git a/sdks/python/dropbox_sign/model/sub_form_fields_per_document_checkbox_merge.py b/sdks/python/dropbox_sign/model/sub_form_fields_per_document_checkbox_merge.py deleted file mode 100644 index 4ecc90c08..000000000 --- a/sdks/python/dropbox_sign/model/sub_form_fields_per_document_checkbox_merge.py +++ /dev/null @@ -1,460 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.sub_form_fields_per_document_base import SubFormFieldsPerDocumentBase - - -def lazy_import(): - from dropbox_sign.model.sub_form_fields_per_document_base import SubFormFieldsPerDocumentBase - globals()['SubFormFieldsPerDocumentBase'] = SubFormFieldsPerDocumentBase - - -class SubFormFieldsPerDocumentCheckboxMerge(ModelComposed): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'type': (str,), # noqa: E501 - 'document_index': (int,), # noqa: E501 - 'api_id': (str,), # noqa: E501 - 'height': (int,), # noqa: E501 - 'required': (bool,), # noqa: E501 - 'signer': (int, str,), # noqa: E501 - 'width': (int,), # noqa: E501 - 'x': (int,), # noqa: E501 - 'y': (int,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'page': (int, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> SubFormFieldsPerDocumentCheckboxMerge: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[SubFormFieldsPerDocumentCheckboxMerge], - _check_type=True, - ) - - - attribute_map = { - 'type': 'type', # noqa: E501 - 'document_index': 'document_index', # noqa: E501 - 'api_id': 'api_id', # noqa: E501 - 'height': 'height', # noqa: E501 - 'required': 'required', # noqa: E501 - 'signer': 'signer', # noqa: E501 - 'width': 'width', # noqa: E501 - 'x': 'x', # noqa: E501 - 'y': 'y', # noqa: E501 - 'name': 'name', # noqa: E501 - 'page': 'page', # noqa: E501 - } - - read_only_vars = { - } - - @property - def type(self) -> str: - return self.get("type") - - @type.setter - def type(self, value: str): - setattr(self, "type", value) - - @property - def document_index(self) -> int: - return self.get("document_index") - - @document_index.setter - def document_index(self, value: int): - setattr(self, "document_index", value) - - @property - def api_id(self) -> str: - return self.get("api_id") - - @api_id.setter - def api_id(self, value: str): - setattr(self, "api_id", value) - - @property - def height(self) -> int: - return self.get("height") - - @height.setter - def height(self, value: int): - setattr(self, "height", value) - - @property - def required(self) -> bool: - return self.get("required") - - @required.setter - def required(self, value: bool): - setattr(self, "required", value) - - @property - def signer(self) -> Union[int, str]: - return self.get("signer") - - @signer.setter - def signer(self, value: Union[int, str]): - setattr(self, "signer", value) - - @property - def width(self) -> int: - return self.get("width") - - @width.setter - def width(self, value: int): - setattr(self, "width", value) - - @property - def x(self) -> int: - return self.get("x") - - @x.setter - def x(self, value: int): - setattr(self, "x", value) - - @property - def y(self) -> int: - return self.get("y") - - @y.setter - def y(self, value: int): - setattr(self, "y", value) - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def page(self) -> Optional[int]: - return self.get("page") - - @page.setter - def page(self, value: Optional[int]): - setattr(self, "page", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """SubFormFieldsPerDocumentCheckboxMerge - a model defined in OpenAPI - - Keyword Args: - type (str): A checkbox field that has default value set using pre-filled data. Use the `SubFormFieldsPerDocumentCheckboxMerge` class.. defaults to "checkbox-merge" # noqa: E501 - document_index (int): Represents the integer index of the `file` or `file_url` document the field should be attached to. - api_id (str): An identifier for the field that is unique across all documents in the request. - height (int): Size of the field in pixels. - required (bool): Whether this field is required. - signer (str|int): 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. - width (int): Size of the field in pixels. - x (int): Location coordinates of the field in pixels. - y (int): Location coordinates of the field in pixels. - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - name (str): Display name for the field.. [optional] # noqa: E501 - page (int, none_type): 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.. [optional] # noqa: E501 - """ - - type = kwargs.get('type', "checkbox-merge") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """SubFormFieldsPerDocumentCheckboxMerge - a model defined in OpenAPI - - Keyword Args: - type (str): A checkbox field that has default value set using pre-filled data. Use the `SubFormFieldsPerDocumentCheckboxMerge` class.. defaults to "checkbox-merge" # noqa: E501 - document_index (int): Represents the integer index of the `file` or `file_url` document the field should be attached to. - api_id (str): An identifier for the field that is unique across all documents in the request. - height (int): Size of the field in pixels. - required (bool): Whether this field is required. - signer (str|int): 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. - width (int): Size of the field in pixels. - x (int): Location coordinates of the field in pixels. - y (int): Location coordinates of the field in pixels. - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - name (str): Display name for the field.. [optional] # noqa: E501 - page (int, none_type): 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.. [optional] # noqa: E501 - """ - - type = kwargs.get('type', "checkbox-merge") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'oneOf': [ - ], - } diff --git a/sdks/python/dropbox_sign/model/sub_form_fields_per_document_date_signed.py b/sdks/python/dropbox_sign/model/sub_form_fields_per_document_date_signed.py deleted file mode 100644 index 78735a90f..000000000 --- a/sdks/python/dropbox_sign/model/sub_form_fields_per_document_date_signed.py +++ /dev/null @@ -1,502 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.sub_form_fields_per_document_base import SubFormFieldsPerDocumentBase - - -def lazy_import(): - from dropbox_sign.model.sub_form_fields_per_document_base import SubFormFieldsPerDocumentBase - globals()['SubFormFieldsPerDocumentBase'] = SubFormFieldsPerDocumentBase - - -class SubFormFieldsPerDocumentDateSigned(ModelComposed): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('font_family',): { - '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", - 'NOTOCJK-JP-REGULAR': "notoCJK-JP-Regular", - 'NOTOHEBREW-REGULAR': "notoHebrew-Regular", - 'NOTOSANTHAIMERGED': "notoSanThaiMerged", - }, - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'type': (str,), # noqa: E501 - 'document_index': (int,), # noqa: E501 - 'api_id': (str,), # noqa: E501 - 'height': (int,), # noqa: E501 - 'required': (bool,), # noqa: E501 - 'signer': (int, str,), # noqa: E501 - 'width': (int,), # noqa: E501 - 'x': (int,), # noqa: E501 - 'y': (int,), # noqa: E501 - 'font_family': (str,), # noqa: E501 - 'font_size': (int,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'page': (int, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> SubFormFieldsPerDocumentDateSigned: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[SubFormFieldsPerDocumentDateSigned], - _check_type=True, - ) - - - attribute_map = { - 'type': 'type', # noqa: E501 - 'document_index': 'document_index', # noqa: E501 - 'api_id': 'api_id', # noqa: E501 - 'height': 'height', # noqa: E501 - 'required': 'required', # noqa: E501 - 'signer': 'signer', # noqa: E501 - 'width': 'width', # noqa: E501 - 'x': 'x', # noqa: E501 - 'y': 'y', # noqa: E501 - 'font_family': 'font_family', # noqa: E501 - 'font_size': 'font_size', # noqa: E501 - 'name': 'name', # noqa: E501 - 'page': 'page', # noqa: E501 - } - - read_only_vars = { - } - - @property - def type(self) -> str: - return self.get("type") - - @type.setter - def type(self, value: str): - setattr(self, "type", value) - - @property - def document_index(self) -> int: - return self.get("document_index") - - @document_index.setter - def document_index(self, value: int): - setattr(self, "document_index", value) - - @property - def api_id(self) -> str: - return self.get("api_id") - - @api_id.setter - def api_id(self, value: str): - setattr(self, "api_id", value) - - @property - def height(self) -> int: - return self.get("height") - - @height.setter - def height(self, value: int): - setattr(self, "height", value) - - @property - def required(self) -> bool: - return self.get("required") - - @required.setter - def required(self, value: bool): - setattr(self, "required", value) - - @property - def signer(self) -> Union[int, str]: - return self.get("signer") - - @signer.setter - def signer(self, value: Union[int, str]): - setattr(self, "signer", value) - - @property - def width(self) -> int: - return self.get("width") - - @width.setter - def width(self, value: int): - setattr(self, "width", value) - - @property - def x(self) -> int: - return self.get("x") - - @x.setter - def x(self, value: int): - setattr(self, "x", value) - - @property - def y(self) -> int: - return self.get("y") - - @y.setter - def y(self, value: int): - setattr(self, "y", value) - - @property - def font_family(self) -> str: - return self.get("font_family") - - @font_family.setter - def font_family(self, value: str): - setattr(self, "font_family", value) - - @property - def font_size(self) -> int: - return self.get("font_size") - - @font_size.setter - def font_size(self, value: int): - setattr(self, "font_size", value) - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def page(self) -> Optional[int]: - return self.get("page") - - @page.setter - def page(self, value: Optional[int]): - setattr(self, "page", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """SubFormFieldsPerDocumentDateSigned - a model defined in OpenAPI - - Keyword Args: - type (str): A date. Use the `SubFormFieldsPerDocumentDateSigned` class.. defaults to "date_signed" # noqa: E501 - document_index (int): Represents the integer index of the `file` or `file_url` document the field should be attached to. - api_id (str): An identifier for the field that is unique across all documents in the request. - height (int): Size of the field in pixels. - required (bool): Whether this field is required. - signer (str|int): 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. - width (int): Size of the field in pixels. - x (int): Location coordinates of the field in pixels. - y (int): Location coordinates of the field in pixels. - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - font_family (str): Font family for the field.. [optional] # noqa: E501 - font_size (int): 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.. [optional] if omitted the server will use the default value of 12 # noqa: E501 - name (str): Display name for the field.. [optional] # noqa: E501 - page (int, none_type): 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.. [optional] # noqa: E501 - """ - - type = kwargs.get('type', "date_signed") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """SubFormFieldsPerDocumentDateSigned - a model defined in OpenAPI - - Keyword Args: - type (str): A date. Use the `SubFormFieldsPerDocumentDateSigned` class.. defaults to "date_signed" # noqa: E501 - document_index (int): Represents the integer index of the `file` or `file_url` document the field should be attached to. - api_id (str): An identifier for the field that is unique across all documents in the request. - height (int): Size of the field in pixels. - required (bool): Whether this field is required. - signer (str|int): 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. - width (int): Size of the field in pixels. - x (int): Location coordinates of the field in pixels. - y (int): Location coordinates of the field in pixels. - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - font_family (str): Font family for the field.. [optional] # noqa: E501 - font_size (int): 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.. [optional] if omitted the server will use the default value of 12 # noqa: E501 - name (str): Display name for the field.. [optional] # noqa: E501 - page (int, none_type): 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.. [optional] # noqa: E501 - """ - - type = kwargs.get('type', "date_signed") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'oneOf': [ - ], - } diff --git a/sdks/python/dropbox_sign/model/sub_form_fields_per_document_dropdown.py b/sdks/python/dropbox_sign/model/sub_form_fields_per_document_dropdown.py deleted file mode 100644 index 993be98cd..000000000 --- a/sdks/python/dropbox_sign/model/sub_form_fields_per_document_dropdown.py +++ /dev/null @@ -1,529 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.sub_form_fields_per_document_base import SubFormFieldsPerDocumentBase - - -def lazy_import(): - from dropbox_sign.model.sub_form_fields_per_document_base import SubFormFieldsPerDocumentBase - globals()['SubFormFieldsPerDocumentBase'] = SubFormFieldsPerDocumentBase - - -class SubFormFieldsPerDocumentDropdown(ModelComposed): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('font_family',): { - '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", - 'NOTOCJK-JP-REGULAR': "notoCJK-JP-Regular", - 'NOTOHEBREW-REGULAR': "notoHebrew-Regular", - 'NOTOSANTHAIMERGED': "notoSanThaiMerged", - }, - } - - validations = { - ('options',): { - 'min_items': 1, - }, - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'type': (str,), # noqa: E501 - 'options': ([str],), # noqa: E501 - 'document_index': (int,), # noqa: E501 - 'api_id': (str,), # noqa: E501 - 'height': (int,), # noqa: E501 - 'required': (bool,), # noqa: E501 - 'signer': (int, str,), # noqa: E501 - 'width': (int,), # noqa: E501 - 'x': (int,), # noqa: E501 - 'y': (int,), # noqa: E501 - 'content': (str,), # noqa: E501 - 'font_family': (str,), # noqa: E501 - 'font_size': (int,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'page': (int, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> SubFormFieldsPerDocumentDropdown: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[SubFormFieldsPerDocumentDropdown], - _check_type=True, - ) - - - attribute_map = { - 'type': 'type', # noqa: E501 - 'options': 'options', # noqa: E501 - 'document_index': 'document_index', # noqa: E501 - 'api_id': 'api_id', # noqa: E501 - 'height': 'height', # noqa: E501 - 'required': 'required', # noqa: E501 - 'signer': 'signer', # noqa: E501 - 'width': 'width', # noqa: E501 - 'x': 'x', # noqa: E501 - 'y': 'y', # noqa: E501 - 'content': 'content', # noqa: E501 - 'font_family': 'font_family', # noqa: E501 - 'font_size': 'font_size', # noqa: E501 - 'name': 'name', # noqa: E501 - 'page': 'page', # noqa: E501 - } - - read_only_vars = { - } - - @property - def type(self) -> str: - return self.get("type") - - @type.setter - def type(self, value: str): - setattr(self, "type", value) - - @property - def options(self) -> List[str]: - return self.get("options") - - @options.setter - def options(self, value: List[str]): - setattr(self, "options", value) - - @property - def document_index(self) -> int: - return self.get("document_index") - - @document_index.setter - def document_index(self, value: int): - setattr(self, "document_index", value) - - @property - def api_id(self) -> str: - return self.get("api_id") - - @api_id.setter - def api_id(self, value: str): - setattr(self, "api_id", value) - - @property - def height(self) -> int: - return self.get("height") - - @height.setter - def height(self, value: int): - setattr(self, "height", value) - - @property - def required(self) -> bool: - return self.get("required") - - @required.setter - def required(self, value: bool): - setattr(self, "required", value) - - @property - def signer(self) -> Union[int, str]: - return self.get("signer") - - @signer.setter - def signer(self, value: Union[int, str]): - setattr(self, "signer", value) - - @property - def width(self) -> int: - return self.get("width") - - @width.setter - def width(self, value: int): - setattr(self, "width", value) - - @property - def x(self) -> int: - return self.get("x") - - @x.setter - def x(self, value: int): - setattr(self, "x", value) - - @property - def y(self) -> int: - return self.get("y") - - @y.setter - def y(self, value: int): - setattr(self, "y", value) - - @property - def content(self) -> str: - return self.get("content") - - @content.setter - def content(self, value: str): - setattr(self, "content", value) - - @property - def font_family(self) -> str: - return self.get("font_family") - - @font_family.setter - def font_family(self, value: str): - setattr(self, "font_family", value) - - @property - def font_size(self) -> int: - return self.get("font_size") - - @font_size.setter - def font_size(self, value: int): - setattr(self, "font_size", value) - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def page(self) -> Optional[int]: - return self.get("page") - - @page.setter - def page(self, value: Optional[int]): - setattr(self, "page", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """SubFormFieldsPerDocumentDropdown - a model defined in OpenAPI - - Keyword Args: - type (str): An input field for dropdowns. Use the `SubFormFieldsPerDocumentDropdown` class.. defaults to "dropdown" # noqa: E501 - options ([str]): Array of string values representing dropdown values. - document_index (int): Represents the integer index of the `file` or `file_url` document the field should be attached to. - api_id (str): An identifier for the field that is unique across all documents in the request. - height (int): Size of the field in pixels. - required (bool): Whether this field is required. - signer (str|int): 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. - width (int): Size of the field in pixels. - x (int): Location coordinates of the field in pixels. - y (int): Location coordinates of the field in pixels. - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - content (str): Selected value in `options` array. Value must exist in array.. [optional] # noqa: E501 - font_family (str): Font family for the field.. [optional] # noqa: E501 - font_size (int): 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.. [optional] if omitted the server will use the default value of 12 # noqa: E501 - name (str): Display name for the field.. [optional] # noqa: E501 - page (int, none_type): 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.. [optional] # noqa: E501 - """ - - type = kwargs.get('type', "dropdown") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """SubFormFieldsPerDocumentDropdown - a model defined in OpenAPI - - Keyword Args: - type (str): An input field for dropdowns. Use the `SubFormFieldsPerDocumentDropdown` class.. defaults to "dropdown" # noqa: E501 - options ([str]): Array of string values representing dropdown values. - document_index (int): Represents the integer index of the `file` or `file_url` document the field should be attached to. - api_id (str): An identifier for the field that is unique across all documents in the request. - height (int): Size of the field in pixels. - required (bool): Whether this field is required. - signer (str|int): 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. - width (int): Size of the field in pixels. - x (int): Location coordinates of the field in pixels. - y (int): Location coordinates of the field in pixels. - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - content (str): Selected value in `options` array. Value must exist in array.. [optional] # noqa: E501 - font_family (str): Font family for the field.. [optional] # noqa: E501 - font_size (int): 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.. [optional] if omitted the server will use the default value of 12 # noqa: E501 - name (str): Display name for the field.. [optional] # noqa: E501 - page (int, none_type): 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.. [optional] # noqa: E501 - """ - - type = kwargs.get('type', "dropdown") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'oneOf': [ - ], - } diff --git a/sdks/python/dropbox_sign/model/sub_form_fields_per_document_font_enum.py b/sdks/python/dropbox_sign/model/sub_form_fields_per_document_font_enum.py deleted file mode 100644 index 3b63d8229..000000000 --- a/sdks/python/dropbox_sign/model/sub_form_fields_per_document_font_enum.py +++ /dev/null @@ -1,316 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class SubFormFieldsPerDocumentFontEnum(ModelSimple): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('value',): { - '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", - 'NOTOCJK-JP-REGULAR': "notoCJK-JP-Regular", - 'NOTOHEBREW-REGULAR': "notoHebrew-Regular", - 'NOTOSANTHAIMERGED': "notoSanThaiMerged", - }, - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'value': (str,), - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> SubFormFieldsPerDocumentFontEnum: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[SubFormFieldsPerDocumentFontEnum], - _check_type=True, - ) - - - attribute_map = {} - - read_only_vars = set() - - _composed_schemas = None - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): - """SubFormFieldsPerDocumentFontEnum - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str):, must be one of ["helvetica", "arial", "courier", "calibri", "cambria", "georgia", "times", "trebuchet", "verdana", "roboto", "robotoMono", "notoSans", "notoSerif", "notoCJK-JP-Regular", "notoHebrew-Regular", "notoSanThaiMerged", ] # noqa: E501 - - Keyword Args: - value (str):, must be one of ["helvetica", "arial", "courier", "calibri", "cambria", "georgia", "times", "trebuchet", "verdana", "roboto", "robotoMono", "notoSans", "notoSerif", "notoCJK-JP-Regular", "notoHebrew-Regular", "notoSanThaiMerged", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """SubFormFieldsPerDocumentFontEnum - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str):, must be one of ["helvetica", "arial", "courier", "calibri", "cambria", "georgia", "times", "trebuchet", "verdana", "roboto", "robotoMono", "notoSans", "notoSerif", "notoCJK-JP-Regular", "notoHebrew-Regular", "notoSanThaiMerged", ] # noqa: E501 - - Keyword Args: - value (str):, must be one of ["helvetica", "arial", "courier", "calibri", "cambria", "georgia", "times", "trebuchet", "verdana", "roboto", "robotoMono", "notoSans", "notoSerif", "notoCJK-JP-Regular", "notoHebrew-Regular", "notoSanThaiMerged", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - return self diff --git a/sdks/python/dropbox_sign/model/sub_form_fields_per_document_hyperlink.py b/sdks/python/dropbox_sign/model/sub_form_fields_per_document_hyperlink.py deleted file mode 100644 index 238d7572e..000000000 --- a/sdks/python/dropbox_sign/model/sub_form_fields_per_document_hyperlink.py +++ /dev/null @@ -1,526 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.sub_form_fields_per_document_base import SubFormFieldsPerDocumentBase - - -def lazy_import(): - from dropbox_sign.model.sub_form_fields_per_document_base import SubFormFieldsPerDocumentBase - globals()['SubFormFieldsPerDocumentBase'] = SubFormFieldsPerDocumentBase - - -class SubFormFieldsPerDocumentHyperlink(ModelComposed): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('font_family',): { - '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", - 'NOTOCJK-JP-REGULAR': "notoCJK-JP-Regular", - 'NOTOHEBREW-REGULAR': "notoHebrew-Regular", - 'NOTOSANTHAIMERGED': "notoSanThaiMerged", - }, - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'type': (str,), # noqa: E501 - 'content': (str,), # noqa: E501 - 'content_url': (str,), # noqa: E501 - 'document_index': (int,), # noqa: E501 - 'api_id': (str,), # noqa: E501 - 'height': (int,), # noqa: E501 - 'required': (bool,), # noqa: E501 - 'signer': (int, str,), # noqa: E501 - 'width': (int,), # noqa: E501 - 'x': (int,), # noqa: E501 - 'y': (int,), # noqa: E501 - 'font_family': (str,), # noqa: E501 - 'font_size': (int,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'page': (int, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> SubFormFieldsPerDocumentHyperlink: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[SubFormFieldsPerDocumentHyperlink], - _check_type=True, - ) - - - attribute_map = { - 'type': 'type', # noqa: E501 - 'content': 'content', # noqa: E501 - 'content_url': 'content_url', # noqa: E501 - 'document_index': 'document_index', # noqa: E501 - 'api_id': 'api_id', # noqa: E501 - 'height': 'height', # noqa: E501 - 'required': 'required', # noqa: E501 - 'signer': 'signer', # noqa: E501 - 'width': 'width', # noqa: E501 - 'x': 'x', # noqa: E501 - 'y': 'y', # noqa: E501 - 'font_family': 'font_family', # noqa: E501 - 'font_size': 'font_size', # noqa: E501 - 'name': 'name', # noqa: E501 - 'page': 'page', # noqa: E501 - } - - read_only_vars = { - } - - @property - def type(self) -> str: - return self.get("type") - - @type.setter - def type(self, value: str): - setattr(self, "type", value) - - @property - def content(self) -> str: - return self.get("content") - - @content.setter - def content(self, value: str): - setattr(self, "content", value) - - @property - def content_url(self) -> str: - return self.get("content_url") - - @content_url.setter - def content_url(self, value: str): - setattr(self, "content_url", value) - - @property - def document_index(self) -> int: - return self.get("document_index") - - @document_index.setter - def document_index(self, value: int): - setattr(self, "document_index", value) - - @property - def api_id(self) -> str: - return self.get("api_id") - - @api_id.setter - def api_id(self, value: str): - setattr(self, "api_id", value) - - @property - def height(self) -> int: - return self.get("height") - - @height.setter - def height(self, value: int): - setattr(self, "height", value) - - @property - def required(self) -> bool: - return self.get("required") - - @required.setter - def required(self, value: bool): - setattr(self, "required", value) - - @property - def signer(self) -> Union[int, str]: - return self.get("signer") - - @signer.setter - def signer(self, value: Union[int, str]): - setattr(self, "signer", value) - - @property - def width(self) -> int: - return self.get("width") - - @width.setter - def width(self, value: int): - setattr(self, "width", value) - - @property - def x(self) -> int: - return self.get("x") - - @x.setter - def x(self, value: int): - setattr(self, "x", value) - - @property - def y(self) -> int: - return self.get("y") - - @y.setter - def y(self, value: int): - setattr(self, "y", value) - - @property - def font_family(self) -> str: - return self.get("font_family") - - @font_family.setter - def font_family(self, value: str): - setattr(self, "font_family", value) - - @property - def font_size(self) -> int: - return self.get("font_size") - - @font_size.setter - def font_size(self, value: int): - setattr(self, "font_size", value) - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def page(self) -> Optional[int]: - return self.get("page") - - @page.setter - def page(self, value: Optional[int]): - setattr(self, "page", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """SubFormFieldsPerDocumentHyperlink - a model defined in OpenAPI - - Keyword Args: - type (str): A hyperlink field. Use the `SubFormFieldsPerDocumentHyperlink` class.. defaults to "hyperlink" # noqa: E501 - content (str): Link Text. - content_url (str): Link URL. - document_index (int): Represents the integer index of the `file` or `file_url` document the field should be attached to. - api_id (str): An identifier for the field that is unique across all documents in the request. - height (int): Size of the field in pixels. - required (bool): Whether this field is required. - signer (str|int): 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. - width (int): Size of the field in pixels. - x (int): Location coordinates of the field in pixels. - y (int): Location coordinates of the field in pixels. - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - font_family (str): Font family for the field.. [optional] # noqa: E501 - font_size (int): 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.. [optional] if omitted the server will use the default value of 12 # noqa: E501 - name (str): Display name for the field.. [optional] # noqa: E501 - page (int, none_type): 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.. [optional] # noqa: E501 - """ - - type = kwargs.get('type', "hyperlink") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """SubFormFieldsPerDocumentHyperlink - a model defined in OpenAPI - - Keyword Args: - type (str): A hyperlink field. Use the `SubFormFieldsPerDocumentHyperlink` class.. defaults to "hyperlink" # noqa: E501 - content (str): Link Text. - content_url (str): Link URL. - document_index (int): Represents the integer index of the `file` or `file_url` document the field should be attached to. - api_id (str): An identifier for the field that is unique across all documents in the request. - height (int): Size of the field in pixels. - required (bool): Whether this field is required. - signer (str|int): 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. - width (int): Size of the field in pixels. - x (int): Location coordinates of the field in pixels. - y (int): Location coordinates of the field in pixels. - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - font_family (str): Font family for the field.. [optional] # noqa: E501 - font_size (int): 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.. [optional] if omitted the server will use the default value of 12 # noqa: E501 - name (str): Display name for the field.. [optional] # noqa: E501 - page (int, none_type): 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.. [optional] # noqa: E501 - """ - - type = kwargs.get('type', "hyperlink") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'oneOf': [ - ], - } diff --git a/sdks/python/dropbox_sign/model/sub_form_fields_per_document_initials.py b/sdks/python/dropbox_sign/model/sub_form_fields_per_document_initials.py deleted file mode 100644 index fafc83347..000000000 --- a/sdks/python/dropbox_sign/model/sub_form_fields_per_document_initials.py +++ /dev/null @@ -1,460 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.sub_form_fields_per_document_base import SubFormFieldsPerDocumentBase - - -def lazy_import(): - from dropbox_sign.model.sub_form_fields_per_document_base import SubFormFieldsPerDocumentBase - globals()['SubFormFieldsPerDocumentBase'] = SubFormFieldsPerDocumentBase - - -class SubFormFieldsPerDocumentInitials(ModelComposed): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'type': (str,), # noqa: E501 - 'document_index': (int,), # noqa: E501 - 'api_id': (str,), # noqa: E501 - 'height': (int,), # noqa: E501 - 'required': (bool,), # noqa: E501 - 'signer': (int, str,), # noqa: E501 - 'width': (int,), # noqa: E501 - 'x': (int,), # noqa: E501 - 'y': (int,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'page': (int, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> SubFormFieldsPerDocumentInitials: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[SubFormFieldsPerDocumentInitials], - _check_type=True, - ) - - - attribute_map = { - 'type': 'type', # noqa: E501 - 'document_index': 'document_index', # noqa: E501 - 'api_id': 'api_id', # noqa: E501 - 'height': 'height', # noqa: E501 - 'required': 'required', # noqa: E501 - 'signer': 'signer', # noqa: E501 - 'width': 'width', # noqa: E501 - 'x': 'x', # noqa: E501 - 'y': 'y', # noqa: E501 - 'name': 'name', # noqa: E501 - 'page': 'page', # noqa: E501 - } - - read_only_vars = { - } - - @property - def type(self) -> str: - return self.get("type") - - @type.setter - def type(self, value: str): - setattr(self, "type", value) - - @property - def document_index(self) -> int: - return self.get("document_index") - - @document_index.setter - def document_index(self, value: int): - setattr(self, "document_index", value) - - @property - def api_id(self) -> str: - return self.get("api_id") - - @api_id.setter - def api_id(self, value: str): - setattr(self, "api_id", value) - - @property - def height(self) -> int: - return self.get("height") - - @height.setter - def height(self, value: int): - setattr(self, "height", value) - - @property - def required(self) -> bool: - return self.get("required") - - @required.setter - def required(self, value: bool): - setattr(self, "required", value) - - @property - def signer(self) -> Union[int, str]: - return self.get("signer") - - @signer.setter - def signer(self, value: Union[int, str]): - setattr(self, "signer", value) - - @property - def width(self) -> int: - return self.get("width") - - @width.setter - def width(self, value: int): - setattr(self, "width", value) - - @property - def x(self) -> int: - return self.get("x") - - @x.setter - def x(self, value: int): - setattr(self, "x", value) - - @property - def y(self) -> int: - return self.get("y") - - @y.setter - def y(self, value: int): - setattr(self, "y", value) - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def page(self) -> Optional[int]: - return self.get("page") - - @page.setter - def page(self, value: Optional[int]): - setattr(self, "page", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """SubFormFieldsPerDocumentInitials - a model defined in OpenAPI - - Keyword Args: - type (str): An input field for initials. Use the `SubFormFieldsPerDocumentInitials` class.. defaults to "initials" # noqa: E501 - document_index (int): Represents the integer index of the `file` or `file_url` document the field should be attached to. - api_id (str): An identifier for the field that is unique across all documents in the request. - height (int): Size of the field in pixels. - required (bool): Whether this field is required. - signer (str|int): 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. - width (int): Size of the field in pixels. - x (int): Location coordinates of the field in pixels. - y (int): Location coordinates of the field in pixels. - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - name (str): Display name for the field.. [optional] # noqa: E501 - page (int, none_type): 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.. [optional] # noqa: E501 - """ - - type = kwargs.get('type', "initials") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """SubFormFieldsPerDocumentInitials - a model defined in OpenAPI - - Keyword Args: - type (str): An input field for initials. Use the `SubFormFieldsPerDocumentInitials` class.. defaults to "initials" # noqa: E501 - document_index (int): Represents the integer index of the `file` or `file_url` document the field should be attached to. - api_id (str): An identifier for the field that is unique across all documents in the request. - height (int): Size of the field in pixels. - required (bool): Whether this field is required. - signer (str|int): 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. - width (int): Size of the field in pixels. - x (int): Location coordinates of the field in pixels. - y (int): Location coordinates of the field in pixels. - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - name (str): Display name for the field.. [optional] # noqa: E501 - page (int, none_type): 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.. [optional] # noqa: E501 - """ - - type = kwargs.get('type', "initials") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'oneOf': [ - ], - } diff --git a/sdks/python/dropbox_sign/model/sub_form_fields_per_document_radio.py b/sdks/python/dropbox_sign/model/sub_form_fields_per_document_radio.py deleted file mode 100644 index d7384e29c..000000000 --- a/sdks/python/dropbox_sign/model/sub_form_fields_per_document_radio.py +++ /dev/null @@ -1,484 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.sub_form_fields_per_document_base import SubFormFieldsPerDocumentBase - - -def lazy_import(): - from dropbox_sign.model.sub_form_fields_per_document_base import SubFormFieldsPerDocumentBase - globals()['SubFormFieldsPerDocumentBase'] = SubFormFieldsPerDocumentBase - - -class SubFormFieldsPerDocumentRadio(ModelComposed): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'type': (str,), # noqa: E501 - 'group': (str,), # noqa: E501 - 'is_checked': (bool,), # noqa: E501 - 'document_index': (int,), # noqa: E501 - 'api_id': (str,), # noqa: E501 - 'height': (int,), # noqa: E501 - 'required': (bool,), # noqa: E501 - 'signer': (int, str,), # noqa: E501 - 'width': (int,), # noqa: E501 - 'x': (int,), # noqa: E501 - 'y': (int,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'page': (int, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> SubFormFieldsPerDocumentRadio: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[SubFormFieldsPerDocumentRadio], - _check_type=True, - ) - - - attribute_map = { - 'type': 'type', # noqa: E501 - 'group': 'group', # noqa: E501 - 'is_checked': 'is_checked', # noqa: E501 - 'document_index': 'document_index', # noqa: E501 - 'api_id': 'api_id', # noqa: E501 - 'height': 'height', # noqa: E501 - 'required': 'required', # noqa: E501 - 'signer': 'signer', # noqa: E501 - 'width': 'width', # noqa: E501 - 'x': 'x', # noqa: E501 - 'y': 'y', # noqa: E501 - 'name': 'name', # noqa: E501 - 'page': 'page', # noqa: E501 - } - - read_only_vars = { - } - - @property - def type(self) -> str: - return self.get("type") - - @type.setter - def type(self, value: str): - setattr(self, "type", value) - - @property - def group(self) -> str: - return self.get("group") - - @group.setter - def group(self, value: str): - setattr(self, "group", value) - - @property - def is_checked(self) -> bool: - return self.get("is_checked") - - @is_checked.setter - def is_checked(self, value: bool): - setattr(self, "is_checked", value) - - @property - def document_index(self) -> int: - return self.get("document_index") - - @document_index.setter - def document_index(self, value: int): - setattr(self, "document_index", value) - - @property - def api_id(self) -> str: - return self.get("api_id") - - @api_id.setter - def api_id(self, value: str): - setattr(self, "api_id", value) - - @property - def height(self) -> int: - return self.get("height") - - @height.setter - def height(self, value: int): - setattr(self, "height", value) - - @property - def required(self) -> bool: - return self.get("required") - - @required.setter - def required(self, value: bool): - setattr(self, "required", value) - - @property - def signer(self) -> Union[int, str]: - return self.get("signer") - - @signer.setter - def signer(self, value: Union[int, str]): - setattr(self, "signer", value) - - @property - def width(self) -> int: - return self.get("width") - - @width.setter - def width(self, value: int): - setattr(self, "width", value) - - @property - def x(self) -> int: - return self.get("x") - - @x.setter - def x(self, value: int): - setattr(self, "x", value) - - @property - def y(self) -> int: - return self.get("y") - - @y.setter - def y(self, value: int): - setattr(self, "y", value) - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def page(self) -> Optional[int]: - return self.get("page") - - @page.setter - def page(self, value: Optional[int]): - setattr(self, "page", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """SubFormFieldsPerDocumentRadio - a model defined in OpenAPI - - Keyword Args: - type (str): An input field for radios. Use the `SubFormFieldsPerDocumentRadio` class.. defaults to "radio" # noqa: E501 - group (str): String referencing group defined in `form_field_groups` parameter. - is_checked (bool): `true` for checking the radio field by default, otherwise `false`. Only one radio field per group can be `true`. - document_index (int): Represents the integer index of the `file` or `file_url` document the field should be attached to. - api_id (str): An identifier for the field that is unique across all documents in the request. - height (int): Size of the field in pixels. - required (bool): Whether this field is required. - signer (str|int): 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. - width (int): Size of the field in pixels. - x (int): Location coordinates of the field in pixels. - y (int): Location coordinates of the field in pixels. - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - name (str): Display name for the field.. [optional] # noqa: E501 - page (int, none_type): 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.. [optional] # noqa: E501 - """ - - type = kwargs.get('type', "radio") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """SubFormFieldsPerDocumentRadio - a model defined in OpenAPI - - Keyword Args: - type (str): An input field for radios. Use the `SubFormFieldsPerDocumentRadio` class.. defaults to "radio" # noqa: E501 - group (str): String referencing group defined in `form_field_groups` parameter. - is_checked (bool): `true` for checking the radio field by default, otherwise `false`. Only one radio field per group can be `true`. - document_index (int): Represents the integer index of the `file` or `file_url` document the field should be attached to. - api_id (str): An identifier for the field that is unique across all documents in the request. - height (int): Size of the field in pixels. - required (bool): Whether this field is required. - signer (str|int): 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. - width (int): Size of the field in pixels. - x (int): Location coordinates of the field in pixels. - y (int): Location coordinates of the field in pixels. - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - name (str): Display name for the field.. [optional] # noqa: E501 - page (int, none_type): 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.. [optional] # noqa: E501 - """ - - type = kwargs.get('type', "radio") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'oneOf': [ - ], - } diff --git a/sdks/python/dropbox_sign/model/sub_form_fields_per_document_signature.py b/sdks/python/dropbox_sign/model/sub_form_fields_per_document_signature.py deleted file mode 100644 index f8ca58530..000000000 --- a/sdks/python/dropbox_sign/model/sub_form_fields_per_document_signature.py +++ /dev/null @@ -1,460 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.sub_form_fields_per_document_base import SubFormFieldsPerDocumentBase - - -def lazy_import(): - from dropbox_sign.model.sub_form_fields_per_document_base import SubFormFieldsPerDocumentBase - globals()['SubFormFieldsPerDocumentBase'] = SubFormFieldsPerDocumentBase - - -class SubFormFieldsPerDocumentSignature(ModelComposed): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'type': (str,), # noqa: E501 - 'document_index': (int,), # noqa: E501 - 'api_id': (str,), # noqa: E501 - 'height': (int,), # noqa: E501 - 'required': (bool,), # noqa: E501 - 'signer': (int, str,), # noqa: E501 - 'width': (int,), # noqa: E501 - 'x': (int,), # noqa: E501 - 'y': (int,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'page': (int, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> SubFormFieldsPerDocumentSignature: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[SubFormFieldsPerDocumentSignature], - _check_type=True, - ) - - - attribute_map = { - 'type': 'type', # noqa: E501 - 'document_index': 'document_index', # noqa: E501 - 'api_id': 'api_id', # noqa: E501 - 'height': 'height', # noqa: E501 - 'required': 'required', # noqa: E501 - 'signer': 'signer', # noqa: E501 - 'width': 'width', # noqa: E501 - 'x': 'x', # noqa: E501 - 'y': 'y', # noqa: E501 - 'name': 'name', # noqa: E501 - 'page': 'page', # noqa: E501 - } - - read_only_vars = { - } - - @property - def type(self) -> str: - return self.get("type") - - @type.setter - def type(self, value: str): - setattr(self, "type", value) - - @property - def document_index(self) -> int: - return self.get("document_index") - - @document_index.setter - def document_index(self, value: int): - setattr(self, "document_index", value) - - @property - def api_id(self) -> str: - return self.get("api_id") - - @api_id.setter - def api_id(self, value: str): - setattr(self, "api_id", value) - - @property - def height(self) -> int: - return self.get("height") - - @height.setter - def height(self, value: int): - setattr(self, "height", value) - - @property - def required(self) -> bool: - return self.get("required") - - @required.setter - def required(self, value: bool): - setattr(self, "required", value) - - @property - def signer(self) -> Union[int, str]: - return self.get("signer") - - @signer.setter - def signer(self, value: Union[int, str]): - setattr(self, "signer", value) - - @property - def width(self) -> int: - return self.get("width") - - @width.setter - def width(self, value: int): - setattr(self, "width", value) - - @property - def x(self) -> int: - return self.get("x") - - @x.setter - def x(self, value: int): - setattr(self, "x", value) - - @property - def y(self) -> int: - return self.get("y") - - @y.setter - def y(self, value: int): - setattr(self, "y", value) - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def page(self) -> Optional[int]: - return self.get("page") - - @page.setter - def page(self, value: Optional[int]): - setattr(self, "page", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """SubFormFieldsPerDocumentSignature - a model defined in OpenAPI - - Keyword Args: - type (str): A signature input field. Use the `SubFormFieldsPerDocumentSignature` class.. defaults to "signature" # noqa: E501 - document_index (int): Represents the integer index of the `file` or `file_url` document the field should be attached to. - api_id (str): An identifier for the field that is unique across all documents in the request. - height (int): Size of the field in pixels. - required (bool): Whether this field is required. - signer (str|int): 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. - width (int): Size of the field in pixels. - x (int): Location coordinates of the field in pixels. - y (int): Location coordinates of the field in pixels. - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - name (str): Display name for the field.. [optional] # noqa: E501 - page (int, none_type): 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.. [optional] # noqa: E501 - """ - - type = kwargs.get('type', "signature") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """SubFormFieldsPerDocumentSignature - a model defined in OpenAPI - - Keyword Args: - type (str): A signature input field. Use the `SubFormFieldsPerDocumentSignature` class.. defaults to "signature" # noqa: E501 - document_index (int): Represents the integer index of the `file` or `file_url` document the field should be attached to. - api_id (str): An identifier for the field that is unique across all documents in the request. - height (int): Size of the field in pixels. - required (bool): Whether this field is required. - signer (str|int): 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. - width (int): Size of the field in pixels. - x (int): Location coordinates of the field in pixels. - y (int): Location coordinates of the field in pixels. - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - name (str): Display name for the field.. [optional] # noqa: E501 - page (int, none_type): 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.. [optional] # noqa: E501 - """ - - type = kwargs.get('type', "signature") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'oneOf': [ - ], - } diff --git a/sdks/python/dropbox_sign/model/sub_form_fields_per_document_text.py b/sdks/python/dropbox_sign/model/sub_form_fields_per_document_text.py deleted file mode 100644 index 448ce339b..000000000 --- a/sdks/python/dropbox_sign/model/sub_form_fields_per_document_text.py +++ /dev/null @@ -1,610 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.sub_form_fields_per_document_base import SubFormFieldsPerDocumentBase - - -def lazy_import(): - from dropbox_sign.model.sub_form_fields_per_document_base import SubFormFieldsPerDocumentBase - globals()['SubFormFieldsPerDocumentBase'] = SubFormFieldsPerDocumentBase - - -class SubFormFieldsPerDocumentText(ModelComposed): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('validation_type',): { - 'NUMBERS_ONLY': "numbers_only", - 'LETTERS_ONLY': "letters_only", - 'PHONE_NUMBER': "phone_number", - 'BANK_ROUTING_NUMBER': "bank_routing_number", - 'BANK_ACCOUNT_NUMBER': "bank_account_number", - 'EMAIL_ADDRESS': "email_address", - 'ZIP_CODE': "zip_code", - 'SOCIAL_SECURITY_NUMBER': "social_security_number", - 'EMPLOYER_IDENTIFICATION_NUMBER': "employer_identification_number", - 'CUSTOM_REGEX': "custom_regex", - }, - ('font_family',): { - '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", - 'NOTOCJK-JP-REGULAR': "notoCJK-JP-Regular", - 'NOTOHEBREW-REGULAR': "notoHebrew-Regular", - 'NOTOSANTHAIMERGED': "notoSanThaiMerged", - }, - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'type': (str,), # noqa: E501 - 'document_index': (int,), # noqa: E501 - 'api_id': (str,), # noqa: E501 - 'height': (int,), # noqa: E501 - 'required': (bool,), # noqa: E501 - 'signer': (int, str,), # noqa: E501 - 'width': (int,), # noqa: E501 - 'x': (int,), # noqa: E501 - 'y': (int,), # noqa: E501 - 'placeholder': (str,), # noqa: E501 - 'auto_fill_type': (str,), # noqa: E501 - 'link_id': (str,), # noqa: E501 - 'masked': (bool,), # noqa: E501 - 'validation_type': (str,), # noqa: E501 - 'validation_custom_regex': (str,), # noqa: E501 - 'validation_custom_regex_format_label': (str,), # noqa: E501 - 'content': (str,), # noqa: E501 - 'font_family': (str,), # noqa: E501 - 'font_size': (int,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'page': (int, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> SubFormFieldsPerDocumentText: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[SubFormFieldsPerDocumentText], - _check_type=True, - ) - - - attribute_map = { - 'type': 'type', # noqa: E501 - 'document_index': 'document_index', # noqa: E501 - 'api_id': 'api_id', # noqa: E501 - 'height': 'height', # noqa: E501 - 'required': 'required', # noqa: E501 - 'signer': 'signer', # noqa: E501 - 'width': 'width', # noqa: E501 - 'x': 'x', # noqa: E501 - 'y': 'y', # noqa: E501 - 'placeholder': 'placeholder', # noqa: E501 - 'auto_fill_type': 'auto_fill_type', # noqa: E501 - 'link_id': 'link_id', # noqa: E501 - 'masked': 'masked', # noqa: E501 - 'validation_type': 'validation_type', # noqa: E501 - 'validation_custom_regex': 'validation_custom_regex', # noqa: E501 - 'validation_custom_regex_format_label': 'validation_custom_regex_format_label', # noqa: E501 - 'content': 'content', # noqa: E501 - 'font_family': 'font_family', # noqa: E501 - 'font_size': 'font_size', # noqa: E501 - 'name': 'name', # noqa: E501 - 'page': 'page', # noqa: E501 - } - - read_only_vars = { - } - - @property - def type(self) -> str: - return self.get("type") - - @type.setter - def type(self, value: str): - setattr(self, "type", value) - - @property - def document_index(self) -> int: - return self.get("document_index") - - @document_index.setter - def document_index(self, value: int): - setattr(self, "document_index", value) - - @property - def api_id(self) -> str: - return self.get("api_id") - - @api_id.setter - def api_id(self, value: str): - setattr(self, "api_id", value) - - @property - def height(self) -> int: - return self.get("height") - - @height.setter - def height(self, value: int): - setattr(self, "height", value) - - @property - def required(self) -> bool: - return self.get("required") - - @required.setter - def required(self, value: bool): - setattr(self, "required", value) - - @property - def signer(self) -> Union[int, str]: - return self.get("signer") - - @signer.setter - def signer(self, value: Union[int, str]): - setattr(self, "signer", value) - - @property - def width(self) -> int: - return self.get("width") - - @width.setter - def width(self, value: int): - setattr(self, "width", value) - - @property - def x(self) -> int: - return self.get("x") - - @x.setter - def x(self, value: int): - setattr(self, "x", value) - - @property - def y(self) -> int: - return self.get("y") - - @y.setter - def y(self, value: int): - setattr(self, "y", value) - - @property - def placeholder(self) -> str: - return self.get("placeholder") - - @placeholder.setter - def placeholder(self, value: str): - setattr(self, "placeholder", value) - - @property - def auto_fill_type(self) -> str: - return self.get("auto_fill_type") - - @auto_fill_type.setter - def auto_fill_type(self, value: str): - setattr(self, "auto_fill_type", value) - - @property - def link_id(self) -> str: - return self.get("link_id") - - @link_id.setter - def link_id(self, value: str): - setattr(self, "link_id", value) - - @property - def masked(self) -> bool: - return self.get("masked") - - @masked.setter - def masked(self, value: bool): - setattr(self, "masked", value) - - @property - def validation_type(self) -> str: - return self.get("validation_type") - - @validation_type.setter - def validation_type(self, value: str): - setattr(self, "validation_type", value) - - @property - def validation_custom_regex(self) -> str: - return self.get("validation_custom_regex") - - @validation_custom_regex.setter - def validation_custom_regex(self, value: str): - setattr(self, "validation_custom_regex", value) - - @property - def validation_custom_regex_format_label(self) -> str: - return self.get("validation_custom_regex_format_label") - - @validation_custom_regex_format_label.setter - def validation_custom_regex_format_label(self, value: str): - setattr(self, "validation_custom_regex_format_label", value) - - @property - def content(self) -> str: - return self.get("content") - - @content.setter - def content(self, value: str): - setattr(self, "content", value) - - @property - def font_family(self) -> str: - return self.get("font_family") - - @font_family.setter - def font_family(self, value: str): - setattr(self, "font_family", value) - - @property - def font_size(self) -> int: - return self.get("font_size") - - @font_size.setter - def font_size(self, value: int): - setattr(self, "font_size", value) - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def page(self) -> Optional[int]: - return self.get("page") - - @page.setter - def page(self, value: Optional[int]): - setattr(self, "page", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """SubFormFieldsPerDocumentText - a model defined in OpenAPI - - Keyword Args: - type (str): A text input field. Use the `SubFormFieldsPerDocumentText` class.. defaults to "text" # noqa: E501 - document_index (int): Represents the integer index of the `file` or `file_url` document the field should be attached to. - api_id (str): An identifier for the field that is unique across all documents in the request. - height (int): Size of the field in pixels. - required (bool): Whether this field is required. - signer (str|int): 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. - width (int): Size of the field in pixels. - x (int): Location coordinates of the field in pixels. - y (int): Location coordinates of the field in pixels. - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - placeholder (str): Placeholder value for text field.. [optional] # noqa: E501 - auto_fill_type (str): 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.. [optional] # noqa: E501 - link_id (str): Link two or more text fields. Enter data into one linked text field, which automatically fill all other linked text fields.. [optional] # noqa: E501 - masked (bool): 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`.. [optional] # noqa: E501 - validation_type (str): 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.. [optional] # noqa: E501 - validation_custom_regex (str): [optional] # noqa: E501 - validation_custom_regex_format_label (str): [optional] # noqa: E501 - content (str): Content of a `me_now` text field. [optional] # noqa: E501 - font_family (str): Font family for the field.. [optional] # noqa: E501 - font_size (int): 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.. [optional] if omitted the server will use the default value of 12 # noqa: E501 - name (str): Display name for the field.. [optional] # noqa: E501 - page (int, none_type): 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.. [optional] # noqa: E501 - """ - - type = kwargs.get('type', "text") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """SubFormFieldsPerDocumentText - a model defined in OpenAPI - - Keyword Args: - type (str): A text input field. Use the `SubFormFieldsPerDocumentText` class.. defaults to "text" # noqa: E501 - document_index (int): Represents the integer index of the `file` or `file_url` document the field should be attached to. - api_id (str): An identifier for the field that is unique across all documents in the request. - height (int): Size of the field in pixels. - required (bool): Whether this field is required. - signer (str|int): 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. - width (int): Size of the field in pixels. - x (int): Location coordinates of the field in pixels. - y (int): Location coordinates of the field in pixels. - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - placeholder (str): Placeholder value for text field.. [optional] # noqa: E501 - auto_fill_type (str): 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.. [optional] # noqa: E501 - link_id (str): Link two or more text fields. Enter data into one linked text field, which automatically fill all other linked text fields.. [optional] # noqa: E501 - masked (bool): 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`.. [optional] # noqa: E501 - validation_type (str): 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.. [optional] # noqa: E501 - validation_custom_regex (str): [optional] # noqa: E501 - validation_custom_regex_format_label (str): [optional] # noqa: E501 - content (str): Content of a `me_now` text field. [optional] # noqa: E501 - font_family (str): Font family for the field.. [optional] # noqa: E501 - font_size (int): 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.. [optional] if omitted the server will use the default value of 12 # noqa: E501 - name (str): Display name for the field.. [optional] # noqa: E501 - page (int, none_type): 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.. [optional] # noqa: E501 - """ - - type = kwargs.get('type', "text") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'oneOf': [ - ], - } diff --git a/sdks/python/dropbox_sign/model/sub_form_fields_per_document_text_merge.py b/sdks/python/dropbox_sign/model/sub_form_fields_per_document_text_merge.py deleted file mode 100644 index ac655cc3d..000000000 --- a/sdks/python/dropbox_sign/model/sub_form_fields_per_document_text_merge.py +++ /dev/null @@ -1,502 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.sub_form_fields_per_document_base import SubFormFieldsPerDocumentBase - - -def lazy_import(): - from dropbox_sign.model.sub_form_fields_per_document_base import SubFormFieldsPerDocumentBase - globals()['SubFormFieldsPerDocumentBase'] = SubFormFieldsPerDocumentBase - - -class SubFormFieldsPerDocumentTextMerge(ModelComposed): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('font_family',): { - '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", - 'NOTOCJK-JP-REGULAR': "notoCJK-JP-Regular", - 'NOTOHEBREW-REGULAR': "notoHebrew-Regular", - 'NOTOSANTHAIMERGED': "notoSanThaiMerged", - }, - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'type': (str,), # noqa: E501 - 'document_index': (int,), # noqa: E501 - 'api_id': (str,), # noqa: E501 - 'height': (int,), # noqa: E501 - 'required': (bool,), # noqa: E501 - 'signer': (int, str,), # noqa: E501 - 'width': (int,), # noqa: E501 - 'x': (int,), # noqa: E501 - 'y': (int,), # noqa: E501 - 'font_family': (str,), # noqa: E501 - 'font_size': (int,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'page': (int, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> SubFormFieldsPerDocumentTextMerge: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[SubFormFieldsPerDocumentTextMerge], - _check_type=True, - ) - - - attribute_map = { - 'type': 'type', # noqa: E501 - 'document_index': 'document_index', # noqa: E501 - 'api_id': 'api_id', # noqa: E501 - 'height': 'height', # noqa: E501 - 'required': 'required', # noqa: E501 - 'signer': 'signer', # noqa: E501 - 'width': 'width', # noqa: E501 - 'x': 'x', # noqa: E501 - 'y': 'y', # noqa: E501 - 'font_family': 'font_family', # noqa: E501 - 'font_size': 'font_size', # noqa: E501 - 'name': 'name', # noqa: E501 - 'page': 'page', # noqa: E501 - } - - read_only_vars = { - } - - @property - def type(self) -> str: - return self.get("type") - - @type.setter - def type(self, value: str): - setattr(self, "type", value) - - @property - def document_index(self) -> int: - return self.get("document_index") - - @document_index.setter - def document_index(self, value: int): - setattr(self, "document_index", value) - - @property - def api_id(self) -> str: - return self.get("api_id") - - @api_id.setter - def api_id(self, value: str): - setattr(self, "api_id", value) - - @property - def height(self) -> int: - return self.get("height") - - @height.setter - def height(self, value: int): - setattr(self, "height", value) - - @property - def required(self) -> bool: - return self.get("required") - - @required.setter - def required(self, value: bool): - setattr(self, "required", value) - - @property - def signer(self) -> Union[int, str]: - return self.get("signer") - - @signer.setter - def signer(self, value: Union[int, str]): - setattr(self, "signer", value) - - @property - def width(self) -> int: - return self.get("width") - - @width.setter - def width(self, value: int): - setattr(self, "width", value) - - @property - def x(self) -> int: - return self.get("x") - - @x.setter - def x(self, value: int): - setattr(self, "x", value) - - @property - def y(self) -> int: - return self.get("y") - - @y.setter - def y(self, value: int): - setattr(self, "y", value) - - @property - def font_family(self) -> str: - return self.get("font_family") - - @font_family.setter - def font_family(self, value: str): - setattr(self, "font_family", value) - - @property - def font_size(self) -> int: - return self.get("font_size") - - @font_size.setter - def font_size(self, value: int): - setattr(self, "font_size", value) - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def page(self) -> Optional[int]: - return self.get("page") - - @page.setter - def page(self, value: Optional[int]): - setattr(self, "page", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """SubFormFieldsPerDocumentTextMerge - a model defined in OpenAPI - - Keyword Args: - type (str): A text field that has default text set using pre-filled data. Use the `SubFormFieldsPerDocumentTextMerge` class.. defaults to "text-merge" # noqa: E501 - document_index (int): Represents the integer index of the `file` or `file_url` document the field should be attached to. - api_id (str): An identifier for the field that is unique across all documents in the request. - height (int): Size of the field in pixels. - required (bool): Whether this field is required. - signer (str|int): 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. - width (int): Size of the field in pixels. - x (int): Location coordinates of the field in pixels. - y (int): Location coordinates of the field in pixels. - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - font_family (str): Font family for the field.. [optional] # noqa: E501 - font_size (int): 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.. [optional] if omitted the server will use the default value of 12 # noqa: E501 - name (str): Display name for the field.. [optional] # noqa: E501 - page (int, none_type): 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.. [optional] # noqa: E501 - """ - - type = kwargs.get('type', "text-merge") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """SubFormFieldsPerDocumentTextMerge - a model defined in OpenAPI - - Keyword Args: - type (str): A text field that has default text set using pre-filled data. Use the `SubFormFieldsPerDocumentTextMerge` class.. defaults to "text-merge" # noqa: E501 - document_index (int): Represents the integer index of the `file` or `file_url` document the field should be attached to. - api_id (str): An identifier for the field that is unique across all documents in the request. - height (int): Size of the field in pixels. - required (bool): Whether this field is required. - signer (str|int): 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. - width (int): Size of the field in pixels. - x (int): Location coordinates of the field in pixels. - y (int): Location coordinates of the field in pixels. - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - font_family (str): Font family for the field.. [optional] # noqa: E501 - font_size (int): 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.. [optional] if omitted the server will use the default value of 12 # noqa: E501 - name (str): Display name for the field.. [optional] # noqa: E501 - page (int, none_type): 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.. [optional] # noqa: E501 - """ - - type = kwargs.get('type', "text-merge") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'oneOf': [ - ], - } diff --git a/sdks/python/dropbox_sign/model/sub_form_fields_per_document_type_enum.py b/sdks/python/dropbox_sign/model/sub_form_fields_per_document_type_enum.py deleted file mode 100644 index dc8a877bd..000000000 --- a/sdks/python/dropbox_sign/model/sub_form_fields_per_document_type_enum.py +++ /dev/null @@ -1,310 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class SubFormFieldsPerDocumentTypeEnum(ModelSimple): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('value',): { - 'CHECKBOX': "checkbox", - 'CHECKBOX-MERGE': "checkbox-merge", - 'DATE_SIGNED': "date_signed", - 'DROPDOWN': "dropdown", - 'HYPERLINK': "hyperlink", - 'INITIALS': "initials", - 'SIGNATURE': "signature", - 'RADIO': "radio", - 'TEXT': "text", - 'TEXT-MERGE': "text-merge", - }, - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'value': (str,), - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> SubFormFieldsPerDocumentTypeEnum: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[SubFormFieldsPerDocumentTypeEnum], - _check_type=True, - ) - - - attribute_map = {} - - read_only_vars = set() - - _composed_schemas = None - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): - """SubFormFieldsPerDocumentTypeEnum - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str):, must be one of ["checkbox", "checkbox-merge", "date_signed", "dropdown", "hyperlink", "initials", "signature", "radio", "text", "text-merge", ] # noqa: E501 - - Keyword Args: - value (str):, must be one of ["checkbox", "checkbox-merge", "date_signed", "dropdown", "hyperlink", "initials", "signature", "radio", "text", "text-merge", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """SubFormFieldsPerDocumentTypeEnum - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str):, must be one of ["checkbox", "checkbox-merge", "date_signed", "dropdown", "hyperlink", "initials", "signature", "radio", "text", "text-merge", ] # noqa: E501 - - Keyword Args: - value (str):, must be one of ["checkbox", "checkbox-merge", "date_signed", "dropdown", "hyperlink", "initials", "signature", "radio", "text", "text-merge", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - return self diff --git a/sdks/python/dropbox_sign/model/sub_merge_field.py b/sdks/python/dropbox_sign/model/sub_merge_field.py deleted file mode 100644 index b256cea94..000000000 --- a/sdks/python/dropbox_sign/model/sub_merge_field.py +++ /dev/null @@ -1,307 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class SubMergeField(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('type',): { - 'TEXT': "text", - 'CHECKBOX': "checkbox", - }, - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'name': (str,), # noqa: E501 - 'type': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> SubMergeField: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[SubMergeField], - _check_type=True, - ) - - - attribute_map = { - 'name': 'name', # noqa: E501 - 'type': 'type', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def type(self) -> str: - return self.get("type") - - @type.setter - def type(self, value: str): - setattr(self, "type", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, name, type, *args, **kwargs): # noqa: E501 - """SubMergeField - a model defined in OpenAPI - - Args: - name (str): The name of the merge field. Must be unique. - type (str): The type of merge field. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.name = name - self.type = type - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, name, type, *args, **kwargs): # noqa: E501 - """SubMergeField - a model defined in OpenAPI - - Args: - name (str): The name of the merge field. Must be unique. - type (str): The type of merge field. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.name = name - self.type = type - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/sub_o_auth.py b/sdks/python/dropbox_sign/model/sub_o_auth.py deleted file mode 100644 index 602b6fb89..000000000 --- a/sdks/python/dropbox_sign/model/sub_o_auth.py +++ /dev/null @@ -1,305 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class SubOAuth(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('scopes',): { - 'REQUEST_SIGNATURE': "request_signature", - 'BASIC_ACCOUNT_INFO': "basic_account_info", - 'ACCOUNT_ACCESS': "account_access", - 'SIGNATURE_REQUEST_ACCESS': "signature_request_access", - 'TEMPLATE_ACCESS': "template_access", - 'TEAM_ACCESS': "team_access", - 'API_APP_ACCESS': "api_app_access", - 'EMPTY': "", - }, - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'callback_url': (str,), # noqa: E501 - 'scopes': ([str],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> SubOAuth: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[SubOAuth], - _check_type=True, - ) - - - attribute_map = { - 'callback_url': 'callback_url', # noqa: E501 - 'scopes': 'scopes', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def callback_url(self) -> str: - return self.get("callback_url") - - @callback_url.setter - def callback_url(self, value: str): - setattr(self, "callback_url", value) - - @property - def scopes(self) -> List[str]: - return self.get("scopes") - - @scopes.setter - def scopes(self, value: List[str]): - setattr(self, "scopes", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """SubOAuth - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - callback_url (str): The callback URL to be used for OAuth flows. (Required if `oauth[scopes]` is provided). [optional] # noqa: E501 - scopes ([str]): A list of [OAuth scopes](/api/reference/tag/OAuth) to be granted to the app. (Required if `oauth[callback_url]` is provided).. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """SubOAuth - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - callback_url (str): The callback URL to be used for OAuth flows. (Required if `oauth[scopes]` is provided). [optional] # noqa: E501 - scopes ([str]): A list of [OAuth scopes](/api/reference/tag/OAuth) to be granted to the app. (Required if `oauth[callback_url]` is provided).. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/sub_options.py b/sdks/python/dropbox_sign/model/sub_options.py deleted file mode 100644 index 4e32708fe..000000000 --- a/sdks/python/dropbox_sign/model/sub_options.py +++ /dev/null @@ -1,283 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class SubOptions(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'can_insert_everywhere': (bool,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> SubOptions: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[SubOptions], - _check_type=True, - ) - - - attribute_map = { - 'can_insert_everywhere': 'can_insert_everywhere', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def can_insert_everywhere(self) -> bool: - return self.get("can_insert_everywhere") - - @can_insert_everywhere.setter - def can_insert_everywhere(self, value: bool): - setattr(self, "can_insert_everywhere", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """SubOptions - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - can_insert_everywhere (bool): Determines if signers can use \"Insert Everywhere\" when signing a document.. [optional] if omitted the server will use the default value of False # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """SubOptions - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - can_insert_everywhere (bool): Determines if signers can use \"Insert Everywhere\" when signing a document.. [optional] if omitted the server will use the default value of False # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/sub_signature_request_grouped_signers.py b/sdks/python/dropbox_sign/model/sub_signature_request_grouped_signers.py deleted file mode 100644 index a53d7da62..000000000 --- a/sdks/python/dropbox_sign/model/sub_signature_request_grouped_signers.py +++ /dev/null @@ -1,323 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.sub_signature_request_signer import SubSignatureRequestSigner - - -def lazy_import(): - from dropbox_sign.model.sub_signature_request_signer import SubSignatureRequestSigner - globals()['SubSignatureRequestSigner'] = SubSignatureRequestSigner - - -class SubSignatureRequestGroupedSigners(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'group': (str,), # noqa: E501 - 'signers': ([SubSignatureRequestSigner],), # noqa: E501 - 'order': (int, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> SubSignatureRequestGroupedSigners: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[SubSignatureRequestGroupedSigners], - _check_type=True, - ) - - - attribute_map = { - 'group': 'group', # noqa: E501 - 'signers': 'signers', # noqa: E501 - 'order': 'order', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def group(self) -> str: - return self.get("group") - - @group.setter - def group(self, value: str): - setattr(self, "group", value) - - @property - def signers(self) -> List[SubSignatureRequestSigner]: - return self.get("signers") - - @signers.setter - def signers(self, value: List[SubSignatureRequestSigner]): - setattr(self, "signers", value) - - @property - def order(self) -> Optional[int]: - return self.get("order") - - @order.setter - def order(self, value: Optional[int]): - setattr(self, "order", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, group, signers, *args, **kwargs): # noqa: E501 - """SubSignatureRequestGroupedSigners - a model defined in OpenAPI - - Args: - group (str): The name of the group. - signers ([SubSignatureRequestSigner]): 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. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - order (int, none_type): The order the group is required to sign in. Use this instead of Signer-level `order`.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.group = group - self.signers = signers - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, group, signers, *args, **kwargs): # noqa: E501 - """SubSignatureRequestGroupedSigners - a model defined in OpenAPI - - Args: - group (str): The name of the group. - signers ([SubSignatureRequestSigner]): 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. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - order (int, none_type): The order the group is required to sign in. Use this instead of Signer-level `order`.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.group = group - self.signers = signers - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/sub_signature_request_signer.py b/sdks/python/dropbox_sign/model/sub_signature_request_signer.py deleted file mode 100644 index f6beed4b4..000000000 --- a/sdks/python/dropbox_sign/model/sub_signature_request_signer.py +++ /dev/null @@ -1,359 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class SubSignatureRequestSigner(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('sms_phone_number_type',): { - 'AUTHENTICATION': "authentication", - 'DELIVERY': "delivery", - }, - } - - validations = { - ('pin',): { - 'max_length': 12, - 'min_length': 4, - }, - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'name': (str,), # noqa: E501 - 'email_address': (str,), # noqa: E501 - 'order': (int, none_type,), # noqa: E501 - 'pin': (str,), # noqa: E501 - 'sms_phone_number': (str,), # noqa: E501 - 'sms_phone_number_type': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> SubSignatureRequestSigner: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[SubSignatureRequestSigner], - _check_type=True, - ) - - - attribute_map = { - 'name': 'name', # noqa: E501 - 'email_address': 'email_address', # noqa: E501 - 'order': 'order', # noqa: E501 - 'pin': 'pin', # noqa: E501 - 'sms_phone_number': 'sms_phone_number', # noqa: E501 - 'sms_phone_number_type': 'sms_phone_number_type', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def email_address(self) -> str: - return self.get("email_address") - - @email_address.setter - def email_address(self, value: str): - setattr(self, "email_address", value) - - @property - def order(self) -> Optional[int]: - return self.get("order") - - @order.setter - def order(self, value: Optional[int]): - setattr(self, "order", value) - - @property - def pin(self) -> str: - return self.get("pin") - - @pin.setter - def pin(self, value: str): - setattr(self, "pin", value) - - @property - def sms_phone_number(self) -> str: - return self.get("sms_phone_number") - - @sms_phone_number.setter - def sms_phone_number(self, value: str): - setattr(self, "sms_phone_number", value) - - @property - def sms_phone_number_type(self) -> str: - return self.get("sms_phone_number_type") - - @sms_phone_number_type.setter - def sms_phone_number_type(self, value: str): - setattr(self, "sms_phone_number_type", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, name, email_address, *args, **kwargs): # noqa: E501 - """SubSignatureRequestSigner - a model defined in OpenAPI - - Args: - name (str): The name of the signer. - email_address (str): The email address of the signer. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - order (int, none_type): The order the signer is required to sign in.. [optional] # noqa: E501 - pin (str): The 4- to 12-character access code that will secure this signer's signature page.. [optional] # noqa: E501 - sms_phone_number (str): 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.. [optional] # noqa: E501 - sms_phone_number_type (str): 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).. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.name = name - self.email_address = email_address - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, name, email_address, *args, **kwargs): # noqa: E501 - """SubSignatureRequestSigner - a model defined in OpenAPI - - Args: - name (str): The name of the signer. - email_address (str): The email address of the signer. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - order (int, none_type): The order the signer is required to sign in.. [optional] # noqa: E501 - pin (str): The 4- to 12-character access code that will secure this signer's signature page.. [optional] # noqa: E501 - sms_phone_number (str): 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.. [optional] # noqa: E501 - sms_phone_number_type (str): 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).. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.name = name - self.email_address = email_address - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/sub_signature_request_template_signer.py b/sdks/python/dropbox_sign/model/sub_signature_request_template_signer.py deleted file mode 100644 index 79b47f2b9..000000000 --- a/sdks/python/dropbox_sign/model/sub_signature_request_template_signer.py +++ /dev/null @@ -1,361 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class SubSignatureRequestTemplateSigner(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('sms_phone_number_type',): { - 'AUTHENTICATION': "authentication", - 'DELIVERY': "delivery", - }, - } - - validations = { - ('pin',): { - 'max_length': 12, - 'min_length': 4, - }, - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'role': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'email_address': (str,), # noqa: E501 - 'pin': (str,), # noqa: E501 - 'sms_phone_number': (str,), # noqa: E501 - 'sms_phone_number_type': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> SubSignatureRequestTemplateSigner: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[SubSignatureRequestTemplateSigner], - _check_type=True, - ) - - - attribute_map = { - 'role': 'role', # noqa: E501 - 'name': 'name', # noqa: E501 - 'email_address': 'email_address', # noqa: E501 - 'pin': 'pin', # noqa: E501 - 'sms_phone_number': 'sms_phone_number', # noqa: E501 - 'sms_phone_number_type': 'sms_phone_number_type', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def role(self) -> str: - return self.get("role") - - @role.setter - def role(self, value: str): - setattr(self, "role", value) - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def email_address(self) -> str: - return self.get("email_address") - - @email_address.setter - def email_address(self, value: str): - setattr(self, "email_address", value) - - @property - def pin(self) -> str: - return self.get("pin") - - @pin.setter - def pin(self, value: str): - setattr(self, "pin", value) - - @property - def sms_phone_number(self) -> str: - return self.get("sms_phone_number") - - @sms_phone_number.setter - def sms_phone_number(self, value: str): - setattr(self, "sms_phone_number", value) - - @property - def sms_phone_number_type(self) -> str: - return self.get("sms_phone_number_type") - - @sms_phone_number_type.setter - def sms_phone_number_type(self, value: str): - setattr(self, "sms_phone_number_type", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, role, name, email_address, *args, **kwargs): # noqa: E501 - """SubSignatureRequestTemplateSigner - a model defined in OpenAPI - - Args: - role (str): Must match an existing role in chosen Template(s). It's case-sensitive. - name (str): The name of the signer. - email_address (str): The email address of the signer. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - pin (str): The 4- to 12-character access code that will secure this signer's signature page.. [optional] # noqa: E501 - sms_phone_number (str): 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.. [optional] # noqa: E501 - sms_phone_number_type (str): 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).. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.role = role - self.name = name - self.email_address = email_address - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, role, name, email_address, *args, **kwargs): # noqa: E501 - """SubSignatureRequestTemplateSigner - a model defined in OpenAPI - - Args: - role (str): Must match an existing role in chosen Template(s). It's case-sensitive. - name (str): The name of the signer. - email_address (str): The email address of the signer. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - pin (str): The 4- to 12-character access code that will secure this signer's signature page.. [optional] # noqa: E501 - sms_phone_number (str): 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.. [optional] # noqa: E501 - sms_phone_number_type (str): 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).. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.role = role - self.name = name - self.email_address = email_address - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/sub_signing_options.py b/sdks/python/dropbox_sign/model/sub_signing_options.py deleted file mode 100644 index 5936f0808..000000000 --- a/sdks/python/dropbox_sign/model/sub_signing_options.py +++ /dev/null @@ -1,343 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class SubSigningOptions(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('default_type',): { - 'DRAW': "draw", - 'PHONE': "phone", - 'TYPE': "type", - 'UPLOAD': "upload", - }, - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'default_type': (str,), # noqa: E501 - 'draw': (bool,), # noqa: E501 - 'phone': (bool,), # noqa: E501 - 'type': (bool,), # noqa: E501 - 'upload': (bool,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> SubSigningOptions: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[SubSigningOptions], - _check_type=True, - ) - - - attribute_map = { - 'default_type': 'default_type', # noqa: E501 - 'draw': 'draw', # noqa: E501 - 'phone': 'phone', # noqa: E501 - 'type': 'type', # noqa: E501 - 'upload': 'upload', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def default_type(self) -> str: - return self.get("default_type") - - @default_type.setter - def default_type(self, value: str): - setattr(self, "default_type", value) - - @property - def draw(self) -> bool: - return self.get("draw") - - @draw.setter - def draw(self, value: bool): - setattr(self, "draw", value) - - @property - def phone(self) -> bool: - return self.get("phone") - - @phone.setter - def phone(self, value: bool): - setattr(self, "phone", value) - - @property - def type(self) -> bool: - return self.get("type") - - @type.setter - def type(self, value: bool): - setattr(self, "type", value) - - @property - def upload(self) -> bool: - return self.get("upload") - - @upload.setter - def upload(self, value: bool): - setattr(self, "upload", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, default_type, *args, **kwargs): # noqa: E501 - """SubSigningOptions - a model defined in OpenAPI - - Args: - default_type (str): The default type shown (limited to the listed types) - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - draw (bool): Allows drawing the signature. [optional] if omitted the server will use the default value of False # noqa: E501 - phone (bool): Allows using a smartphone to email the signature. [optional] if omitted the server will use the default value of False # noqa: E501 - type (bool): Allows typing the signature. [optional] if omitted the server will use the default value of False # noqa: E501 - upload (bool): Allows uploading the signature. [optional] if omitted the server will use the default value of False # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.default_type = default_type - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, default_type, *args, **kwargs): # noqa: E501 - """SubSigningOptions - a model defined in OpenAPI - - Args: - default_type (str): The default type shown (limited to the listed types) - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - draw (bool): Allows drawing the signature. [optional] if omitted the server will use the default value of False # noqa: E501 - phone (bool): Allows using a smartphone to email the signature. [optional] if omitted the server will use the default value of False # noqa: E501 - type (bool): Allows typing the signature. [optional] if omitted the server will use the default value of False # noqa: E501 - upload (bool): Allows uploading the signature. [optional] if omitted the server will use the default value of False # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.default_type = default_type - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/sub_team_response.py b/sdks/python/dropbox_sign/model/sub_team_response.py deleted file mode 100644 index 32d550706..000000000 --- a/sdks/python/dropbox_sign/model/sub_team_response.py +++ /dev/null @@ -1,295 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class SubTeamResponse(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'team_id': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> SubTeamResponse: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[SubTeamResponse], - _check_type=True, - ) - - - attribute_map = { - 'team_id': 'team_id', # noqa: E501 - 'name': 'name', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def team_id(self) -> str: - return self.get("team_id") - - @team_id.setter - def team_id(self, value: str): - setattr(self, "team_id", value) - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """SubTeamResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - team_id (str): The id of a team. [optional] # noqa: E501 - name (str): The name of a team. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """SubTeamResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - team_id (str): The id of a team. [optional] # noqa: E501 - name (str): The name of a team. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/sub_template_role.py b/sdks/python/dropbox_sign/model/sub_template_role.py deleted file mode 100644 index 39907c5b6..000000000 --- a/sdks/python/dropbox_sign/model/sub_template_role.py +++ /dev/null @@ -1,295 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class SubTemplateRole(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'name': (str,), # noqa: E501 - 'order': (int, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> SubTemplateRole: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[SubTemplateRole], - _check_type=True, - ) - - - attribute_map = { - 'name': 'name', # noqa: E501 - 'order': 'order', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def order(self) -> Optional[int]: - return self.get("order") - - @order.setter - def order(self, value: Optional[int]): - setattr(self, "order", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """SubTemplateRole - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - name (str): The role name of the signer that will be displayed when the template is used to create a signature request.. [optional] # noqa: E501 - order (int, none_type): The order in which this signer role is required to sign.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """SubTemplateRole - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - name (str): The role name of the signer that will be displayed when the template is used to create a signature request.. [optional] # noqa: E501 - order (int, none_type): The order in which this signer role is required to sign.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/sub_unclaimed_draft_signer.py b/sdks/python/dropbox_sign/model/sub_unclaimed_draft_signer.py deleted file mode 100644 index 7bd19f544..000000000 --- a/sdks/python/dropbox_sign/model/sub_unclaimed_draft_signer.py +++ /dev/null @@ -1,315 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class SubUnclaimedDraftSigner(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'email_address': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'order': (int, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> SubUnclaimedDraftSigner: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[SubUnclaimedDraftSigner], - _check_type=True, - ) - - - attribute_map = { - 'email_address': 'email_address', # noqa: E501 - 'name': 'name', # noqa: E501 - 'order': 'order', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def email_address(self) -> str: - return self.get("email_address") - - @email_address.setter - def email_address(self, value: str): - setattr(self, "email_address", value) - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def order(self) -> Optional[int]: - return self.get("order") - - @order.setter - def order(self, value: Optional[int]): - setattr(self, "order", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, email_address, name, *args, **kwargs): # noqa: E501 - """SubUnclaimedDraftSigner - a model defined in OpenAPI - - Args: - email_address (str): The email address of the signer. - name (str): The name of the signer. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - order (int, none_type): The order the signer is required to sign in.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.email_address = email_address - self.name = name - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, email_address, name, *args, **kwargs): # noqa: E501 - """SubUnclaimedDraftSigner - a model defined in OpenAPI - - Args: - email_address (str): The email address of the signer. - name (str): The name of the signer. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - order (int, none_type): The order the signer is required to sign in.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.email_address = email_address - self.name = name - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/sub_unclaimed_draft_template_signer.py b/sdks/python/dropbox_sign/model/sub_unclaimed_draft_template_signer.py deleted file mode 100644 index 02fbdd265..000000000 --- a/sdks/python/dropbox_sign/model/sub_unclaimed_draft_template_signer.py +++ /dev/null @@ -1,317 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class SubUnclaimedDraftTemplateSigner(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'role': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'email_address': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> SubUnclaimedDraftTemplateSigner: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[SubUnclaimedDraftTemplateSigner], - _check_type=True, - ) - - - attribute_map = { - 'role': 'role', # noqa: E501 - 'name': 'name', # noqa: E501 - 'email_address': 'email_address', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def role(self) -> str: - return self.get("role") - - @role.setter - def role(self, value: str): - setattr(self, "role", value) - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def email_address(self) -> str: - return self.get("email_address") - - @email_address.setter - def email_address(self, value: str): - setattr(self, "email_address", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, role, name, email_address, *args, **kwargs): # noqa: E501 - """SubUnclaimedDraftTemplateSigner - a model defined in OpenAPI - - Args: - role (str): Must match an existing role in chosen Template(s). - name (str): The name of the signer filling the role of `role`. - email_address (str): The email address of the signer filling the role of `role`. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.role = role - self.name = name - self.email_address = email_address - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, role, name, email_address, *args, **kwargs): # noqa: E501 - """SubUnclaimedDraftTemplateSigner - a model defined in OpenAPI - - Args: - role (str): Must match an existing role in chosen Template(s). - name (str): The name of the signer filling the role of `role`. - email_address (str): The email address of the signer filling the role of `role`. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.role = role - self.name = name - self.email_address = email_address - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/sub_white_labeling_options.py b/sdks/python/dropbox_sign/model/sub_white_labeling_options.py deleted file mode 100644 index 6eb89b9c5..000000000 --- a/sdks/python/dropbox_sign/model/sub_white_labeling_options.py +++ /dev/null @@ -1,455 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class SubWhiteLabelingOptions(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('legal_version',): { - 'TERMS1': "terms1", - 'TERMS2': "terms2", - }, - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'header_background_color': (str,), # noqa: E501 - 'legal_version': (str,), # noqa: E501 - 'link_color': (str,), # noqa: E501 - 'page_background_color': (str,), # noqa: E501 - 'primary_button_color': (str,), # noqa: E501 - 'primary_button_color_hover': (str,), # noqa: E501 - 'primary_button_text_color': (str,), # noqa: E501 - 'primary_button_text_color_hover': (str,), # noqa: E501 - 'secondary_button_color': (str,), # noqa: E501 - 'secondary_button_color_hover': (str,), # noqa: E501 - 'secondary_button_text_color': (str,), # noqa: E501 - 'secondary_button_text_color_hover': (str,), # noqa: E501 - 'text_color1': (str,), # noqa: E501 - 'text_color2': (str,), # noqa: E501 - 'reset_to_default': (bool,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> SubWhiteLabelingOptions: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[SubWhiteLabelingOptions], - _check_type=True, - ) - - - attribute_map = { - 'header_background_color': 'header_background_color', # noqa: E501 - 'legal_version': 'legal_version', # noqa: E501 - 'link_color': 'link_color', # noqa: E501 - 'page_background_color': 'page_background_color', # noqa: E501 - 'primary_button_color': 'primary_button_color', # noqa: E501 - 'primary_button_color_hover': 'primary_button_color_hover', # noqa: E501 - 'primary_button_text_color': 'primary_button_text_color', # noqa: E501 - 'primary_button_text_color_hover': 'primary_button_text_color_hover', # noqa: E501 - 'secondary_button_color': 'secondary_button_color', # noqa: E501 - 'secondary_button_color_hover': 'secondary_button_color_hover', # noqa: E501 - 'secondary_button_text_color': 'secondary_button_text_color', # noqa: E501 - 'secondary_button_text_color_hover': 'secondary_button_text_color_hover', # noqa: E501 - 'text_color1': 'text_color1', # noqa: E501 - 'text_color2': 'text_color2', # noqa: E501 - 'reset_to_default': 'reset_to_default', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def header_background_color(self) -> str: - return self.get("header_background_color") - - @header_background_color.setter - def header_background_color(self, value: str): - setattr(self, "header_background_color", value) - - @property - def legal_version(self) -> str: - return self.get("legal_version") - - @legal_version.setter - def legal_version(self, value: str): - setattr(self, "legal_version", value) - - @property - def link_color(self) -> str: - return self.get("link_color") - - @link_color.setter - def link_color(self, value: str): - setattr(self, "link_color", value) - - @property - def page_background_color(self) -> str: - return self.get("page_background_color") - - @page_background_color.setter - def page_background_color(self, value: str): - setattr(self, "page_background_color", value) - - @property - def primary_button_color(self) -> str: - return self.get("primary_button_color") - - @primary_button_color.setter - def primary_button_color(self, value: str): - setattr(self, "primary_button_color", value) - - @property - def primary_button_color_hover(self) -> str: - return self.get("primary_button_color_hover") - - @primary_button_color_hover.setter - def primary_button_color_hover(self, value: str): - setattr(self, "primary_button_color_hover", value) - - @property - def primary_button_text_color(self) -> str: - return self.get("primary_button_text_color") - - @primary_button_text_color.setter - def primary_button_text_color(self, value: str): - setattr(self, "primary_button_text_color", value) - - @property - def primary_button_text_color_hover(self) -> str: - return self.get("primary_button_text_color_hover") - - @primary_button_text_color_hover.setter - def primary_button_text_color_hover(self, value: str): - setattr(self, "primary_button_text_color_hover", value) - - @property - def secondary_button_color(self) -> str: - return self.get("secondary_button_color") - - @secondary_button_color.setter - def secondary_button_color(self, value: str): - setattr(self, "secondary_button_color", value) - - @property - def secondary_button_color_hover(self) -> str: - return self.get("secondary_button_color_hover") - - @secondary_button_color_hover.setter - def secondary_button_color_hover(self, value: str): - setattr(self, "secondary_button_color_hover", value) - - @property - def secondary_button_text_color(self) -> str: - return self.get("secondary_button_text_color") - - @secondary_button_text_color.setter - def secondary_button_text_color(self, value: str): - setattr(self, "secondary_button_text_color", value) - - @property - def secondary_button_text_color_hover(self) -> str: - return self.get("secondary_button_text_color_hover") - - @secondary_button_text_color_hover.setter - def secondary_button_text_color_hover(self, value: str): - setattr(self, "secondary_button_text_color_hover", value) - - @property - def text_color1(self) -> str: - return self.get("text_color1") - - @text_color1.setter - def text_color1(self, value: str): - setattr(self, "text_color1", value) - - @property - def text_color2(self) -> str: - return self.get("text_color2") - - @text_color2.setter - def text_color2(self, value: str): - setattr(self, "text_color2", value) - - @property - def reset_to_default(self) -> bool: - return self.get("reset_to_default") - - @reset_to_default.setter - def reset_to_default(self, value: bool): - setattr(self, "reset_to_default", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """SubWhiteLabelingOptions - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - header_background_color (str): [optional] if omitted the server will use the default value of "#1A1A1A" # noqa: E501 - legal_version (str): [optional] if omitted the server will use the default value of "terms1" # noqa: E501 - link_color (str): [optional] if omitted the server will use the default value of "#00B3E6" # noqa: E501 - page_background_color (str): [optional] if omitted the server will use the default value of "#F7F8F9" # noqa: E501 - primary_button_color (str): [optional] if omitted the server will use the default value of "#00B3E6" # noqa: E501 - primary_button_color_hover (str): [optional] if omitted the server will use the default value of "#00B3E6" # noqa: E501 - primary_button_text_color (str): [optional] if omitted the server will use the default value of "#FFFFFF" # noqa: E501 - primary_button_text_color_hover (str): [optional] if omitted the server will use the default value of "#FFFFFF" # noqa: E501 - secondary_button_color (str): [optional] if omitted the server will use the default value of "#FFFFFF" # noqa: E501 - secondary_button_color_hover (str): [optional] if omitted the server will use the default value of "#FFFFFF" # noqa: E501 - secondary_button_text_color (str): [optional] if omitted the server will use the default value of "#00B3E6" # noqa: E501 - secondary_button_text_color_hover (str): [optional] if omitted the server will use the default value of "#00B3E6" # noqa: E501 - text_color1 (str): [optional] if omitted the server will use the default value of "#808080" # noqa: E501 - text_color2 (str): [optional] if omitted the server will use the default value of "#FFFFFF" # noqa: E501 - reset_to_default (bool): Resets white labeling options to defaults. Only useful when updating an API App.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """SubWhiteLabelingOptions - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - header_background_color (str): [optional] if omitted the server will use the default value of "#1A1A1A" # noqa: E501 - legal_version (str): [optional] if omitted the server will use the default value of "terms1" # noqa: E501 - link_color (str): [optional] if omitted the server will use the default value of "#00B3E6" # noqa: E501 - page_background_color (str): [optional] if omitted the server will use the default value of "#F7F8F9" # noqa: E501 - primary_button_color (str): [optional] if omitted the server will use the default value of "#00B3E6" # noqa: E501 - primary_button_color_hover (str): [optional] if omitted the server will use the default value of "#00B3E6" # noqa: E501 - primary_button_text_color (str): [optional] if omitted the server will use the default value of "#FFFFFF" # noqa: E501 - primary_button_text_color_hover (str): [optional] if omitted the server will use the default value of "#FFFFFF" # noqa: E501 - secondary_button_color (str): [optional] if omitted the server will use the default value of "#FFFFFF" # noqa: E501 - secondary_button_color_hover (str): [optional] if omitted the server will use the default value of "#FFFFFF" # noqa: E501 - secondary_button_text_color (str): [optional] if omitted the server will use the default value of "#00B3E6" # noqa: E501 - secondary_button_text_color_hover (str): [optional] if omitted the server will use the default value of "#00B3E6" # noqa: E501 - text_color1 (str): [optional] if omitted the server will use the default value of "#808080" # noqa: E501 - text_color2 (str): [optional] if omitted the server will use the default value of "#FFFFFF" # noqa: E501 - reset_to_default (bool): Resets white labeling options to defaults. Only useful when updating an API App.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/team_add_member_request.py b/sdks/python/dropbox_sign/model/team_add_member_request.py deleted file mode 100644 index c74f2c376..000000000 --- a/sdks/python/dropbox_sign/model/team_add_member_request.py +++ /dev/null @@ -1,313 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class TeamAddMemberRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('role',): { - 'MEMBER': "Member", - 'DEVELOPER': "Developer", - 'TEAM_MANAGER': "Team Manager", - 'ADMIN': "Admin", - }, - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'account_id': (str,), # noqa: E501 - 'email_address': (str,), # noqa: E501 - 'role': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> TeamAddMemberRequest: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[TeamAddMemberRequest], - _check_type=True, - ) - - - attribute_map = { - 'account_id': 'account_id', # noqa: E501 - 'email_address': 'email_address', # noqa: E501 - 'role': 'role', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def account_id(self) -> str: - return self.get("account_id") - - @account_id.setter - def account_id(self, value: str): - setattr(self, "account_id", value) - - @property - def email_address(self) -> str: - return self.get("email_address") - - @email_address.setter - def email_address(self, value: str): - setattr(self, "email_address", value) - - @property - def role(self) -> str: - return self.get("role") - - @role.setter - def role(self, value: str): - setattr(self, "role", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TeamAddMemberRequest - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - account_id (str): `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.. [optional] # noqa: E501 - email_address (str): `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.. [optional] # noqa: E501 - role (str): A role member will take in a new Team. **NOTE:** This parameter is used only if `team_id` is provided.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TeamAddMemberRequest - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - account_id (str): `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.. [optional] # noqa: E501 - email_address (str): `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.. [optional] # noqa: E501 - role (str): A role member will take in a new Team. **NOTE:** This parameter is used only if `team_id` is provided.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/team_create_request.py b/sdks/python/dropbox_sign/model/team_create_request.py deleted file mode 100644 index 9cf9ecdc5..000000000 --- a/sdks/python/dropbox_sign/model/team_create_request.py +++ /dev/null @@ -1,283 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class TeamCreateRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'name': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> TeamCreateRequest: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[TeamCreateRequest], - _check_type=True, - ) - - - attribute_map = { - 'name': 'name', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TeamCreateRequest - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - name (str): The name of your Team.. [optional] if omitted the server will use the default value of "Untitled Team" # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TeamCreateRequest - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - name (str): The name of your Team.. [optional] if omitted the server will use the default value of "Untitled Team" # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/team_get_info_response.py b/sdks/python/dropbox_sign/model/team_get_info_response.py deleted file mode 100644 index f2ca84fc8..000000000 --- a/sdks/python/dropbox_sign/model/team_get_info_response.py +++ /dev/null @@ -1,306 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.team_info_response import TeamInfoResponse - from dropbox_sign.model.warning_response import WarningResponse - - -def lazy_import(): - from dropbox_sign.model.team_info_response import TeamInfoResponse - from dropbox_sign.model.warning_response import WarningResponse - globals()['TeamInfoResponse'] = TeamInfoResponse - globals()['WarningResponse'] = WarningResponse - - -class TeamGetInfoResponse(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'team': (TeamInfoResponse,), # noqa: E501 - 'warnings': ([WarningResponse],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> TeamGetInfoResponse: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[TeamGetInfoResponse], - _check_type=True, - ) - - - attribute_map = { - 'team': 'team', # noqa: E501 - 'warnings': 'warnings', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def team(self) -> TeamInfoResponse: - return self.get("team") - - @team.setter - def team(self, value: TeamInfoResponse): - setattr(self, "team", value) - - @property - def warnings(self) -> List[WarningResponse]: - return self.get("warnings") - - @warnings.setter - def warnings(self, value: List[WarningResponse]): - setattr(self, "warnings", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TeamGetInfoResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - team (TeamInfoResponse): [optional] # noqa: E501 - warnings ([WarningResponse]): A list of warnings.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TeamGetInfoResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - team (TeamInfoResponse): [optional] # noqa: E501 - warnings ([WarningResponse]): A list of warnings.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/team_get_response.py b/sdks/python/dropbox_sign/model/team_get_response.py deleted file mode 100644 index d85c189a0..000000000 --- a/sdks/python/dropbox_sign/model/team_get_response.py +++ /dev/null @@ -1,306 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.team_response import TeamResponse - from dropbox_sign.model.warning_response import WarningResponse - - -def lazy_import(): - from dropbox_sign.model.team_response import TeamResponse - from dropbox_sign.model.warning_response import WarningResponse - globals()['TeamResponse'] = TeamResponse - globals()['WarningResponse'] = WarningResponse - - -class TeamGetResponse(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'team': (TeamResponse,), # noqa: E501 - 'warnings': ([WarningResponse],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> TeamGetResponse: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[TeamGetResponse], - _check_type=True, - ) - - - attribute_map = { - 'team': 'team', # noqa: E501 - 'warnings': 'warnings', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def team(self) -> TeamResponse: - return self.get("team") - - @team.setter - def team(self, value: TeamResponse): - setattr(self, "team", value) - - @property - def warnings(self) -> List[WarningResponse]: - return self.get("warnings") - - @warnings.setter - def warnings(self, value: List[WarningResponse]): - setattr(self, "warnings", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TeamGetResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - team (TeamResponse): [optional] # noqa: E501 - warnings ([WarningResponse]): A list of warnings.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TeamGetResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - team (TeamResponse): [optional] # noqa: E501 - warnings ([WarningResponse]): A list of warnings.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/team_info_response.py b/sdks/python/dropbox_sign/model/team_info_response.py deleted file mode 100644 index 77c28d11e..000000000 --- a/sdks/python/dropbox_sign/model/team_info_response.py +++ /dev/null @@ -1,339 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.team_parent_response import TeamParentResponse - - -def lazy_import(): - from dropbox_sign.model.team_parent_response import TeamParentResponse - globals()['TeamParentResponse'] = TeamParentResponse - - -class TeamInfoResponse(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'team_id': (str,), # noqa: E501 - 'team_parent': (TeamParentResponse,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'num_members': (int,), # noqa: E501 - 'num_sub_teams': (int,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> TeamInfoResponse: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[TeamInfoResponse], - _check_type=True, - ) - - - attribute_map = { - 'team_id': 'team_id', # noqa: E501 - 'team_parent': 'team_parent', # noqa: E501 - 'name': 'name', # noqa: E501 - 'num_members': 'num_members', # noqa: E501 - 'num_sub_teams': 'num_sub_teams', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def team_id(self) -> str: - return self.get("team_id") - - @team_id.setter - def team_id(self, value: str): - setattr(self, "team_id", value) - - @property - def team_parent(self) -> TeamParentResponse: - return self.get("team_parent") - - @team_parent.setter - def team_parent(self, value: TeamParentResponse): - setattr(self, "team_parent", value) - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def num_members(self) -> int: - return self.get("num_members") - - @num_members.setter - def num_members(self, value: int): - setattr(self, "num_members", value) - - @property - def num_sub_teams(self) -> int: - return self.get("num_sub_teams") - - @num_sub_teams.setter - def num_sub_teams(self, value: int): - setattr(self, "num_sub_teams", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TeamInfoResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - team_id (str): The id of a team. [optional] # noqa: E501 - team_parent (TeamParentResponse): [optional] # noqa: E501 - name (str): The name of a team. [optional] # noqa: E501 - num_members (int): Number of members within a team. [optional] # noqa: E501 - num_sub_teams (int): Number of sub teams within a team. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TeamInfoResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - team_id (str): The id of a team. [optional] # noqa: E501 - team_parent (TeamParentResponse): [optional] # noqa: E501 - name (str): The name of a team. [optional] # noqa: E501 - num_members (int): Number of members within a team. [optional] # noqa: E501 - num_sub_teams (int): Number of sub teams within a team. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/team_invite_response.py b/sdks/python/dropbox_sign/model/team_invite_response.py deleted file mode 100644 index 65f05540d..000000000 --- a/sdks/python/dropbox_sign/model/team_invite_response.py +++ /dev/null @@ -1,343 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class TeamInviteResponse(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'email_address': (str,), # noqa: E501 - 'team_id': (str,), # noqa: E501 - 'role': (str,), # noqa: E501 - 'sent_at': (int,), # noqa: E501 - 'redeemed_at': (int,), # noqa: E501 - 'expires_at': (int,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> TeamInviteResponse: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[TeamInviteResponse], - _check_type=True, - ) - - - attribute_map = { - 'email_address': 'email_address', # noqa: E501 - 'team_id': 'team_id', # noqa: E501 - 'role': 'role', # noqa: E501 - 'sent_at': 'sent_at', # noqa: E501 - 'redeemed_at': 'redeemed_at', # noqa: E501 - 'expires_at': 'expires_at', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def email_address(self) -> str: - return self.get("email_address") - - @email_address.setter - def email_address(self, value: str): - setattr(self, "email_address", value) - - @property - def team_id(self) -> str: - return self.get("team_id") - - @team_id.setter - def team_id(self, value: str): - setattr(self, "team_id", value) - - @property - def role(self) -> str: - return self.get("role") - - @role.setter - def role(self, value: str): - setattr(self, "role", value) - - @property - def sent_at(self) -> int: - return self.get("sent_at") - - @sent_at.setter - def sent_at(self, value: int): - setattr(self, "sent_at", value) - - @property - def redeemed_at(self) -> int: - return self.get("redeemed_at") - - @redeemed_at.setter - def redeemed_at(self, value: int): - setattr(self, "redeemed_at", value) - - @property - def expires_at(self) -> int: - return self.get("expires_at") - - @expires_at.setter - def expires_at(self, value: int): - setattr(self, "expires_at", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TeamInviteResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - email_address (str): Email address of the user invited to this team.. [optional] # noqa: E501 - team_id (str): Id of the team.. [optional] # noqa: E501 - role (str): Role of the user invited to this team.. [optional] # noqa: E501 - sent_at (int): Timestamp when the invitation was sent.. [optional] # noqa: E501 - redeemed_at (int): Timestamp when the invitation was redeemed.. [optional] # noqa: E501 - expires_at (int): Timestamp when the invitation is expiring.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TeamInviteResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - email_address (str): Email address of the user invited to this team.. [optional] # noqa: E501 - team_id (str): Id of the team.. [optional] # noqa: E501 - role (str): Role of the user invited to this team.. [optional] # noqa: E501 - sent_at (int): Timestamp when the invitation was sent.. [optional] # noqa: E501 - redeemed_at (int): Timestamp when the invitation was redeemed.. [optional] # noqa: E501 - expires_at (int): Timestamp when the invitation is expiring.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/team_invites_response.py b/sdks/python/dropbox_sign/model/team_invites_response.py deleted file mode 100644 index 5b8749582..000000000 --- a/sdks/python/dropbox_sign/model/team_invites_response.py +++ /dev/null @@ -1,306 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.team_invite_response import TeamInviteResponse - from dropbox_sign.model.warning_response import WarningResponse - - -def lazy_import(): - from dropbox_sign.model.team_invite_response import TeamInviteResponse - from dropbox_sign.model.warning_response import WarningResponse - globals()['TeamInviteResponse'] = TeamInviteResponse - globals()['WarningResponse'] = WarningResponse - - -class TeamInvitesResponse(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'team_invites': ([TeamInviteResponse],), # noqa: E501 - 'warnings': ([WarningResponse],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> TeamInvitesResponse: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[TeamInvitesResponse], - _check_type=True, - ) - - - attribute_map = { - 'team_invites': 'team_invites', # noqa: E501 - 'warnings': 'warnings', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def team_invites(self) -> List[TeamInviteResponse]: - return self.get("team_invites") - - @team_invites.setter - def team_invites(self, value: List[TeamInviteResponse]): - setattr(self, "team_invites", value) - - @property - def warnings(self) -> List[WarningResponse]: - return self.get("warnings") - - @warnings.setter - def warnings(self, value: List[WarningResponse]): - setattr(self, "warnings", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TeamInvitesResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - team_invites ([TeamInviteResponse]): Contains a list of team invites and their roles.. [optional] # noqa: E501 - warnings ([WarningResponse]): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TeamInvitesResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - team_invites ([TeamInviteResponse]): Contains a list of team invites and their roles.. [optional] # noqa: E501 - warnings ([WarningResponse]): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/team_member_response.py b/sdks/python/dropbox_sign/model/team_member_response.py deleted file mode 100644 index fc8c9d0a5..000000000 --- a/sdks/python/dropbox_sign/model/team_member_response.py +++ /dev/null @@ -1,307 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class TeamMemberResponse(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'account_id': (str,), # noqa: E501 - 'email_address': (str,), # noqa: E501 - 'role': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> TeamMemberResponse: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[TeamMemberResponse], - _check_type=True, - ) - - - attribute_map = { - 'account_id': 'account_id', # noqa: E501 - 'email_address': 'email_address', # noqa: E501 - 'role': 'role', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def account_id(self) -> str: - return self.get("account_id") - - @account_id.setter - def account_id(self, value: str): - setattr(self, "account_id", value) - - @property - def email_address(self) -> str: - return self.get("email_address") - - @email_address.setter - def email_address(self, value: str): - setattr(self, "email_address", value) - - @property - def role(self) -> str: - return self.get("role") - - @role.setter - def role(self, value: str): - setattr(self, "role", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TeamMemberResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - account_id (str): Account id of the team member.. [optional] # noqa: E501 - email_address (str): Email address of the team member.. [optional] # noqa: E501 - role (str): The specific role a member has on the team.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TeamMemberResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - account_id (str): Account id of the team member.. [optional] # noqa: E501 - email_address (str): Email address of the team member.. [optional] # noqa: E501 - role (str): The specific role a member has on the team.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/team_members_response.py b/sdks/python/dropbox_sign/model/team_members_response.py deleted file mode 100644 index 50fb12b58..000000000 --- a/sdks/python/dropbox_sign/model/team_members_response.py +++ /dev/null @@ -1,321 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.list_info_response import ListInfoResponse - from dropbox_sign.model.team_member_response import TeamMemberResponse - from dropbox_sign.model.warning_response import WarningResponse - - -def lazy_import(): - from dropbox_sign.model.list_info_response import ListInfoResponse - from dropbox_sign.model.team_member_response import TeamMemberResponse - from dropbox_sign.model.warning_response import WarningResponse - globals()['ListInfoResponse'] = ListInfoResponse - globals()['TeamMemberResponse'] = TeamMemberResponse - globals()['WarningResponse'] = WarningResponse - - -class TeamMembersResponse(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'team_members': ([TeamMemberResponse],), # noqa: E501 - 'list_info': (ListInfoResponse,), # noqa: E501 - 'warnings': ([WarningResponse],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> TeamMembersResponse: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[TeamMembersResponse], - _check_type=True, - ) - - - attribute_map = { - 'team_members': 'team_members', # noqa: E501 - 'list_info': 'list_info', # noqa: E501 - 'warnings': 'warnings', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def team_members(self) -> List[TeamMemberResponse]: - return self.get("team_members") - - @team_members.setter - def team_members(self, value: List[TeamMemberResponse]): - setattr(self, "team_members", value) - - @property - def list_info(self) -> ListInfoResponse: - return self.get("list_info") - - @list_info.setter - def list_info(self, value: ListInfoResponse): - setattr(self, "list_info", value) - - @property - def warnings(self) -> List[WarningResponse]: - return self.get("warnings") - - @warnings.setter - def warnings(self, value: List[WarningResponse]): - setattr(self, "warnings", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TeamMembersResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - team_members ([TeamMemberResponse]): Contains a list of team members and their roles for a specific team.. [optional] # noqa: E501 - list_info (ListInfoResponse): [optional] # noqa: E501 - warnings ([WarningResponse]): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TeamMembersResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - team_members ([TeamMemberResponse]): Contains a list of team members and their roles for a specific team.. [optional] # noqa: E501 - list_info (ListInfoResponse): [optional] # noqa: E501 - warnings ([WarningResponse]): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/team_parent_response.py b/sdks/python/dropbox_sign/model/team_parent_response.py deleted file mode 100644 index 2ba7dd4f8..000000000 --- a/sdks/python/dropbox_sign/model/team_parent_response.py +++ /dev/null @@ -1,295 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class TeamParentResponse(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = True - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'team_id': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> TeamParentResponse: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[TeamParentResponse], - _check_type=True, - ) - - - attribute_map = { - 'team_id': 'team_id', # noqa: E501 - 'name': 'name', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def team_id(self) -> str: - return self.get("team_id") - - @team_id.setter - def team_id(self, value: str): - setattr(self, "team_id", value) - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TeamParentResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - team_id (str): The id of a team. [optional] # noqa: E501 - name (str): The name of a team. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TeamParentResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - team_id (str): The id of a team. [optional] # noqa: E501 - name (str): The name of a team. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/team_remove_member_request.py b/sdks/python/dropbox_sign/model/team_remove_member_request.py deleted file mode 100644 index 7eb1bb272..000000000 --- a/sdks/python/dropbox_sign/model/team_remove_member_request.py +++ /dev/null @@ -1,337 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class TeamRemoveMemberRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('new_role',): { - 'MEMBER': "Member", - 'DEVELOPER': "Developer", - 'TEAM_MANAGER': "Team Manager", - 'ADMIN': "Admin", - }, - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'account_id': (str,), # noqa: E501 - 'email_address': (str,), # noqa: E501 - 'new_owner_email_address': (str,), # noqa: E501 - 'new_team_id': (str,), # noqa: E501 - 'new_role': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> TeamRemoveMemberRequest: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[TeamRemoveMemberRequest], - _check_type=True, - ) - - - attribute_map = { - 'account_id': 'account_id', # noqa: E501 - 'email_address': 'email_address', # noqa: E501 - 'new_owner_email_address': 'new_owner_email_address', # noqa: E501 - 'new_team_id': 'new_team_id', # noqa: E501 - 'new_role': 'new_role', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def account_id(self) -> str: - return self.get("account_id") - - @account_id.setter - def account_id(self, value: str): - setattr(self, "account_id", value) - - @property - def email_address(self) -> str: - return self.get("email_address") - - @email_address.setter - def email_address(self, value: str): - setattr(self, "email_address", value) - - @property - def new_owner_email_address(self) -> str: - return self.get("new_owner_email_address") - - @new_owner_email_address.setter - def new_owner_email_address(self, value: str): - setattr(self, "new_owner_email_address", value) - - @property - def new_team_id(self) -> str: - return self.get("new_team_id") - - @new_team_id.setter - def new_team_id(self, value: str): - setattr(self, "new_team_id", value) - - @property - def new_role(self) -> str: - return self.get("new_role") - - @new_role.setter - def new_role(self, value: str): - setattr(self, "new_role", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TeamRemoveMemberRequest - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - account_id (str): **account_id** or **email_address** is required. If both are provided, the account id prevails. Account id to remove from your Team.. [optional] # noqa: E501 - email_address (str): **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.. [optional] # noqa: E501 - new_owner_email_address (str): 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.. [optional] # noqa: E501 - new_team_id (str): Id of the new Team.. [optional] # noqa: E501 - new_role (str): A new role member will take in a new Team. **NOTE:** This parameter is used only if `new_team_id` is provided.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TeamRemoveMemberRequest - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - account_id (str): **account_id** or **email_address** is required. If both are provided, the account id prevails. Account id to remove from your Team.. [optional] # noqa: E501 - email_address (str): **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.. [optional] # noqa: E501 - new_owner_email_address (str): 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.. [optional] # noqa: E501 - new_team_id (str): Id of the new Team.. [optional] # noqa: E501 - new_role (str): A new role member will take in a new Team. **NOTE:** This parameter is used only if `new_team_id` is provided.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/team_response.py b/sdks/python/dropbox_sign/model/team_response.py deleted file mode 100644 index d7ac13221..000000000 --- a/sdks/python/dropbox_sign/model/team_response.py +++ /dev/null @@ -1,327 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.account_response import AccountResponse - - -def lazy_import(): - from dropbox_sign.model.account_response import AccountResponse - globals()['AccountResponse'] = AccountResponse - - -class TeamResponse(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'name': (str,), # noqa: E501 - 'accounts': ([AccountResponse],), # noqa: E501 - 'invited_accounts': ([AccountResponse],), # noqa: E501 - 'invited_emails': ([str],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> TeamResponse: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[TeamResponse], - _check_type=True, - ) - - - attribute_map = { - 'name': 'name', # noqa: E501 - 'accounts': 'accounts', # noqa: E501 - 'invited_accounts': 'invited_accounts', # noqa: E501 - 'invited_emails': 'invited_emails', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def accounts(self) -> List[AccountResponse]: - return self.get("accounts") - - @accounts.setter - def accounts(self, value: List[AccountResponse]): - setattr(self, "accounts", value) - - @property - def invited_accounts(self) -> List[AccountResponse]: - return self.get("invited_accounts") - - @invited_accounts.setter - def invited_accounts(self, value: List[AccountResponse]): - setattr(self, "invited_accounts", value) - - @property - def invited_emails(self) -> List[str]: - return self.get("invited_emails") - - @invited_emails.setter - def invited_emails(self, value: List[str]): - setattr(self, "invited_emails", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TeamResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - name (str): The name of your Team. [optional] # noqa: E501 - accounts ([AccountResponse]): [optional] # noqa: E501 - invited_accounts ([AccountResponse]): 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`.. [optional] # noqa: E501 - invited_emails ([str]): A list of email addresses that have an outstanding invitation to join your Team and do not yet have a Dropbox Sign account.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TeamResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - name (str): The name of your Team. [optional] # noqa: E501 - accounts ([AccountResponse]): [optional] # noqa: E501 - invited_accounts ([AccountResponse]): 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`.. [optional] # noqa: E501 - invited_emails ([str]): A list of email addresses that have an outstanding invitation to join your Team and do not yet have a Dropbox Sign account.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/team_sub_teams_response.py b/sdks/python/dropbox_sign/model/team_sub_teams_response.py deleted file mode 100644 index 173cbe67f..000000000 --- a/sdks/python/dropbox_sign/model/team_sub_teams_response.py +++ /dev/null @@ -1,321 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.list_info_response import ListInfoResponse - from dropbox_sign.model.sub_team_response import SubTeamResponse - from dropbox_sign.model.warning_response import WarningResponse - - -def lazy_import(): - from dropbox_sign.model.list_info_response import ListInfoResponse - from dropbox_sign.model.sub_team_response import SubTeamResponse - from dropbox_sign.model.warning_response import WarningResponse - globals()['ListInfoResponse'] = ListInfoResponse - globals()['SubTeamResponse'] = SubTeamResponse - globals()['WarningResponse'] = WarningResponse - - -class TeamSubTeamsResponse(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'sub_teams': ([SubTeamResponse],), # noqa: E501 - 'list_info': (ListInfoResponse,), # noqa: E501 - 'warnings': ([WarningResponse],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> TeamSubTeamsResponse: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[TeamSubTeamsResponse], - _check_type=True, - ) - - - attribute_map = { - 'sub_teams': 'sub_teams', # noqa: E501 - 'list_info': 'list_info', # noqa: E501 - 'warnings': 'warnings', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def sub_teams(self) -> List[SubTeamResponse]: - return self.get("sub_teams") - - @sub_teams.setter - def sub_teams(self, value: List[SubTeamResponse]): - setattr(self, "sub_teams", value) - - @property - def list_info(self) -> ListInfoResponse: - return self.get("list_info") - - @list_info.setter - def list_info(self, value: ListInfoResponse): - setattr(self, "list_info", value) - - @property - def warnings(self) -> List[WarningResponse]: - return self.get("warnings") - - @warnings.setter - def warnings(self, value: List[WarningResponse]): - setattr(self, "warnings", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TeamSubTeamsResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - sub_teams ([SubTeamResponse]): Contains a list with sub teams.. [optional] # noqa: E501 - list_info (ListInfoResponse): [optional] # noqa: E501 - warnings ([WarningResponse]): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TeamSubTeamsResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - sub_teams ([SubTeamResponse]): Contains a list with sub teams.. [optional] # noqa: E501 - list_info (ListInfoResponse): [optional] # noqa: E501 - warnings ([WarningResponse]): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/team_update_request.py b/sdks/python/dropbox_sign/model/team_update_request.py deleted file mode 100644 index acee5d059..000000000 --- a/sdks/python/dropbox_sign/model/team_update_request.py +++ /dev/null @@ -1,283 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class TeamUpdateRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'name': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> TeamUpdateRequest: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[TeamUpdateRequest], - _check_type=True, - ) - - - attribute_map = { - 'name': 'name', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TeamUpdateRequest - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - name (str): The name of your Team.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TeamUpdateRequest - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - name (str): The name of your Team.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/template_add_user_request.py b/sdks/python/dropbox_sign/model/template_add_user_request.py deleted file mode 100644 index 6fdb406f3..000000000 --- a/sdks/python/dropbox_sign/model/template_add_user_request.py +++ /dev/null @@ -1,307 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class TemplateAddUserRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'account_id': (str,), # noqa: E501 - 'email_address': (str,), # noqa: E501 - 'skip_notification': (bool,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> TemplateAddUserRequest: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[TemplateAddUserRequest], - _check_type=True, - ) - - - attribute_map = { - 'account_id': 'account_id', # noqa: E501 - 'email_address': 'email_address', # noqa: E501 - 'skip_notification': 'skip_notification', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def account_id(self) -> str: - return self.get("account_id") - - @account_id.setter - def account_id(self, value: str): - setattr(self, "account_id", value) - - @property - def email_address(self) -> str: - return self.get("email_address") - - @email_address.setter - def email_address(self, value: str): - setattr(self, "email_address", value) - - @property - def skip_notification(self) -> bool: - return self.get("skip_notification") - - @skip_notification.setter - def skip_notification(self, value: bool): - setattr(self, "skip_notification", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TemplateAddUserRequest - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - account_id (str): The id of the Account to give access to the Template. **NOTE:** The account id prevails if email address is also provided.. [optional] # noqa: E501 - email_address (str): The email address of the Account to give access to the Template. **NOTE:** The account id prevails if it is also provided.. [optional] # noqa: E501 - skip_notification (bool): If set to `true`, the user does not receive an email notification when a template has been shared with them. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TemplateAddUserRequest - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - account_id (str): The id of the Account to give access to the Template. **NOTE:** The account id prevails if email address is also provided.. [optional] # noqa: E501 - email_address (str): The email address of the Account to give access to the Template. **NOTE:** The account id prevails if it is also provided.. [optional] # noqa: E501 - skip_notification (bool): If set to `true`, the user does not receive an email notification when a template has been shared with them. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/template_create_embedded_draft_request.py b/sdks/python/dropbox_sign/model/template_create_embedded_draft_request.py deleted file mode 100644 index 2d7c413f3..000000000 --- a/sdks/python/dropbox_sign/model/template_create_embedded_draft_request.py +++ /dev/null @@ -1,614 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.sub_attachment import SubAttachment - from dropbox_sign.model.sub_editor_options import SubEditorOptions - from dropbox_sign.model.sub_field_options import SubFieldOptions - from dropbox_sign.model.sub_form_field_group import SubFormFieldGroup - from dropbox_sign.model.sub_form_field_rule import SubFormFieldRule - from dropbox_sign.model.sub_form_fields_per_document_base import SubFormFieldsPerDocumentBase - from dropbox_sign.model.sub_merge_field import SubMergeField - from dropbox_sign.model.sub_template_role import SubTemplateRole - - -def lazy_import(): - from dropbox_sign.model.sub_attachment import SubAttachment - from dropbox_sign.model.sub_editor_options import SubEditorOptions - from dropbox_sign.model.sub_field_options import SubFieldOptions - from dropbox_sign.model.sub_form_field_group import SubFormFieldGroup - from dropbox_sign.model.sub_form_field_rule import SubFormFieldRule - from dropbox_sign.model.sub_form_fields_per_document_base import SubFormFieldsPerDocumentBase - from dropbox_sign.model.sub_merge_field import SubMergeField - from dropbox_sign.model.sub_template_role import SubTemplateRole - globals()['SubAttachment'] = SubAttachment - globals()['SubEditorOptions'] = SubEditorOptions - globals()['SubFieldOptions'] = SubFieldOptions - globals()['SubFormFieldGroup'] = SubFormFieldGroup - globals()['SubFormFieldRule'] = SubFormFieldRule - globals()['SubFormFieldsPerDocumentBase'] = SubFormFieldsPerDocumentBase - globals()['SubMergeField'] = SubMergeField - globals()['SubTemplateRole'] = SubTemplateRole - - -class TemplateCreateEmbeddedDraftRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - ('message',): { - 'max_length': 5000, - }, - ('metadata',): { - }, - ('subject',): { - 'max_length': 200, - }, - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'client_id': (str,), # noqa: E501 - 'files': ([file_type],), # noqa: E501 - 'file_urls': ([str],), # noqa: E501 - 'allow_ccs': (bool,), # noqa: E501 - 'allow_reassign': (bool,), # noqa: E501 - 'attachments': ([SubAttachment],), # noqa: E501 - 'cc_roles': ([str],), # noqa: E501 - 'editor_options': (SubEditorOptions,), # noqa: E501 - 'field_options': (SubFieldOptions,), # noqa: E501 - 'force_signer_roles': (bool,), # noqa: E501 - 'force_subject_message': (bool,), # noqa: E501 - 'form_field_groups': ([SubFormFieldGroup],), # noqa: E501 - 'form_field_rules': ([SubFormFieldRule],), # noqa: E501 - 'form_fields_per_document': ([SubFormFieldsPerDocumentBase],), # noqa: E501 - 'merge_fields': ([SubMergeField],), # noqa: E501 - 'message': (str,), # noqa: E501 - 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 - 'show_preview': (bool,), # noqa: E501 - 'show_progress_stepper': (bool,), # noqa: E501 - 'signer_roles': ([SubTemplateRole],), # noqa: E501 - 'skip_me_now': (bool,), # noqa: E501 - 'subject': (str,), # noqa: E501 - 'test_mode': (bool,), # noqa: E501 - 'title': (str,), # noqa: E501 - 'use_preexisting_fields': (bool,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> TemplateCreateEmbeddedDraftRequest: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[TemplateCreateEmbeddedDraftRequest], - _check_type=True, - ) - - - attribute_map = { - 'client_id': 'client_id', # noqa: E501 - 'files': 'files', # noqa: E501 - 'file_urls': 'file_urls', # noqa: E501 - 'allow_ccs': 'allow_ccs', # noqa: E501 - 'allow_reassign': 'allow_reassign', # noqa: E501 - 'attachments': 'attachments', # noqa: E501 - 'cc_roles': 'cc_roles', # noqa: E501 - 'editor_options': 'editor_options', # noqa: E501 - 'field_options': 'field_options', # noqa: E501 - 'force_signer_roles': 'force_signer_roles', # noqa: E501 - 'force_subject_message': 'force_subject_message', # noqa: E501 - 'form_field_groups': 'form_field_groups', # noqa: E501 - 'form_field_rules': 'form_field_rules', # noqa: E501 - 'form_fields_per_document': 'form_fields_per_document', # noqa: E501 - 'merge_fields': 'merge_fields', # noqa: E501 - 'message': 'message', # noqa: E501 - 'metadata': 'metadata', # noqa: E501 - 'show_preview': 'show_preview', # noqa: E501 - 'show_progress_stepper': 'show_progress_stepper', # noqa: E501 - 'signer_roles': 'signer_roles', # noqa: E501 - 'skip_me_now': 'skip_me_now', # noqa: E501 - 'subject': 'subject', # noqa: E501 - 'test_mode': 'test_mode', # noqa: E501 - 'title': 'title', # noqa: E501 - 'use_preexisting_fields': 'use_preexisting_fields', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def client_id(self) -> str: - return self.get("client_id") - - @client_id.setter - def client_id(self, value: str): - setattr(self, "client_id", value) - - @property - def files(self) -> List[file_type]: - return self.get("files") - - @files.setter - def files(self, value: List[file_type]): - setattr(self, "files", value) - - @property - def file_urls(self) -> List[str]: - return self.get("file_urls") - - @file_urls.setter - def file_urls(self, value: List[str]): - setattr(self, "file_urls", value) - - @property - def allow_ccs(self) -> bool: - return self.get("allow_ccs") - - @allow_ccs.setter - def allow_ccs(self, value: bool): - setattr(self, "allow_ccs", value) - - @property - def allow_reassign(self) -> bool: - return self.get("allow_reassign") - - @allow_reassign.setter - def allow_reassign(self, value: bool): - setattr(self, "allow_reassign", value) - - @property - def attachments(self) -> List[SubAttachment]: - return self.get("attachments") - - @attachments.setter - def attachments(self, value: List[SubAttachment]): - setattr(self, "attachments", value) - - @property - def cc_roles(self) -> List[str]: - return self.get("cc_roles") - - @cc_roles.setter - def cc_roles(self, value: List[str]): - setattr(self, "cc_roles", value) - - @property - def editor_options(self) -> SubEditorOptions: - return self.get("editor_options") - - @editor_options.setter - def editor_options(self, value: SubEditorOptions): - setattr(self, "editor_options", value) - - @property - def field_options(self) -> SubFieldOptions: - return self.get("field_options") - - @field_options.setter - def field_options(self, value: SubFieldOptions): - setattr(self, "field_options", value) - - @property - def force_signer_roles(self) -> bool: - return self.get("force_signer_roles") - - @force_signer_roles.setter - def force_signer_roles(self, value: bool): - setattr(self, "force_signer_roles", value) - - @property - def force_subject_message(self) -> bool: - return self.get("force_subject_message") - - @force_subject_message.setter - def force_subject_message(self, value: bool): - setattr(self, "force_subject_message", value) - - @property - def form_field_groups(self) -> List[SubFormFieldGroup]: - return self.get("form_field_groups") - - @form_field_groups.setter - def form_field_groups(self, value: List[SubFormFieldGroup]): - setattr(self, "form_field_groups", value) - - @property - def form_field_rules(self) -> List[SubFormFieldRule]: - return self.get("form_field_rules") - - @form_field_rules.setter - def form_field_rules(self, value: List[SubFormFieldRule]): - setattr(self, "form_field_rules", value) - - @property - def form_fields_per_document(self) -> List[SubFormFieldsPerDocumentBase]: - return self.get("form_fields_per_document") - - @form_fields_per_document.setter - def form_fields_per_document(self, value: List[SubFormFieldsPerDocumentBase]): - setattr(self, "form_fields_per_document", value) - - @property - def merge_fields(self) -> List[SubMergeField]: - return self.get("merge_fields") - - @merge_fields.setter - def merge_fields(self, value: List[SubMergeField]): - setattr(self, "merge_fields", value) - - @property - def message(self) -> str: - return self.get("message") - - @message.setter - def message(self, value: str): - setattr(self, "message", value) - - @property - def metadata(self) -> Dict[str, Union[bool, date, datetime, dict, float, int, list, str, none_type]]: - return self.get("metadata") - - @metadata.setter - def metadata(self, value: Dict[str, Union[bool, date, datetime, dict, float, int, list, str, none_type]]): - setattr(self, "metadata", value) - - @property - def show_preview(self) -> bool: - return self.get("show_preview") - - @show_preview.setter - def show_preview(self, value: bool): - setattr(self, "show_preview", value) - - @property - def show_progress_stepper(self) -> bool: - return self.get("show_progress_stepper") - - @show_progress_stepper.setter - def show_progress_stepper(self, value: bool): - setattr(self, "show_progress_stepper", value) - - @property - def signer_roles(self) -> List[SubTemplateRole]: - return self.get("signer_roles") - - @signer_roles.setter - def signer_roles(self, value: List[SubTemplateRole]): - setattr(self, "signer_roles", value) - - @property - def skip_me_now(self) -> bool: - return self.get("skip_me_now") - - @skip_me_now.setter - def skip_me_now(self, value: bool): - setattr(self, "skip_me_now", value) - - @property - def subject(self) -> str: - return self.get("subject") - - @subject.setter - def subject(self, value: str): - setattr(self, "subject", value) - - @property - def test_mode(self) -> bool: - return self.get("test_mode") - - @test_mode.setter - def test_mode(self, value: bool): - setattr(self, "test_mode", value) - - @property - def title(self) -> str: - return self.get("title") - - @title.setter - def title(self, value: str): - setattr(self, "title", value) - - @property - def use_preexisting_fields(self) -> bool: - return self.get("use_preexisting_fields") - - @use_preexisting_fields.setter - def use_preexisting_fields(self, value: bool): - setattr(self, "use_preexisting_fields", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, client_id, *args, **kwargs): # noqa: E501 - """TemplateCreateEmbeddedDraftRequest - a model defined in OpenAPI - - Args: - client_id (str): Client id of the app you're using to create this draft. Used to apply the branding and callback url defined for the app. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - files ([file_type]): Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.. [optional] # noqa: E501 - file_urls ([str]): 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.. [optional] # noqa: E501 - allow_ccs (bool): This allows the requester to specify whether the user is allowed to provide email addresses to CC when creating a template.. [optional] if omitted the server will use the default value of True # noqa: E501 - allow_reassign (bool): 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.. [optional] if omitted the server will use the default value of False # noqa: E501 - attachments ([SubAttachment]): A list describing the attachments. [optional] # noqa: E501 - cc_roles ([str]): The CC roles that must be assigned when using the template to send a signature request. [optional] # noqa: E501 - editor_options (SubEditorOptions): [optional] # noqa: E501 - field_options (SubFieldOptions): [optional] # noqa: E501 - force_signer_roles (bool): Provide users the ability to review/edit the template signer roles.. [optional] if omitted the server will use the default value of False # noqa: E501 - force_subject_message (bool): Provide users the ability to review/edit the template subject and message.. [optional] if omitted the server will use the default value of False # noqa: E501 - form_field_groups ([SubFormFieldGroup]): 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`.. [optional] # noqa: E501 - form_field_rules ([SubFormFieldRule]): Conditional Logic rules for fields defined in `form_fields_per_document`.. [optional] # noqa: E501 - form_fields_per_document ([SubFormFieldsPerDocumentBase]): 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`. [optional] # noqa: E501 - merge_fields ([SubMergeField]): 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.. [optional] # noqa: E501 - message (str): The default template email message.. [optional] # noqa: E501 - metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): 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.. [optional] # noqa: E501 - show_preview (bool): 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.. [optional] if omitted the server will use the default value of False # noqa: E501 - show_progress_stepper (bool): When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden.. [optional] if omitted the server will use the default value of True # noqa: E501 - signer_roles ([SubTemplateRole]): An array of the designated signer roles that must be specified when sending a SignatureRequest using this Template.. [optional] # noqa: E501 - skip_me_now (bool): Disables the \"Me (Now)\" option for the person preparing the document. Does not work with type `send_document`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - subject (str): The template title (alias).. [optional] # noqa: E501 - test_mode (bool): Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - title (str): The title you want to assign to the SignatureRequest.. [optional] # noqa: E501 - use_preexisting_fields (bool): Enable the detection of predefined PDF fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`).. [optional] if omitted the server will use the default value of False # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.client_id = client_id - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, client_id, *args, **kwargs): # noqa: E501 - """TemplateCreateEmbeddedDraftRequest - a model defined in OpenAPI - - Args: - client_id (str): Client id of the app you're using to create this draft. Used to apply the branding and callback url defined for the app. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - files ([file_type]): Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.. [optional] # noqa: E501 - file_urls ([str]): 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.. [optional] # noqa: E501 - allow_ccs (bool): This allows the requester to specify whether the user is allowed to provide email addresses to CC when creating a template.. [optional] if omitted the server will use the default value of True # noqa: E501 - allow_reassign (bool): 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.. [optional] if omitted the server will use the default value of False # noqa: E501 - attachments ([SubAttachment]): A list describing the attachments. [optional] # noqa: E501 - cc_roles ([str]): The CC roles that must be assigned when using the template to send a signature request. [optional] # noqa: E501 - editor_options (SubEditorOptions): [optional] # noqa: E501 - field_options (SubFieldOptions): [optional] # noqa: E501 - force_signer_roles (bool): Provide users the ability to review/edit the template signer roles.. [optional] if omitted the server will use the default value of False # noqa: E501 - force_subject_message (bool): Provide users the ability to review/edit the template subject and message.. [optional] if omitted the server will use the default value of False # noqa: E501 - form_field_groups ([SubFormFieldGroup]): 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`.. [optional] # noqa: E501 - form_field_rules ([SubFormFieldRule]): Conditional Logic rules for fields defined in `form_fields_per_document`.. [optional] # noqa: E501 - form_fields_per_document ([SubFormFieldsPerDocumentBase]): 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`. [optional] # noqa: E501 - merge_fields ([SubMergeField]): 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.. [optional] # noqa: E501 - message (str): The default template email message.. [optional] # noqa: E501 - metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): 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.. [optional] # noqa: E501 - show_preview (bool): 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.. [optional] if omitted the server will use the default value of False # noqa: E501 - show_progress_stepper (bool): When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden.. [optional] if omitted the server will use the default value of True # noqa: E501 - signer_roles ([SubTemplateRole]): An array of the designated signer roles that must be specified when sending a SignatureRequest using this Template.. [optional] # noqa: E501 - skip_me_now (bool): Disables the \"Me (Now)\" option for the person preparing the document. Does not work with type `send_document`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - subject (str): The template title (alias).. [optional] # noqa: E501 - test_mode (bool): Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - title (str): The title you want to assign to the SignatureRequest.. [optional] # noqa: E501 - use_preexisting_fields (bool): Enable the detection of predefined PDF fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`).. [optional] if omitted the server will use the default value of False # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.client_id = client_id - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/template_create_embedded_draft_response.py b/sdks/python/dropbox_sign/model/template_create_embedded_draft_response.py deleted file mode 100644 index 2c444f869..000000000 --- a/sdks/python/dropbox_sign/model/template_create_embedded_draft_response.py +++ /dev/null @@ -1,306 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.template_create_embedded_draft_response_template import TemplateCreateEmbeddedDraftResponseTemplate - from dropbox_sign.model.warning_response import WarningResponse - - -def lazy_import(): - from dropbox_sign.model.template_create_embedded_draft_response_template import TemplateCreateEmbeddedDraftResponseTemplate - from dropbox_sign.model.warning_response import WarningResponse - globals()['TemplateCreateEmbeddedDraftResponseTemplate'] = TemplateCreateEmbeddedDraftResponseTemplate - globals()['WarningResponse'] = WarningResponse - - -class TemplateCreateEmbeddedDraftResponse(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'template': (TemplateCreateEmbeddedDraftResponseTemplate,), # noqa: E501 - 'warnings': ([WarningResponse],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> TemplateCreateEmbeddedDraftResponse: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[TemplateCreateEmbeddedDraftResponse], - _check_type=True, - ) - - - attribute_map = { - 'template': 'template', # noqa: E501 - 'warnings': 'warnings', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def template(self) -> TemplateCreateEmbeddedDraftResponseTemplate: - return self.get("template") - - @template.setter - def template(self, value: TemplateCreateEmbeddedDraftResponseTemplate): - setattr(self, "template", value) - - @property - def warnings(self) -> List[WarningResponse]: - return self.get("warnings") - - @warnings.setter - def warnings(self, value: List[WarningResponse]): - setattr(self, "warnings", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TemplateCreateEmbeddedDraftResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - template (TemplateCreateEmbeddedDraftResponseTemplate): [optional] # noqa: E501 - warnings ([WarningResponse]): A list of warnings.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TemplateCreateEmbeddedDraftResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - template (TemplateCreateEmbeddedDraftResponseTemplate): [optional] # noqa: E501 - warnings ([WarningResponse]): A list of warnings.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/template_create_embedded_draft_response_template.py b/sdks/python/dropbox_sign/model/template_create_embedded_draft_response_template.py deleted file mode 100644 index 1931b4e03..000000000 --- a/sdks/python/dropbox_sign/model/template_create_embedded_draft_response_template.py +++ /dev/null @@ -1,327 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.warning_response import WarningResponse - - -def lazy_import(): - from dropbox_sign.model.warning_response import WarningResponse - globals()['WarningResponse'] = WarningResponse - - -class TemplateCreateEmbeddedDraftResponseTemplate(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'template_id': (str,), # noqa: E501 - 'edit_url': (str,), # noqa: E501 - 'expires_at': (int,), # noqa: E501 - 'warnings': ([WarningResponse],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> TemplateCreateEmbeddedDraftResponseTemplate: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[TemplateCreateEmbeddedDraftResponseTemplate], - _check_type=True, - ) - - - attribute_map = { - 'template_id': 'template_id', # noqa: E501 - 'edit_url': 'edit_url', # noqa: E501 - 'expires_at': 'expires_at', # noqa: E501 - 'warnings': 'warnings', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def template_id(self) -> str: - return self.get("template_id") - - @template_id.setter - def template_id(self, value: str): - setattr(self, "template_id", value) - - @property - def edit_url(self) -> str: - return self.get("edit_url") - - @edit_url.setter - def edit_url(self, value: str): - setattr(self, "edit_url", value) - - @property - def expires_at(self) -> int: - return self.get("expires_at") - - @expires_at.setter - def expires_at(self, value: int): - setattr(self, "expires_at", value) - - @property - def warnings(self) -> List[WarningResponse]: - return self.get("warnings") - - @warnings.setter - def warnings(self, value: List[WarningResponse]): - setattr(self, "warnings", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TemplateCreateEmbeddedDraftResponseTemplate - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - template_id (str): The id of the Template.. [optional] # noqa: E501 - edit_url (str): Link to edit the template.. [optional] # noqa: E501 - expires_at (int): When the link expires.. [optional] # noqa: E501 - warnings ([WarningResponse]): A list of warnings.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TemplateCreateEmbeddedDraftResponseTemplate - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - template_id (str): The id of the Template.. [optional] # noqa: E501 - edit_url (str): Link to edit the template.. [optional] # noqa: E501 - expires_at (int): When the link expires.. [optional] # noqa: E501 - warnings ([WarningResponse]): A list of warnings.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/template_create_request.py b/sdks/python/dropbox_sign/model/template_create_request.py deleted file mode 100644 index 13ca1ba4d..000000000 --- a/sdks/python/dropbox_sign/model/template_create_request.py +++ /dev/null @@ -1,529 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.sub_attachment import SubAttachment - from dropbox_sign.model.sub_field_options import SubFieldOptions - from dropbox_sign.model.sub_form_field_group import SubFormFieldGroup - from dropbox_sign.model.sub_form_field_rule import SubFormFieldRule - from dropbox_sign.model.sub_form_fields_per_document_base import SubFormFieldsPerDocumentBase - from dropbox_sign.model.sub_merge_field import SubMergeField - from dropbox_sign.model.sub_template_role import SubTemplateRole - - -def lazy_import(): - from dropbox_sign.model.sub_attachment import SubAttachment - from dropbox_sign.model.sub_field_options import SubFieldOptions - from dropbox_sign.model.sub_form_field_group import SubFormFieldGroup - from dropbox_sign.model.sub_form_field_rule import SubFormFieldRule - from dropbox_sign.model.sub_form_fields_per_document_base import SubFormFieldsPerDocumentBase - from dropbox_sign.model.sub_merge_field import SubMergeField - from dropbox_sign.model.sub_template_role import SubTemplateRole - globals()['SubAttachment'] = SubAttachment - globals()['SubFieldOptions'] = SubFieldOptions - globals()['SubFormFieldGroup'] = SubFormFieldGroup - globals()['SubFormFieldRule'] = SubFormFieldRule - globals()['SubFormFieldsPerDocumentBase'] = SubFormFieldsPerDocumentBase - globals()['SubMergeField'] = SubMergeField - globals()['SubTemplateRole'] = SubTemplateRole - - -class TemplateCreateRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - ('message',): { - 'max_length': 5000, - }, - ('metadata',): { - }, - ('subject',): { - 'max_length': 200, - }, - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'form_fields_per_document': ([SubFormFieldsPerDocumentBase],), # noqa: E501 - 'signer_roles': ([SubTemplateRole],), # noqa: E501 - 'files': ([file_type],), # noqa: E501 - 'file_urls': ([str],), # noqa: E501 - 'allow_reassign': (bool,), # noqa: E501 - 'attachments': ([SubAttachment],), # noqa: E501 - 'cc_roles': ([str],), # noqa: E501 - 'client_id': (str,), # noqa: E501 - 'field_options': (SubFieldOptions,), # noqa: E501 - 'form_field_groups': ([SubFormFieldGroup],), # noqa: E501 - 'form_field_rules': ([SubFormFieldRule],), # noqa: E501 - 'merge_fields': ([SubMergeField],), # noqa: E501 - 'message': (str,), # noqa: E501 - 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 - 'subject': (str,), # noqa: E501 - 'test_mode': (bool,), # noqa: E501 - 'title': (str,), # noqa: E501 - 'use_preexisting_fields': (bool,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> TemplateCreateRequest: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[TemplateCreateRequest], - _check_type=True, - ) - - - attribute_map = { - 'form_fields_per_document': 'form_fields_per_document', # noqa: E501 - 'signer_roles': 'signer_roles', # noqa: E501 - 'files': 'files', # noqa: E501 - 'file_urls': 'file_urls', # noqa: E501 - 'allow_reassign': 'allow_reassign', # noqa: E501 - 'attachments': 'attachments', # noqa: E501 - 'cc_roles': 'cc_roles', # noqa: E501 - 'client_id': 'client_id', # noqa: E501 - 'field_options': 'field_options', # noqa: E501 - 'form_field_groups': 'form_field_groups', # noqa: E501 - 'form_field_rules': 'form_field_rules', # noqa: E501 - 'merge_fields': 'merge_fields', # noqa: E501 - 'message': 'message', # noqa: E501 - 'metadata': 'metadata', # noqa: E501 - 'subject': 'subject', # noqa: E501 - 'test_mode': 'test_mode', # noqa: E501 - 'title': 'title', # noqa: E501 - 'use_preexisting_fields': 'use_preexisting_fields', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def form_fields_per_document(self) -> List[SubFormFieldsPerDocumentBase]: - return self.get("form_fields_per_document") - - @form_fields_per_document.setter - def form_fields_per_document(self, value: List[SubFormFieldsPerDocumentBase]): - setattr(self, "form_fields_per_document", value) - - @property - def signer_roles(self) -> List[SubTemplateRole]: - return self.get("signer_roles") - - @signer_roles.setter - def signer_roles(self, value: List[SubTemplateRole]): - setattr(self, "signer_roles", value) - - @property - def files(self) -> List[file_type]: - return self.get("files") - - @files.setter - def files(self, value: List[file_type]): - setattr(self, "files", value) - - @property - def file_urls(self) -> List[str]: - return self.get("file_urls") - - @file_urls.setter - def file_urls(self, value: List[str]): - setattr(self, "file_urls", value) - - @property - def allow_reassign(self) -> bool: - return self.get("allow_reassign") - - @allow_reassign.setter - def allow_reassign(self, value: bool): - setattr(self, "allow_reassign", value) - - @property - def attachments(self) -> List[SubAttachment]: - return self.get("attachments") - - @attachments.setter - def attachments(self, value: List[SubAttachment]): - setattr(self, "attachments", value) - - @property - def cc_roles(self) -> List[str]: - return self.get("cc_roles") - - @cc_roles.setter - def cc_roles(self, value: List[str]): - setattr(self, "cc_roles", value) - - @property - def client_id(self) -> str: - return self.get("client_id") - - @client_id.setter - def client_id(self, value: str): - setattr(self, "client_id", value) - - @property - def field_options(self) -> SubFieldOptions: - return self.get("field_options") - - @field_options.setter - def field_options(self, value: SubFieldOptions): - setattr(self, "field_options", value) - - @property - def form_field_groups(self) -> List[SubFormFieldGroup]: - return self.get("form_field_groups") - - @form_field_groups.setter - def form_field_groups(self, value: List[SubFormFieldGroup]): - setattr(self, "form_field_groups", value) - - @property - def form_field_rules(self) -> List[SubFormFieldRule]: - return self.get("form_field_rules") - - @form_field_rules.setter - def form_field_rules(self, value: List[SubFormFieldRule]): - setattr(self, "form_field_rules", value) - - @property - def merge_fields(self) -> List[SubMergeField]: - return self.get("merge_fields") - - @merge_fields.setter - def merge_fields(self, value: List[SubMergeField]): - setattr(self, "merge_fields", value) - - @property - def message(self) -> str: - return self.get("message") - - @message.setter - def message(self, value: str): - setattr(self, "message", value) - - @property - def metadata(self) -> Dict[str, Union[bool, date, datetime, dict, float, int, list, str, none_type]]: - return self.get("metadata") - - @metadata.setter - def metadata(self, value: Dict[str, Union[bool, date, datetime, dict, float, int, list, str, none_type]]): - setattr(self, "metadata", value) - - @property - def subject(self) -> str: - return self.get("subject") - - @subject.setter - def subject(self, value: str): - setattr(self, "subject", value) - - @property - def test_mode(self) -> bool: - return self.get("test_mode") - - @test_mode.setter - def test_mode(self, value: bool): - setattr(self, "test_mode", value) - - @property - def title(self) -> str: - return self.get("title") - - @title.setter - def title(self, value: str): - setattr(self, "title", value) - - @property - def use_preexisting_fields(self) -> bool: - return self.get("use_preexisting_fields") - - @use_preexisting_fields.setter - def use_preexisting_fields(self, value: bool): - setattr(self, "use_preexisting_fields", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, form_fields_per_document, signer_roles, *args, **kwargs): # noqa: E501 - """TemplateCreateRequest - a model defined in OpenAPI - - Args: - form_fields_per_document ([SubFormFieldsPerDocumentBase]): 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 ([SubTemplateRole]): An array of the designated signer roles that must be specified when sending a SignatureRequest using this Template. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - files ([file_type]): Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.. [optional] # noqa: E501 - file_urls ([str]): 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.. [optional] # noqa: E501 - allow_reassign (bool): 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.. [optional] if omitted the server will use the default value of False # noqa: E501 - attachments ([SubAttachment]): A list describing the attachments. [optional] # noqa: E501 - cc_roles ([str]): The CC roles that must be assigned when using the template to send a signature request. [optional] # noqa: E501 - client_id (str): Client id of the app you're using to create this draft. Used to apply the branding and callback url defined for the app.. [optional] # noqa: E501 - field_options (SubFieldOptions): [optional] # noqa: E501 - form_field_groups ([SubFormFieldGroup]): 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`.. [optional] # noqa: E501 - form_field_rules ([SubFormFieldRule]): Conditional Logic rules for fields defined in `form_fields_per_document`.. [optional] # noqa: E501 - merge_fields ([SubMergeField]): 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.. [optional] # noqa: E501 - message (str): The default template email message.. [optional] # noqa: E501 - metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): 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.. [optional] # noqa: E501 - subject (str): The template title (alias).. [optional] # noqa: E501 - test_mode (bool): Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - title (str): The title you want to assign to the SignatureRequest.. [optional] # noqa: E501 - use_preexisting_fields (bool): Enable the detection of predefined PDF fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`).. [optional] if omitted the server will use the default value of False # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.form_fields_per_document = form_fields_per_document - self.signer_roles = signer_roles - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, form_fields_per_document, signer_roles, *args, **kwargs): # noqa: E501 - """TemplateCreateRequest - a model defined in OpenAPI - - Args: - form_fields_per_document ([SubFormFieldsPerDocumentBase]): 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 ([SubTemplateRole]): An array of the designated signer roles that must be specified when sending a SignatureRequest using this Template. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - files ([file_type]): Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.. [optional] # noqa: E501 - file_urls ([str]): 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.. [optional] # noqa: E501 - allow_reassign (bool): 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.. [optional] if omitted the server will use the default value of False # noqa: E501 - attachments ([SubAttachment]): A list describing the attachments. [optional] # noqa: E501 - cc_roles ([str]): The CC roles that must be assigned when using the template to send a signature request. [optional] # noqa: E501 - client_id (str): Client id of the app you're using to create this draft. Used to apply the branding and callback url defined for the app.. [optional] # noqa: E501 - field_options (SubFieldOptions): [optional] # noqa: E501 - form_field_groups ([SubFormFieldGroup]): 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`.. [optional] # noqa: E501 - form_field_rules ([SubFormFieldRule]): Conditional Logic rules for fields defined in `form_fields_per_document`.. [optional] # noqa: E501 - merge_fields ([SubMergeField]): 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.. [optional] # noqa: E501 - message (str): The default template email message.. [optional] # noqa: E501 - metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): 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.. [optional] # noqa: E501 - subject (str): The template title (alias).. [optional] # noqa: E501 - test_mode (bool): Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - title (str): The title you want to assign to the SignatureRequest.. [optional] # noqa: E501 - use_preexisting_fields (bool): Enable the detection of predefined PDF fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`).. [optional] if omitted the server will use the default value of False # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.form_fields_per_document = form_fields_per_document - self.signer_roles = signer_roles - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/template_create_response.py b/sdks/python/dropbox_sign/model/template_create_response.py deleted file mode 100644 index ecbe35729..000000000 --- a/sdks/python/dropbox_sign/model/template_create_response.py +++ /dev/null @@ -1,306 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.template_create_response_template import TemplateCreateResponseTemplate - from dropbox_sign.model.warning_response import WarningResponse - - -def lazy_import(): - from dropbox_sign.model.template_create_response_template import TemplateCreateResponseTemplate - from dropbox_sign.model.warning_response import WarningResponse - globals()['TemplateCreateResponseTemplate'] = TemplateCreateResponseTemplate - globals()['WarningResponse'] = WarningResponse - - -class TemplateCreateResponse(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'template': (TemplateCreateResponseTemplate,), # noqa: E501 - 'warnings': ([WarningResponse],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> TemplateCreateResponse: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[TemplateCreateResponse], - _check_type=True, - ) - - - attribute_map = { - 'template': 'template', # noqa: E501 - 'warnings': 'warnings', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def template(self) -> TemplateCreateResponseTemplate: - return self.get("template") - - @template.setter - def template(self, value: TemplateCreateResponseTemplate): - setattr(self, "template", value) - - @property - def warnings(self) -> List[WarningResponse]: - return self.get("warnings") - - @warnings.setter - def warnings(self, value: List[WarningResponse]): - setattr(self, "warnings", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TemplateCreateResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - template (TemplateCreateResponseTemplate): [optional] # noqa: E501 - warnings ([WarningResponse]): A list of warnings.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TemplateCreateResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - template (TemplateCreateResponseTemplate): [optional] # noqa: E501 - warnings ([WarningResponse]): A list of warnings.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/template_create_response_template.py b/sdks/python/dropbox_sign/model/template_create_response_template.py deleted file mode 100644 index 947acdc2d..000000000 --- a/sdks/python/dropbox_sign/model/template_create_response_template.py +++ /dev/null @@ -1,283 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class TemplateCreateResponseTemplate(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'template_id': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> TemplateCreateResponseTemplate: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[TemplateCreateResponseTemplate], - _check_type=True, - ) - - - attribute_map = { - 'template_id': 'template_id', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def template_id(self) -> str: - return self.get("template_id") - - @template_id.setter - def template_id(self, value: str): - setattr(self, "template_id", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TemplateCreateResponseTemplate - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - template_id (str): The id of the Template.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TemplateCreateResponseTemplate - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - template_id (str): The id of the Template.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/template_edit_response.py b/sdks/python/dropbox_sign/model/template_edit_response.py deleted file mode 100644 index 818582dd0..000000000 --- a/sdks/python/dropbox_sign/model/template_edit_response.py +++ /dev/null @@ -1,283 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class TemplateEditResponse(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'template_id': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> TemplateEditResponse: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[TemplateEditResponse], - _check_type=True, - ) - - - attribute_map = { - 'template_id': 'template_id', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def template_id(self) -> str: - return self.get("template_id") - - @template_id.setter - def template_id(self, value: str): - setattr(self, "template_id", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TemplateEditResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - template_id (str): The id of the Template.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TemplateEditResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - template_id (str): The id of the Template.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/template_get_response.py b/sdks/python/dropbox_sign/model/template_get_response.py deleted file mode 100644 index adb6686a8..000000000 --- a/sdks/python/dropbox_sign/model/template_get_response.py +++ /dev/null @@ -1,306 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.template_response import TemplateResponse - from dropbox_sign.model.warning_response import WarningResponse - - -def lazy_import(): - from dropbox_sign.model.template_response import TemplateResponse - from dropbox_sign.model.warning_response import WarningResponse - globals()['TemplateResponse'] = TemplateResponse - globals()['WarningResponse'] = WarningResponse - - -class TemplateGetResponse(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'template': (TemplateResponse,), # noqa: E501 - 'warnings': ([WarningResponse],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> TemplateGetResponse: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[TemplateGetResponse], - _check_type=True, - ) - - - attribute_map = { - 'template': 'template', # noqa: E501 - 'warnings': 'warnings', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def template(self) -> TemplateResponse: - return self.get("template") - - @template.setter - def template(self, value: TemplateResponse): - setattr(self, "template", value) - - @property - def warnings(self) -> List[WarningResponse]: - return self.get("warnings") - - @warnings.setter - def warnings(self, value: List[WarningResponse]): - setattr(self, "warnings", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TemplateGetResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - template (TemplateResponse): [optional] # noqa: E501 - warnings ([WarningResponse]): A list of warnings.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TemplateGetResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - template (TemplateResponse): [optional] # noqa: E501 - warnings ([WarningResponse]): A list of warnings.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/template_list_response.py b/sdks/python/dropbox_sign/model/template_list_response.py deleted file mode 100644 index 36dcafc19..000000000 --- a/sdks/python/dropbox_sign/model/template_list_response.py +++ /dev/null @@ -1,321 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.list_info_response import ListInfoResponse - from dropbox_sign.model.template_response import TemplateResponse - from dropbox_sign.model.warning_response import WarningResponse - - -def lazy_import(): - from dropbox_sign.model.list_info_response import ListInfoResponse - from dropbox_sign.model.template_response import TemplateResponse - from dropbox_sign.model.warning_response import WarningResponse - globals()['ListInfoResponse'] = ListInfoResponse - globals()['TemplateResponse'] = TemplateResponse - globals()['WarningResponse'] = WarningResponse - - -class TemplateListResponse(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'templates': ([TemplateResponse],), # noqa: E501 - 'list_info': (ListInfoResponse,), # noqa: E501 - 'warnings': ([WarningResponse],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> TemplateListResponse: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[TemplateListResponse], - _check_type=True, - ) - - - attribute_map = { - 'templates': 'templates', # noqa: E501 - 'list_info': 'list_info', # noqa: E501 - 'warnings': 'warnings', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def templates(self) -> List[TemplateResponse]: - return self.get("templates") - - @templates.setter - def templates(self, value: List[TemplateResponse]): - setattr(self, "templates", value) - - @property - def list_info(self) -> ListInfoResponse: - return self.get("list_info") - - @list_info.setter - def list_info(self, value: ListInfoResponse): - setattr(self, "list_info", value) - - @property - def warnings(self) -> List[WarningResponse]: - return self.get("warnings") - - @warnings.setter - def warnings(self, value: List[WarningResponse]): - setattr(self, "warnings", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TemplateListResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - templates ([TemplateResponse]): List of templates that the API caller has access to.. [optional] # noqa: E501 - list_info (ListInfoResponse): [optional] # noqa: E501 - warnings ([WarningResponse]): A list of warnings.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TemplateListResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - templates ([TemplateResponse]): List of templates that the API caller has access to.. [optional] # noqa: E501 - list_info (ListInfoResponse): [optional] # noqa: E501 - warnings ([WarningResponse]): A list of warnings.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/template_remove_user_request.py b/sdks/python/dropbox_sign/model/template_remove_user_request.py deleted file mode 100644 index acc5eb880..000000000 --- a/sdks/python/dropbox_sign/model/template_remove_user_request.py +++ /dev/null @@ -1,295 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class TemplateRemoveUserRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'account_id': (str,), # noqa: E501 - 'email_address': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> TemplateRemoveUserRequest: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[TemplateRemoveUserRequest], - _check_type=True, - ) - - - attribute_map = { - 'account_id': 'account_id', # noqa: E501 - 'email_address': 'email_address', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def account_id(self) -> str: - return self.get("account_id") - - @account_id.setter - def account_id(self, value: str): - setattr(self, "account_id", value) - - @property - def email_address(self) -> str: - return self.get("email_address") - - @email_address.setter - def email_address(self, value: str): - setattr(self, "email_address", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TemplateRemoveUserRequest - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - account_id (str): The id or email address of the Account to remove access to the Template. The account id prevails if both are provided.. [optional] # noqa: E501 - email_address (str): The id or email address of the Account to remove access to the Template. The account id prevails if both are provided.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TemplateRemoveUserRequest - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - account_id (str): The id or email address of the Account to remove access to the Template. The account id prevails if both are provided.. [optional] # noqa: E501 - email_address (str): The id or email address of the Account to remove access to the Template. The account id prevails if both are provided.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/template_response.py b/sdks/python/dropbox_sign/model/template_response.py deleted file mode 100644 index a926e1def..000000000 --- a/sdks/python/dropbox_sign/model/template_response.py +++ /dev/null @@ -1,474 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.template_response_account import TemplateResponseAccount - from dropbox_sign.model.template_response_cc_role import TemplateResponseCCRole - from dropbox_sign.model.template_response_document import TemplateResponseDocument - from dropbox_sign.model.template_response_document_custom_field_base import TemplateResponseDocumentCustomFieldBase - from dropbox_sign.model.template_response_document_form_field_base import TemplateResponseDocumentFormFieldBase - from dropbox_sign.model.template_response_signer_role import TemplateResponseSignerRole - - -def lazy_import(): - from dropbox_sign.model.template_response_account import TemplateResponseAccount - from dropbox_sign.model.template_response_cc_role import TemplateResponseCCRole - from dropbox_sign.model.template_response_document import TemplateResponseDocument - from dropbox_sign.model.template_response_document_custom_field_base import TemplateResponseDocumentCustomFieldBase - from dropbox_sign.model.template_response_document_form_field_base import TemplateResponseDocumentFormFieldBase - from dropbox_sign.model.template_response_signer_role import TemplateResponseSignerRole - globals()['TemplateResponseAccount'] = TemplateResponseAccount - globals()['TemplateResponseCCRole'] = TemplateResponseCCRole - globals()['TemplateResponseDocument'] = TemplateResponseDocument - globals()['TemplateResponseDocumentCustomFieldBase'] = TemplateResponseDocumentCustomFieldBase - globals()['TemplateResponseDocumentFormFieldBase'] = TemplateResponseDocumentFormFieldBase - globals()['TemplateResponseSignerRole'] = TemplateResponseSignerRole - - -class TemplateResponse(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'template_id': (str,), # noqa: E501 - 'title': (str,), # noqa: E501 - 'message': (str,), # noqa: E501 - 'updated_at': (int,), # noqa: E501 - 'is_embedded': (bool, none_type,), # noqa: E501 - 'is_creator': (bool, none_type,), # noqa: E501 - 'can_edit': (bool, none_type,), # noqa: E501 - 'is_locked': (bool, none_type,), # noqa: E501 - 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 - 'signer_roles': ([TemplateResponseSignerRole],), # noqa: E501 - 'cc_roles': ([TemplateResponseCCRole],), # noqa: E501 - 'documents': ([TemplateResponseDocument],), # noqa: E501 - 'custom_fields': ([TemplateResponseDocumentCustomFieldBase], none_type,), # noqa: E501 - 'named_form_fields': ([TemplateResponseDocumentFormFieldBase], none_type,), # noqa: E501 - 'accounts': ([TemplateResponseAccount], none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> TemplateResponse: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[TemplateResponse], - _check_type=True, - ) - - - attribute_map = { - 'template_id': 'template_id', # noqa: E501 - 'title': 'title', # noqa: E501 - 'message': 'message', # noqa: E501 - 'updated_at': 'updated_at', # noqa: E501 - 'is_embedded': 'is_embedded', # noqa: E501 - 'is_creator': 'is_creator', # noqa: E501 - 'can_edit': 'can_edit', # noqa: E501 - 'is_locked': 'is_locked', # noqa: E501 - 'metadata': 'metadata', # noqa: E501 - 'signer_roles': 'signer_roles', # noqa: E501 - 'cc_roles': 'cc_roles', # noqa: E501 - 'documents': 'documents', # noqa: E501 - 'custom_fields': 'custom_fields', # noqa: E501 - 'named_form_fields': 'named_form_fields', # noqa: E501 - 'accounts': 'accounts', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def template_id(self) -> str: - return self.get("template_id") - - @template_id.setter - def template_id(self, value: str): - setattr(self, "template_id", value) - - @property - def title(self) -> str: - return self.get("title") - - @title.setter - def title(self, value: str): - setattr(self, "title", value) - - @property - def message(self) -> str: - return self.get("message") - - @message.setter - def message(self, value: str): - setattr(self, "message", value) - - @property - def updated_at(self) -> int: - return self.get("updated_at") - - @updated_at.setter - def updated_at(self, value: int): - setattr(self, "updated_at", value) - - @property - def is_embedded(self) -> Optional[bool]: - return self.get("is_embedded") - - @is_embedded.setter - def is_embedded(self, value: Optional[bool]): - setattr(self, "is_embedded", value) - - @property - def is_creator(self) -> Optional[bool]: - return self.get("is_creator") - - @is_creator.setter - def is_creator(self, value: Optional[bool]): - setattr(self, "is_creator", value) - - @property - def can_edit(self) -> Optional[bool]: - return self.get("can_edit") - - @can_edit.setter - def can_edit(self, value: Optional[bool]): - setattr(self, "can_edit", value) - - @property - def is_locked(self) -> Optional[bool]: - return self.get("is_locked") - - @is_locked.setter - def is_locked(self, value: Optional[bool]): - setattr(self, "is_locked", value) - - @property - def metadata(self) -> Dict[str, Union[bool, date, datetime, dict, float, int, list, str, none_type]]: - return self.get("metadata") - - @metadata.setter - def metadata(self, value: Dict[str, Union[bool, date, datetime, dict, float, int, list, str, none_type]]): - setattr(self, "metadata", value) - - @property - def signer_roles(self) -> List[TemplateResponseSignerRole]: - return self.get("signer_roles") - - @signer_roles.setter - def signer_roles(self, value: List[TemplateResponseSignerRole]): - setattr(self, "signer_roles", value) - - @property - def cc_roles(self) -> List[TemplateResponseCCRole]: - return self.get("cc_roles") - - @cc_roles.setter - def cc_roles(self, value: List[TemplateResponseCCRole]): - setattr(self, "cc_roles", value) - - @property - def documents(self) -> List[TemplateResponseDocument]: - return self.get("documents") - - @documents.setter - def documents(self, value: List[TemplateResponseDocument]): - setattr(self, "documents", value) - - @property - def custom_fields(self) -> Optional[List[TemplateResponseDocumentCustomFieldBase]]: - return self.get("custom_fields") - - @custom_fields.setter - def custom_fields(self, value: Optional[List[TemplateResponseDocumentCustomFieldBase]]): - setattr(self, "custom_fields", value) - - @property - def named_form_fields(self) -> Optional[List[TemplateResponseDocumentFormFieldBase]]: - return self.get("named_form_fields") - - @named_form_fields.setter - def named_form_fields(self, value: Optional[List[TemplateResponseDocumentFormFieldBase]]): - setattr(self, "named_form_fields", value) - - @property - def accounts(self) -> Optional[List[TemplateResponseAccount]]: - return self.get("accounts") - - @accounts.setter - def accounts(self, value: Optional[List[TemplateResponseAccount]]): - setattr(self, "accounts", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TemplateResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - template_id (str): The id of the Template.. [optional] # noqa: E501 - title (str): 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.. [optional] # noqa: E501 - message (str): 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.. [optional] # noqa: E501 - updated_at (int): Time the template was last updated.. [optional] # noqa: E501 - is_embedded (bool, none_type): `true` if this template was created using an embedded flow, `false` if it was created on our website.. [optional] # noqa: E501 - is_creator (bool, none_type): `true` if you are the owner of this template, `false` if it's been shared with you by a team member.. [optional] # noqa: E501 - can_edit (bool, none_type): Indicates whether edit rights have been granted to you by the owner (always `true` if that's you).. [optional] # noqa: E501 - is_locked (bool, none_type): 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.. [optional] # noqa: E501 - metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): The metadata attached to the template.. [optional] # noqa: E501 - signer_roles ([TemplateResponseSignerRole]): An array of the designated signer roles that must be specified when sending a SignatureRequest using this Template.. [optional] # noqa: E501 - cc_roles ([TemplateResponseCCRole]): An array of the designated CC roles that must be specified when sending a SignatureRequest using this Template.. [optional] # noqa: E501 - documents ([TemplateResponseDocument]): An array describing each document associated with this Template. Includes form field data for each document.. [optional] # noqa: E501 - custom_fields ([TemplateResponseDocumentCustomFieldBase], none_type): Deprecated. Use `custom_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead.. [optional] # noqa: E501 - named_form_fields ([TemplateResponseDocumentFormFieldBase], none_type): Deprecated. Use `form_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead.. [optional] # noqa: E501 - accounts ([TemplateResponseAccount], none_type): An array of the Accounts that can use this Template.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TemplateResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - template_id (str): The id of the Template.. [optional] # noqa: E501 - title (str): 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.. [optional] # noqa: E501 - message (str): 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.. [optional] # noqa: E501 - updated_at (int): Time the template was last updated.. [optional] # noqa: E501 - is_embedded (bool, none_type): `true` if this template was created using an embedded flow, `false` if it was created on our website.. [optional] # noqa: E501 - is_creator (bool, none_type): `true` if you are the owner of this template, `false` if it's been shared with you by a team member.. [optional] # noqa: E501 - can_edit (bool, none_type): Indicates whether edit rights have been granted to you by the owner (always `true` if that's you).. [optional] # noqa: E501 - is_locked (bool, none_type): 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.. [optional] # noqa: E501 - metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): The metadata attached to the template.. [optional] # noqa: E501 - signer_roles ([TemplateResponseSignerRole]): An array of the designated signer roles that must be specified when sending a SignatureRequest using this Template.. [optional] # noqa: E501 - cc_roles ([TemplateResponseCCRole]): An array of the designated CC roles that must be specified when sending a SignatureRequest using this Template.. [optional] # noqa: E501 - documents ([TemplateResponseDocument]): An array describing each document associated with this Template. Includes form field data for each document.. [optional] # noqa: E501 - custom_fields ([TemplateResponseDocumentCustomFieldBase], none_type): Deprecated. Use `custom_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead.. [optional] # noqa: E501 - named_form_fields ([TemplateResponseDocumentFormFieldBase], none_type): Deprecated. Use `form_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead.. [optional] # noqa: E501 - accounts ([TemplateResponseAccount], none_type): An array of the Accounts that can use this Template.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/template_response_account.py b/sdks/python/dropbox_sign/model/template_response_account.py deleted file mode 100644 index 1693133d1..000000000 --- a/sdks/python/dropbox_sign/model/template_response_account.py +++ /dev/null @@ -1,351 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.template_response_account_quota import TemplateResponseAccountQuota - - -def lazy_import(): - from dropbox_sign.model.template_response_account_quota import TemplateResponseAccountQuota - globals()['TemplateResponseAccountQuota'] = TemplateResponseAccountQuota - - -class TemplateResponseAccount(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'account_id': (str,), # noqa: E501 - 'email_address': (str,), # noqa: E501 - 'is_locked': (bool,), # noqa: E501 - 'is_paid_hs': (bool,), # noqa: E501 - 'is_paid_hf': (bool,), # noqa: E501 - 'quotas': (TemplateResponseAccountQuota,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> TemplateResponseAccount: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[TemplateResponseAccount], - _check_type=True, - ) - - - attribute_map = { - 'account_id': 'account_id', # noqa: E501 - 'email_address': 'email_address', # noqa: E501 - 'is_locked': 'is_locked', # noqa: E501 - 'is_paid_hs': 'is_paid_hs', # noqa: E501 - 'is_paid_hf': 'is_paid_hf', # noqa: E501 - 'quotas': 'quotas', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def account_id(self) -> str: - return self.get("account_id") - - @account_id.setter - def account_id(self, value: str): - setattr(self, "account_id", value) - - @property - def email_address(self) -> str: - return self.get("email_address") - - @email_address.setter - def email_address(self, value: str): - setattr(self, "email_address", value) - - @property - def is_locked(self) -> bool: - return self.get("is_locked") - - @is_locked.setter - def is_locked(self, value: bool): - setattr(self, "is_locked", value) - - @property - def is_paid_hs(self) -> bool: - return self.get("is_paid_hs") - - @is_paid_hs.setter - def is_paid_hs(self, value: bool): - setattr(self, "is_paid_hs", value) - - @property - def is_paid_hf(self) -> bool: - return self.get("is_paid_hf") - - @is_paid_hf.setter - def is_paid_hf(self, value: bool): - setattr(self, "is_paid_hf", value) - - @property - def quotas(self) -> TemplateResponseAccountQuota: - return self.get("quotas") - - @quotas.setter - def quotas(self, value: TemplateResponseAccountQuota): - setattr(self, "quotas", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TemplateResponseAccount - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - account_id (str): The id of the Account.. [optional] # noqa: E501 - email_address (str): The email address associated with the Account.. [optional] # noqa: E501 - is_locked (bool): Returns `true` if the user has been locked out of their account by a team admin.. [optional] # noqa: E501 - is_paid_hs (bool): Returns `true` if the user has a paid Dropbox Sign account.. [optional] # noqa: E501 - is_paid_hf (bool): Returns `true` if the user has a paid HelloFax account.. [optional] # noqa: E501 - quotas (TemplateResponseAccountQuota): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TemplateResponseAccount - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - account_id (str): The id of the Account.. [optional] # noqa: E501 - email_address (str): The email address associated with the Account.. [optional] # noqa: E501 - is_locked (bool): Returns `true` if the user has been locked out of their account by a team admin.. [optional] # noqa: E501 - is_paid_hs (bool): Returns `true` if the user has a paid Dropbox Sign account.. [optional] # noqa: E501 - is_paid_hf (bool): Returns `true` if the user has a paid HelloFax account.. [optional] # noqa: E501 - quotas (TemplateResponseAccountQuota): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/template_response_account_quota.py b/sdks/python/dropbox_sign/model/template_response_account_quota.py deleted file mode 100644 index dc596aaf2..000000000 --- a/sdks/python/dropbox_sign/model/template_response_account_quota.py +++ /dev/null @@ -1,319 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class TemplateResponseAccountQuota(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'templates_left': (int,), # noqa: E501 - 'api_signature_requests_left': (int,), # noqa: E501 - 'documents_left': (int,), # noqa: E501 - 'sms_verifications_left': (int,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> TemplateResponseAccountQuota: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[TemplateResponseAccountQuota], - _check_type=True, - ) - - - attribute_map = { - 'templates_left': 'templates_left', # noqa: E501 - 'api_signature_requests_left': 'api_signature_requests_left', # noqa: E501 - 'documents_left': 'documents_left', # noqa: E501 - 'sms_verifications_left': 'sms_verifications_left', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def templates_left(self) -> int: - return self.get("templates_left") - - @templates_left.setter - def templates_left(self, value: int): - setattr(self, "templates_left", value) - - @property - def api_signature_requests_left(self) -> int: - return self.get("api_signature_requests_left") - - @api_signature_requests_left.setter - def api_signature_requests_left(self, value: int): - setattr(self, "api_signature_requests_left", value) - - @property - def documents_left(self) -> int: - return self.get("documents_left") - - @documents_left.setter - def documents_left(self, value: int): - setattr(self, "documents_left", value) - - @property - def sms_verifications_left(self) -> int: - return self.get("sms_verifications_left") - - @sms_verifications_left.setter - def sms_verifications_left(self, value: int): - setattr(self, "sms_verifications_left", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TemplateResponseAccountQuota - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - templates_left (int): API templates remaining.. [optional] # noqa: E501 - api_signature_requests_left (int): API signature requests remaining.. [optional] # noqa: E501 - documents_left (int): Signature requests remaining.. [optional] # noqa: E501 - sms_verifications_left (int): SMS verifications remaining.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TemplateResponseAccountQuota - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - templates_left (int): API templates remaining.. [optional] # noqa: E501 - api_signature_requests_left (int): API signature requests remaining.. [optional] # noqa: E501 - documents_left (int): Signature requests remaining.. [optional] # noqa: E501 - sms_verifications_left (int): SMS verifications remaining.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/template_response_cc_role.py b/sdks/python/dropbox_sign/model/template_response_cc_role.py deleted file mode 100644 index 8b0fe6dcc..000000000 --- a/sdks/python/dropbox_sign/model/template_response_cc_role.py +++ /dev/null @@ -1,283 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class TemplateResponseCCRole(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'name': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> TemplateResponseCCRole: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[TemplateResponseCCRole], - _check_type=True, - ) - - - attribute_map = { - 'name': 'name', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TemplateResponseCCRole - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - name (str): The name of the Role.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TemplateResponseCCRole - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - name (str): The name of the Role.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/template_response_custom_field.py b/sdks/python/dropbox_sign/model/template_response_custom_field.py deleted file mode 100644 index 5402cb417..000000000 --- a/sdks/python/dropbox_sign/model/template_response_custom_field.py +++ /dev/null @@ -1,301 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 - -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - -if TYPE_CHECKING: - from dropbox_sign.models import TemplateResponseDocumentCustomFieldCheckbox - from dropbox_sign.models import TemplateResponseDocumentCustomFieldText - - -def lazy_import(): - from dropbox_sign.models import TemplateResponseDocumentCustomFieldCheckbox - from dropbox_sign.models import TemplateResponseDocumentCustomFieldText - globals()['TemplateResponseDocumentCustomFieldCheckbox'] = TemplateResponseDocumentCustomFieldCheckbox - globals()['TemplateResponseDocumentCustomFieldText'] = TemplateResponseDocumentCustomFieldText - - -class TemplateResponseCustomField(ModelSimple): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'value': (TemplateResponseDocumentCustomFieldBase,), - } - - @cached_property - def discriminator(): - lazy_import() - val = { - 'checkbox': TemplateResponseDocumentCustomFieldCheckbox, - 'text': TemplateResponseDocumentCustomFieldText, - } - if not val: - return None - return {'type': val} - - - attribute_map = {} - - read_only_vars = set() - - _composed_schemas = None - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): - """TemplateResponseCustomField - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (TemplateResponseDocumentCustomFieldBase): # noqa: E501 - - Keyword Args: - value (TemplateResponseDocumentCustomFieldBase): # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """TemplateResponseCustomField - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (TemplateResponseDocumentCustomFieldBase): # noqa: E501 - - Keyword Args: - value (TemplateResponseDocumentCustomFieldBase): # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - return self diff --git a/sdks/python/dropbox_sign/model/template_response_document.py b/sdks/python/dropbox_sign/model/template_response_document.py deleted file mode 100644 index 7dfb7ba98..000000000 --- a/sdks/python/dropbox_sign/model/template_response_document.py +++ /dev/null @@ -1,360 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.template_response_document_custom_field_base import TemplateResponseDocumentCustomFieldBase - from dropbox_sign.model.template_response_document_field_group import TemplateResponseDocumentFieldGroup - from dropbox_sign.model.template_response_document_form_field_base import TemplateResponseDocumentFormFieldBase - from dropbox_sign.model.template_response_document_static_field_base import TemplateResponseDocumentStaticFieldBase - - -def lazy_import(): - from dropbox_sign.model.template_response_document_custom_field_base import TemplateResponseDocumentCustomFieldBase - from dropbox_sign.model.template_response_document_field_group import TemplateResponseDocumentFieldGroup - from dropbox_sign.model.template_response_document_form_field_base import TemplateResponseDocumentFormFieldBase - from dropbox_sign.model.template_response_document_static_field_base import TemplateResponseDocumentStaticFieldBase - globals()['TemplateResponseDocumentCustomFieldBase'] = TemplateResponseDocumentCustomFieldBase - globals()['TemplateResponseDocumentFieldGroup'] = TemplateResponseDocumentFieldGroup - globals()['TemplateResponseDocumentFormFieldBase'] = TemplateResponseDocumentFormFieldBase - globals()['TemplateResponseDocumentStaticFieldBase'] = TemplateResponseDocumentStaticFieldBase - - -class TemplateResponseDocument(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'name': (str,), # noqa: E501 - 'index': (int,), # noqa: E501 - 'field_groups': ([TemplateResponseDocumentFieldGroup],), # noqa: E501 - 'form_fields': ([TemplateResponseDocumentFormFieldBase],), # noqa: E501 - 'custom_fields': ([TemplateResponseDocumentCustomFieldBase],), # noqa: E501 - 'static_fields': ([TemplateResponseDocumentStaticFieldBase], none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> TemplateResponseDocument: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[TemplateResponseDocument], - _check_type=True, - ) - - - attribute_map = { - 'name': 'name', # noqa: E501 - 'index': 'index', # noqa: E501 - 'field_groups': 'field_groups', # noqa: E501 - 'form_fields': 'form_fields', # noqa: E501 - 'custom_fields': 'custom_fields', # noqa: E501 - 'static_fields': 'static_fields', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def index(self) -> int: - return self.get("index") - - @index.setter - def index(self, value: int): - setattr(self, "index", value) - - @property - def field_groups(self) -> List[TemplateResponseDocumentFieldGroup]: - return self.get("field_groups") - - @field_groups.setter - def field_groups(self, value: List[TemplateResponseDocumentFieldGroup]): - setattr(self, "field_groups", value) - - @property - def form_fields(self) -> List[TemplateResponseDocumentFormFieldBase]: - return self.get("form_fields") - - @form_fields.setter - def form_fields(self, value: List[TemplateResponseDocumentFormFieldBase]): - setattr(self, "form_fields", value) - - @property - def custom_fields(self) -> List[TemplateResponseDocumentCustomFieldBase]: - return self.get("custom_fields") - - @custom_fields.setter - def custom_fields(self, value: List[TemplateResponseDocumentCustomFieldBase]): - setattr(self, "custom_fields", value) - - @property - def static_fields(self) -> Optional[List[TemplateResponseDocumentStaticFieldBase]]: - return self.get("static_fields") - - @static_fields.setter - def static_fields(self, value: Optional[List[TemplateResponseDocumentStaticFieldBase]]): - setattr(self, "static_fields", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TemplateResponseDocument - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - name (str): Name of the associated file.. [optional] # noqa: E501 - index (int): Document ordering, the lowest index is displayed first and the highest last (0-based indexing).. [optional] # noqa: E501 - field_groups ([TemplateResponseDocumentFieldGroup]): An array of Form Field Group objects.. [optional] # noqa: E501 - form_fields ([TemplateResponseDocumentFormFieldBase]): An array of Form Field objects containing the name and type of each named field.. [optional] # noqa: E501 - custom_fields ([TemplateResponseDocumentCustomFieldBase]): An array of Form Field objects containing the name and type of each named field.. [optional] # noqa: E501 - static_fields ([TemplateResponseDocumentStaticFieldBase], none_type): An array describing static overlay fields. **NOTE:** Only available for certain subscriptions.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TemplateResponseDocument - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - name (str): Name of the associated file.. [optional] # noqa: E501 - index (int): Document ordering, the lowest index is displayed first and the highest last (0-based indexing).. [optional] # noqa: E501 - field_groups ([TemplateResponseDocumentFieldGroup]): An array of Form Field Group objects.. [optional] # noqa: E501 - form_fields ([TemplateResponseDocumentFormFieldBase]): An array of Form Field objects containing the name and type of each named field.. [optional] # noqa: E501 - custom_fields ([TemplateResponseDocumentCustomFieldBase]): An array of Form Field objects containing the name and type of each named field.. [optional] # noqa: E501 - static_fields ([TemplateResponseDocumentStaticFieldBase], none_type): An array describing static overlay fields. **NOTE:** Only available for certain subscriptions.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/template_response_document_custom_field.py b/sdks/python/dropbox_sign/model/template_response_document_custom_field.py deleted file mode 100644 index 6a5721e2c..000000000 --- a/sdks/python/dropbox_sign/model/template_response_document_custom_field.py +++ /dev/null @@ -1,475 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 - -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.template_response_field_avg_text_length import TemplateResponseFieldAvgTextLength - - -def lazy_import(): - from dropbox_sign.model.template_response_field_avg_text_length import TemplateResponseFieldAvgTextLength - globals()['TemplateResponseFieldAvgTextLength'] = TemplateResponseFieldAvgTextLength - - -class TemplateResponseDocumentCustomField(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('type',): { - 'TEXT': "text", - 'CHECKBOX': "checkbox", - }, - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'name': (str,), # noqa: E501 - 'type': (str,), # noqa: E501 - 'signer': (str,), # noqa: E501 - 'x': (int,), # noqa: E501 - 'y': (int,), # noqa: E501 - 'width': (int,), # noqa: E501 - 'height': (int,), # noqa: E501 - 'required': (bool,), # noqa: E501 - 'api_id': (str,), # noqa: E501 - 'group': (str, none_type,), # noqa: E501 - 'avg_text_length': (TemplateResponseFieldAvgTextLength,), # noqa: E501 - 'is_multiline': (bool, none_type,), # noqa: E501 - 'original_font_size': (int, none_type,), # noqa: E501 - 'font_family': (str, none_type,), # noqa: E501 - 'named_form_fields': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 - 'reusable_form_id': (str, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> TemplateResponseDocumentCustomField: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[TemplateResponseDocumentCustomField], - _check_type=True, - ) - - attribute_map = { - 'name': 'name', # noqa: E501 - 'type': 'type', # noqa: E501 - 'signer': 'signer', # noqa: E501 - 'x': 'x', # noqa: E501 - 'y': 'y', # noqa: E501 - 'width': 'width', # noqa: E501 - 'height': 'height', # noqa: E501 - 'required': 'required', # noqa: E501 - 'api_id': 'api_id', # noqa: E501 - 'group': 'group', # noqa: E501 - 'avg_text_length': 'avg_text_length', # noqa: E501 - 'is_multiline': 'isMultiline', # noqa: E501 - 'original_font_size': 'originalFontSize', # noqa: E501 - 'font_family': 'fontFamily', # noqa: E501 - 'named_form_fields': 'named_form_fields', # noqa: E501 - 'reusable_form_id': 'reusable_form_id', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def type(self) -> str: - return self.get("type") - - @type.setter - def type(self, value: str): - setattr(self, "type", value) - - @property - def signer(self) -> str: - return self.get("signer") - - @signer.setter - def signer(self, value: str): - setattr(self, "signer", value) - - @property - def x(self) -> int: - return self.get("x") - - @x.setter - def x(self, value: int): - setattr(self, "x", value) - - @property - def y(self) -> int: - return self.get("y") - - @y.setter - def y(self, value: int): - setattr(self, "y", value) - - @property - def width(self) -> int: - return self.get("width") - - @width.setter - def width(self, value: int): - setattr(self, "width", value) - - @property - def height(self) -> int: - return self.get("height") - - @height.setter - def height(self, value: int): - setattr(self, "height", value) - - @property - def required(self) -> bool: - return self.get("required") - - @required.setter - def required(self, value: bool): - setattr(self, "required", value) - - @property - def api_id(self) -> str: - return self.get("api_id") - - @api_id.setter - def api_id(self, value: str): - setattr(self, "api_id", value) - - @property - def group(self) -> Optional[str]: - return self.get("group") - - @group.setter - def group(self, value: Optional[str]): - setattr(self, "group", value) - - @property - def avg_text_length(self) -> TemplateResponseFieldAvgTextLength: - return self.get("avg_text_length") - - @avg_text_length.setter - def avg_text_length(self, value: TemplateResponseFieldAvgTextLength): - setattr(self, "avg_text_length", value) - - @property - def is_multiline(self) -> Optional[bool]: - return self.get("is_multiline") - - @is_multiline.setter - def is_multiline(self, value: Optional[bool]): - setattr(self, "is_multiline", value) - - @property - def original_font_size(self) -> Optional[int]: - return self.get("original_font_size") - - @original_font_size.setter - def original_font_size(self, value: Optional[int]): - setattr(self, "original_font_size", value) - - @property - def font_family(self) -> Optional[str]: - return self.get("font_family") - - @font_family.setter - def font_family(self, value: Optional[str]): - setattr(self, "font_family", value) - - @property - def named_form_fields(self) -> Optional[{str: (bool, date, datetime, dict, float, int, list, str, none_type)}]: - return self.get("named_form_fields") - - @named_form_fields.setter - def named_form_fields(self, value: Optional[{str: (bool, date, datetime, dict, float, int, list, str, none_type)}]): - setattr(self, "named_form_fields", value) - - @property - def reusable_form_id(self) -> Optional[str]: - return self.get("reusable_form_id") - - @reusable_form_id.setter - def reusable_form_id(self, value: Optional[str]): - setattr(self, "reusable_form_id", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TemplateResponseDocumentCustomField - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - name (str): The name of the Custom Field.. [optional] # noqa: E501 - type (str): The type of this Custom Field. Only `text` and `checkbox` are currently supported.. [optional] # noqa: E501 - signer (str): The signer of the Custom Field.. [optional] # noqa: E501 - x (int): The horizontal offset in pixels for this form field.. [optional] # noqa: E501 - y (int): The vertical offset in pixels for this form field.. [optional] # noqa: E501 - width (int): The width in pixels of this form field.. [optional] # noqa: E501 - height (int): The height in pixels of this form field.. [optional] # noqa: E501 - required (bool): Boolean showing whether or not this field is required.. [optional] # noqa: E501 - api_id (str): The unique ID for this field.. [optional] # noqa: E501 - group (str, none_type): The name of the group this field is in. If this field is not a group, this defaults to `null`.. [optional] # noqa: E501 - avg_text_length (TemplateResponseFieldAvgTextLength): [optional] # noqa: E501 - is_multiline (bool, none_type): Whether this form field is multiline text.. [optional] # noqa: E501 - original_font_size (int, none_type): Original font size used in this form field's text.. [optional] # noqa: E501 - font_family (str, none_type): Font family used in this form field's text.. [optional] # noqa: E501 - named_form_fields ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): Deprecated. Use `form_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead.. [optional] # noqa: E501 - reusable_form_id (str, none_type): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TemplateResponseDocumentCustomField - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - name (str): The name of the Custom Field.. [optional] # noqa: E501 - type (str): The type of this Custom Field. Only `text` and `checkbox` are currently supported.. [optional] # noqa: E501 - signer (str): The signer of the Custom Field.. [optional] # noqa: E501 - x (int): The horizontal offset in pixels for this form field.. [optional] # noqa: E501 - y (int): The vertical offset in pixels for this form field.. [optional] # noqa: E501 - width (int): The width in pixels of this form field.. [optional] # noqa: E501 - height (int): The height in pixels of this form field.. [optional] # noqa: E501 - required (bool): Boolean showing whether or not this field is required.. [optional] # noqa: E501 - api_id (str): The unique ID for this field.. [optional] # noqa: E501 - group (str, none_type): The name of the group this field is in. If this field is not a group, this defaults to `null`.. [optional] # noqa: E501 - avg_text_length (TemplateResponseFieldAvgTextLength): [optional] # noqa: E501 - is_multiline (bool, none_type): Whether this form field is multiline text.. [optional] # noqa: E501 - original_font_size (int, none_type): Original font size used in this form field's text.. [optional] # noqa: E501 - font_family (str, none_type): Font family used in this form field's text.. [optional] # noqa: E501 - named_form_fields ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): Deprecated. Use `form_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead.. [optional] # noqa: E501 - reusable_form_id (str, none_type): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/template_response_document_custom_field_base.py b/sdks/python/dropbox_sign/model/template_response_document_custom_field_base.py deleted file mode 100644 index 79a8b014f..000000000 --- a/sdks/python/dropbox_sign/model/template_response_document_custom_field_base.py +++ /dev/null @@ -1,400 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - -if TYPE_CHECKING: - from dropbox_sign.models import TemplateResponseDocumentCustomFieldCheckbox - from dropbox_sign.models import TemplateResponseDocumentCustomFieldText - - -def lazy_import(): - from dropbox_sign.models import TemplateResponseDocumentCustomFieldCheckbox - from dropbox_sign.models import TemplateResponseDocumentCustomFieldText - globals()['TemplateResponseDocumentCustomFieldCheckbox'] = TemplateResponseDocumentCustomFieldCheckbox - globals()['TemplateResponseDocumentCustomFieldText'] = TemplateResponseDocumentCustomFieldText - - -class TemplateResponseDocumentCustomFieldBase(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'type': (str,), # noqa: E501 - 'api_id': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'signer': (str, none_type,), # noqa: E501 - 'x': (int,), # noqa: E501 - 'y': (int,), # noqa: E501 - 'width': (int,), # noqa: E501 - 'height': (int,), # noqa: E501 - 'required': (bool,), # noqa: E501 - 'group': (str, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - lazy_import() - val = { - 'checkbox': TemplateResponseDocumentCustomFieldCheckbox, - 'text': TemplateResponseDocumentCustomFieldText, - } - if not val: - return None - return {'type': val} - - - attribute_map = { - 'type': 'type', # noqa: E501 - 'api_id': 'api_id', # noqa: E501 - 'name': 'name', # noqa: E501 - 'signer': 'signer', # noqa: E501 - 'x': 'x', # noqa: E501 - 'y': 'y', # noqa: E501 - 'width': 'width', # noqa: E501 - 'height': 'height', # noqa: E501 - 'required': 'required', # noqa: E501 - 'group': 'group', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def type(self) -> str: - return self.get("type") - - @type.setter - def type(self, value: str): - setattr(self, "type", value) - - @property - def api_id(self) -> str: - return self.get("api_id") - - @api_id.setter - def api_id(self, value: str): - setattr(self, "api_id", value) - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def signer(self) -> Optional[str]: - return self.get("signer") - - @signer.setter - def signer(self, value: Optional[str]): - setattr(self, "signer", value) - - @property - def x(self) -> int: - return self.get("x") - - @x.setter - def x(self, value: int): - setattr(self, "x", value) - - @property - def y(self) -> int: - return self.get("y") - - @y.setter - def y(self, value: int): - setattr(self, "y", value) - - @property - def width(self) -> int: - return self.get("width") - - @width.setter - def width(self, value: int): - setattr(self, "width", value) - - @property - def height(self) -> int: - return self.get("height") - - @height.setter - def height(self, value: int): - setattr(self, "height", value) - - @property - def required(self) -> bool: - return self.get("required") - - @required.setter - def required(self, value: bool): - setattr(self, "required", value) - - @property - def group(self) -> Optional[str]: - return self.get("group") - - @group.setter - def group(self, value: Optional[str]): - setattr(self, "group", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, type, *args, **kwargs): # noqa: E501 - """TemplateResponseDocumentCustomFieldBase - a model defined in OpenAPI - - Args: - type (str): - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - api_id (str): The unique ID for this field.. [optional] # noqa: E501 - name (str): The name of the Custom Field.. [optional] # noqa: E501 - signer (str, none_type): The signer of the Custom Field. Can be `null` if field is a merge field (assigned to Sender).. [optional] # noqa: E501 - x (int): The horizontal offset in pixels for this form field.. [optional] # noqa: E501 - y (int): The vertical offset in pixels for this form field.. [optional] # noqa: E501 - width (int): The width in pixels of this form field.. [optional] # noqa: E501 - height (int): The height in pixels of this form field.. [optional] # noqa: E501 - required (bool): Boolean showing whether or not this field is required.. [optional] # noqa: E501 - group (str, none_type): The name of the group this field is in. If this field is not a group, this defaults to `null`.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.type = type - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, type, *args, **kwargs): # noqa: E501 - """TemplateResponseDocumentCustomFieldBase - a model defined in OpenAPI - - Args: - type (str): - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - api_id (str): The unique ID for this field.. [optional] # noqa: E501 - name (str): The name of the Custom Field.. [optional] # noqa: E501 - signer (str, none_type): The signer of the Custom Field. Can be `null` if field is a merge field (assigned to Sender).. [optional] # noqa: E501 - x (int): The horizontal offset in pixels for this form field.. [optional] # noqa: E501 - y (int): The vertical offset in pixels for this form field.. [optional] # noqa: E501 - width (int): The width in pixels of this form field.. [optional] # noqa: E501 - height (int): The height in pixels of this form field.. [optional] # noqa: E501 - required (bool): Boolean showing whether or not this field is required.. [optional] # noqa: E501 - group (str, none_type): The name of the group this field is in. If this field is not a group, this defaults to `null`.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.type = type - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/template_response_document_custom_field_checkbox.py b/sdks/python/dropbox_sign/model/template_response_document_custom_field_checkbox.py deleted file mode 100644 index fe62210fc..000000000 --- a/sdks/python/dropbox_sign/model/template_response_document_custom_field_checkbox.py +++ /dev/null @@ -1,448 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.template_response_document_custom_field_base import TemplateResponseDocumentCustomFieldBase - - -def lazy_import(): - from dropbox_sign.model.template_response_document_custom_field_base import TemplateResponseDocumentCustomFieldBase - globals()['TemplateResponseDocumentCustomFieldBase'] = TemplateResponseDocumentCustomFieldBase - - -class TemplateResponseDocumentCustomFieldCheckbox(ModelComposed): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'type': (str,), # noqa: E501 - 'api_id': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'signer': (str, none_type,), # noqa: E501 - 'x': (int,), # noqa: E501 - 'y': (int,), # noqa: E501 - 'width': (int,), # noqa: E501 - 'height': (int,), # noqa: E501 - 'required': (bool,), # noqa: E501 - 'group': (str, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> TemplateResponseDocumentCustomFieldCheckbox: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[TemplateResponseDocumentCustomFieldCheckbox], - _check_type=True, - ) - - - attribute_map = { - 'type': 'type', # noqa: E501 - 'api_id': 'api_id', # noqa: E501 - 'name': 'name', # noqa: E501 - 'signer': 'signer', # noqa: E501 - 'x': 'x', # noqa: E501 - 'y': 'y', # noqa: E501 - 'width': 'width', # noqa: E501 - 'height': 'height', # noqa: E501 - 'required': 'required', # noqa: E501 - 'group': 'group', # noqa: E501 - } - - read_only_vars = { - } - - @property - def type(self) -> str: - return self.get("type") - - @type.setter - def type(self, value: str): - setattr(self, "type", value) - - @property - def api_id(self) -> str: - return self.get("api_id") - - @api_id.setter - def api_id(self, value: str): - setattr(self, "api_id", value) - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def signer(self) -> Optional[str]: - return self.get("signer") - - @signer.setter - def signer(self, value: Optional[str]): - setattr(self, "signer", value) - - @property - def x(self) -> int: - return self.get("x") - - @x.setter - def x(self, value: int): - setattr(self, "x", value) - - @property - def y(self) -> int: - return self.get("y") - - @y.setter - def y(self, value: int): - setattr(self, "y", value) - - @property - def width(self) -> int: - return self.get("width") - - @width.setter - def width(self, value: int): - setattr(self, "width", value) - - @property - def height(self) -> int: - return self.get("height") - - @height.setter - def height(self, value: int): - setattr(self, "height", value) - - @property - def required(self) -> bool: - return self.get("required") - - @required.setter - def required(self, value: bool): - setattr(self, "required", value) - - @property - def group(self) -> Optional[str]: - return self.get("group") - - @group.setter - def group(self, value: Optional[str]): - setattr(self, "group", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TemplateResponseDocumentCustomFieldCheckbox - a model defined in OpenAPI - - Keyword Args: - type (str): The type of this Custom Field. Only `text` and `checkbox` are currently supported. * Text uses `TemplateResponseDocumentCustomFieldText` * Checkbox uses `TemplateResponseDocumentCustomFieldCheckbox`. defaults to "checkbox" # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - api_id (str): The unique ID for this field.. [optional] # noqa: E501 - name (str): The name of the Custom Field.. [optional] # noqa: E501 - signer (str, none_type): The signer of the Custom Field. Can be `null` if field is a merge field (assigned to Sender).. [optional] # noqa: E501 - x (int): The horizontal offset in pixels for this form field.. [optional] # noqa: E501 - y (int): The vertical offset in pixels for this form field.. [optional] # noqa: E501 - width (int): The width in pixels of this form field.. [optional] # noqa: E501 - height (int): The height in pixels of this form field.. [optional] # noqa: E501 - required (bool): Boolean showing whether or not this field is required.. [optional] # noqa: E501 - group (str, none_type): The name of the group this field is in. If this field is not a group, this defaults to `null`.. [optional] # noqa: E501 - """ - - type = kwargs.get('type', "checkbox") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TemplateResponseDocumentCustomFieldCheckbox - a model defined in OpenAPI - - Keyword Args: - type (str): The type of this Custom Field. Only `text` and `checkbox` are currently supported. * Text uses `TemplateResponseDocumentCustomFieldText` * Checkbox uses `TemplateResponseDocumentCustomFieldCheckbox`. defaults to "checkbox" # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - api_id (str): The unique ID for this field.. [optional] # noqa: E501 - name (str): The name of the Custom Field.. [optional] # noqa: E501 - signer (str, none_type): The signer of the Custom Field. Can be `null` if field is a merge field (assigned to Sender).. [optional] # noqa: E501 - x (int): The horizontal offset in pixels for this form field.. [optional] # noqa: E501 - y (int): The vertical offset in pixels for this form field.. [optional] # noqa: E501 - width (int): The width in pixels of this form field.. [optional] # noqa: E501 - height (int): The height in pixels of this form field.. [optional] # noqa: E501 - required (bool): Boolean showing whether or not this field is required.. [optional] # noqa: E501 - group (str, none_type): The name of the group this field is in. If this field is not a group, this defaults to `null`.. [optional] # noqa: E501 - """ - - type = kwargs.get('type', "checkbox") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'oneOf': [ - ], - } diff --git a/sdks/python/dropbox_sign/model/template_response_document_custom_field_text.py b/sdks/python/dropbox_sign/model/template_response_document_custom_field_text.py deleted file mode 100644 index 725c49a70..000000000 --- a/sdks/python/dropbox_sign/model/template_response_document_custom_field_text.py +++ /dev/null @@ -1,499 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.template_response_document_custom_field_base import TemplateResponseDocumentCustomFieldBase - from dropbox_sign.model.template_response_field_avg_text_length import TemplateResponseFieldAvgTextLength - - -def lazy_import(): - from dropbox_sign.model.template_response_document_custom_field_base import TemplateResponseDocumentCustomFieldBase - from dropbox_sign.model.template_response_field_avg_text_length import TemplateResponseFieldAvgTextLength - globals()['TemplateResponseDocumentCustomFieldBase'] = TemplateResponseDocumentCustomFieldBase - globals()['TemplateResponseFieldAvgTextLength'] = TemplateResponseFieldAvgTextLength - - -class TemplateResponseDocumentCustomFieldText(ModelComposed): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'type': (str,), # noqa: E501 - 'avg_text_length': (TemplateResponseFieldAvgTextLength,), # noqa: E501 - 'is_multiline': (bool,), # noqa: E501 - 'original_font_size': (int,), # noqa: E501 - 'font_family': (str,), # noqa: E501 - 'api_id': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'signer': (str, none_type,), # noqa: E501 - 'x': (int,), # noqa: E501 - 'y': (int,), # noqa: E501 - 'width': (int,), # noqa: E501 - 'height': (int,), # noqa: E501 - 'required': (bool,), # noqa: E501 - 'group': (str, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> TemplateResponseDocumentCustomFieldText: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[TemplateResponseDocumentCustomFieldText], - _check_type=True, - ) - - - attribute_map = { - 'type': 'type', # noqa: E501 - 'avg_text_length': 'avg_text_length', # noqa: E501 - 'is_multiline': 'isMultiline', # noqa: E501 - 'original_font_size': 'originalFontSize', # noqa: E501 - 'font_family': 'fontFamily', # noqa: E501 - 'api_id': 'api_id', # noqa: E501 - 'name': 'name', # noqa: E501 - 'signer': 'signer', # noqa: E501 - 'x': 'x', # noqa: E501 - 'y': 'y', # noqa: E501 - 'width': 'width', # noqa: E501 - 'height': 'height', # noqa: E501 - 'required': 'required', # noqa: E501 - 'group': 'group', # noqa: E501 - } - - read_only_vars = { - } - - @property - def type(self) -> str: - return self.get("type") - - @type.setter - def type(self, value: str): - setattr(self, "type", value) - - @property - def avg_text_length(self) -> TemplateResponseFieldAvgTextLength: - return self.get("avg_text_length") - - @avg_text_length.setter - def avg_text_length(self, value: TemplateResponseFieldAvgTextLength): - setattr(self, "avg_text_length", value) - - @property - def is_multiline(self) -> bool: - return self.get("is_multiline") - - @is_multiline.setter - def is_multiline(self, value: bool): - setattr(self, "is_multiline", value) - - @property - def original_font_size(self) -> int: - return self.get("original_font_size") - - @original_font_size.setter - def original_font_size(self, value: int): - setattr(self, "original_font_size", value) - - @property - def font_family(self) -> str: - return self.get("font_family") - - @font_family.setter - def font_family(self, value: str): - setattr(self, "font_family", value) - - @property - def api_id(self) -> str: - return self.get("api_id") - - @api_id.setter - def api_id(self, value: str): - setattr(self, "api_id", value) - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def signer(self) -> Optional[str]: - return self.get("signer") - - @signer.setter - def signer(self, value: Optional[str]): - setattr(self, "signer", value) - - @property - def x(self) -> int: - return self.get("x") - - @x.setter - def x(self, value: int): - setattr(self, "x", value) - - @property - def y(self) -> int: - return self.get("y") - - @y.setter - def y(self, value: int): - setattr(self, "y", value) - - @property - def width(self) -> int: - return self.get("width") - - @width.setter - def width(self, value: int): - setattr(self, "width", value) - - @property - def height(self) -> int: - return self.get("height") - - @height.setter - def height(self, value: int): - setattr(self, "height", value) - - @property - def required(self) -> bool: - return self.get("required") - - @required.setter - def required(self, value: bool): - setattr(self, "required", value) - - @property - def group(self) -> Optional[str]: - return self.get("group") - - @group.setter - def group(self, value: Optional[str]): - setattr(self, "group", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TemplateResponseDocumentCustomFieldText - a model defined in OpenAPI - - Keyword Args: - type (str): The type of this Custom Field. Only `text` and `checkbox` are currently supported. * Text uses `TemplateResponseDocumentCustomFieldText` * Checkbox uses `TemplateResponseDocumentCustomFieldCheckbox`. defaults to "text" # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - avg_text_length (TemplateResponseFieldAvgTextLength): [optional] # noqa: E501 - is_multiline (bool): Whether this form field is multiline text.. [optional] # noqa: E501 - original_font_size (int): Original font size used in this form field's text.. [optional] # noqa: E501 - font_family (str): Font family used in this form field's text.. [optional] # noqa: E501 - api_id (str): The unique ID for this field.. [optional] # noqa: E501 - name (str): The name of the Custom Field.. [optional] # noqa: E501 - signer (str, none_type): The signer of the Custom Field. Can be `null` if field is a merge field (assigned to Sender).. [optional] # noqa: E501 - x (int): The horizontal offset in pixels for this form field.. [optional] # noqa: E501 - y (int): The vertical offset in pixels for this form field.. [optional] # noqa: E501 - width (int): The width in pixels of this form field.. [optional] # noqa: E501 - height (int): The height in pixels of this form field.. [optional] # noqa: E501 - required (bool): Boolean showing whether or not this field is required.. [optional] # noqa: E501 - group (str, none_type): The name of the group this field is in. If this field is not a group, this defaults to `null`.. [optional] # noqa: E501 - """ - - type = kwargs.get('type', "text") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TemplateResponseDocumentCustomFieldText - a model defined in OpenAPI - - Keyword Args: - type (str): The type of this Custom Field. Only `text` and `checkbox` are currently supported. * Text uses `TemplateResponseDocumentCustomFieldText` * Checkbox uses `TemplateResponseDocumentCustomFieldCheckbox`. defaults to "text" # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - avg_text_length (TemplateResponseFieldAvgTextLength): [optional] # noqa: E501 - is_multiline (bool): Whether this form field is multiline text.. [optional] # noqa: E501 - original_font_size (int): Original font size used in this form field's text.. [optional] # noqa: E501 - font_family (str): Font family used in this form field's text.. [optional] # noqa: E501 - api_id (str): The unique ID for this field.. [optional] # noqa: E501 - name (str): The name of the Custom Field.. [optional] # noqa: E501 - signer (str, none_type): The signer of the Custom Field. Can be `null` if field is a merge field (assigned to Sender).. [optional] # noqa: E501 - x (int): The horizontal offset in pixels for this form field.. [optional] # noqa: E501 - y (int): The vertical offset in pixels for this form field.. [optional] # noqa: E501 - width (int): The width in pixels of this form field.. [optional] # noqa: E501 - height (int): The height in pixels of this form field.. [optional] # noqa: E501 - required (bool): Boolean showing whether or not this field is required.. [optional] # noqa: E501 - group (str, none_type): The name of the group this field is in. If this field is not a group, this defaults to `null`.. [optional] # noqa: E501 - """ - - type = kwargs.get('type', "text") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'oneOf': [ - ], - } diff --git a/sdks/python/dropbox_sign/model/template_response_document_field_group.py b/sdks/python/dropbox_sign/model/template_response_document_field_group.py deleted file mode 100644 index e3bcfca84..000000000 --- a/sdks/python/dropbox_sign/model/template_response_document_field_group.py +++ /dev/null @@ -1,303 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.template_response_document_field_group_rule import TemplateResponseDocumentFieldGroupRule - - -def lazy_import(): - from dropbox_sign.model.template_response_document_field_group_rule import TemplateResponseDocumentFieldGroupRule - globals()['TemplateResponseDocumentFieldGroupRule'] = TemplateResponseDocumentFieldGroupRule - - -class TemplateResponseDocumentFieldGroup(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'name': (str,), # noqa: E501 - 'rule': (TemplateResponseDocumentFieldGroupRule,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> TemplateResponseDocumentFieldGroup: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[TemplateResponseDocumentFieldGroup], - _check_type=True, - ) - - - attribute_map = { - 'name': 'name', # noqa: E501 - 'rule': 'rule', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def rule(self) -> TemplateResponseDocumentFieldGroupRule: - return self.get("rule") - - @rule.setter - def rule(self, value: TemplateResponseDocumentFieldGroupRule): - setattr(self, "rule", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TemplateResponseDocumentFieldGroup - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - name (str): The name of the form field group.. [optional] # noqa: E501 - rule (TemplateResponseDocumentFieldGroupRule): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TemplateResponseDocumentFieldGroup - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - name (str): The name of the form field group.. [optional] # noqa: E501 - rule (TemplateResponseDocumentFieldGroupRule): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/template_response_document_field_group_rule.py b/sdks/python/dropbox_sign/model/template_response_document_field_group_rule.py deleted file mode 100644 index 4dc956ccd..000000000 --- a/sdks/python/dropbox_sign/model/template_response_document_field_group_rule.py +++ /dev/null @@ -1,295 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class TemplateResponseDocumentFieldGroupRule(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'requirement': (str,), # noqa: E501 - 'group_label': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> TemplateResponseDocumentFieldGroupRule: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[TemplateResponseDocumentFieldGroupRule], - _check_type=True, - ) - - - attribute_map = { - 'requirement': 'requirement', # noqa: E501 - 'group_label': 'groupLabel', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def requirement(self) -> str: - return self.get("requirement") - - @requirement.setter - def requirement(self, value: str): - setattr(self, "requirement", value) - - @property - def group_label(self) -> str: - return self.get("group_label") - - @group_label.setter - def group_label(self, value: str): - setattr(self, "group_label", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TemplateResponseDocumentFieldGroupRule - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - requirement (str): 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.. [optional] # noqa: E501 - group_label (str): Name of the group. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TemplateResponseDocumentFieldGroupRule - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - requirement (str): 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.. [optional] # noqa: E501 - group_label (str): Name of the group. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/template_response_document_form_field.py b/sdks/python/dropbox_sign/model/template_response_document_form_field.py deleted file mode 100644 index e1d4c0a3f..000000000 --- a/sdks/python/dropbox_sign/model/template_response_document_form_field.py +++ /dev/null @@ -1,459 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 - -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.template_response_field_avg_text_length import TemplateResponseFieldAvgTextLength - - -def lazy_import(): - from dropbox_sign.model.template_response_field_avg_text_length import TemplateResponseFieldAvgTextLength - globals()['TemplateResponseFieldAvgTextLength'] = TemplateResponseFieldAvgTextLength - - -class TemplateResponseDocumentFormField(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('type',): { - 'CHECKBOX': "checkbox", - 'CHECKBOX-MERGE': "checkbox-merge", - 'DATE_SIGNED': "date_signed", - 'DROPDOWN': "dropdown", - 'HYPERLINK': "hyperlink", - 'INITIALS': "initials", - 'SIGNATURE': "signature", - 'RADIO': "radio", - 'TEXT': "text", - 'TEXT-MERGE': "text-merge", - }, - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'api_id': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'type': (str,), # noqa: E501 - 'signer': (str,), # noqa: E501 - 'x': (int,), # noqa: E501 - 'y': (int,), # noqa: E501 - 'width': (int,), # noqa: E501 - 'height': (int,), # noqa: E501 - 'required': (bool,), # noqa: E501 - 'group': (str, none_type,), # noqa: E501 - 'avg_text_length': (TemplateResponseFieldAvgTextLength,), # noqa: E501 - 'is_multiline': (bool, none_type,), # noqa: E501 - 'original_font_size': (int, none_type,), # noqa: E501 - 'font_family': (str, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> TemplateResponseDocumentFormField: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[TemplateResponseDocumentFormField], - _check_type=True, - ) - - attribute_map = { - 'api_id': 'api_id', # noqa: E501 - 'name': 'name', # noqa: E501 - 'type': 'type', # noqa: E501 - 'signer': 'signer', # noqa: E501 - 'x': 'x', # noqa: E501 - 'y': 'y', # noqa: E501 - 'width': 'width', # noqa: E501 - 'height': 'height', # noqa: E501 - 'required': 'required', # noqa: E501 - 'group': 'group', # noqa: E501 - 'avg_text_length': 'avg_text_length', # noqa: E501 - 'is_multiline': 'isMultiline', # noqa: E501 - 'original_font_size': 'originalFontSize', # noqa: E501 - 'font_family': 'fontFamily', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def api_id(self) -> str: - return self.get("api_id") - - @api_id.setter - def api_id(self, value: str): - setattr(self, "api_id", value) - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def type(self) -> str: - return self.get("type") - - @type.setter - def type(self, value: str): - setattr(self, "type", value) - - @property - def signer(self) -> str: - return self.get("signer") - - @signer.setter - def signer(self, value: str): - setattr(self, "signer", value) - - @property - def x(self) -> int: - return self.get("x") - - @x.setter - def x(self, value: int): - setattr(self, "x", value) - - @property - def y(self) -> int: - return self.get("y") - - @y.setter - def y(self, value: int): - setattr(self, "y", value) - - @property - def width(self) -> int: - return self.get("width") - - @width.setter - def width(self, value: int): - setattr(self, "width", value) - - @property - def height(self) -> int: - return self.get("height") - - @height.setter - def height(self, value: int): - setattr(self, "height", value) - - @property - def required(self) -> bool: - return self.get("required") - - @required.setter - def required(self, value: bool): - setattr(self, "required", value) - - @property - def group(self) -> Optional[str]: - return self.get("group") - - @group.setter - def group(self, value: Optional[str]): - setattr(self, "group", value) - - @property - def avg_text_length(self) -> TemplateResponseFieldAvgTextLength: - return self.get("avg_text_length") - - @avg_text_length.setter - def avg_text_length(self, value: TemplateResponseFieldAvgTextLength): - setattr(self, "avg_text_length", value) - - @property - def is_multiline(self) -> Optional[bool]: - return self.get("is_multiline") - - @is_multiline.setter - def is_multiline(self, value: Optional[bool]): - setattr(self, "is_multiline", value) - - @property - def original_font_size(self) -> Optional[int]: - return self.get("original_font_size") - - @original_font_size.setter - def original_font_size(self, value: Optional[int]): - setattr(self, "original_font_size", value) - - @property - def font_family(self) -> Optional[str]: - return self.get("font_family") - - @font_family.setter - def font_family(self, value: Optional[str]): - setattr(self, "font_family", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TemplateResponseDocumentFormField - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - api_id (str): A unique id for the form field.. [optional] # noqa: E501 - name (str): The name of the form field.. [optional] # noqa: E501 - type (str): The type of this form field. See [field types](/api/reference/constants/#field-types).. [optional] # noqa: E501 - signer (str): The signer of the Form Field.. [optional] # noqa: E501 - x (int): The horizontal offset in pixels for this form field.. [optional] # noqa: E501 - y (int): The vertical offset in pixels for this form field.. [optional] # noqa: E501 - width (int): The width in pixels of this form field.. [optional] # noqa: E501 - height (int): The height in pixels of this form field.. [optional] # noqa: E501 - required (bool): Boolean showing whether or not this field is required.. [optional] # noqa: E501 - group (str, none_type): The name of the group this field is in. If this field is not a group, this defaults to `null`.. [optional] # noqa: E501 - avg_text_length (TemplateResponseFieldAvgTextLength): [optional] # noqa: E501 - is_multiline (bool, none_type): Whether this form field is multiline text.. [optional] # noqa: E501 - original_font_size (int, none_type): Original font size used in this form field's text.. [optional] # noqa: E501 - font_family (str, none_type): Font family used in this form field's text.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TemplateResponseDocumentFormField - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - api_id (str): A unique id for the form field.. [optional] # noqa: E501 - name (str): The name of the form field.. [optional] # noqa: E501 - type (str): The type of this form field. See [field types](/api/reference/constants/#field-types).. [optional] # noqa: E501 - signer (str): The signer of the Form Field.. [optional] # noqa: E501 - x (int): The horizontal offset in pixels for this form field.. [optional] # noqa: E501 - y (int): The vertical offset in pixels for this form field.. [optional] # noqa: E501 - width (int): The width in pixels of this form field.. [optional] # noqa: E501 - height (int): The height in pixels of this form field.. [optional] # noqa: E501 - required (bool): Boolean showing whether or not this field is required.. [optional] # noqa: E501 - group (str, none_type): The name of the group this field is in. If this field is not a group, this defaults to `null`.. [optional] # noqa: E501 - avg_text_length (TemplateResponseFieldAvgTextLength): [optional] # noqa: E501 - is_multiline (bool, none_type): Whether this form field is multiline text.. [optional] # noqa: E501 - original_font_size (int, none_type): Original font size used in this form field's text.. [optional] # noqa: E501 - font_family (str, none_type): Font family used in this form field's text.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/template_response_document_form_field_base.py b/sdks/python/dropbox_sign/model/template_response_document_form_field_base.py deleted file mode 100644 index 2194f6c59..000000000 --- a/sdks/python/dropbox_sign/model/template_response_document_form_field_base.py +++ /dev/null @@ -1,424 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - -if TYPE_CHECKING: - from dropbox_sign.models import TemplateResponseDocumentFormFieldCheckbox - from dropbox_sign.models import TemplateResponseDocumentFormFieldDateSigned - from dropbox_sign.models import TemplateResponseDocumentFormFieldDropdown - from dropbox_sign.models import TemplateResponseDocumentFormFieldHyperlink - from dropbox_sign.models import TemplateResponseDocumentFormFieldInitials - from dropbox_sign.models import TemplateResponseDocumentFormFieldRadio - from dropbox_sign.models import TemplateResponseDocumentFormFieldSignature - from dropbox_sign.models import TemplateResponseDocumentFormFieldText - - -def lazy_import(): - from dropbox_sign.models import TemplateResponseDocumentFormFieldCheckbox - from dropbox_sign.models import TemplateResponseDocumentFormFieldDateSigned - from dropbox_sign.models import TemplateResponseDocumentFormFieldDropdown - from dropbox_sign.models import TemplateResponseDocumentFormFieldHyperlink - from dropbox_sign.models import TemplateResponseDocumentFormFieldInitials - from dropbox_sign.models import TemplateResponseDocumentFormFieldRadio - from dropbox_sign.models import TemplateResponseDocumentFormFieldSignature - from dropbox_sign.models import TemplateResponseDocumentFormFieldText - globals()['TemplateResponseDocumentFormFieldCheckbox'] = TemplateResponseDocumentFormFieldCheckbox - globals()['TemplateResponseDocumentFormFieldDateSigned'] = TemplateResponseDocumentFormFieldDateSigned - globals()['TemplateResponseDocumentFormFieldDropdown'] = TemplateResponseDocumentFormFieldDropdown - globals()['TemplateResponseDocumentFormFieldHyperlink'] = TemplateResponseDocumentFormFieldHyperlink - globals()['TemplateResponseDocumentFormFieldInitials'] = TemplateResponseDocumentFormFieldInitials - globals()['TemplateResponseDocumentFormFieldRadio'] = TemplateResponseDocumentFormFieldRadio - globals()['TemplateResponseDocumentFormFieldSignature'] = TemplateResponseDocumentFormFieldSignature - globals()['TemplateResponseDocumentFormFieldText'] = TemplateResponseDocumentFormFieldText - - -class TemplateResponseDocumentFormFieldBase(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'type': (str,), # noqa: E501 - 'api_id': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'signer': (str,), # noqa: E501 - 'x': (int,), # noqa: E501 - 'y': (int,), # noqa: E501 - 'width': (int,), # noqa: E501 - 'height': (int,), # noqa: E501 - 'required': (bool,), # noqa: E501 - 'group': (str, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - lazy_import() - val = { - 'checkbox': TemplateResponseDocumentFormFieldCheckbox, - 'date_signed': TemplateResponseDocumentFormFieldDateSigned, - 'dropdown': TemplateResponseDocumentFormFieldDropdown, - 'hyperlink': TemplateResponseDocumentFormFieldHyperlink, - 'initials': TemplateResponseDocumentFormFieldInitials, - 'radio': TemplateResponseDocumentFormFieldRadio, - 'signature': TemplateResponseDocumentFormFieldSignature, - 'text': TemplateResponseDocumentFormFieldText, - } - if not val: - return None - return {'type': val} - - - attribute_map = { - 'type': 'type', # noqa: E501 - 'api_id': 'api_id', # noqa: E501 - 'name': 'name', # noqa: E501 - 'signer': 'signer', # noqa: E501 - 'x': 'x', # noqa: E501 - 'y': 'y', # noqa: E501 - 'width': 'width', # noqa: E501 - 'height': 'height', # noqa: E501 - 'required': 'required', # noqa: E501 - 'group': 'group', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def type(self) -> str: - return self.get("type") - - @type.setter - def type(self, value: str): - setattr(self, "type", value) - - @property - def api_id(self) -> str: - return self.get("api_id") - - @api_id.setter - def api_id(self, value: str): - setattr(self, "api_id", value) - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def signer(self) -> str: - return self.get("signer") - - @signer.setter - def signer(self, value: str): - setattr(self, "signer", value) - - @property - def x(self) -> int: - return self.get("x") - - @x.setter - def x(self, value: int): - setattr(self, "x", value) - - @property - def y(self) -> int: - return self.get("y") - - @y.setter - def y(self, value: int): - setattr(self, "y", value) - - @property - def width(self) -> int: - return self.get("width") - - @width.setter - def width(self, value: int): - setattr(self, "width", value) - - @property - def height(self) -> int: - return self.get("height") - - @height.setter - def height(self, value: int): - setattr(self, "height", value) - - @property - def required(self) -> bool: - return self.get("required") - - @required.setter - def required(self, value: bool): - setattr(self, "required", value) - - @property - def group(self) -> Optional[str]: - return self.get("group") - - @group.setter - def group(self, value: Optional[str]): - setattr(self, "group", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, type, *args, **kwargs): # noqa: E501 - """TemplateResponseDocumentFormFieldBase - a model defined in OpenAPI - - Args: - type (str): - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - api_id (str): A unique id for the form field.. [optional] # noqa: E501 - name (str): The name of the form field.. [optional] # noqa: E501 - signer (str): The signer of the Form Field.. [optional] # noqa: E501 - x (int): The horizontal offset in pixels for this form field.. [optional] # noqa: E501 - y (int): The vertical offset in pixels for this form field.. [optional] # noqa: E501 - width (int): The width in pixels of this form field.. [optional] # noqa: E501 - height (int): The height in pixels of this form field.. [optional] # noqa: E501 - required (bool): Boolean showing whether or not this field is required.. [optional] # noqa: E501 - group (str, none_type): The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.type = type - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, type, *args, **kwargs): # noqa: E501 - """TemplateResponseDocumentFormFieldBase - a model defined in OpenAPI - - Args: - type (str): - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - api_id (str): A unique id for the form field.. [optional] # noqa: E501 - name (str): The name of the form field.. [optional] # noqa: E501 - signer (str): The signer of the Form Field.. [optional] # noqa: E501 - x (int): The horizontal offset in pixels for this form field.. [optional] # noqa: E501 - y (int): The vertical offset in pixels for this form field.. [optional] # noqa: E501 - width (int): The width in pixels of this form field.. [optional] # noqa: E501 - height (int): The height in pixels of this form field.. [optional] # noqa: E501 - required (bool): Boolean showing whether or not this field is required.. [optional] # noqa: E501 - group (str, none_type): The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.type = type - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/template_response_document_form_field_checkbox.py b/sdks/python/dropbox_sign/model/template_response_document_form_field_checkbox.py deleted file mode 100644 index 176630f42..000000000 --- a/sdks/python/dropbox_sign/model/template_response_document_form_field_checkbox.py +++ /dev/null @@ -1,448 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.template_response_document_form_field_base import TemplateResponseDocumentFormFieldBase - - -def lazy_import(): - from dropbox_sign.model.template_response_document_form_field_base import TemplateResponseDocumentFormFieldBase - globals()['TemplateResponseDocumentFormFieldBase'] = TemplateResponseDocumentFormFieldBase - - -class TemplateResponseDocumentFormFieldCheckbox(ModelComposed): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'type': (str,), # noqa: E501 - 'api_id': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'signer': (str,), # noqa: E501 - 'x': (int,), # noqa: E501 - 'y': (int,), # noqa: E501 - 'width': (int,), # noqa: E501 - 'height': (int,), # noqa: E501 - 'required': (bool,), # noqa: E501 - 'group': (str, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> TemplateResponseDocumentFormFieldCheckbox: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[TemplateResponseDocumentFormFieldCheckbox], - _check_type=True, - ) - - - attribute_map = { - 'type': 'type', # noqa: E501 - 'api_id': 'api_id', # noqa: E501 - 'name': 'name', # noqa: E501 - 'signer': 'signer', # noqa: E501 - 'x': 'x', # noqa: E501 - 'y': 'y', # noqa: E501 - 'width': 'width', # noqa: E501 - 'height': 'height', # noqa: E501 - 'required': 'required', # noqa: E501 - 'group': 'group', # noqa: E501 - } - - read_only_vars = { - } - - @property - def type(self) -> str: - return self.get("type") - - @type.setter - def type(self, value: str): - setattr(self, "type", value) - - @property - def api_id(self) -> str: - return self.get("api_id") - - @api_id.setter - def api_id(self, value: str): - setattr(self, "api_id", value) - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def signer(self) -> str: - return self.get("signer") - - @signer.setter - def signer(self, value: str): - setattr(self, "signer", value) - - @property - def x(self) -> int: - return self.get("x") - - @x.setter - def x(self, value: int): - setattr(self, "x", value) - - @property - def y(self) -> int: - return self.get("y") - - @y.setter - def y(self, value: int): - setattr(self, "y", value) - - @property - def width(self) -> int: - return self.get("width") - - @width.setter - def width(self, value: int): - setattr(self, "width", value) - - @property - def height(self) -> int: - return self.get("height") - - @height.setter - def height(self, value: int): - setattr(self, "height", value) - - @property - def required(self) -> bool: - return self.get("required") - - @required.setter - def required(self, value: bool): - setattr(self, "required", value) - - @property - def group(self) -> Optional[str]: - return self.get("group") - - @group.setter - def group(self, value: Optional[str]): - setattr(self, "group", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TemplateResponseDocumentFormFieldCheckbox - a model defined in OpenAPI - - Keyword Args: - type (str): 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`. defaults to "checkbox" # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - api_id (str): A unique id for the form field.. [optional] # noqa: E501 - name (str): The name of the form field.. [optional] # noqa: E501 - signer (str): The signer of the Form Field.. [optional] # noqa: E501 - x (int): The horizontal offset in pixels for this form field.. [optional] # noqa: E501 - y (int): The vertical offset in pixels for this form field.. [optional] # noqa: E501 - width (int): The width in pixels of this form field.. [optional] # noqa: E501 - height (int): The height in pixels of this form field.. [optional] # noqa: E501 - required (bool): Boolean showing whether or not this field is required.. [optional] # noqa: E501 - group (str, none_type): The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.. [optional] # noqa: E501 - """ - - type = kwargs.get('type', "checkbox") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TemplateResponseDocumentFormFieldCheckbox - a model defined in OpenAPI - - Keyword Args: - type (str): 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`. defaults to "checkbox" # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - api_id (str): A unique id for the form field.. [optional] # noqa: E501 - name (str): The name of the form field.. [optional] # noqa: E501 - signer (str): The signer of the Form Field.. [optional] # noqa: E501 - x (int): The horizontal offset in pixels for this form field.. [optional] # noqa: E501 - y (int): The vertical offset in pixels for this form field.. [optional] # noqa: E501 - width (int): The width in pixels of this form field.. [optional] # noqa: E501 - height (int): The height in pixels of this form field.. [optional] # noqa: E501 - required (bool): Boolean showing whether or not this field is required.. [optional] # noqa: E501 - group (str, none_type): The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.. [optional] # noqa: E501 - """ - - type = kwargs.get('type', "checkbox") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'oneOf': [ - ], - } diff --git a/sdks/python/dropbox_sign/model/template_response_document_form_field_date_signed.py b/sdks/python/dropbox_sign/model/template_response_document_form_field_date_signed.py deleted file mode 100644 index ce632dd03..000000000 --- a/sdks/python/dropbox_sign/model/template_response_document_form_field_date_signed.py +++ /dev/null @@ -1,448 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.template_response_document_form_field_base import TemplateResponseDocumentFormFieldBase - - -def lazy_import(): - from dropbox_sign.model.template_response_document_form_field_base import TemplateResponseDocumentFormFieldBase - globals()['TemplateResponseDocumentFormFieldBase'] = TemplateResponseDocumentFormFieldBase - - -class TemplateResponseDocumentFormFieldDateSigned(ModelComposed): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'type': (str,), # noqa: E501 - 'api_id': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'signer': (str,), # noqa: E501 - 'x': (int,), # noqa: E501 - 'y': (int,), # noqa: E501 - 'width': (int,), # noqa: E501 - 'height': (int,), # noqa: E501 - 'required': (bool,), # noqa: E501 - 'group': (str, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> TemplateResponseDocumentFormFieldDateSigned: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[TemplateResponseDocumentFormFieldDateSigned], - _check_type=True, - ) - - - attribute_map = { - 'type': 'type', # noqa: E501 - 'api_id': 'api_id', # noqa: E501 - 'name': 'name', # noqa: E501 - 'signer': 'signer', # noqa: E501 - 'x': 'x', # noqa: E501 - 'y': 'y', # noqa: E501 - 'width': 'width', # noqa: E501 - 'height': 'height', # noqa: E501 - 'required': 'required', # noqa: E501 - 'group': 'group', # noqa: E501 - } - - read_only_vars = { - } - - @property - def type(self) -> str: - return self.get("type") - - @type.setter - def type(self, value: str): - setattr(self, "type", value) - - @property - def api_id(self) -> str: - return self.get("api_id") - - @api_id.setter - def api_id(self, value: str): - setattr(self, "api_id", value) - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def signer(self) -> str: - return self.get("signer") - - @signer.setter - def signer(self, value: str): - setattr(self, "signer", value) - - @property - def x(self) -> int: - return self.get("x") - - @x.setter - def x(self, value: int): - setattr(self, "x", value) - - @property - def y(self) -> int: - return self.get("y") - - @y.setter - def y(self, value: int): - setattr(self, "y", value) - - @property - def width(self) -> int: - return self.get("width") - - @width.setter - def width(self, value: int): - setattr(self, "width", value) - - @property - def height(self) -> int: - return self.get("height") - - @height.setter - def height(self, value: int): - setattr(self, "height", value) - - @property - def required(self) -> bool: - return self.get("required") - - @required.setter - def required(self, value: bool): - setattr(self, "required", value) - - @property - def group(self) -> Optional[str]: - return self.get("group") - - @group.setter - def group(self, value: Optional[str]): - setattr(self, "group", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TemplateResponseDocumentFormFieldDateSigned - a model defined in OpenAPI - - Keyword Args: - type (str): 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`. defaults to "date_signed" # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - api_id (str): A unique id for the form field.. [optional] # noqa: E501 - name (str): The name of the form field.. [optional] # noqa: E501 - signer (str): The signer of the Form Field.. [optional] # noqa: E501 - x (int): The horizontal offset in pixels for this form field.. [optional] # noqa: E501 - y (int): The vertical offset in pixels for this form field.. [optional] # noqa: E501 - width (int): The width in pixels of this form field.. [optional] # noqa: E501 - height (int): The height in pixels of this form field.. [optional] # noqa: E501 - required (bool): Boolean showing whether or not this field is required.. [optional] # noqa: E501 - group (str, none_type): The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.. [optional] # noqa: E501 - """ - - type = kwargs.get('type', "date_signed") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TemplateResponseDocumentFormFieldDateSigned - a model defined in OpenAPI - - Keyword Args: - type (str): 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`. defaults to "date_signed" # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - api_id (str): A unique id for the form field.. [optional] # noqa: E501 - name (str): The name of the form field.. [optional] # noqa: E501 - signer (str): The signer of the Form Field.. [optional] # noqa: E501 - x (int): The horizontal offset in pixels for this form field.. [optional] # noqa: E501 - y (int): The vertical offset in pixels for this form field.. [optional] # noqa: E501 - width (int): The width in pixels of this form field.. [optional] # noqa: E501 - height (int): The height in pixels of this form field.. [optional] # noqa: E501 - required (bool): Boolean showing whether or not this field is required.. [optional] # noqa: E501 - group (str, none_type): The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.. [optional] # noqa: E501 - """ - - type = kwargs.get('type', "date_signed") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'oneOf': [ - ], - } diff --git a/sdks/python/dropbox_sign/model/template_response_document_form_field_dropdown.py b/sdks/python/dropbox_sign/model/template_response_document_form_field_dropdown.py deleted file mode 100644 index 3aa4cf05b..000000000 --- a/sdks/python/dropbox_sign/model/template_response_document_form_field_dropdown.py +++ /dev/null @@ -1,448 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.template_response_document_form_field_base import TemplateResponseDocumentFormFieldBase - - -def lazy_import(): - from dropbox_sign.model.template_response_document_form_field_base import TemplateResponseDocumentFormFieldBase - globals()['TemplateResponseDocumentFormFieldBase'] = TemplateResponseDocumentFormFieldBase - - -class TemplateResponseDocumentFormFieldDropdown(ModelComposed): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'type': (str,), # noqa: E501 - 'api_id': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'signer': (str,), # noqa: E501 - 'x': (int,), # noqa: E501 - 'y': (int,), # noqa: E501 - 'width': (int,), # noqa: E501 - 'height': (int,), # noqa: E501 - 'required': (bool,), # noqa: E501 - 'group': (str, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> TemplateResponseDocumentFormFieldDropdown: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[TemplateResponseDocumentFormFieldDropdown], - _check_type=True, - ) - - - attribute_map = { - 'type': 'type', # noqa: E501 - 'api_id': 'api_id', # noqa: E501 - 'name': 'name', # noqa: E501 - 'signer': 'signer', # noqa: E501 - 'x': 'x', # noqa: E501 - 'y': 'y', # noqa: E501 - 'width': 'width', # noqa: E501 - 'height': 'height', # noqa: E501 - 'required': 'required', # noqa: E501 - 'group': 'group', # noqa: E501 - } - - read_only_vars = { - } - - @property - def type(self) -> str: - return self.get("type") - - @type.setter - def type(self, value: str): - setattr(self, "type", value) - - @property - def api_id(self) -> str: - return self.get("api_id") - - @api_id.setter - def api_id(self, value: str): - setattr(self, "api_id", value) - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def signer(self) -> str: - return self.get("signer") - - @signer.setter - def signer(self, value: str): - setattr(self, "signer", value) - - @property - def x(self) -> int: - return self.get("x") - - @x.setter - def x(self, value: int): - setattr(self, "x", value) - - @property - def y(self) -> int: - return self.get("y") - - @y.setter - def y(self, value: int): - setattr(self, "y", value) - - @property - def width(self) -> int: - return self.get("width") - - @width.setter - def width(self, value: int): - setattr(self, "width", value) - - @property - def height(self) -> int: - return self.get("height") - - @height.setter - def height(self, value: int): - setattr(self, "height", value) - - @property - def required(self) -> bool: - return self.get("required") - - @required.setter - def required(self, value: bool): - setattr(self, "required", value) - - @property - def group(self) -> Optional[str]: - return self.get("group") - - @group.setter - def group(self, value: Optional[str]): - setattr(self, "group", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TemplateResponseDocumentFormFieldDropdown - a model defined in OpenAPI - - Keyword Args: - type (str): 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`. defaults to "dropdown" # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - api_id (str): A unique id for the form field.. [optional] # noqa: E501 - name (str): The name of the form field.. [optional] # noqa: E501 - signer (str): The signer of the Form Field.. [optional] # noqa: E501 - x (int): The horizontal offset in pixels for this form field.. [optional] # noqa: E501 - y (int): The vertical offset in pixels for this form field.. [optional] # noqa: E501 - width (int): The width in pixels of this form field.. [optional] # noqa: E501 - height (int): The height in pixels of this form field.. [optional] # noqa: E501 - required (bool): Boolean showing whether or not this field is required.. [optional] # noqa: E501 - group (str, none_type): The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.. [optional] # noqa: E501 - """ - - type = kwargs.get('type', "dropdown") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TemplateResponseDocumentFormFieldDropdown - a model defined in OpenAPI - - Keyword Args: - type (str): 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`. defaults to "dropdown" # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - api_id (str): A unique id for the form field.. [optional] # noqa: E501 - name (str): The name of the form field.. [optional] # noqa: E501 - signer (str): The signer of the Form Field.. [optional] # noqa: E501 - x (int): The horizontal offset in pixels for this form field.. [optional] # noqa: E501 - y (int): The vertical offset in pixels for this form field.. [optional] # noqa: E501 - width (int): The width in pixels of this form field.. [optional] # noqa: E501 - height (int): The height in pixels of this form field.. [optional] # noqa: E501 - required (bool): Boolean showing whether or not this field is required.. [optional] # noqa: E501 - group (str, none_type): The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.. [optional] # noqa: E501 - """ - - type = kwargs.get('type', "dropdown") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'oneOf': [ - ], - } diff --git a/sdks/python/dropbox_sign/model/template_response_document_form_field_hyperlink.py b/sdks/python/dropbox_sign/model/template_response_document_form_field_hyperlink.py deleted file mode 100644 index 5ebb3bfc9..000000000 --- a/sdks/python/dropbox_sign/model/template_response_document_form_field_hyperlink.py +++ /dev/null @@ -1,499 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.template_response_document_form_field_base import TemplateResponseDocumentFormFieldBase - from dropbox_sign.model.template_response_field_avg_text_length import TemplateResponseFieldAvgTextLength - - -def lazy_import(): - from dropbox_sign.model.template_response_document_form_field_base import TemplateResponseDocumentFormFieldBase - from dropbox_sign.model.template_response_field_avg_text_length import TemplateResponseFieldAvgTextLength - globals()['TemplateResponseDocumentFormFieldBase'] = TemplateResponseDocumentFormFieldBase - globals()['TemplateResponseFieldAvgTextLength'] = TemplateResponseFieldAvgTextLength - - -class TemplateResponseDocumentFormFieldHyperlink(ModelComposed): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'type': (str,), # noqa: E501 - 'avg_text_length': (TemplateResponseFieldAvgTextLength,), # noqa: E501 - 'is_multiline': (bool,), # noqa: E501 - 'original_font_size': (int,), # noqa: E501 - 'font_family': (str,), # noqa: E501 - 'api_id': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'signer': (str,), # noqa: E501 - 'x': (int,), # noqa: E501 - 'y': (int,), # noqa: E501 - 'width': (int,), # noqa: E501 - 'height': (int,), # noqa: E501 - 'required': (bool,), # noqa: E501 - 'group': (str, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> TemplateResponseDocumentFormFieldHyperlink: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[TemplateResponseDocumentFormFieldHyperlink], - _check_type=True, - ) - - - attribute_map = { - 'type': 'type', # noqa: E501 - 'avg_text_length': 'avg_text_length', # noqa: E501 - 'is_multiline': 'isMultiline', # noqa: E501 - 'original_font_size': 'originalFontSize', # noqa: E501 - 'font_family': 'fontFamily', # noqa: E501 - 'api_id': 'api_id', # noqa: E501 - 'name': 'name', # noqa: E501 - 'signer': 'signer', # noqa: E501 - 'x': 'x', # noqa: E501 - 'y': 'y', # noqa: E501 - 'width': 'width', # noqa: E501 - 'height': 'height', # noqa: E501 - 'required': 'required', # noqa: E501 - 'group': 'group', # noqa: E501 - } - - read_only_vars = { - } - - @property - def type(self) -> str: - return self.get("type") - - @type.setter - def type(self, value: str): - setattr(self, "type", value) - - @property - def avg_text_length(self) -> TemplateResponseFieldAvgTextLength: - return self.get("avg_text_length") - - @avg_text_length.setter - def avg_text_length(self, value: TemplateResponseFieldAvgTextLength): - setattr(self, "avg_text_length", value) - - @property - def is_multiline(self) -> bool: - return self.get("is_multiline") - - @is_multiline.setter - def is_multiline(self, value: bool): - setattr(self, "is_multiline", value) - - @property - def original_font_size(self) -> int: - return self.get("original_font_size") - - @original_font_size.setter - def original_font_size(self, value: int): - setattr(self, "original_font_size", value) - - @property - def font_family(self) -> str: - return self.get("font_family") - - @font_family.setter - def font_family(self, value: str): - setattr(self, "font_family", value) - - @property - def api_id(self) -> str: - return self.get("api_id") - - @api_id.setter - def api_id(self, value: str): - setattr(self, "api_id", value) - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def signer(self) -> str: - return self.get("signer") - - @signer.setter - def signer(self, value: str): - setattr(self, "signer", value) - - @property - def x(self) -> int: - return self.get("x") - - @x.setter - def x(self, value: int): - setattr(self, "x", value) - - @property - def y(self) -> int: - return self.get("y") - - @y.setter - def y(self, value: int): - setattr(self, "y", value) - - @property - def width(self) -> int: - return self.get("width") - - @width.setter - def width(self, value: int): - setattr(self, "width", value) - - @property - def height(self) -> int: - return self.get("height") - - @height.setter - def height(self, value: int): - setattr(self, "height", value) - - @property - def required(self) -> bool: - return self.get("required") - - @required.setter - def required(self, value: bool): - setattr(self, "required", value) - - @property - def group(self) -> Optional[str]: - return self.get("group") - - @group.setter - def group(self, value: Optional[str]): - setattr(self, "group", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TemplateResponseDocumentFormFieldHyperlink - a model defined in OpenAPI - - Keyword Args: - type (str): 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`. defaults to "hyperlink" # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - avg_text_length (TemplateResponseFieldAvgTextLength): [optional] # noqa: E501 - is_multiline (bool): Whether this form field is multiline text.. [optional] # noqa: E501 - original_font_size (int): Original font size used in this form field's text.. [optional] # noqa: E501 - font_family (str): Font family used in this form field's text.. [optional] # noqa: E501 - api_id (str): A unique id for the form field.. [optional] # noqa: E501 - name (str): The name of the form field.. [optional] # noqa: E501 - signer (str): The signer of the Form Field.. [optional] # noqa: E501 - x (int): The horizontal offset in pixels for this form field.. [optional] # noqa: E501 - y (int): The vertical offset in pixels for this form field.. [optional] # noqa: E501 - width (int): The width in pixels of this form field.. [optional] # noqa: E501 - height (int): The height in pixels of this form field.. [optional] # noqa: E501 - required (bool): Boolean showing whether or not this field is required.. [optional] # noqa: E501 - group (str, none_type): The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.. [optional] # noqa: E501 - """ - - type = kwargs.get('type', "hyperlink") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TemplateResponseDocumentFormFieldHyperlink - a model defined in OpenAPI - - Keyword Args: - type (str): 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`. defaults to "hyperlink" # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - avg_text_length (TemplateResponseFieldAvgTextLength): [optional] # noqa: E501 - is_multiline (bool): Whether this form field is multiline text.. [optional] # noqa: E501 - original_font_size (int): Original font size used in this form field's text.. [optional] # noqa: E501 - font_family (str): Font family used in this form field's text.. [optional] # noqa: E501 - api_id (str): A unique id for the form field.. [optional] # noqa: E501 - name (str): The name of the form field.. [optional] # noqa: E501 - signer (str): The signer of the Form Field.. [optional] # noqa: E501 - x (int): The horizontal offset in pixels for this form field.. [optional] # noqa: E501 - y (int): The vertical offset in pixels for this form field.. [optional] # noqa: E501 - width (int): The width in pixels of this form field.. [optional] # noqa: E501 - height (int): The height in pixels of this form field.. [optional] # noqa: E501 - required (bool): Boolean showing whether or not this field is required.. [optional] # noqa: E501 - group (str, none_type): The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.. [optional] # noqa: E501 - """ - - type = kwargs.get('type', "hyperlink") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'oneOf': [ - ], - } diff --git a/sdks/python/dropbox_sign/model/template_response_document_form_field_initials.py b/sdks/python/dropbox_sign/model/template_response_document_form_field_initials.py deleted file mode 100644 index 4d7771f35..000000000 --- a/sdks/python/dropbox_sign/model/template_response_document_form_field_initials.py +++ /dev/null @@ -1,448 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.template_response_document_form_field_base import TemplateResponseDocumentFormFieldBase - - -def lazy_import(): - from dropbox_sign.model.template_response_document_form_field_base import TemplateResponseDocumentFormFieldBase - globals()['TemplateResponseDocumentFormFieldBase'] = TemplateResponseDocumentFormFieldBase - - -class TemplateResponseDocumentFormFieldInitials(ModelComposed): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'type': (str,), # noqa: E501 - 'api_id': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'signer': (str,), # noqa: E501 - 'x': (int,), # noqa: E501 - 'y': (int,), # noqa: E501 - 'width': (int,), # noqa: E501 - 'height': (int,), # noqa: E501 - 'required': (bool,), # noqa: E501 - 'group': (str, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> TemplateResponseDocumentFormFieldInitials: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[TemplateResponseDocumentFormFieldInitials], - _check_type=True, - ) - - - attribute_map = { - 'type': 'type', # noqa: E501 - 'api_id': 'api_id', # noqa: E501 - 'name': 'name', # noqa: E501 - 'signer': 'signer', # noqa: E501 - 'x': 'x', # noqa: E501 - 'y': 'y', # noqa: E501 - 'width': 'width', # noqa: E501 - 'height': 'height', # noqa: E501 - 'required': 'required', # noqa: E501 - 'group': 'group', # noqa: E501 - } - - read_only_vars = { - } - - @property - def type(self) -> str: - return self.get("type") - - @type.setter - def type(self, value: str): - setattr(self, "type", value) - - @property - def api_id(self) -> str: - return self.get("api_id") - - @api_id.setter - def api_id(self, value: str): - setattr(self, "api_id", value) - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def signer(self) -> str: - return self.get("signer") - - @signer.setter - def signer(self, value: str): - setattr(self, "signer", value) - - @property - def x(self) -> int: - return self.get("x") - - @x.setter - def x(self, value: int): - setattr(self, "x", value) - - @property - def y(self) -> int: - return self.get("y") - - @y.setter - def y(self, value: int): - setattr(self, "y", value) - - @property - def width(self) -> int: - return self.get("width") - - @width.setter - def width(self, value: int): - setattr(self, "width", value) - - @property - def height(self) -> int: - return self.get("height") - - @height.setter - def height(self, value: int): - setattr(self, "height", value) - - @property - def required(self) -> bool: - return self.get("required") - - @required.setter - def required(self, value: bool): - setattr(self, "required", value) - - @property - def group(self) -> Optional[str]: - return self.get("group") - - @group.setter - def group(self, value: Optional[str]): - setattr(self, "group", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TemplateResponseDocumentFormFieldInitials - a model defined in OpenAPI - - Keyword Args: - type (str): 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`. defaults to "initials" # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - api_id (str): A unique id for the form field.. [optional] # noqa: E501 - name (str): The name of the form field.. [optional] # noqa: E501 - signer (str): The signer of the Form Field.. [optional] # noqa: E501 - x (int): The horizontal offset in pixels for this form field.. [optional] # noqa: E501 - y (int): The vertical offset in pixels for this form field.. [optional] # noqa: E501 - width (int): The width in pixels of this form field.. [optional] # noqa: E501 - height (int): The height in pixels of this form field.. [optional] # noqa: E501 - required (bool): Boolean showing whether or not this field is required.. [optional] # noqa: E501 - group (str, none_type): The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.. [optional] # noqa: E501 - """ - - type = kwargs.get('type', "initials") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TemplateResponseDocumentFormFieldInitials - a model defined in OpenAPI - - Keyword Args: - type (str): 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`. defaults to "initials" # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - api_id (str): A unique id for the form field.. [optional] # noqa: E501 - name (str): The name of the form field.. [optional] # noqa: E501 - signer (str): The signer of the Form Field.. [optional] # noqa: E501 - x (int): The horizontal offset in pixels for this form field.. [optional] # noqa: E501 - y (int): The vertical offset in pixels for this form field.. [optional] # noqa: E501 - width (int): The width in pixels of this form field.. [optional] # noqa: E501 - height (int): The height in pixels of this form field.. [optional] # noqa: E501 - required (bool): Boolean showing whether or not this field is required.. [optional] # noqa: E501 - group (str, none_type): The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.. [optional] # noqa: E501 - """ - - type = kwargs.get('type', "initials") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'oneOf': [ - ], - } diff --git a/sdks/python/dropbox_sign/model/template_response_document_form_field_radio.py b/sdks/python/dropbox_sign/model/template_response_document_form_field_radio.py deleted file mode 100644 index ef0c4b4ae..000000000 --- a/sdks/python/dropbox_sign/model/template_response_document_form_field_radio.py +++ /dev/null @@ -1,448 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.template_response_document_form_field_base import TemplateResponseDocumentFormFieldBase - - -def lazy_import(): - from dropbox_sign.model.template_response_document_form_field_base import TemplateResponseDocumentFormFieldBase - globals()['TemplateResponseDocumentFormFieldBase'] = TemplateResponseDocumentFormFieldBase - - -class TemplateResponseDocumentFormFieldRadio(ModelComposed): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'type': (str,), # noqa: E501 - 'group': (str, none_type,), # noqa: E501 - 'api_id': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'signer': (str,), # noqa: E501 - 'x': (int,), # noqa: E501 - 'y': (int,), # noqa: E501 - 'width': (int,), # noqa: E501 - 'height': (int,), # noqa: E501 - 'required': (bool,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> TemplateResponseDocumentFormFieldRadio: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[TemplateResponseDocumentFormFieldRadio], - _check_type=True, - ) - - - attribute_map = { - 'type': 'type', # noqa: E501 - 'group': 'group', # noqa: E501 - 'api_id': 'api_id', # noqa: E501 - 'name': 'name', # noqa: E501 - 'signer': 'signer', # noqa: E501 - 'x': 'x', # noqa: E501 - 'y': 'y', # noqa: E501 - 'width': 'width', # noqa: E501 - 'height': 'height', # noqa: E501 - 'required': 'required', # noqa: E501 - } - - read_only_vars = { - } - - @property - def type(self) -> str: - return self.get("type") - - @type.setter - def type(self, value: str): - setattr(self, "type", value) - - @property - def group(self) -> Optional[str]: - return self.get("group") - - @group.setter - def group(self, value: Optional[str]): - setattr(self, "group", value) - - @property - def api_id(self) -> str: - return self.get("api_id") - - @api_id.setter - def api_id(self, value: str): - setattr(self, "api_id", value) - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def signer(self) -> str: - return self.get("signer") - - @signer.setter - def signer(self, value: str): - setattr(self, "signer", value) - - @property - def x(self) -> int: - return self.get("x") - - @x.setter - def x(self, value: int): - setattr(self, "x", value) - - @property - def y(self) -> int: - return self.get("y") - - @y.setter - def y(self, value: int): - setattr(self, "y", value) - - @property - def width(self) -> int: - return self.get("width") - - @width.setter - def width(self, value: int): - setattr(self, "width", value) - - @property - def height(self) -> int: - return self.get("height") - - @height.setter - def height(self, value: int): - setattr(self, "height", value) - - @property - def required(self) -> bool: - return self.get("required") - - @required.setter - def required(self, value: bool): - setattr(self, "required", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TemplateResponseDocumentFormFieldRadio - a model defined in OpenAPI - - Keyword Args: - type (str): 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`. defaults to "radio" # noqa: E501 - group (str, none_type): The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - api_id (str): A unique id for the form field.. [optional] # noqa: E501 - name (str): The name of the form field.. [optional] # noqa: E501 - signer (str): The signer of the Form Field.. [optional] # noqa: E501 - x (int): The horizontal offset in pixels for this form field.. [optional] # noqa: E501 - y (int): The vertical offset in pixels for this form field.. [optional] # noqa: E501 - width (int): The width in pixels of this form field.. [optional] # noqa: E501 - height (int): The height in pixels of this form field.. [optional] # noqa: E501 - required (bool): Boolean showing whether or not this field is required.. [optional] # noqa: E501 - """ - - type = kwargs.get('type', "radio") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TemplateResponseDocumentFormFieldRadio - a model defined in OpenAPI - - Keyword Args: - type (str): 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`. defaults to "radio" # noqa: E501 - group (str, none_type): The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - api_id (str): A unique id for the form field.. [optional] # noqa: E501 - name (str): The name of the form field.. [optional] # noqa: E501 - signer (str): The signer of the Form Field.. [optional] # noqa: E501 - x (int): The horizontal offset in pixels for this form field.. [optional] # noqa: E501 - y (int): The vertical offset in pixels for this form field.. [optional] # noqa: E501 - width (int): The width in pixels of this form field.. [optional] # noqa: E501 - height (int): The height in pixels of this form field.. [optional] # noqa: E501 - required (bool): Boolean showing whether or not this field is required.. [optional] # noqa: E501 - """ - - type = kwargs.get('type', "radio") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'oneOf': [ - ], - } diff --git a/sdks/python/dropbox_sign/model/template_response_document_form_field_signature.py b/sdks/python/dropbox_sign/model/template_response_document_form_field_signature.py deleted file mode 100644 index 3d58e79ed..000000000 --- a/sdks/python/dropbox_sign/model/template_response_document_form_field_signature.py +++ /dev/null @@ -1,448 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.template_response_document_form_field_base import TemplateResponseDocumentFormFieldBase - - -def lazy_import(): - from dropbox_sign.model.template_response_document_form_field_base import TemplateResponseDocumentFormFieldBase - globals()['TemplateResponseDocumentFormFieldBase'] = TemplateResponseDocumentFormFieldBase - - -class TemplateResponseDocumentFormFieldSignature(ModelComposed): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'type': (str,), # noqa: E501 - 'api_id': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'signer': (str,), # noqa: E501 - 'x': (int,), # noqa: E501 - 'y': (int,), # noqa: E501 - 'width': (int,), # noqa: E501 - 'height': (int,), # noqa: E501 - 'required': (bool,), # noqa: E501 - 'group': (str, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> TemplateResponseDocumentFormFieldSignature: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[TemplateResponseDocumentFormFieldSignature], - _check_type=True, - ) - - - attribute_map = { - 'type': 'type', # noqa: E501 - 'api_id': 'api_id', # noqa: E501 - 'name': 'name', # noqa: E501 - 'signer': 'signer', # noqa: E501 - 'x': 'x', # noqa: E501 - 'y': 'y', # noqa: E501 - 'width': 'width', # noqa: E501 - 'height': 'height', # noqa: E501 - 'required': 'required', # noqa: E501 - 'group': 'group', # noqa: E501 - } - - read_only_vars = { - } - - @property - def type(self) -> str: - return self.get("type") - - @type.setter - def type(self, value: str): - setattr(self, "type", value) - - @property - def api_id(self) -> str: - return self.get("api_id") - - @api_id.setter - def api_id(self, value: str): - setattr(self, "api_id", value) - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def signer(self) -> str: - return self.get("signer") - - @signer.setter - def signer(self, value: str): - setattr(self, "signer", value) - - @property - def x(self) -> int: - return self.get("x") - - @x.setter - def x(self, value: int): - setattr(self, "x", value) - - @property - def y(self) -> int: - return self.get("y") - - @y.setter - def y(self, value: int): - setattr(self, "y", value) - - @property - def width(self) -> int: - return self.get("width") - - @width.setter - def width(self, value: int): - setattr(self, "width", value) - - @property - def height(self) -> int: - return self.get("height") - - @height.setter - def height(self, value: int): - setattr(self, "height", value) - - @property - def required(self) -> bool: - return self.get("required") - - @required.setter - def required(self, value: bool): - setattr(self, "required", value) - - @property - def group(self) -> Optional[str]: - return self.get("group") - - @group.setter - def group(self, value: Optional[str]): - setattr(self, "group", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TemplateResponseDocumentFormFieldSignature - a model defined in OpenAPI - - Keyword Args: - type (str): 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`. defaults to "signature" # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - api_id (str): A unique id for the form field.. [optional] # noqa: E501 - name (str): The name of the form field.. [optional] # noqa: E501 - signer (str): The signer of the Form Field.. [optional] # noqa: E501 - x (int): The horizontal offset in pixels for this form field.. [optional] # noqa: E501 - y (int): The vertical offset in pixels for this form field.. [optional] # noqa: E501 - width (int): The width in pixels of this form field.. [optional] # noqa: E501 - height (int): The height in pixels of this form field.. [optional] # noqa: E501 - required (bool): Boolean showing whether or not this field is required.. [optional] # noqa: E501 - group (str, none_type): The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.. [optional] # noqa: E501 - """ - - type = kwargs.get('type', "signature") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TemplateResponseDocumentFormFieldSignature - a model defined in OpenAPI - - Keyword Args: - type (str): 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`. defaults to "signature" # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - api_id (str): A unique id for the form field.. [optional] # noqa: E501 - name (str): The name of the form field.. [optional] # noqa: E501 - signer (str): The signer of the Form Field.. [optional] # noqa: E501 - x (int): The horizontal offset in pixels for this form field.. [optional] # noqa: E501 - y (int): The vertical offset in pixels for this form field.. [optional] # noqa: E501 - width (int): The width in pixels of this form field.. [optional] # noqa: E501 - height (int): The height in pixels of this form field.. [optional] # noqa: E501 - required (bool): Boolean showing whether or not this field is required.. [optional] # noqa: E501 - group (str, none_type): The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.. [optional] # noqa: E501 - """ - - type = kwargs.get('type', "signature") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'oneOf': [ - ], - } diff --git a/sdks/python/dropbox_sign/model/template_response_document_form_field_text.py b/sdks/python/dropbox_sign/model/template_response_document_form_field_text.py deleted file mode 100644 index 7487e8bce..000000000 --- a/sdks/python/dropbox_sign/model/template_response_document_form_field_text.py +++ /dev/null @@ -1,524 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.template_response_document_form_field_base import TemplateResponseDocumentFormFieldBase - from dropbox_sign.model.template_response_field_avg_text_length import TemplateResponseFieldAvgTextLength - - -def lazy_import(): - from dropbox_sign.model.template_response_document_form_field_base import TemplateResponseDocumentFormFieldBase - from dropbox_sign.model.template_response_field_avg_text_length import TemplateResponseFieldAvgTextLength - globals()['TemplateResponseDocumentFormFieldBase'] = TemplateResponseDocumentFormFieldBase - globals()['TemplateResponseFieldAvgTextLength'] = TemplateResponseFieldAvgTextLength - - -class TemplateResponseDocumentFormFieldText(ModelComposed): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('validation_type',): { - 'None': None, - 'NUMBERS_ONLY': "numbers_only", - 'LETTERS_ONLY': "letters_only", - 'PHONE_NUMBER': "phone_number", - 'BANK_ROUTING_NUMBER': "bank_routing_number", - 'BANK_ACCOUNT_NUMBER': "bank_account_number", - 'EMAIL_ADDRESS': "email_address", - 'ZIP_CODE': "zip_code", - 'SOCIAL_SECURITY_NUMBER': "social_security_number", - 'EMPLOYER_IDENTIFICATION_NUMBER': "employer_identification_number", - 'CUSTOM_REGEX': "custom_regex", - }, - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'type': (str,), # noqa: E501 - 'avg_text_length': (TemplateResponseFieldAvgTextLength,), # noqa: E501 - 'is_multiline': (bool,), # noqa: E501 - 'original_font_size': (int,), # noqa: E501 - 'font_family': (str,), # noqa: E501 - 'validation_type': (str, none_type,), # noqa: E501 - 'api_id': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'signer': (str,), # noqa: E501 - 'x': (int,), # noqa: E501 - 'y': (int,), # noqa: E501 - 'width': (int,), # noqa: E501 - 'height': (int,), # noqa: E501 - 'required': (bool,), # noqa: E501 - 'group': (str, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> TemplateResponseDocumentFormFieldText: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[TemplateResponseDocumentFormFieldText], - _check_type=True, - ) - - - attribute_map = { - 'type': 'type', # noqa: E501 - 'avg_text_length': 'avg_text_length', # noqa: E501 - 'is_multiline': 'isMultiline', # noqa: E501 - 'original_font_size': 'originalFontSize', # noqa: E501 - 'font_family': 'fontFamily', # noqa: E501 - 'validation_type': 'validation_type', # noqa: E501 - 'api_id': 'api_id', # noqa: E501 - 'name': 'name', # noqa: E501 - 'signer': 'signer', # noqa: E501 - 'x': 'x', # noqa: E501 - 'y': 'y', # noqa: E501 - 'width': 'width', # noqa: E501 - 'height': 'height', # noqa: E501 - 'required': 'required', # noqa: E501 - 'group': 'group', # noqa: E501 - } - - read_only_vars = { - } - - @property - def type(self) -> str: - return self.get("type") - - @type.setter - def type(self, value: str): - setattr(self, "type", value) - - @property - def avg_text_length(self) -> TemplateResponseFieldAvgTextLength: - return self.get("avg_text_length") - - @avg_text_length.setter - def avg_text_length(self, value: TemplateResponseFieldAvgTextLength): - setattr(self, "avg_text_length", value) - - @property - def is_multiline(self) -> bool: - return self.get("is_multiline") - - @is_multiline.setter - def is_multiline(self, value: bool): - setattr(self, "is_multiline", value) - - @property - def original_font_size(self) -> int: - return self.get("original_font_size") - - @original_font_size.setter - def original_font_size(self, value: int): - setattr(self, "original_font_size", value) - - @property - def font_family(self) -> str: - return self.get("font_family") - - @font_family.setter - def font_family(self, value: str): - setattr(self, "font_family", value) - - @property - def validation_type(self) -> Optional[str]: - return self.get("validation_type") - - @validation_type.setter - def validation_type(self, value: Optional[str]): - setattr(self, "validation_type", value) - - @property - def api_id(self) -> str: - return self.get("api_id") - - @api_id.setter - def api_id(self, value: str): - setattr(self, "api_id", value) - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def signer(self) -> str: - return self.get("signer") - - @signer.setter - def signer(self, value: str): - setattr(self, "signer", value) - - @property - def x(self) -> int: - return self.get("x") - - @x.setter - def x(self, value: int): - setattr(self, "x", value) - - @property - def y(self) -> int: - return self.get("y") - - @y.setter - def y(self, value: int): - setattr(self, "y", value) - - @property - def width(self) -> int: - return self.get("width") - - @width.setter - def width(self, value: int): - setattr(self, "width", value) - - @property - def height(self) -> int: - return self.get("height") - - @height.setter - def height(self, value: int): - setattr(self, "height", value) - - @property - def required(self) -> bool: - return self.get("required") - - @required.setter - def required(self, value: bool): - setattr(self, "required", value) - - @property - def group(self) -> Optional[str]: - return self.get("group") - - @group.setter - def group(self, value: Optional[str]): - setattr(self, "group", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TemplateResponseDocumentFormFieldText - a model defined in OpenAPI - - Keyword Args: - type (str): 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`. defaults to "text" # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - avg_text_length (TemplateResponseFieldAvgTextLength): [optional] # noqa: E501 - is_multiline (bool): Whether this form field is multiline text.. [optional] # noqa: E501 - original_font_size (int): Original font size used in this form field's text.. [optional] # noqa: E501 - font_family (str): Font family used in this form field's text.. [optional] # noqa: E501 - validation_type (str, none_type): 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.. [optional] # noqa: E501 - api_id (str): A unique id for the form field.. [optional] # noqa: E501 - name (str): The name of the form field.. [optional] # noqa: E501 - signer (str): The signer of the Form Field.. [optional] # noqa: E501 - x (int): The horizontal offset in pixels for this form field.. [optional] # noqa: E501 - y (int): The vertical offset in pixels for this form field.. [optional] # noqa: E501 - width (int): The width in pixels of this form field.. [optional] # noqa: E501 - height (int): The height in pixels of this form field.. [optional] # noqa: E501 - required (bool): Boolean showing whether or not this field is required.. [optional] # noqa: E501 - group (str, none_type): The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.. [optional] # noqa: E501 - """ - - type = kwargs.get('type', "text") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TemplateResponseDocumentFormFieldText - a model defined in OpenAPI - - Keyword Args: - type (str): 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`. defaults to "text" # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - avg_text_length (TemplateResponseFieldAvgTextLength): [optional] # noqa: E501 - is_multiline (bool): Whether this form field is multiline text.. [optional] # noqa: E501 - original_font_size (int): Original font size used in this form field's text.. [optional] # noqa: E501 - font_family (str): Font family used in this form field's text.. [optional] # noqa: E501 - validation_type (str, none_type): 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.. [optional] # noqa: E501 - api_id (str): A unique id for the form field.. [optional] # noqa: E501 - name (str): The name of the form field.. [optional] # noqa: E501 - signer (str): The signer of the Form Field.. [optional] # noqa: E501 - x (int): The horizontal offset in pixels for this form field.. [optional] # noqa: E501 - y (int): The vertical offset in pixels for this form field.. [optional] # noqa: E501 - width (int): The width in pixels of this form field.. [optional] # noqa: E501 - height (int): The height in pixels of this form field.. [optional] # noqa: E501 - required (bool): Boolean showing whether or not this field is required.. [optional] # noqa: E501 - group (str, none_type): The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.. [optional] # noqa: E501 - """ - - type = kwargs.get('type', "text") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'oneOf': [ - ], - } diff --git a/sdks/python/dropbox_sign/model/template_response_document_static_field.py b/sdks/python/dropbox_sign/model/template_response_document_static_field.py deleted file mode 100644 index 1339f042b..000000000 --- a/sdks/python/dropbox_sign/model/template_response_document_static_field.py +++ /dev/null @@ -1,391 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 - -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class TemplateResponseDocumentStaticField(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'name': (str,), # noqa: E501 - 'type': (str,), # noqa: E501 - 'signer': (str,), # noqa: E501 - 'x': (int,), # noqa: E501 - 'y': (int,), # noqa: E501 - 'width': (int,), # noqa: E501 - 'height': (int,), # noqa: E501 - 'required': (bool,), # noqa: E501 - 'api_id': (str,), # noqa: E501 - 'group': (str, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> TemplateResponseDocumentStaticField: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[TemplateResponseDocumentStaticField], - _check_type=True, - ) - - attribute_map = { - 'name': 'name', # noqa: E501 - 'type': 'type', # noqa: E501 - 'signer': 'signer', # noqa: E501 - 'x': 'x', # noqa: E501 - 'y': 'y', # noqa: E501 - 'width': 'width', # noqa: E501 - 'height': 'height', # noqa: E501 - 'required': 'required', # noqa: E501 - 'api_id': 'api_id', # noqa: E501 - 'group': 'group', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def type(self) -> str: - return self.get("type") - - @type.setter - def type(self, value: str): - setattr(self, "type", value) - - @property - def signer(self) -> str: - return self.get("signer") - - @signer.setter - def signer(self, value: str): - setattr(self, "signer", value) - - @property - def x(self) -> int: - return self.get("x") - - @x.setter - def x(self, value: int): - setattr(self, "x", value) - - @property - def y(self) -> int: - return self.get("y") - - @y.setter - def y(self, value: int): - setattr(self, "y", value) - - @property - def width(self) -> int: - return self.get("width") - - @width.setter - def width(self, value: int): - setattr(self, "width", value) - - @property - def height(self) -> int: - return self.get("height") - - @height.setter - def height(self, value: int): - setattr(self, "height", value) - - @property - def required(self) -> bool: - return self.get("required") - - @required.setter - def required(self, value: bool): - setattr(self, "required", value) - - @property - def api_id(self) -> str: - return self.get("api_id") - - @api_id.setter - def api_id(self, value: str): - setattr(self, "api_id", value) - - @property - def group(self) -> Optional[str]: - return self.get("group") - - @group.setter - def group(self, value: Optional[str]): - setattr(self, "group", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TemplateResponseDocumentStaticField - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - name (str): The name of the static field.. [optional] # noqa: E501 - type (str): The type of this static field. See [field types](/api/reference/constants/#field-types).. [optional] # noqa: E501 - signer (str): The signer of the Static Field.. [optional] # noqa: E501 - x (int): The horizontal offset in pixels for this static field.. [optional] # noqa: E501 - y (int): The vertical offset in pixels for this static field.. [optional] # noqa: E501 - width (int): The width in pixels of this static field.. [optional] # noqa: E501 - height (int): The height in pixels of this static field.. [optional] # noqa: E501 - required (bool): Boolean showing whether or not this field is required.. [optional] # noqa: E501 - api_id (str): A unique id for the static field.. [optional] # noqa: E501 - group (str, none_type): The name of the group this field is in. If this field is not a group, this defaults to `null`.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TemplateResponseDocumentStaticField - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - name (str): The name of the static field.. [optional] # noqa: E501 - type (str): The type of this static field. See [field types](/api/reference/constants/#field-types).. [optional] # noqa: E501 - signer (str): The signer of the Static Field.. [optional] # noqa: E501 - x (int): The horizontal offset in pixels for this static field.. [optional] # noqa: E501 - y (int): The vertical offset in pixels for this static field.. [optional] # noqa: E501 - width (int): The width in pixels of this static field.. [optional] # noqa: E501 - height (int): The height in pixels of this static field.. [optional] # noqa: E501 - required (bool): Boolean showing whether or not this field is required.. [optional] # noqa: E501 - api_id (str): A unique id for the static field.. [optional] # noqa: E501 - group (str, none_type): The name of the group this field is in. If this field is not a group, this defaults to `null`.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/template_response_document_static_field_base.py b/sdks/python/dropbox_sign/model/template_response_document_static_field_base.py deleted file mode 100644 index b1c092e1e..000000000 --- a/sdks/python/dropbox_sign/model/template_response_document_static_field_base.py +++ /dev/null @@ -1,424 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - -if TYPE_CHECKING: - from dropbox_sign.models import TemplateResponseDocumentStaticFieldCheckbox - from dropbox_sign.models import TemplateResponseDocumentStaticFieldDateSigned - from dropbox_sign.models import TemplateResponseDocumentStaticFieldDropdown - from dropbox_sign.models import TemplateResponseDocumentStaticFieldHyperlink - from dropbox_sign.models import TemplateResponseDocumentStaticFieldInitials - from dropbox_sign.models import TemplateResponseDocumentStaticFieldRadio - from dropbox_sign.models import TemplateResponseDocumentStaticFieldSignature - from dropbox_sign.models import TemplateResponseDocumentStaticFieldText - - -def lazy_import(): - from dropbox_sign.models import TemplateResponseDocumentStaticFieldCheckbox - from dropbox_sign.models import TemplateResponseDocumentStaticFieldDateSigned - from dropbox_sign.models import TemplateResponseDocumentStaticFieldDropdown - from dropbox_sign.models import TemplateResponseDocumentStaticFieldHyperlink - from dropbox_sign.models import TemplateResponseDocumentStaticFieldInitials - from dropbox_sign.models import TemplateResponseDocumentStaticFieldRadio - from dropbox_sign.models import TemplateResponseDocumentStaticFieldSignature - from dropbox_sign.models import TemplateResponseDocumentStaticFieldText - globals()['TemplateResponseDocumentStaticFieldCheckbox'] = TemplateResponseDocumentStaticFieldCheckbox - globals()['TemplateResponseDocumentStaticFieldDateSigned'] = TemplateResponseDocumentStaticFieldDateSigned - globals()['TemplateResponseDocumentStaticFieldDropdown'] = TemplateResponseDocumentStaticFieldDropdown - globals()['TemplateResponseDocumentStaticFieldHyperlink'] = TemplateResponseDocumentStaticFieldHyperlink - globals()['TemplateResponseDocumentStaticFieldInitials'] = TemplateResponseDocumentStaticFieldInitials - globals()['TemplateResponseDocumentStaticFieldRadio'] = TemplateResponseDocumentStaticFieldRadio - globals()['TemplateResponseDocumentStaticFieldSignature'] = TemplateResponseDocumentStaticFieldSignature - globals()['TemplateResponseDocumentStaticFieldText'] = TemplateResponseDocumentStaticFieldText - - -class TemplateResponseDocumentStaticFieldBase(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'type': (str,), # noqa: E501 - 'api_id': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'signer': (str,), # noqa: E501 - 'x': (int,), # noqa: E501 - 'y': (int,), # noqa: E501 - 'width': (int,), # noqa: E501 - 'height': (int,), # noqa: E501 - 'required': (bool,), # noqa: E501 - 'group': (str, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - lazy_import() - val = { - 'checkbox': TemplateResponseDocumentStaticFieldCheckbox, - 'date_signed': TemplateResponseDocumentStaticFieldDateSigned, - 'dropdown': TemplateResponseDocumentStaticFieldDropdown, - 'hyperlink': TemplateResponseDocumentStaticFieldHyperlink, - 'initials': TemplateResponseDocumentStaticFieldInitials, - 'radio': TemplateResponseDocumentStaticFieldRadio, - 'signature': TemplateResponseDocumentStaticFieldSignature, - 'text': TemplateResponseDocumentStaticFieldText, - } - if not val: - return None - return {'type': val} - - - attribute_map = { - 'type': 'type', # noqa: E501 - 'api_id': 'api_id', # noqa: E501 - 'name': 'name', # noqa: E501 - 'signer': 'signer', # noqa: E501 - 'x': 'x', # noqa: E501 - 'y': 'y', # noqa: E501 - 'width': 'width', # noqa: E501 - 'height': 'height', # noqa: E501 - 'required': 'required', # noqa: E501 - 'group': 'group', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def type(self) -> str: - return self.get("type") - - @type.setter - def type(self, value: str): - setattr(self, "type", value) - - @property - def api_id(self) -> str: - return self.get("api_id") - - @api_id.setter - def api_id(self, value: str): - setattr(self, "api_id", value) - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def signer(self) -> str: - return self.get("signer") - - @signer.setter - def signer(self, value: str): - setattr(self, "signer", value) - - @property - def x(self) -> int: - return self.get("x") - - @x.setter - def x(self, value: int): - setattr(self, "x", value) - - @property - def y(self) -> int: - return self.get("y") - - @y.setter - def y(self, value: int): - setattr(self, "y", value) - - @property - def width(self) -> int: - return self.get("width") - - @width.setter - def width(self, value: int): - setattr(self, "width", value) - - @property - def height(self) -> int: - return self.get("height") - - @height.setter - def height(self, value: int): - setattr(self, "height", value) - - @property - def required(self) -> bool: - return self.get("required") - - @required.setter - def required(self, value: bool): - setattr(self, "required", value) - - @property - def group(self) -> Optional[str]: - return self.get("group") - - @group.setter - def group(self, value: Optional[str]): - setattr(self, "group", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, type, *args, **kwargs): # noqa: E501 - """TemplateResponseDocumentStaticFieldBase - a model defined in OpenAPI - - Args: - type (str): - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - api_id (str): A unique id for the static field.. [optional] # noqa: E501 - name (str): The name of the static field.. [optional] # noqa: E501 - signer (str): The signer of the Static Field.. [optional] if omitted the server will use the default value of "me_now" # noqa: E501 - x (int): The horizontal offset in pixels for this static field.. [optional] # noqa: E501 - y (int): The vertical offset in pixels for this static field.. [optional] # noqa: E501 - width (int): The width in pixels of this static field.. [optional] # noqa: E501 - height (int): The height in pixels of this static field.. [optional] # noqa: E501 - required (bool): Boolean showing whether or not this field is required.. [optional] # noqa: E501 - group (str, none_type): The name of the group this field is in. If this field is not a group, this defaults to `null`.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.type = type - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, type, *args, **kwargs): # noqa: E501 - """TemplateResponseDocumentStaticFieldBase - a model defined in OpenAPI - - Args: - type (str): - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - api_id (str): A unique id for the static field.. [optional] # noqa: E501 - name (str): The name of the static field.. [optional] # noqa: E501 - signer (str): The signer of the Static Field.. [optional] if omitted the server will use the default value of "me_now" # noqa: E501 - x (int): The horizontal offset in pixels for this static field.. [optional] # noqa: E501 - y (int): The vertical offset in pixels for this static field.. [optional] # noqa: E501 - width (int): The width in pixels of this static field.. [optional] # noqa: E501 - height (int): The height in pixels of this static field.. [optional] # noqa: E501 - required (bool): Boolean showing whether or not this field is required.. [optional] # noqa: E501 - group (str, none_type): The name of the group this field is in. If this field is not a group, this defaults to `null`.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.type = type - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/template_response_document_static_field_checkbox.py b/sdks/python/dropbox_sign/model/template_response_document_static_field_checkbox.py deleted file mode 100644 index 19a4cf297..000000000 --- a/sdks/python/dropbox_sign/model/template_response_document_static_field_checkbox.py +++ /dev/null @@ -1,448 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.template_response_document_static_field_base import TemplateResponseDocumentStaticFieldBase - - -def lazy_import(): - from dropbox_sign.model.template_response_document_static_field_base import TemplateResponseDocumentStaticFieldBase - globals()['TemplateResponseDocumentStaticFieldBase'] = TemplateResponseDocumentStaticFieldBase - - -class TemplateResponseDocumentStaticFieldCheckbox(ModelComposed): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'type': (str,), # noqa: E501 - 'api_id': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'signer': (str,), # noqa: E501 - 'x': (int,), # noqa: E501 - 'y': (int,), # noqa: E501 - 'width': (int,), # noqa: E501 - 'height': (int,), # noqa: E501 - 'required': (bool,), # noqa: E501 - 'group': (str, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> TemplateResponseDocumentStaticFieldCheckbox: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[TemplateResponseDocumentStaticFieldCheckbox], - _check_type=True, - ) - - - attribute_map = { - 'type': 'type', # noqa: E501 - 'api_id': 'api_id', # noqa: E501 - 'name': 'name', # noqa: E501 - 'signer': 'signer', # noqa: E501 - 'x': 'x', # noqa: E501 - 'y': 'y', # noqa: E501 - 'width': 'width', # noqa: E501 - 'height': 'height', # noqa: E501 - 'required': 'required', # noqa: E501 - 'group': 'group', # noqa: E501 - } - - read_only_vars = { - } - - @property - def type(self) -> str: - return self.get("type") - - @type.setter - def type(self, value: str): - setattr(self, "type", value) - - @property - def api_id(self) -> str: - return self.get("api_id") - - @api_id.setter - def api_id(self, value: str): - setattr(self, "api_id", value) - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def signer(self) -> str: - return self.get("signer") - - @signer.setter - def signer(self, value: str): - setattr(self, "signer", value) - - @property - def x(self) -> int: - return self.get("x") - - @x.setter - def x(self, value: int): - setattr(self, "x", value) - - @property - def y(self) -> int: - return self.get("y") - - @y.setter - def y(self, value: int): - setattr(self, "y", value) - - @property - def width(self) -> int: - return self.get("width") - - @width.setter - def width(self, value: int): - setattr(self, "width", value) - - @property - def height(self) -> int: - return self.get("height") - - @height.setter - def height(self, value: int): - setattr(self, "height", value) - - @property - def required(self) -> bool: - return self.get("required") - - @required.setter - def required(self, value: bool): - setattr(self, "required", value) - - @property - def group(self) -> Optional[str]: - return self.get("group") - - @group.setter - def group(self, value: Optional[str]): - setattr(self, "group", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TemplateResponseDocumentStaticFieldCheckbox - a model defined in OpenAPI - - Keyword Args: - type (str): 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`. defaults to "checkbox" # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - api_id (str): A unique id for the static field.. [optional] # noqa: E501 - name (str): The name of the static field.. [optional] # noqa: E501 - signer (str): The signer of the Static Field.. [optional] if omitted the server will use the default value of "me_now" # noqa: E501 - x (int): The horizontal offset in pixels for this static field.. [optional] # noqa: E501 - y (int): The vertical offset in pixels for this static field.. [optional] # noqa: E501 - width (int): The width in pixels of this static field.. [optional] # noqa: E501 - height (int): The height in pixels of this static field.. [optional] # noqa: E501 - required (bool): Boolean showing whether or not this field is required.. [optional] # noqa: E501 - group (str, none_type): The name of the group this field is in. If this field is not a group, this defaults to `null`.. [optional] # noqa: E501 - """ - - type = kwargs.get('type', "checkbox") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TemplateResponseDocumentStaticFieldCheckbox - a model defined in OpenAPI - - Keyword Args: - type (str): 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`. defaults to "checkbox" # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - api_id (str): A unique id for the static field.. [optional] # noqa: E501 - name (str): The name of the static field.. [optional] # noqa: E501 - signer (str): The signer of the Static Field.. [optional] if omitted the server will use the default value of "me_now" # noqa: E501 - x (int): The horizontal offset in pixels for this static field.. [optional] # noqa: E501 - y (int): The vertical offset in pixels for this static field.. [optional] # noqa: E501 - width (int): The width in pixels of this static field.. [optional] # noqa: E501 - height (int): The height in pixels of this static field.. [optional] # noqa: E501 - required (bool): Boolean showing whether or not this field is required.. [optional] # noqa: E501 - group (str, none_type): The name of the group this field is in. If this field is not a group, this defaults to `null`.. [optional] # noqa: E501 - """ - - type = kwargs.get('type', "checkbox") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'oneOf': [ - ], - } diff --git a/sdks/python/dropbox_sign/model/template_response_document_static_field_date_signed.py b/sdks/python/dropbox_sign/model/template_response_document_static_field_date_signed.py deleted file mode 100644 index e9d724d0c..000000000 --- a/sdks/python/dropbox_sign/model/template_response_document_static_field_date_signed.py +++ /dev/null @@ -1,448 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.template_response_document_static_field_base import TemplateResponseDocumentStaticFieldBase - - -def lazy_import(): - from dropbox_sign.model.template_response_document_static_field_base import TemplateResponseDocumentStaticFieldBase - globals()['TemplateResponseDocumentStaticFieldBase'] = TemplateResponseDocumentStaticFieldBase - - -class TemplateResponseDocumentStaticFieldDateSigned(ModelComposed): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'type': (str,), # noqa: E501 - 'api_id': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'signer': (str,), # noqa: E501 - 'x': (int,), # noqa: E501 - 'y': (int,), # noqa: E501 - 'width': (int,), # noqa: E501 - 'height': (int,), # noqa: E501 - 'required': (bool,), # noqa: E501 - 'group': (str, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> TemplateResponseDocumentStaticFieldDateSigned: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[TemplateResponseDocumentStaticFieldDateSigned], - _check_type=True, - ) - - - attribute_map = { - 'type': 'type', # noqa: E501 - 'api_id': 'api_id', # noqa: E501 - 'name': 'name', # noqa: E501 - 'signer': 'signer', # noqa: E501 - 'x': 'x', # noqa: E501 - 'y': 'y', # noqa: E501 - 'width': 'width', # noqa: E501 - 'height': 'height', # noqa: E501 - 'required': 'required', # noqa: E501 - 'group': 'group', # noqa: E501 - } - - read_only_vars = { - } - - @property - def type(self) -> str: - return self.get("type") - - @type.setter - def type(self, value: str): - setattr(self, "type", value) - - @property - def api_id(self) -> str: - return self.get("api_id") - - @api_id.setter - def api_id(self, value: str): - setattr(self, "api_id", value) - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def signer(self) -> str: - return self.get("signer") - - @signer.setter - def signer(self, value: str): - setattr(self, "signer", value) - - @property - def x(self) -> int: - return self.get("x") - - @x.setter - def x(self, value: int): - setattr(self, "x", value) - - @property - def y(self) -> int: - return self.get("y") - - @y.setter - def y(self, value: int): - setattr(self, "y", value) - - @property - def width(self) -> int: - return self.get("width") - - @width.setter - def width(self, value: int): - setattr(self, "width", value) - - @property - def height(self) -> int: - return self.get("height") - - @height.setter - def height(self, value: int): - setattr(self, "height", value) - - @property - def required(self) -> bool: - return self.get("required") - - @required.setter - def required(self, value: bool): - setattr(self, "required", value) - - @property - def group(self) -> Optional[str]: - return self.get("group") - - @group.setter - def group(self, value: Optional[str]): - setattr(self, "group", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TemplateResponseDocumentStaticFieldDateSigned - a model defined in OpenAPI - - Keyword Args: - type (str): 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`. defaults to "date_signed" # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - api_id (str): A unique id for the static field.. [optional] # noqa: E501 - name (str): The name of the static field.. [optional] # noqa: E501 - signer (str): The signer of the Static Field.. [optional] if omitted the server will use the default value of "me_now" # noqa: E501 - x (int): The horizontal offset in pixels for this static field.. [optional] # noqa: E501 - y (int): The vertical offset in pixels for this static field.. [optional] # noqa: E501 - width (int): The width in pixels of this static field.. [optional] # noqa: E501 - height (int): The height in pixels of this static field.. [optional] # noqa: E501 - required (bool): Boolean showing whether or not this field is required.. [optional] # noqa: E501 - group (str, none_type): The name of the group this field is in. If this field is not a group, this defaults to `null`.. [optional] # noqa: E501 - """ - - type = kwargs.get('type', "date_signed") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TemplateResponseDocumentStaticFieldDateSigned - a model defined in OpenAPI - - Keyword Args: - type (str): 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`. defaults to "date_signed" # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - api_id (str): A unique id for the static field.. [optional] # noqa: E501 - name (str): The name of the static field.. [optional] # noqa: E501 - signer (str): The signer of the Static Field.. [optional] if omitted the server will use the default value of "me_now" # noqa: E501 - x (int): The horizontal offset in pixels for this static field.. [optional] # noqa: E501 - y (int): The vertical offset in pixels for this static field.. [optional] # noqa: E501 - width (int): The width in pixels of this static field.. [optional] # noqa: E501 - height (int): The height in pixels of this static field.. [optional] # noqa: E501 - required (bool): Boolean showing whether or not this field is required.. [optional] # noqa: E501 - group (str, none_type): The name of the group this field is in. If this field is not a group, this defaults to `null`.. [optional] # noqa: E501 - """ - - type = kwargs.get('type', "date_signed") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'oneOf': [ - ], - } diff --git a/sdks/python/dropbox_sign/model/template_response_document_static_field_dropdown.py b/sdks/python/dropbox_sign/model/template_response_document_static_field_dropdown.py deleted file mode 100644 index c5afa1746..000000000 --- a/sdks/python/dropbox_sign/model/template_response_document_static_field_dropdown.py +++ /dev/null @@ -1,448 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.template_response_document_static_field_base import TemplateResponseDocumentStaticFieldBase - - -def lazy_import(): - from dropbox_sign.model.template_response_document_static_field_base import TemplateResponseDocumentStaticFieldBase - globals()['TemplateResponseDocumentStaticFieldBase'] = TemplateResponseDocumentStaticFieldBase - - -class TemplateResponseDocumentStaticFieldDropdown(ModelComposed): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'type': (str,), # noqa: E501 - 'api_id': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'signer': (str,), # noqa: E501 - 'x': (int,), # noqa: E501 - 'y': (int,), # noqa: E501 - 'width': (int,), # noqa: E501 - 'height': (int,), # noqa: E501 - 'required': (bool,), # noqa: E501 - 'group': (str, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> TemplateResponseDocumentStaticFieldDropdown: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[TemplateResponseDocumentStaticFieldDropdown], - _check_type=True, - ) - - - attribute_map = { - 'type': 'type', # noqa: E501 - 'api_id': 'api_id', # noqa: E501 - 'name': 'name', # noqa: E501 - 'signer': 'signer', # noqa: E501 - 'x': 'x', # noqa: E501 - 'y': 'y', # noqa: E501 - 'width': 'width', # noqa: E501 - 'height': 'height', # noqa: E501 - 'required': 'required', # noqa: E501 - 'group': 'group', # noqa: E501 - } - - read_only_vars = { - } - - @property - def type(self) -> str: - return self.get("type") - - @type.setter - def type(self, value: str): - setattr(self, "type", value) - - @property - def api_id(self) -> str: - return self.get("api_id") - - @api_id.setter - def api_id(self, value: str): - setattr(self, "api_id", value) - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def signer(self) -> str: - return self.get("signer") - - @signer.setter - def signer(self, value: str): - setattr(self, "signer", value) - - @property - def x(self) -> int: - return self.get("x") - - @x.setter - def x(self, value: int): - setattr(self, "x", value) - - @property - def y(self) -> int: - return self.get("y") - - @y.setter - def y(self, value: int): - setattr(self, "y", value) - - @property - def width(self) -> int: - return self.get("width") - - @width.setter - def width(self, value: int): - setattr(self, "width", value) - - @property - def height(self) -> int: - return self.get("height") - - @height.setter - def height(self, value: int): - setattr(self, "height", value) - - @property - def required(self) -> bool: - return self.get("required") - - @required.setter - def required(self, value: bool): - setattr(self, "required", value) - - @property - def group(self) -> Optional[str]: - return self.get("group") - - @group.setter - def group(self, value: Optional[str]): - setattr(self, "group", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TemplateResponseDocumentStaticFieldDropdown - a model defined in OpenAPI - - Keyword Args: - type (str): 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`. defaults to "dropdown" # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - api_id (str): A unique id for the static field.. [optional] # noqa: E501 - name (str): The name of the static field.. [optional] # noqa: E501 - signer (str): The signer of the Static Field.. [optional] if omitted the server will use the default value of "me_now" # noqa: E501 - x (int): The horizontal offset in pixels for this static field.. [optional] # noqa: E501 - y (int): The vertical offset in pixels for this static field.. [optional] # noqa: E501 - width (int): The width in pixels of this static field.. [optional] # noqa: E501 - height (int): The height in pixels of this static field.. [optional] # noqa: E501 - required (bool): Boolean showing whether or not this field is required.. [optional] # noqa: E501 - group (str, none_type): The name of the group this field is in. If this field is not a group, this defaults to `null`.. [optional] # noqa: E501 - """ - - type = kwargs.get('type', "dropdown") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TemplateResponseDocumentStaticFieldDropdown - a model defined in OpenAPI - - Keyword Args: - type (str): 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`. defaults to "dropdown" # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - api_id (str): A unique id for the static field.. [optional] # noqa: E501 - name (str): The name of the static field.. [optional] # noqa: E501 - signer (str): The signer of the Static Field.. [optional] if omitted the server will use the default value of "me_now" # noqa: E501 - x (int): The horizontal offset in pixels for this static field.. [optional] # noqa: E501 - y (int): The vertical offset in pixels for this static field.. [optional] # noqa: E501 - width (int): The width in pixels of this static field.. [optional] # noqa: E501 - height (int): The height in pixels of this static field.. [optional] # noqa: E501 - required (bool): Boolean showing whether or not this field is required.. [optional] # noqa: E501 - group (str, none_type): The name of the group this field is in. If this field is not a group, this defaults to `null`.. [optional] # noqa: E501 - """ - - type = kwargs.get('type', "dropdown") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'oneOf': [ - ], - } diff --git a/sdks/python/dropbox_sign/model/template_response_document_static_field_hyperlink.py b/sdks/python/dropbox_sign/model/template_response_document_static_field_hyperlink.py deleted file mode 100644 index e2d72f2bb..000000000 --- a/sdks/python/dropbox_sign/model/template_response_document_static_field_hyperlink.py +++ /dev/null @@ -1,448 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.template_response_document_static_field_base import TemplateResponseDocumentStaticFieldBase - - -def lazy_import(): - from dropbox_sign.model.template_response_document_static_field_base import TemplateResponseDocumentStaticFieldBase - globals()['TemplateResponseDocumentStaticFieldBase'] = TemplateResponseDocumentStaticFieldBase - - -class TemplateResponseDocumentStaticFieldHyperlink(ModelComposed): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'type': (str,), # noqa: E501 - 'api_id': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'signer': (str,), # noqa: E501 - 'x': (int,), # noqa: E501 - 'y': (int,), # noqa: E501 - 'width': (int,), # noqa: E501 - 'height': (int,), # noqa: E501 - 'required': (bool,), # noqa: E501 - 'group': (str, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> TemplateResponseDocumentStaticFieldHyperlink: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[TemplateResponseDocumentStaticFieldHyperlink], - _check_type=True, - ) - - - attribute_map = { - 'type': 'type', # noqa: E501 - 'api_id': 'api_id', # noqa: E501 - 'name': 'name', # noqa: E501 - 'signer': 'signer', # noqa: E501 - 'x': 'x', # noqa: E501 - 'y': 'y', # noqa: E501 - 'width': 'width', # noqa: E501 - 'height': 'height', # noqa: E501 - 'required': 'required', # noqa: E501 - 'group': 'group', # noqa: E501 - } - - read_only_vars = { - } - - @property - def type(self) -> str: - return self.get("type") - - @type.setter - def type(self, value: str): - setattr(self, "type", value) - - @property - def api_id(self) -> str: - return self.get("api_id") - - @api_id.setter - def api_id(self, value: str): - setattr(self, "api_id", value) - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def signer(self) -> str: - return self.get("signer") - - @signer.setter - def signer(self, value: str): - setattr(self, "signer", value) - - @property - def x(self) -> int: - return self.get("x") - - @x.setter - def x(self, value: int): - setattr(self, "x", value) - - @property - def y(self) -> int: - return self.get("y") - - @y.setter - def y(self, value: int): - setattr(self, "y", value) - - @property - def width(self) -> int: - return self.get("width") - - @width.setter - def width(self, value: int): - setattr(self, "width", value) - - @property - def height(self) -> int: - return self.get("height") - - @height.setter - def height(self, value: int): - setattr(self, "height", value) - - @property - def required(self) -> bool: - return self.get("required") - - @required.setter - def required(self, value: bool): - setattr(self, "required", value) - - @property - def group(self) -> Optional[str]: - return self.get("group") - - @group.setter - def group(self, value: Optional[str]): - setattr(self, "group", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TemplateResponseDocumentStaticFieldHyperlink - a model defined in OpenAPI - - Keyword Args: - type (str): 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`. defaults to "hyperlink" # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - api_id (str): A unique id for the static field.. [optional] # noqa: E501 - name (str): The name of the static field.. [optional] # noqa: E501 - signer (str): The signer of the Static Field.. [optional] if omitted the server will use the default value of "me_now" # noqa: E501 - x (int): The horizontal offset in pixels for this static field.. [optional] # noqa: E501 - y (int): The vertical offset in pixels for this static field.. [optional] # noqa: E501 - width (int): The width in pixels of this static field.. [optional] # noqa: E501 - height (int): The height in pixels of this static field.. [optional] # noqa: E501 - required (bool): Boolean showing whether or not this field is required.. [optional] # noqa: E501 - group (str, none_type): The name of the group this field is in. If this field is not a group, this defaults to `null`.. [optional] # noqa: E501 - """ - - type = kwargs.get('type', "hyperlink") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TemplateResponseDocumentStaticFieldHyperlink - a model defined in OpenAPI - - Keyword Args: - type (str): 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`. defaults to "hyperlink" # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - api_id (str): A unique id for the static field.. [optional] # noqa: E501 - name (str): The name of the static field.. [optional] # noqa: E501 - signer (str): The signer of the Static Field.. [optional] if omitted the server will use the default value of "me_now" # noqa: E501 - x (int): The horizontal offset in pixels for this static field.. [optional] # noqa: E501 - y (int): The vertical offset in pixels for this static field.. [optional] # noqa: E501 - width (int): The width in pixels of this static field.. [optional] # noqa: E501 - height (int): The height in pixels of this static field.. [optional] # noqa: E501 - required (bool): Boolean showing whether or not this field is required.. [optional] # noqa: E501 - group (str, none_type): The name of the group this field is in. If this field is not a group, this defaults to `null`.. [optional] # noqa: E501 - """ - - type = kwargs.get('type', "hyperlink") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'oneOf': [ - ], - } diff --git a/sdks/python/dropbox_sign/model/template_response_document_static_field_initials.py b/sdks/python/dropbox_sign/model/template_response_document_static_field_initials.py deleted file mode 100644 index dfd51cb7a..000000000 --- a/sdks/python/dropbox_sign/model/template_response_document_static_field_initials.py +++ /dev/null @@ -1,448 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.template_response_document_static_field_base import TemplateResponseDocumentStaticFieldBase - - -def lazy_import(): - from dropbox_sign.model.template_response_document_static_field_base import TemplateResponseDocumentStaticFieldBase - globals()['TemplateResponseDocumentStaticFieldBase'] = TemplateResponseDocumentStaticFieldBase - - -class TemplateResponseDocumentStaticFieldInitials(ModelComposed): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'type': (str,), # noqa: E501 - 'api_id': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'signer': (str,), # noqa: E501 - 'x': (int,), # noqa: E501 - 'y': (int,), # noqa: E501 - 'width': (int,), # noqa: E501 - 'height': (int,), # noqa: E501 - 'required': (bool,), # noqa: E501 - 'group': (str, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> TemplateResponseDocumentStaticFieldInitials: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[TemplateResponseDocumentStaticFieldInitials], - _check_type=True, - ) - - - attribute_map = { - 'type': 'type', # noqa: E501 - 'api_id': 'api_id', # noqa: E501 - 'name': 'name', # noqa: E501 - 'signer': 'signer', # noqa: E501 - 'x': 'x', # noqa: E501 - 'y': 'y', # noqa: E501 - 'width': 'width', # noqa: E501 - 'height': 'height', # noqa: E501 - 'required': 'required', # noqa: E501 - 'group': 'group', # noqa: E501 - } - - read_only_vars = { - } - - @property - def type(self) -> str: - return self.get("type") - - @type.setter - def type(self, value: str): - setattr(self, "type", value) - - @property - def api_id(self) -> str: - return self.get("api_id") - - @api_id.setter - def api_id(self, value: str): - setattr(self, "api_id", value) - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def signer(self) -> str: - return self.get("signer") - - @signer.setter - def signer(self, value: str): - setattr(self, "signer", value) - - @property - def x(self) -> int: - return self.get("x") - - @x.setter - def x(self, value: int): - setattr(self, "x", value) - - @property - def y(self) -> int: - return self.get("y") - - @y.setter - def y(self, value: int): - setattr(self, "y", value) - - @property - def width(self) -> int: - return self.get("width") - - @width.setter - def width(self, value: int): - setattr(self, "width", value) - - @property - def height(self) -> int: - return self.get("height") - - @height.setter - def height(self, value: int): - setattr(self, "height", value) - - @property - def required(self) -> bool: - return self.get("required") - - @required.setter - def required(self, value: bool): - setattr(self, "required", value) - - @property - def group(self) -> Optional[str]: - return self.get("group") - - @group.setter - def group(self, value: Optional[str]): - setattr(self, "group", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TemplateResponseDocumentStaticFieldInitials - a model defined in OpenAPI - - Keyword Args: - type (str): 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`. defaults to "initials" # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - api_id (str): A unique id for the static field.. [optional] # noqa: E501 - name (str): The name of the static field.. [optional] # noqa: E501 - signer (str): The signer of the Static Field.. [optional] if omitted the server will use the default value of "me_now" # noqa: E501 - x (int): The horizontal offset in pixels for this static field.. [optional] # noqa: E501 - y (int): The vertical offset in pixels for this static field.. [optional] # noqa: E501 - width (int): The width in pixels of this static field.. [optional] # noqa: E501 - height (int): The height in pixels of this static field.. [optional] # noqa: E501 - required (bool): Boolean showing whether or not this field is required.. [optional] # noqa: E501 - group (str, none_type): The name of the group this field is in. If this field is not a group, this defaults to `null`.. [optional] # noqa: E501 - """ - - type = kwargs.get('type', "initials") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TemplateResponseDocumentStaticFieldInitials - a model defined in OpenAPI - - Keyword Args: - type (str): 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`. defaults to "initials" # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - api_id (str): A unique id for the static field.. [optional] # noqa: E501 - name (str): The name of the static field.. [optional] # noqa: E501 - signer (str): The signer of the Static Field.. [optional] if omitted the server will use the default value of "me_now" # noqa: E501 - x (int): The horizontal offset in pixels for this static field.. [optional] # noqa: E501 - y (int): The vertical offset in pixels for this static field.. [optional] # noqa: E501 - width (int): The width in pixels of this static field.. [optional] # noqa: E501 - height (int): The height in pixels of this static field.. [optional] # noqa: E501 - required (bool): Boolean showing whether or not this field is required.. [optional] # noqa: E501 - group (str, none_type): The name of the group this field is in. If this field is not a group, this defaults to `null`.. [optional] # noqa: E501 - """ - - type = kwargs.get('type', "initials") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'oneOf': [ - ], - } diff --git a/sdks/python/dropbox_sign/model/template_response_document_static_field_radio.py b/sdks/python/dropbox_sign/model/template_response_document_static_field_radio.py deleted file mode 100644 index 11cf70a60..000000000 --- a/sdks/python/dropbox_sign/model/template_response_document_static_field_radio.py +++ /dev/null @@ -1,448 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.template_response_document_static_field_base import TemplateResponseDocumentStaticFieldBase - - -def lazy_import(): - from dropbox_sign.model.template_response_document_static_field_base import TemplateResponseDocumentStaticFieldBase - globals()['TemplateResponseDocumentStaticFieldBase'] = TemplateResponseDocumentStaticFieldBase - - -class TemplateResponseDocumentStaticFieldRadio(ModelComposed): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'type': (str,), # noqa: E501 - 'api_id': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'signer': (str,), # noqa: E501 - 'x': (int,), # noqa: E501 - 'y': (int,), # noqa: E501 - 'width': (int,), # noqa: E501 - 'height': (int,), # noqa: E501 - 'required': (bool,), # noqa: E501 - 'group': (str, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> TemplateResponseDocumentStaticFieldRadio: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[TemplateResponseDocumentStaticFieldRadio], - _check_type=True, - ) - - - attribute_map = { - 'type': 'type', # noqa: E501 - 'api_id': 'api_id', # noqa: E501 - 'name': 'name', # noqa: E501 - 'signer': 'signer', # noqa: E501 - 'x': 'x', # noqa: E501 - 'y': 'y', # noqa: E501 - 'width': 'width', # noqa: E501 - 'height': 'height', # noqa: E501 - 'required': 'required', # noqa: E501 - 'group': 'group', # noqa: E501 - } - - read_only_vars = { - } - - @property - def type(self) -> str: - return self.get("type") - - @type.setter - def type(self, value: str): - setattr(self, "type", value) - - @property - def api_id(self) -> str: - return self.get("api_id") - - @api_id.setter - def api_id(self, value: str): - setattr(self, "api_id", value) - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def signer(self) -> str: - return self.get("signer") - - @signer.setter - def signer(self, value: str): - setattr(self, "signer", value) - - @property - def x(self) -> int: - return self.get("x") - - @x.setter - def x(self, value: int): - setattr(self, "x", value) - - @property - def y(self) -> int: - return self.get("y") - - @y.setter - def y(self, value: int): - setattr(self, "y", value) - - @property - def width(self) -> int: - return self.get("width") - - @width.setter - def width(self, value: int): - setattr(self, "width", value) - - @property - def height(self) -> int: - return self.get("height") - - @height.setter - def height(self, value: int): - setattr(self, "height", value) - - @property - def required(self) -> bool: - return self.get("required") - - @required.setter - def required(self, value: bool): - setattr(self, "required", value) - - @property - def group(self) -> Optional[str]: - return self.get("group") - - @group.setter - def group(self, value: Optional[str]): - setattr(self, "group", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TemplateResponseDocumentStaticFieldRadio - a model defined in OpenAPI - - Keyword Args: - type (str): 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`. defaults to "radio" # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - api_id (str): A unique id for the static field.. [optional] # noqa: E501 - name (str): The name of the static field.. [optional] # noqa: E501 - signer (str): The signer of the Static Field.. [optional] if omitted the server will use the default value of "me_now" # noqa: E501 - x (int): The horizontal offset in pixels for this static field.. [optional] # noqa: E501 - y (int): The vertical offset in pixels for this static field.. [optional] # noqa: E501 - width (int): The width in pixels of this static field.. [optional] # noqa: E501 - height (int): The height in pixels of this static field.. [optional] # noqa: E501 - required (bool): Boolean showing whether or not this field is required.. [optional] # noqa: E501 - group (str, none_type): The name of the group this field is in. If this field is not a group, this defaults to `null`.. [optional] # noqa: E501 - """ - - type = kwargs.get('type', "radio") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TemplateResponseDocumentStaticFieldRadio - a model defined in OpenAPI - - Keyword Args: - type (str): 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`. defaults to "radio" # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - api_id (str): A unique id for the static field.. [optional] # noqa: E501 - name (str): The name of the static field.. [optional] # noqa: E501 - signer (str): The signer of the Static Field.. [optional] if omitted the server will use the default value of "me_now" # noqa: E501 - x (int): The horizontal offset in pixels for this static field.. [optional] # noqa: E501 - y (int): The vertical offset in pixels for this static field.. [optional] # noqa: E501 - width (int): The width in pixels of this static field.. [optional] # noqa: E501 - height (int): The height in pixels of this static field.. [optional] # noqa: E501 - required (bool): Boolean showing whether or not this field is required.. [optional] # noqa: E501 - group (str, none_type): The name of the group this field is in. If this field is not a group, this defaults to `null`.. [optional] # noqa: E501 - """ - - type = kwargs.get('type', "radio") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'oneOf': [ - ], - } diff --git a/sdks/python/dropbox_sign/model/template_response_document_static_field_signature.py b/sdks/python/dropbox_sign/model/template_response_document_static_field_signature.py deleted file mode 100644 index c33578ad6..000000000 --- a/sdks/python/dropbox_sign/model/template_response_document_static_field_signature.py +++ /dev/null @@ -1,448 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.template_response_document_static_field_base import TemplateResponseDocumentStaticFieldBase - - -def lazy_import(): - from dropbox_sign.model.template_response_document_static_field_base import TemplateResponseDocumentStaticFieldBase - globals()['TemplateResponseDocumentStaticFieldBase'] = TemplateResponseDocumentStaticFieldBase - - -class TemplateResponseDocumentStaticFieldSignature(ModelComposed): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'type': (str,), # noqa: E501 - 'api_id': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'signer': (str,), # noqa: E501 - 'x': (int,), # noqa: E501 - 'y': (int,), # noqa: E501 - 'width': (int,), # noqa: E501 - 'height': (int,), # noqa: E501 - 'required': (bool,), # noqa: E501 - 'group': (str, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> TemplateResponseDocumentStaticFieldSignature: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[TemplateResponseDocumentStaticFieldSignature], - _check_type=True, - ) - - - attribute_map = { - 'type': 'type', # noqa: E501 - 'api_id': 'api_id', # noqa: E501 - 'name': 'name', # noqa: E501 - 'signer': 'signer', # noqa: E501 - 'x': 'x', # noqa: E501 - 'y': 'y', # noqa: E501 - 'width': 'width', # noqa: E501 - 'height': 'height', # noqa: E501 - 'required': 'required', # noqa: E501 - 'group': 'group', # noqa: E501 - } - - read_only_vars = { - } - - @property - def type(self) -> str: - return self.get("type") - - @type.setter - def type(self, value: str): - setattr(self, "type", value) - - @property - def api_id(self) -> str: - return self.get("api_id") - - @api_id.setter - def api_id(self, value: str): - setattr(self, "api_id", value) - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def signer(self) -> str: - return self.get("signer") - - @signer.setter - def signer(self, value: str): - setattr(self, "signer", value) - - @property - def x(self) -> int: - return self.get("x") - - @x.setter - def x(self, value: int): - setattr(self, "x", value) - - @property - def y(self) -> int: - return self.get("y") - - @y.setter - def y(self, value: int): - setattr(self, "y", value) - - @property - def width(self) -> int: - return self.get("width") - - @width.setter - def width(self, value: int): - setattr(self, "width", value) - - @property - def height(self) -> int: - return self.get("height") - - @height.setter - def height(self, value: int): - setattr(self, "height", value) - - @property - def required(self) -> bool: - return self.get("required") - - @required.setter - def required(self, value: bool): - setattr(self, "required", value) - - @property - def group(self) -> Optional[str]: - return self.get("group") - - @group.setter - def group(self, value: Optional[str]): - setattr(self, "group", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TemplateResponseDocumentStaticFieldSignature - a model defined in OpenAPI - - Keyword Args: - type (str): 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`. defaults to "signature" # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - api_id (str): A unique id for the static field.. [optional] # noqa: E501 - name (str): The name of the static field.. [optional] # noqa: E501 - signer (str): The signer of the Static Field.. [optional] if omitted the server will use the default value of "me_now" # noqa: E501 - x (int): The horizontal offset in pixels for this static field.. [optional] # noqa: E501 - y (int): The vertical offset in pixels for this static field.. [optional] # noqa: E501 - width (int): The width in pixels of this static field.. [optional] # noqa: E501 - height (int): The height in pixels of this static field.. [optional] # noqa: E501 - required (bool): Boolean showing whether or not this field is required.. [optional] # noqa: E501 - group (str, none_type): The name of the group this field is in. If this field is not a group, this defaults to `null`.. [optional] # noqa: E501 - """ - - type = kwargs.get('type', "signature") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TemplateResponseDocumentStaticFieldSignature - a model defined in OpenAPI - - Keyword Args: - type (str): 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`. defaults to "signature" # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - api_id (str): A unique id for the static field.. [optional] # noqa: E501 - name (str): The name of the static field.. [optional] # noqa: E501 - signer (str): The signer of the Static Field.. [optional] if omitted the server will use the default value of "me_now" # noqa: E501 - x (int): The horizontal offset in pixels for this static field.. [optional] # noqa: E501 - y (int): The vertical offset in pixels for this static field.. [optional] # noqa: E501 - width (int): The width in pixels of this static field.. [optional] # noqa: E501 - height (int): The height in pixels of this static field.. [optional] # noqa: E501 - required (bool): Boolean showing whether or not this field is required.. [optional] # noqa: E501 - group (str, none_type): The name of the group this field is in. If this field is not a group, this defaults to `null`.. [optional] # noqa: E501 - """ - - type = kwargs.get('type', "signature") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'oneOf': [ - ], - } diff --git a/sdks/python/dropbox_sign/model/template_response_document_static_field_text.py b/sdks/python/dropbox_sign/model/template_response_document_static_field_text.py deleted file mode 100644 index 13c5e23c2..000000000 --- a/sdks/python/dropbox_sign/model/template_response_document_static_field_text.py +++ /dev/null @@ -1,448 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.template_response_document_static_field_base import TemplateResponseDocumentStaticFieldBase - - -def lazy_import(): - from dropbox_sign.model.template_response_document_static_field_base import TemplateResponseDocumentStaticFieldBase - globals()['TemplateResponseDocumentStaticFieldBase'] = TemplateResponseDocumentStaticFieldBase - - -class TemplateResponseDocumentStaticFieldText(ModelComposed): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'type': (str,), # noqa: E501 - 'api_id': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'signer': (str,), # noqa: E501 - 'x': (int,), # noqa: E501 - 'y': (int,), # noqa: E501 - 'width': (int,), # noqa: E501 - 'height': (int,), # noqa: E501 - 'required': (bool,), # noqa: E501 - 'group': (str, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> TemplateResponseDocumentStaticFieldText: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[TemplateResponseDocumentStaticFieldText], - _check_type=True, - ) - - - attribute_map = { - 'type': 'type', # noqa: E501 - 'api_id': 'api_id', # noqa: E501 - 'name': 'name', # noqa: E501 - 'signer': 'signer', # noqa: E501 - 'x': 'x', # noqa: E501 - 'y': 'y', # noqa: E501 - 'width': 'width', # noqa: E501 - 'height': 'height', # noqa: E501 - 'required': 'required', # noqa: E501 - 'group': 'group', # noqa: E501 - } - - read_only_vars = { - } - - @property - def type(self) -> str: - return self.get("type") - - @type.setter - def type(self, value: str): - setattr(self, "type", value) - - @property - def api_id(self) -> str: - return self.get("api_id") - - @api_id.setter - def api_id(self, value: str): - setattr(self, "api_id", value) - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def signer(self) -> str: - return self.get("signer") - - @signer.setter - def signer(self, value: str): - setattr(self, "signer", value) - - @property - def x(self) -> int: - return self.get("x") - - @x.setter - def x(self, value: int): - setattr(self, "x", value) - - @property - def y(self) -> int: - return self.get("y") - - @y.setter - def y(self, value: int): - setattr(self, "y", value) - - @property - def width(self) -> int: - return self.get("width") - - @width.setter - def width(self, value: int): - setattr(self, "width", value) - - @property - def height(self) -> int: - return self.get("height") - - @height.setter - def height(self, value: int): - setattr(self, "height", value) - - @property - def required(self) -> bool: - return self.get("required") - - @required.setter - def required(self, value: bool): - setattr(self, "required", value) - - @property - def group(self) -> Optional[str]: - return self.get("group") - - @group.setter - def group(self, value: Optional[str]): - setattr(self, "group", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TemplateResponseDocumentStaticFieldText - a model defined in OpenAPI - - Keyword Args: - type (str): 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`. defaults to "text" # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - api_id (str): A unique id for the static field.. [optional] # noqa: E501 - name (str): The name of the static field.. [optional] # noqa: E501 - signer (str): The signer of the Static Field.. [optional] if omitted the server will use the default value of "me_now" # noqa: E501 - x (int): The horizontal offset in pixels for this static field.. [optional] # noqa: E501 - y (int): The vertical offset in pixels for this static field.. [optional] # noqa: E501 - width (int): The width in pixels of this static field.. [optional] # noqa: E501 - height (int): The height in pixels of this static field.. [optional] # noqa: E501 - required (bool): Boolean showing whether or not this field is required.. [optional] # noqa: E501 - group (str, none_type): The name of the group this field is in. If this field is not a group, this defaults to `null`.. [optional] # noqa: E501 - """ - - type = kwargs.get('type', "text") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TemplateResponseDocumentStaticFieldText - a model defined in OpenAPI - - Keyword Args: - type (str): 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`. defaults to "text" # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - api_id (str): A unique id for the static field.. [optional] # noqa: E501 - name (str): The name of the static field.. [optional] # noqa: E501 - signer (str): The signer of the Static Field.. [optional] if omitted the server will use the default value of "me_now" # noqa: E501 - x (int): The horizontal offset in pixels for this static field.. [optional] # noqa: E501 - y (int): The vertical offset in pixels for this static field.. [optional] # noqa: E501 - width (int): The width in pixels of this static field.. [optional] # noqa: E501 - height (int): The height in pixels of this static field.. [optional] # noqa: E501 - required (bool): Boolean showing whether or not this field is required.. [optional] # noqa: E501 - group (str, none_type): The name of the group this field is in. If this field is not a group, this defaults to `null`.. [optional] # noqa: E501 - """ - - type = kwargs.get('type', "text") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'oneOf': [ - ], - } diff --git a/sdks/python/dropbox_sign/model/template_response_field_avg_text_length.py b/sdks/python/dropbox_sign/model/template_response_field_avg_text_length.py deleted file mode 100644 index 8629c383f..000000000 --- a/sdks/python/dropbox_sign/model/template_response_field_avg_text_length.py +++ /dev/null @@ -1,295 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class TemplateResponseFieldAvgTextLength(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'num_lines': (int,), # noqa: E501 - 'num_chars_per_line': (int,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> TemplateResponseFieldAvgTextLength: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[TemplateResponseFieldAvgTextLength], - _check_type=True, - ) - - - attribute_map = { - 'num_lines': 'num_lines', # noqa: E501 - 'num_chars_per_line': 'num_chars_per_line', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def num_lines(self) -> int: - return self.get("num_lines") - - @num_lines.setter - def num_lines(self, value: int): - setattr(self, "num_lines", value) - - @property - def num_chars_per_line(self) -> int: - return self.get("num_chars_per_line") - - @num_chars_per_line.setter - def num_chars_per_line(self, value: int): - setattr(self, "num_chars_per_line", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TemplateResponseFieldAvgTextLength - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - num_lines (int): Number of lines.. [optional] # noqa: E501 - num_chars_per_line (int): Number of characters per line.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TemplateResponseFieldAvgTextLength - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - num_lines (int): Number of lines.. [optional] # noqa: E501 - num_chars_per_line (int): Number of characters per line.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/template_response_named_form_field.py b/sdks/python/dropbox_sign/model/template_response_named_form_field.py deleted file mode 100644 index 87e474753..000000000 --- a/sdks/python/dropbox_sign/model/template_response_named_form_field.py +++ /dev/null @@ -1,325 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 - -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - -if TYPE_CHECKING: - from dropbox_sign.models import TemplateResponseDocumentFormFieldCheckbox - from dropbox_sign.models import TemplateResponseDocumentFormFieldDateSigned - from dropbox_sign.models import TemplateResponseDocumentFormFieldDropdown - from dropbox_sign.models import TemplateResponseDocumentFormFieldHyperlink - from dropbox_sign.models import TemplateResponseDocumentFormFieldInitials - from dropbox_sign.models import TemplateResponseDocumentFormFieldRadio - from dropbox_sign.models import TemplateResponseDocumentFormFieldSignature - from dropbox_sign.models import TemplateResponseDocumentFormFieldText - - -def lazy_import(): - from dropbox_sign.models import TemplateResponseDocumentFormFieldCheckbox - from dropbox_sign.models import TemplateResponseDocumentFormFieldDateSigned - from dropbox_sign.models import TemplateResponseDocumentFormFieldDropdown - from dropbox_sign.models import TemplateResponseDocumentFormFieldHyperlink - from dropbox_sign.models import TemplateResponseDocumentFormFieldInitials - from dropbox_sign.models import TemplateResponseDocumentFormFieldRadio - from dropbox_sign.models import TemplateResponseDocumentFormFieldSignature - from dropbox_sign.models import TemplateResponseDocumentFormFieldText - globals()['TemplateResponseDocumentFormFieldCheckbox'] = TemplateResponseDocumentFormFieldCheckbox - globals()['TemplateResponseDocumentFormFieldDateSigned'] = TemplateResponseDocumentFormFieldDateSigned - globals()['TemplateResponseDocumentFormFieldDropdown'] = TemplateResponseDocumentFormFieldDropdown - globals()['TemplateResponseDocumentFormFieldHyperlink'] = TemplateResponseDocumentFormFieldHyperlink - globals()['TemplateResponseDocumentFormFieldInitials'] = TemplateResponseDocumentFormFieldInitials - globals()['TemplateResponseDocumentFormFieldRadio'] = TemplateResponseDocumentFormFieldRadio - globals()['TemplateResponseDocumentFormFieldSignature'] = TemplateResponseDocumentFormFieldSignature - globals()['TemplateResponseDocumentFormFieldText'] = TemplateResponseDocumentFormFieldText - - -class TemplateResponseNamedFormField(ModelSimple): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'value': (TemplateResponseDocumentFormFieldBase,), - } - - @cached_property - def discriminator(): - lazy_import() - val = { - 'checkbox': TemplateResponseDocumentFormFieldCheckbox, - 'date_signed': TemplateResponseDocumentFormFieldDateSigned, - 'dropdown': TemplateResponseDocumentFormFieldDropdown, - 'hyperlink': TemplateResponseDocumentFormFieldHyperlink, - 'initials': TemplateResponseDocumentFormFieldInitials, - 'radio': TemplateResponseDocumentFormFieldRadio, - 'signature': TemplateResponseDocumentFormFieldSignature, - 'text': TemplateResponseDocumentFormFieldText, - } - if not val: - return None - return {'type': val} - - - attribute_map = {} - - read_only_vars = set() - - _composed_schemas = None - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): - """TemplateResponseNamedFormField - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (TemplateResponseDocumentFormFieldBase): # noqa: E501 - - Keyword Args: - value (TemplateResponseDocumentFormFieldBase): # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """TemplateResponseNamedFormField - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (TemplateResponseDocumentFormFieldBase): # noqa: E501 - - Keyword Args: - value (TemplateResponseDocumentFormFieldBase): # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - return self diff --git a/sdks/python/dropbox_sign/model/template_response_signer_role.py b/sdks/python/dropbox_sign/model/template_response_signer_role.py deleted file mode 100644 index 31cc0a863..000000000 --- a/sdks/python/dropbox_sign/model/template_response_signer_role.py +++ /dev/null @@ -1,295 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class TemplateResponseSignerRole(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'name': (str,), # noqa: E501 - 'order': (int,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> TemplateResponseSignerRole: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[TemplateResponseSignerRole], - _check_type=True, - ) - - - attribute_map = { - 'name': 'name', # noqa: E501 - 'order': 'order', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def name(self) -> str: - return self.get("name") - - @name.setter - def name(self, value: str): - setattr(self, "name", value) - - @property - def order(self) -> int: - return self.get("order") - - @order.setter - def order(self, value: int): - setattr(self, "order", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TemplateResponseSignerRole - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - name (str): The name of the Role.. [optional] # noqa: E501 - order (int): If signer order is assigned this is the 0-based index for this role.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TemplateResponseSignerRole - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - name (str): The name of the Role.. [optional] # noqa: E501 - order (int): If signer order is assigned this is the 0-based index for this role.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/template_update_files_request.py b/sdks/python/dropbox_sign/model/template_update_files_request.py deleted file mode 100644 index 57781c21d..000000000 --- a/sdks/python/dropbox_sign/model/template_update_files_request.py +++ /dev/null @@ -1,349 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class TemplateUpdateFilesRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - ('message',): { - 'max_length': 5000, - }, - ('subject',): { - 'max_length': 100, - }, - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'client_id': (str,), # noqa: E501 - 'files': ([file_type],), # noqa: E501 - 'file_urls': ([str],), # noqa: E501 - 'message': (str,), # noqa: E501 - 'subject': (str,), # noqa: E501 - 'test_mode': (bool,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> TemplateUpdateFilesRequest: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[TemplateUpdateFilesRequest], - _check_type=True, - ) - - - attribute_map = { - 'client_id': 'client_id', # noqa: E501 - 'files': 'files', # noqa: E501 - 'file_urls': 'file_urls', # noqa: E501 - 'message': 'message', # noqa: E501 - 'subject': 'subject', # noqa: E501 - 'test_mode': 'test_mode', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def client_id(self) -> str: - return self.get("client_id") - - @client_id.setter - def client_id(self, value: str): - setattr(self, "client_id", value) - - @property - def files(self) -> List[file_type]: - return self.get("files") - - @files.setter - def files(self, value: List[file_type]): - setattr(self, "files", value) - - @property - def file_urls(self) -> List[str]: - return self.get("file_urls") - - @file_urls.setter - def file_urls(self, value: List[str]): - setattr(self, "file_urls", value) - - @property - def message(self) -> str: - return self.get("message") - - @message.setter - def message(self, value: str): - setattr(self, "message", value) - - @property - def subject(self) -> str: - return self.get("subject") - - @subject.setter - def subject(self, value: str): - setattr(self, "subject", value) - - @property - def test_mode(self) -> bool: - return self.get("test_mode") - - @test_mode.setter - def test_mode(self, value: bool): - setattr(self, "test_mode", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TemplateUpdateFilesRequest - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - client_id (str): Client id of the app you're using to update this template.. [optional] # noqa: E501 - files ([file_type]): Use `files[]` to indicate the uploaded file(s) to use for the template. This endpoint requires either **files** or **file_urls[]**, but not both.. [optional] # noqa: E501 - file_urls ([str]): 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.. [optional] # noqa: E501 - message (str): The new default template email message.. [optional] # noqa: E501 - subject (str): The new default template email subject.. [optional] # noqa: E501 - test_mode (bool): Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TemplateUpdateFilesRequest - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - client_id (str): Client id of the app you're using to update this template.. [optional] # noqa: E501 - files ([file_type]): Use `files[]` to indicate the uploaded file(s) to use for the template. This endpoint requires either **files** or **file_urls[]**, but not both.. [optional] # noqa: E501 - file_urls ([str]): 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.. [optional] # noqa: E501 - message (str): The new default template email message.. [optional] # noqa: E501 - subject (str): The new default template email subject.. [optional] # noqa: E501 - test_mode (bool): Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/template_update_files_response.py b/sdks/python/dropbox_sign/model/template_update_files_response.py deleted file mode 100644 index caad0c376..000000000 --- a/sdks/python/dropbox_sign/model/template_update_files_response.py +++ /dev/null @@ -1,291 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.template_update_files_response_template import TemplateUpdateFilesResponseTemplate - - -def lazy_import(): - from dropbox_sign.model.template_update_files_response_template import TemplateUpdateFilesResponseTemplate - globals()['TemplateUpdateFilesResponseTemplate'] = TemplateUpdateFilesResponseTemplate - - -class TemplateUpdateFilesResponse(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'template': (TemplateUpdateFilesResponseTemplate,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> TemplateUpdateFilesResponse: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[TemplateUpdateFilesResponse], - _check_type=True, - ) - - - attribute_map = { - 'template': 'template', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def template(self) -> TemplateUpdateFilesResponseTemplate: - return self.get("template") - - @template.setter - def template(self, value: TemplateUpdateFilesResponseTemplate): - setattr(self, "template", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TemplateUpdateFilesResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - template (TemplateUpdateFilesResponseTemplate): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TemplateUpdateFilesResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - template (TemplateUpdateFilesResponseTemplate): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/template_update_files_response_template.py b/sdks/python/dropbox_sign/model/template_update_files_response_template.py deleted file mode 100644 index 9a9116676..000000000 --- a/sdks/python/dropbox_sign/model/template_update_files_response_template.py +++ /dev/null @@ -1,303 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.warning_response import WarningResponse - - -def lazy_import(): - from dropbox_sign.model.warning_response import WarningResponse - globals()['WarningResponse'] = WarningResponse - - -class TemplateUpdateFilesResponseTemplate(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'template_id': (str,), # noqa: E501 - 'warnings': ([WarningResponse],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> TemplateUpdateFilesResponseTemplate: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[TemplateUpdateFilesResponseTemplate], - _check_type=True, - ) - - - attribute_map = { - 'template_id': 'template_id', # noqa: E501 - 'warnings': 'warnings', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def template_id(self) -> str: - return self.get("template_id") - - @template_id.setter - def template_id(self, value: str): - setattr(self, "template_id", value) - - @property - def warnings(self) -> List[WarningResponse]: - return self.get("warnings") - - @warnings.setter - def warnings(self, value: List[WarningResponse]): - setattr(self, "warnings", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TemplateUpdateFilesResponseTemplate - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - template_id (str): The id of the Template.. [optional] # noqa: E501 - warnings ([WarningResponse]): A list of warnings.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TemplateUpdateFilesResponseTemplate - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - template_id (str): The id of the Template.. [optional] # noqa: E501 - warnings ([WarningResponse]): A list of warnings.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/unclaimed_draft_create_embedded_request.py b/sdks/python/dropbox_sign/model/unclaimed_draft_create_embedded_request.py deleted file mode 100644 index f0f5ab40a..000000000 --- a/sdks/python/dropbox_sign/model/unclaimed_draft_create_embedded_request.py +++ /dev/null @@ -1,755 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.sub_attachment import SubAttachment - from dropbox_sign.model.sub_custom_field import SubCustomField - from dropbox_sign.model.sub_editor_options import SubEditorOptions - from dropbox_sign.model.sub_field_options import SubFieldOptions - from dropbox_sign.model.sub_form_field_group import SubFormFieldGroup - from dropbox_sign.model.sub_form_field_rule import SubFormFieldRule - from dropbox_sign.model.sub_form_fields_per_document_base import SubFormFieldsPerDocumentBase - from dropbox_sign.model.sub_signing_options import SubSigningOptions - from dropbox_sign.model.sub_unclaimed_draft_signer import SubUnclaimedDraftSigner - - -def lazy_import(): - from dropbox_sign.model.sub_attachment import SubAttachment - from dropbox_sign.model.sub_custom_field import SubCustomField - from dropbox_sign.model.sub_editor_options import SubEditorOptions - from dropbox_sign.model.sub_field_options import SubFieldOptions - from dropbox_sign.model.sub_form_field_group import SubFormFieldGroup - from dropbox_sign.model.sub_form_field_rule import SubFormFieldRule - from dropbox_sign.model.sub_form_fields_per_document_base import SubFormFieldsPerDocumentBase - from dropbox_sign.model.sub_signing_options import SubSigningOptions - from dropbox_sign.model.sub_unclaimed_draft_signer import SubUnclaimedDraftSigner - globals()['SubAttachment'] = SubAttachment - globals()['SubCustomField'] = SubCustomField - globals()['SubEditorOptions'] = SubEditorOptions - globals()['SubFieldOptions'] = SubFieldOptions - globals()['SubFormFieldGroup'] = SubFormFieldGroup - globals()['SubFormFieldRule'] = SubFormFieldRule - globals()['SubFormFieldsPerDocumentBase'] = SubFormFieldsPerDocumentBase - globals()['SubSigningOptions'] = SubSigningOptions - globals()['SubUnclaimedDraftSigner'] = SubUnclaimedDraftSigner - - -class UnclaimedDraftCreateEmbeddedRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('type',): { - 'SEND_DOCUMENT': "send_document", - 'REQUEST_SIGNATURE': "request_signature", - }, - } - - validations = { - ('message',): { - 'max_length': 5000, - }, - ('metadata',): { - }, - ('subject',): { - 'max_length': 200, - }, - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'client_id': (str,), # noqa: E501 - 'requester_email_address': (str,), # noqa: E501 - 'files': ([file_type],), # noqa: E501 - 'file_urls': ([str],), # noqa: E501 - 'allow_ccs': (bool,), # noqa: E501 - 'allow_decline': (bool,), # noqa: E501 - 'allow_reassign': (bool,), # noqa: E501 - 'attachments': ([SubAttachment],), # noqa: E501 - 'cc_email_addresses': ([str],), # noqa: E501 - 'custom_fields': ([SubCustomField],), # noqa: E501 - 'editor_options': (SubEditorOptions,), # noqa: E501 - 'field_options': (SubFieldOptions,), # noqa: E501 - 'force_signer_page': (bool,), # noqa: E501 - 'force_subject_message': (bool,), # noqa: E501 - 'form_field_groups': ([SubFormFieldGroup],), # noqa: E501 - 'form_field_rules': ([SubFormFieldRule],), # noqa: E501 - 'form_fields_per_document': ([SubFormFieldsPerDocumentBase],), # noqa: E501 - 'hide_text_tags': (bool,), # noqa: E501 - 'hold_request': (bool,), # noqa: E501 - 'is_for_embedded_signing': (bool,), # noqa: E501 - 'message': (str,), # noqa: E501 - 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 - 'requesting_redirect_url': (str,), # noqa: E501 - 'show_preview': (bool,), # noqa: E501 - 'show_progress_stepper': (bool,), # noqa: E501 - 'signers': ([SubUnclaimedDraftSigner],), # noqa: E501 - 'signing_options': (SubSigningOptions,), # noqa: E501 - 'signing_redirect_url': (str,), # noqa: E501 - 'skip_me_now': (bool,), # noqa: E501 - 'subject': (str,), # noqa: E501 - 'test_mode': (bool,), # noqa: E501 - 'type': (str,), # noqa: E501 - 'use_preexisting_fields': (bool,), # noqa: E501 - 'use_text_tags': (bool,), # noqa: E501 - 'populate_auto_fill_fields': (bool,), # noqa: E501 - 'expires_at': (int, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> UnclaimedDraftCreateEmbeddedRequest: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[UnclaimedDraftCreateEmbeddedRequest], - _check_type=True, - ) - - - attribute_map = { - 'client_id': 'client_id', # noqa: E501 - 'requester_email_address': 'requester_email_address', # noqa: E501 - 'files': 'files', # noqa: E501 - 'file_urls': 'file_urls', # noqa: E501 - 'allow_ccs': 'allow_ccs', # noqa: E501 - 'allow_decline': 'allow_decline', # noqa: E501 - 'allow_reassign': 'allow_reassign', # noqa: E501 - 'attachments': 'attachments', # noqa: E501 - 'cc_email_addresses': 'cc_email_addresses', # noqa: E501 - 'custom_fields': 'custom_fields', # noqa: E501 - 'editor_options': 'editor_options', # noqa: E501 - 'field_options': 'field_options', # noqa: E501 - 'force_signer_page': 'force_signer_page', # noqa: E501 - 'force_subject_message': 'force_subject_message', # noqa: E501 - 'form_field_groups': 'form_field_groups', # noqa: E501 - 'form_field_rules': 'form_field_rules', # noqa: E501 - 'form_fields_per_document': 'form_fields_per_document', # noqa: E501 - 'hide_text_tags': 'hide_text_tags', # noqa: E501 - 'hold_request': 'hold_request', # noqa: E501 - 'is_for_embedded_signing': 'is_for_embedded_signing', # noqa: E501 - 'message': 'message', # noqa: E501 - 'metadata': 'metadata', # noqa: E501 - 'requesting_redirect_url': 'requesting_redirect_url', # noqa: E501 - 'show_preview': 'show_preview', # noqa: E501 - 'show_progress_stepper': 'show_progress_stepper', # noqa: E501 - 'signers': 'signers', # noqa: E501 - 'signing_options': 'signing_options', # noqa: E501 - 'signing_redirect_url': 'signing_redirect_url', # noqa: E501 - 'skip_me_now': 'skip_me_now', # noqa: E501 - 'subject': 'subject', # noqa: E501 - 'test_mode': 'test_mode', # noqa: E501 - 'type': 'type', # noqa: E501 - 'use_preexisting_fields': 'use_preexisting_fields', # noqa: E501 - 'use_text_tags': 'use_text_tags', # noqa: E501 - 'populate_auto_fill_fields': 'populate_auto_fill_fields', # noqa: E501 - 'expires_at': 'expires_at', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def client_id(self) -> str: - return self.get("client_id") - - @client_id.setter - def client_id(self, value: str): - setattr(self, "client_id", value) - - @property - def requester_email_address(self) -> str: - return self.get("requester_email_address") - - @requester_email_address.setter - def requester_email_address(self, value: str): - setattr(self, "requester_email_address", value) - - @property - def files(self) -> List[file_type]: - return self.get("files") - - @files.setter - def files(self, value: List[file_type]): - setattr(self, "files", value) - - @property - def file_urls(self) -> List[str]: - return self.get("file_urls") - - @file_urls.setter - def file_urls(self, value: List[str]): - setattr(self, "file_urls", value) - - @property - def allow_ccs(self) -> bool: - return self.get("allow_ccs") - - @allow_ccs.setter - def allow_ccs(self, value: bool): - setattr(self, "allow_ccs", value) - - @property - def allow_decline(self) -> bool: - return self.get("allow_decline") - - @allow_decline.setter - def allow_decline(self, value: bool): - setattr(self, "allow_decline", value) - - @property - def allow_reassign(self) -> bool: - return self.get("allow_reassign") - - @allow_reassign.setter - def allow_reassign(self, value: bool): - setattr(self, "allow_reassign", value) - - @property - def attachments(self) -> List[SubAttachment]: - return self.get("attachments") - - @attachments.setter - def attachments(self, value: List[SubAttachment]): - setattr(self, "attachments", value) - - @property - def cc_email_addresses(self) -> List[str]: - return self.get("cc_email_addresses") - - @cc_email_addresses.setter - def cc_email_addresses(self, value: List[str]): - setattr(self, "cc_email_addresses", value) - - @property - def custom_fields(self) -> List[SubCustomField]: - return self.get("custom_fields") - - @custom_fields.setter - def custom_fields(self, value: List[SubCustomField]): - setattr(self, "custom_fields", value) - - @property - def editor_options(self) -> SubEditorOptions: - return self.get("editor_options") - - @editor_options.setter - def editor_options(self, value: SubEditorOptions): - setattr(self, "editor_options", value) - - @property - def field_options(self) -> SubFieldOptions: - return self.get("field_options") - - @field_options.setter - def field_options(self, value: SubFieldOptions): - setattr(self, "field_options", value) - - @property - def force_signer_page(self) -> bool: - return self.get("force_signer_page") - - @force_signer_page.setter - def force_signer_page(self, value: bool): - setattr(self, "force_signer_page", value) - - @property - def force_subject_message(self) -> bool: - return self.get("force_subject_message") - - @force_subject_message.setter - def force_subject_message(self, value: bool): - setattr(self, "force_subject_message", value) - - @property - def form_field_groups(self) -> List[SubFormFieldGroup]: - return self.get("form_field_groups") - - @form_field_groups.setter - def form_field_groups(self, value: List[SubFormFieldGroup]): - setattr(self, "form_field_groups", value) - - @property - def form_field_rules(self) -> List[SubFormFieldRule]: - return self.get("form_field_rules") - - @form_field_rules.setter - def form_field_rules(self, value: List[SubFormFieldRule]): - setattr(self, "form_field_rules", value) - - @property - def form_fields_per_document(self) -> List[SubFormFieldsPerDocumentBase]: - return self.get("form_fields_per_document") - - @form_fields_per_document.setter - def form_fields_per_document(self, value: List[SubFormFieldsPerDocumentBase]): - setattr(self, "form_fields_per_document", value) - - @property - def hide_text_tags(self) -> bool: - return self.get("hide_text_tags") - - @hide_text_tags.setter - def hide_text_tags(self, value: bool): - setattr(self, "hide_text_tags", value) - - @property - def hold_request(self) -> bool: - return self.get("hold_request") - - @hold_request.setter - def hold_request(self, value: bool): - setattr(self, "hold_request", value) - - @property - def is_for_embedded_signing(self) -> bool: - return self.get("is_for_embedded_signing") - - @is_for_embedded_signing.setter - def is_for_embedded_signing(self, value: bool): - setattr(self, "is_for_embedded_signing", value) - - @property - def message(self) -> str: - return self.get("message") - - @message.setter - def message(self, value: str): - setattr(self, "message", value) - - @property - def metadata(self) -> Dict[str, Union[bool, date, datetime, dict, float, int, list, str, none_type]]: - return self.get("metadata") - - @metadata.setter - def metadata(self, value: Dict[str, Union[bool, date, datetime, dict, float, int, list, str, none_type]]): - setattr(self, "metadata", value) - - @property - def requesting_redirect_url(self) -> str: - return self.get("requesting_redirect_url") - - @requesting_redirect_url.setter - def requesting_redirect_url(self, value: str): - setattr(self, "requesting_redirect_url", value) - - @property - def show_preview(self) -> bool: - return self.get("show_preview") - - @show_preview.setter - def show_preview(self, value: bool): - setattr(self, "show_preview", value) - - @property - def show_progress_stepper(self) -> bool: - return self.get("show_progress_stepper") - - @show_progress_stepper.setter - def show_progress_stepper(self, value: bool): - setattr(self, "show_progress_stepper", value) - - @property - def signers(self) -> List[SubUnclaimedDraftSigner]: - return self.get("signers") - - @signers.setter - def signers(self, value: List[SubUnclaimedDraftSigner]): - setattr(self, "signers", value) - - @property - def signing_options(self) -> SubSigningOptions: - return self.get("signing_options") - - @signing_options.setter - def signing_options(self, value: SubSigningOptions): - setattr(self, "signing_options", value) - - @property - def signing_redirect_url(self) -> str: - return self.get("signing_redirect_url") - - @signing_redirect_url.setter - def signing_redirect_url(self, value: str): - setattr(self, "signing_redirect_url", value) - - @property - def skip_me_now(self) -> bool: - return self.get("skip_me_now") - - @skip_me_now.setter - def skip_me_now(self, value: bool): - setattr(self, "skip_me_now", value) - - @property - def subject(self) -> str: - return self.get("subject") - - @subject.setter - def subject(self, value: str): - setattr(self, "subject", value) - - @property - def test_mode(self) -> bool: - return self.get("test_mode") - - @test_mode.setter - def test_mode(self, value: bool): - setattr(self, "test_mode", value) - - @property - def type(self) -> str: - return self.get("type") - - @type.setter - def type(self, value: str): - setattr(self, "type", value) - - @property - def use_preexisting_fields(self) -> bool: - return self.get("use_preexisting_fields") - - @use_preexisting_fields.setter - def use_preexisting_fields(self, value: bool): - setattr(self, "use_preexisting_fields", value) - - @property - def use_text_tags(self) -> bool: - return self.get("use_text_tags") - - @use_text_tags.setter - def use_text_tags(self, value: bool): - setattr(self, "use_text_tags", value) - - @property - def populate_auto_fill_fields(self) -> bool: - return self.get("populate_auto_fill_fields") - - @populate_auto_fill_fields.setter - def populate_auto_fill_fields(self, value: bool): - setattr(self, "populate_auto_fill_fields", value) - - @property - def expires_at(self) -> Optional[int]: - return self.get("expires_at") - - @expires_at.setter - def expires_at(self, value: Optional[int]): - setattr(self, "expires_at", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, client_id, requester_email_address, *args, **kwargs): # noqa: E501 - """UnclaimedDraftCreateEmbeddedRequest - a model defined in OpenAPI - - Args: - client_id (str): 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 (str): The email address of the user that should be designated as the requester of this draft, if the draft type is `request_signature`. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - files ([file_type]): Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.. [optional] # noqa: E501 - file_urls ([str]): 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.. [optional] # noqa: E501 - allow_ccs (bool): This allows the requester to specify whether the user is allowed to provide email addresses to CC when claiming the draft.. [optional] if omitted the server will use the default value of True # noqa: E501 - allow_decline (bool): Allows signers to decline to sign a document if `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - allow_reassign (bool): 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.. [optional] if omitted the server will use the default value of False # noqa: E501 - attachments ([SubAttachment]): A list describing the attachments. [optional] # noqa: E501 - cc_email_addresses ([str]): The email addresses that should be CCed.. [optional] # noqa: E501 - custom_fields ([SubCustomField]): 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.. [optional] # noqa: E501 - editor_options (SubEditorOptions): [optional] # noqa: E501 - field_options (SubFieldOptions): [optional] # noqa: E501 - force_signer_page (bool): Provide users the ability to review/edit the signers.. [optional] if omitted the server will use the default value of False # noqa: E501 - force_subject_message (bool): Provide users the ability to review/edit the subject and message.. [optional] if omitted the server will use the default value of False # noqa: E501 - form_field_groups ([SubFormFieldGroup]): 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`.. [optional] # noqa: E501 - form_field_rules ([SubFormFieldRule]): Conditional Logic rules for fields defined in `form_fields_per_document`.. [optional] # noqa: E501 - form_fields_per_document ([SubFormFieldsPerDocumentBase]): 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`. [optional] # noqa: E501 - hide_text_tags (bool): 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.. [optional] if omitted the server will use the default value of False # noqa: E501 - hold_request (bool): 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`.. [optional] if omitted the server will use the default value of False # noqa: E501 - is_for_embedded_signing (bool): The request created from this draft will also be signable in embedded mode if set to `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - message (str): The custom message in the email that will be sent to the signers.. [optional] # noqa: E501 - metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): 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.. [optional] # noqa: E501 - requesting_redirect_url (str): The URL you want signers redirected to after they successfully request a signature.. [optional] # noqa: E501 - show_preview (bool): 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.. [optional] # noqa: E501 - show_progress_stepper (bool): When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden.. [optional] if omitted the server will use the default value of True # noqa: E501 - signers ([SubUnclaimedDraftSigner]): Add Signers to your Unclaimed Draft Signature Request.. [optional] # noqa: E501 - signing_options (SubSigningOptions): [optional] # noqa: E501 - signing_redirect_url (str): The URL you want signers redirected to after they successfully sign.. [optional] # noqa: E501 - skip_me_now (bool): Disables the \"Me (Now)\" option for the person preparing the document. Does not work with type `send_document`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - subject (str): The subject in the email that will be sent to the signers.. [optional] # noqa: E501 - test_mode (bool): Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - type (str): 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.. [optional] if omitted the server will use the default value of "request_signature" # noqa: E501 - use_preexisting_fields (bool): 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.. [optional] if omitted the server will use the default value of False # noqa: E501 - use_text_tags (bool): 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.. [optional] if omitted the server will use the default value of False # noqa: E501 - populate_auto_fill_fields (bool): 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.. [optional] if omitted the server will use the default value of False # noqa: E501 - expires_at (int, none_type): 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.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.client_id = client_id - self.requester_email_address = requester_email_address - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, client_id, requester_email_address, *args, **kwargs): # noqa: E501 - """UnclaimedDraftCreateEmbeddedRequest - a model defined in OpenAPI - - Args: - client_id (str): 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 (str): The email address of the user that should be designated as the requester of this draft, if the draft type is `request_signature`. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - files ([file_type]): Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.. [optional] # noqa: E501 - file_urls ([str]): 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.. [optional] # noqa: E501 - allow_ccs (bool): This allows the requester to specify whether the user is allowed to provide email addresses to CC when claiming the draft.. [optional] if omitted the server will use the default value of True # noqa: E501 - allow_decline (bool): Allows signers to decline to sign a document if `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - allow_reassign (bool): 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.. [optional] if omitted the server will use the default value of False # noqa: E501 - attachments ([SubAttachment]): A list describing the attachments. [optional] # noqa: E501 - cc_email_addresses ([str]): The email addresses that should be CCed.. [optional] # noqa: E501 - custom_fields ([SubCustomField]): 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.. [optional] # noqa: E501 - editor_options (SubEditorOptions): [optional] # noqa: E501 - field_options (SubFieldOptions): [optional] # noqa: E501 - force_signer_page (bool): Provide users the ability to review/edit the signers.. [optional] if omitted the server will use the default value of False # noqa: E501 - force_subject_message (bool): Provide users the ability to review/edit the subject and message.. [optional] if omitted the server will use the default value of False # noqa: E501 - form_field_groups ([SubFormFieldGroup]): 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`.. [optional] # noqa: E501 - form_field_rules ([SubFormFieldRule]): Conditional Logic rules for fields defined in `form_fields_per_document`.. [optional] # noqa: E501 - form_fields_per_document ([SubFormFieldsPerDocumentBase]): 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`. [optional] # noqa: E501 - hide_text_tags (bool): 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.. [optional] if omitted the server will use the default value of False # noqa: E501 - hold_request (bool): 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`.. [optional] if omitted the server will use the default value of False # noqa: E501 - is_for_embedded_signing (bool): The request created from this draft will also be signable in embedded mode if set to `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - message (str): The custom message in the email that will be sent to the signers.. [optional] # noqa: E501 - metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): 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.. [optional] # noqa: E501 - requesting_redirect_url (str): The URL you want signers redirected to after they successfully request a signature.. [optional] # noqa: E501 - show_preview (bool): 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.. [optional] # noqa: E501 - show_progress_stepper (bool): When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden.. [optional] if omitted the server will use the default value of True # noqa: E501 - signers ([SubUnclaimedDraftSigner]): Add Signers to your Unclaimed Draft Signature Request.. [optional] # noqa: E501 - signing_options (SubSigningOptions): [optional] # noqa: E501 - signing_redirect_url (str): The URL you want signers redirected to after they successfully sign.. [optional] # noqa: E501 - skip_me_now (bool): Disables the \"Me (Now)\" option for the person preparing the document. Does not work with type `send_document`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - subject (str): The subject in the email that will be sent to the signers.. [optional] # noqa: E501 - test_mode (bool): Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - type (str): 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.. [optional] if omitted the server will use the default value of "request_signature" # noqa: E501 - use_preexisting_fields (bool): 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.. [optional] if omitted the server will use the default value of False # noqa: E501 - use_text_tags (bool): 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.. [optional] if omitted the server will use the default value of False # noqa: E501 - populate_auto_fill_fields (bool): 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.. [optional] if omitted the server will use the default value of False # noqa: E501 - expires_at (int, none_type): 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.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.client_id = client_id - self.requester_email_address = requester_email_address - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/unclaimed_draft_create_embedded_with_template_request.py b/sdks/python/dropbox_sign/model/unclaimed_draft_create_embedded_with_template_request.py deleted file mode 100644 index 57f1ef526..000000000 --- a/sdks/python/dropbox_sign/model/unclaimed_draft_create_embedded_with_template_request.py +++ /dev/null @@ -1,675 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.sub_cc import SubCC - from dropbox_sign.model.sub_custom_field import SubCustomField - from dropbox_sign.model.sub_editor_options import SubEditorOptions - from dropbox_sign.model.sub_field_options import SubFieldOptions - from dropbox_sign.model.sub_signing_options import SubSigningOptions - from dropbox_sign.model.sub_unclaimed_draft_template_signer import SubUnclaimedDraftTemplateSigner - - -def lazy_import(): - from dropbox_sign.model.sub_cc import SubCC - from dropbox_sign.model.sub_custom_field import SubCustomField - from dropbox_sign.model.sub_editor_options import SubEditorOptions - from dropbox_sign.model.sub_field_options import SubFieldOptions - from dropbox_sign.model.sub_signing_options import SubSigningOptions - from dropbox_sign.model.sub_unclaimed_draft_template_signer import SubUnclaimedDraftTemplateSigner - globals()['SubCC'] = SubCC - globals()['SubCustomField'] = SubCustomField - globals()['SubEditorOptions'] = SubEditorOptions - globals()['SubFieldOptions'] = SubFieldOptions - globals()['SubSigningOptions'] = SubSigningOptions - globals()['SubUnclaimedDraftTemplateSigner'] = SubUnclaimedDraftTemplateSigner - - -class UnclaimedDraftCreateEmbeddedWithTemplateRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - ('message',): { - 'max_length': 5000, - }, - ('metadata',): { - }, - ('subject',): { - 'max_length': 255, - }, - ('title',): { - 'max_length': 255, - }, - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'client_id': (str,), # noqa: E501 - 'requester_email_address': (str,), # noqa: E501 - 'template_ids': ([str],), # noqa: E501 - 'allow_decline': (bool,), # noqa: E501 - 'allow_reassign': (bool,), # noqa: E501 - 'ccs': ([SubCC],), # noqa: E501 - 'custom_fields': ([SubCustomField],), # noqa: E501 - 'editor_options': (SubEditorOptions,), # noqa: E501 - 'field_options': (SubFieldOptions,), # noqa: E501 - 'files': ([file_type],), # noqa: E501 - 'file_urls': ([str],), # noqa: E501 - 'force_signer_roles': (bool,), # noqa: E501 - 'force_subject_message': (bool,), # noqa: E501 - 'hold_request': (bool,), # noqa: E501 - 'is_for_embedded_signing': (bool,), # noqa: E501 - 'message': (str,), # noqa: E501 - 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 - 'preview_only': (bool,), # noqa: E501 - 'requesting_redirect_url': (str,), # noqa: E501 - 'show_preview': (bool,), # noqa: E501 - 'show_progress_stepper': (bool,), # noqa: E501 - 'signers': ([SubUnclaimedDraftTemplateSigner],), # noqa: E501 - 'signing_options': (SubSigningOptions,), # noqa: E501 - 'signing_redirect_url': (str,), # noqa: E501 - 'skip_me_now': (bool,), # noqa: E501 - 'subject': (str,), # noqa: E501 - 'test_mode': (bool,), # noqa: E501 - 'title': (str,), # noqa: E501 - 'populate_auto_fill_fields': (bool,), # noqa: E501 - 'allow_ccs': (bool,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> UnclaimedDraftCreateEmbeddedWithTemplateRequest: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[UnclaimedDraftCreateEmbeddedWithTemplateRequest], - _check_type=True, - ) - - - attribute_map = { - 'client_id': 'client_id', # noqa: E501 - 'requester_email_address': 'requester_email_address', # noqa: E501 - 'template_ids': 'template_ids', # noqa: E501 - 'allow_decline': 'allow_decline', # noqa: E501 - 'allow_reassign': 'allow_reassign', # noqa: E501 - 'ccs': 'ccs', # noqa: E501 - 'custom_fields': 'custom_fields', # noqa: E501 - 'editor_options': 'editor_options', # noqa: E501 - 'field_options': 'field_options', # noqa: E501 - 'files': 'files', # noqa: E501 - 'file_urls': 'file_urls', # noqa: E501 - 'force_signer_roles': 'force_signer_roles', # noqa: E501 - 'force_subject_message': 'force_subject_message', # noqa: E501 - 'hold_request': 'hold_request', # noqa: E501 - 'is_for_embedded_signing': 'is_for_embedded_signing', # noqa: E501 - 'message': 'message', # noqa: E501 - 'metadata': 'metadata', # noqa: E501 - 'preview_only': 'preview_only', # noqa: E501 - 'requesting_redirect_url': 'requesting_redirect_url', # noqa: E501 - 'show_preview': 'show_preview', # noqa: E501 - 'show_progress_stepper': 'show_progress_stepper', # noqa: E501 - 'signers': 'signers', # noqa: E501 - 'signing_options': 'signing_options', # noqa: E501 - 'signing_redirect_url': 'signing_redirect_url', # noqa: E501 - 'skip_me_now': 'skip_me_now', # noqa: E501 - 'subject': 'subject', # noqa: E501 - 'test_mode': 'test_mode', # noqa: E501 - 'title': 'title', # noqa: E501 - 'populate_auto_fill_fields': 'populate_auto_fill_fields', # noqa: E501 - 'allow_ccs': 'allow_ccs', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def client_id(self) -> str: - return self.get("client_id") - - @client_id.setter - def client_id(self, value: str): - setattr(self, "client_id", value) - - @property - def requester_email_address(self) -> str: - return self.get("requester_email_address") - - @requester_email_address.setter - def requester_email_address(self, value: str): - setattr(self, "requester_email_address", value) - - @property - def template_ids(self) -> List[str]: - return self.get("template_ids") - - @template_ids.setter - def template_ids(self, value: List[str]): - setattr(self, "template_ids", value) - - @property - def allow_decline(self) -> bool: - return self.get("allow_decline") - - @allow_decline.setter - def allow_decline(self, value: bool): - setattr(self, "allow_decline", value) - - @property - def allow_reassign(self) -> bool: - return self.get("allow_reassign") - - @allow_reassign.setter - def allow_reassign(self, value: bool): - setattr(self, "allow_reassign", value) - - @property - def ccs(self) -> List[SubCC]: - return self.get("ccs") - - @ccs.setter - def ccs(self, value: List[SubCC]): - setattr(self, "ccs", value) - - @property - def custom_fields(self) -> List[SubCustomField]: - return self.get("custom_fields") - - @custom_fields.setter - def custom_fields(self, value: List[SubCustomField]): - setattr(self, "custom_fields", value) - - @property - def editor_options(self) -> SubEditorOptions: - return self.get("editor_options") - - @editor_options.setter - def editor_options(self, value: SubEditorOptions): - setattr(self, "editor_options", value) - - @property - def field_options(self) -> SubFieldOptions: - return self.get("field_options") - - @field_options.setter - def field_options(self, value: SubFieldOptions): - setattr(self, "field_options", value) - - @property - def files(self) -> List[file_type]: - return self.get("files") - - @files.setter - def files(self, value: List[file_type]): - setattr(self, "files", value) - - @property - def file_urls(self) -> List[str]: - return self.get("file_urls") - - @file_urls.setter - def file_urls(self, value: List[str]): - setattr(self, "file_urls", value) - - @property - def force_signer_roles(self) -> bool: - return self.get("force_signer_roles") - - @force_signer_roles.setter - def force_signer_roles(self, value: bool): - setattr(self, "force_signer_roles", value) - - @property - def force_subject_message(self) -> bool: - return self.get("force_subject_message") - - @force_subject_message.setter - def force_subject_message(self, value: bool): - setattr(self, "force_subject_message", value) - - @property - def hold_request(self) -> bool: - return self.get("hold_request") - - @hold_request.setter - def hold_request(self, value: bool): - setattr(self, "hold_request", value) - - @property - def is_for_embedded_signing(self) -> bool: - return self.get("is_for_embedded_signing") - - @is_for_embedded_signing.setter - def is_for_embedded_signing(self, value: bool): - setattr(self, "is_for_embedded_signing", value) - - @property - def message(self) -> str: - return self.get("message") - - @message.setter - def message(self, value: str): - setattr(self, "message", value) - - @property - def metadata(self) -> Dict[str, Union[bool, date, datetime, dict, float, int, list, str, none_type]]: - return self.get("metadata") - - @metadata.setter - def metadata(self, value: Dict[str, Union[bool, date, datetime, dict, float, int, list, str, none_type]]): - setattr(self, "metadata", value) - - @property - def preview_only(self) -> bool: - return self.get("preview_only") - - @preview_only.setter - def preview_only(self, value: bool): - setattr(self, "preview_only", value) - - @property - def requesting_redirect_url(self) -> str: - return self.get("requesting_redirect_url") - - @requesting_redirect_url.setter - def requesting_redirect_url(self, value: str): - setattr(self, "requesting_redirect_url", value) - - @property - def show_preview(self) -> bool: - return self.get("show_preview") - - @show_preview.setter - def show_preview(self, value: bool): - setattr(self, "show_preview", value) - - @property - def show_progress_stepper(self) -> bool: - return self.get("show_progress_stepper") - - @show_progress_stepper.setter - def show_progress_stepper(self, value: bool): - setattr(self, "show_progress_stepper", value) - - @property - def signers(self) -> List[SubUnclaimedDraftTemplateSigner]: - return self.get("signers") - - @signers.setter - def signers(self, value: List[SubUnclaimedDraftTemplateSigner]): - setattr(self, "signers", value) - - @property - def signing_options(self) -> SubSigningOptions: - return self.get("signing_options") - - @signing_options.setter - def signing_options(self, value: SubSigningOptions): - setattr(self, "signing_options", value) - - @property - def signing_redirect_url(self) -> str: - return self.get("signing_redirect_url") - - @signing_redirect_url.setter - def signing_redirect_url(self, value: str): - setattr(self, "signing_redirect_url", value) - - @property - def skip_me_now(self) -> bool: - return self.get("skip_me_now") - - @skip_me_now.setter - def skip_me_now(self, value: bool): - setattr(self, "skip_me_now", value) - - @property - def subject(self) -> str: - return self.get("subject") - - @subject.setter - def subject(self, value: str): - setattr(self, "subject", value) - - @property - def test_mode(self) -> bool: - return self.get("test_mode") - - @test_mode.setter - def test_mode(self, value: bool): - setattr(self, "test_mode", value) - - @property - def title(self) -> str: - return self.get("title") - - @title.setter - def title(self, value: str): - setattr(self, "title", value) - - @property - def populate_auto_fill_fields(self) -> bool: - return self.get("populate_auto_fill_fields") - - @populate_auto_fill_fields.setter - def populate_auto_fill_fields(self, value: bool): - setattr(self, "populate_auto_fill_fields", value) - - @property - def allow_ccs(self) -> bool: - return self.get("allow_ccs") - - @allow_ccs.setter - def allow_ccs(self, value: bool): - setattr(self, "allow_ccs", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, client_id, requester_email_address, template_ids, *args, **kwargs): # noqa: E501 - """UnclaimedDraftCreateEmbeddedWithTemplateRequest - a model defined in OpenAPI - - Args: - client_id (str): 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 (str): The email address of the user that should be designated as the requester of this draft. - template_ids ([str]): Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the templates will be used. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - allow_decline (bool): Allows signers to decline to sign a document if `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - allow_reassign (bool): 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.. [optional] if omitted the server will use the default value of False # noqa: E501 - ccs ([SubCC]): Add CC email recipients. Required when a CC role exists for the Template.. [optional] # noqa: E501 - custom_fields ([SubCustomField]): An array defining values and options for custom fields. Required when a custom field exists in the Template.. [optional] # noqa: E501 - editor_options (SubEditorOptions): [optional] # noqa: E501 - field_options (SubFieldOptions): [optional] # noqa: E501 - files ([file_type]): 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.. [optional] # noqa: E501 - file_urls ([str]): 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.. [optional] # noqa: E501 - force_signer_roles (bool): Provide users the ability to review/edit the template signer roles.. [optional] if omitted the server will use the default value of False # noqa: E501 - force_subject_message (bool): Provide users the ability to review/edit the template subject and message.. [optional] if omitted the server will use the default value of False # noqa: E501 - hold_request (bool): 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`.. [optional] if omitted the server will use the default value of False # noqa: E501 - is_for_embedded_signing (bool): The request created from this draft will also be signable in embedded mode if set to `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - message (str): The custom message in the email that will be sent to the signers.. [optional] # noqa: E501 - metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): 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.. [optional] # noqa: E501 - preview_only (bool): 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).. [optional] if omitted the server will use the default value of False # noqa: E501 - requesting_redirect_url (str): The URL you want signers redirected to after they successfully request a signature.. [optional] # noqa: E501 - show_preview (bool): 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.. [optional] if omitted the server will use the default value of False # noqa: E501 - show_progress_stepper (bool): When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden.. [optional] if omitted the server will use the default value of True # noqa: E501 - signers ([SubUnclaimedDraftTemplateSigner]): Add Signers to your Templated-based Signature Request.. [optional] # noqa: E501 - signing_options (SubSigningOptions): [optional] # noqa: E501 - signing_redirect_url (str): The URL you want signers redirected to after they successfully sign.. [optional] # noqa: E501 - skip_me_now (bool): Disables the \"Me (Now)\" option for the person preparing the document. Does not work with type `send_document`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - subject (str): The subject in the email that will be sent to the signers.. [optional] # noqa: E501 - test_mode (bool): Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - title (str): The title you want to assign to the SignatureRequest.. [optional] # noqa: E501 - populate_auto_fill_fields (bool): 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.. [optional] if omitted the server will use the default value of False # noqa: E501 - allow_ccs (bool): This allows the requester to specify whether the user is allowed to provide email addresses to CC when claiming the draft.. [optional] if omitted the server will use the default value of False # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.client_id = client_id - self.requester_email_address = requester_email_address - self.template_ids = template_ids - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, client_id, requester_email_address, template_ids, *args, **kwargs): # noqa: E501 - """UnclaimedDraftCreateEmbeddedWithTemplateRequest - a model defined in OpenAPI - - Args: - client_id (str): 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 (str): The email address of the user that should be designated as the requester of this draft. - template_ids ([str]): Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the templates will be used. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - allow_decline (bool): Allows signers to decline to sign a document if `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - allow_reassign (bool): 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.. [optional] if omitted the server will use the default value of False # noqa: E501 - ccs ([SubCC]): Add CC email recipients. Required when a CC role exists for the Template.. [optional] # noqa: E501 - custom_fields ([SubCustomField]): An array defining values and options for custom fields. Required when a custom field exists in the Template.. [optional] # noqa: E501 - editor_options (SubEditorOptions): [optional] # noqa: E501 - field_options (SubFieldOptions): [optional] # noqa: E501 - files ([file_type]): 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.. [optional] # noqa: E501 - file_urls ([str]): 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.. [optional] # noqa: E501 - force_signer_roles (bool): Provide users the ability to review/edit the template signer roles.. [optional] if omitted the server will use the default value of False # noqa: E501 - force_subject_message (bool): Provide users the ability to review/edit the template subject and message.. [optional] if omitted the server will use the default value of False # noqa: E501 - hold_request (bool): 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`.. [optional] if omitted the server will use the default value of False # noqa: E501 - is_for_embedded_signing (bool): The request created from this draft will also be signable in embedded mode if set to `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - message (str): The custom message in the email that will be sent to the signers.. [optional] # noqa: E501 - metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): 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.. [optional] # noqa: E501 - preview_only (bool): 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).. [optional] if omitted the server will use the default value of False # noqa: E501 - requesting_redirect_url (str): The URL you want signers redirected to after they successfully request a signature.. [optional] # noqa: E501 - show_preview (bool): 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.. [optional] if omitted the server will use the default value of False # noqa: E501 - show_progress_stepper (bool): When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden.. [optional] if omitted the server will use the default value of True # noqa: E501 - signers ([SubUnclaimedDraftTemplateSigner]): Add Signers to your Templated-based Signature Request.. [optional] # noqa: E501 - signing_options (SubSigningOptions): [optional] # noqa: E501 - signing_redirect_url (str): The URL you want signers redirected to after they successfully sign.. [optional] # noqa: E501 - skip_me_now (bool): Disables the \"Me (Now)\" option for the person preparing the document. Does not work with type `send_document`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - subject (str): The subject in the email that will be sent to the signers.. [optional] # noqa: E501 - test_mode (bool): Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - title (str): The title you want to assign to the SignatureRequest.. [optional] # noqa: E501 - populate_auto_fill_fields (bool): 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.. [optional] if omitted the server will use the default value of False # noqa: E501 - allow_ccs (bool): This allows the requester to specify whether the user is allowed to provide email addresses to CC when claiming the draft.. [optional] if omitted the server will use the default value of False # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.client_id = client_id - self.requester_email_address = requester_email_address - self.template_ids = template_ids - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/unclaimed_draft_create_request.py b/sdks/python/dropbox_sign/model/unclaimed_draft_create_request.py deleted file mode 100644 index 829176dbf..000000000 --- a/sdks/python/dropbox_sign/model/unclaimed_draft_create_request.py +++ /dev/null @@ -1,606 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.sub_attachment import SubAttachment - from dropbox_sign.model.sub_custom_field import SubCustomField - from dropbox_sign.model.sub_field_options import SubFieldOptions - from dropbox_sign.model.sub_form_field_group import SubFormFieldGroup - from dropbox_sign.model.sub_form_field_rule import SubFormFieldRule - from dropbox_sign.model.sub_form_fields_per_document_base import SubFormFieldsPerDocumentBase - from dropbox_sign.model.sub_signing_options import SubSigningOptions - from dropbox_sign.model.sub_unclaimed_draft_signer import SubUnclaimedDraftSigner - - -def lazy_import(): - from dropbox_sign.model.sub_attachment import SubAttachment - from dropbox_sign.model.sub_custom_field import SubCustomField - from dropbox_sign.model.sub_field_options import SubFieldOptions - from dropbox_sign.model.sub_form_field_group import SubFormFieldGroup - from dropbox_sign.model.sub_form_field_rule import SubFormFieldRule - from dropbox_sign.model.sub_form_fields_per_document_base import SubFormFieldsPerDocumentBase - from dropbox_sign.model.sub_signing_options import SubSigningOptions - from dropbox_sign.model.sub_unclaimed_draft_signer import SubUnclaimedDraftSigner - globals()['SubAttachment'] = SubAttachment - globals()['SubCustomField'] = SubCustomField - globals()['SubFieldOptions'] = SubFieldOptions - globals()['SubFormFieldGroup'] = SubFormFieldGroup - globals()['SubFormFieldRule'] = SubFormFieldRule - globals()['SubFormFieldsPerDocumentBase'] = SubFormFieldsPerDocumentBase - globals()['SubSigningOptions'] = SubSigningOptions - globals()['SubUnclaimedDraftSigner'] = SubUnclaimedDraftSigner - - -class UnclaimedDraftCreateRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('type',): { - 'SEND_DOCUMENT': "send_document", - 'REQUEST_SIGNATURE': "request_signature", - }, - } - - validations = { - ('message',): { - 'max_length': 5000, - }, - ('metadata',): { - }, - ('subject',): { - 'max_length': 200, - }, - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'type': (str,), # noqa: E501 - 'files': ([file_type],), # noqa: E501 - 'file_urls': ([str],), # noqa: E501 - 'allow_decline': (bool,), # noqa: E501 - 'attachments': ([SubAttachment],), # noqa: E501 - 'cc_email_addresses': ([str],), # noqa: E501 - 'client_id': (str,), # noqa: E501 - 'custom_fields': ([SubCustomField],), # noqa: E501 - 'field_options': (SubFieldOptions,), # noqa: E501 - 'form_field_groups': ([SubFormFieldGroup],), # noqa: E501 - 'form_field_rules': ([SubFormFieldRule],), # noqa: E501 - 'form_fields_per_document': ([SubFormFieldsPerDocumentBase],), # noqa: E501 - 'hide_text_tags': (bool,), # noqa: E501 - 'message': (str,), # noqa: E501 - 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 - 'show_progress_stepper': (bool,), # noqa: E501 - 'signers': ([SubUnclaimedDraftSigner],), # noqa: E501 - 'signing_options': (SubSigningOptions,), # noqa: E501 - 'signing_redirect_url': (str,), # noqa: E501 - 'subject': (str,), # noqa: E501 - 'test_mode': (bool,), # noqa: E501 - 'use_preexisting_fields': (bool,), # noqa: E501 - 'use_text_tags': (bool,), # noqa: E501 - 'expires_at': (int, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> UnclaimedDraftCreateRequest: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[UnclaimedDraftCreateRequest], - _check_type=True, - ) - - - attribute_map = { - 'type': 'type', # noqa: E501 - 'files': 'files', # noqa: E501 - 'file_urls': 'file_urls', # noqa: E501 - 'allow_decline': 'allow_decline', # noqa: E501 - 'attachments': 'attachments', # noqa: E501 - 'cc_email_addresses': 'cc_email_addresses', # noqa: E501 - 'client_id': 'client_id', # noqa: E501 - 'custom_fields': 'custom_fields', # noqa: E501 - 'field_options': 'field_options', # noqa: E501 - 'form_field_groups': 'form_field_groups', # noqa: E501 - 'form_field_rules': 'form_field_rules', # noqa: E501 - 'form_fields_per_document': 'form_fields_per_document', # noqa: E501 - 'hide_text_tags': 'hide_text_tags', # noqa: E501 - 'message': 'message', # noqa: E501 - 'metadata': 'metadata', # noqa: E501 - 'show_progress_stepper': 'show_progress_stepper', # noqa: E501 - 'signers': 'signers', # noqa: E501 - 'signing_options': 'signing_options', # noqa: E501 - 'signing_redirect_url': 'signing_redirect_url', # noqa: E501 - 'subject': 'subject', # noqa: E501 - 'test_mode': 'test_mode', # noqa: E501 - 'use_preexisting_fields': 'use_preexisting_fields', # noqa: E501 - 'use_text_tags': 'use_text_tags', # noqa: E501 - 'expires_at': 'expires_at', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def type(self) -> str: - return self.get("type") - - @type.setter - def type(self, value: str): - setattr(self, "type", value) - - @property - def files(self) -> List[file_type]: - return self.get("files") - - @files.setter - def files(self, value: List[file_type]): - setattr(self, "files", value) - - @property - def file_urls(self) -> List[str]: - return self.get("file_urls") - - @file_urls.setter - def file_urls(self, value: List[str]): - setattr(self, "file_urls", value) - - @property - def allow_decline(self) -> bool: - return self.get("allow_decline") - - @allow_decline.setter - def allow_decline(self, value: bool): - setattr(self, "allow_decline", value) - - @property - def attachments(self) -> List[SubAttachment]: - return self.get("attachments") - - @attachments.setter - def attachments(self, value: List[SubAttachment]): - setattr(self, "attachments", value) - - @property - def cc_email_addresses(self) -> List[str]: - return self.get("cc_email_addresses") - - @cc_email_addresses.setter - def cc_email_addresses(self, value: List[str]): - setattr(self, "cc_email_addresses", value) - - @property - def client_id(self) -> str: - return self.get("client_id") - - @client_id.setter - def client_id(self, value: str): - setattr(self, "client_id", value) - - @property - def custom_fields(self) -> List[SubCustomField]: - return self.get("custom_fields") - - @custom_fields.setter - def custom_fields(self, value: List[SubCustomField]): - setattr(self, "custom_fields", value) - - @property - def field_options(self) -> SubFieldOptions: - return self.get("field_options") - - @field_options.setter - def field_options(self, value: SubFieldOptions): - setattr(self, "field_options", value) - - @property - def form_field_groups(self) -> List[SubFormFieldGroup]: - return self.get("form_field_groups") - - @form_field_groups.setter - def form_field_groups(self, value: List[SubFormFieldGroup]): - setattr(self, "form_field_groups", value) - - @property - def form_field_rules(self) -> List[SubFormFieldRule]: - return self.get("form_field_rules") - - @form_field_rules.setter - def form_field_rules(self, value: List[SubFormFieldRule]): - setattr(self, "form_field_rules", value) - - @property - def form_fields_per_document(self) -> List[SubFormFieldsPerDocumentBase]: - return self.get("form_fields_per_document") - - @form_fields_per_document.setter - def form_fields_per_document(self, value: List[SubFormFieldsPerDocumentBase]): - setattr(self, "form_fields_per_document", value) - - @property - def hide_text_tags(self) -> bool: - return self.get("hide_text_tags") - - @hide_text_tags.setter - def hide_text_tags(self, value: bool): - setattr(self, "hide_text_tags", value) - - @property - def message(self) -> str: - return self.get("message") - - @message.setter - def message(self, value: str): - setattr(self, "message", value) - - @property - def metadata(self) -> Dict[str, Union[bool, date, datetime, dict, float, int, list, str, none_type]]: - return self.get("metadata") - - @metadata.setter - def metadata(self, value: Dict[str, Union[bool, date, datetime, dict, float, int, list, str, none_type]]): - setattr(self, "metadata", value) - - @property - def show_progress_stepper(self) -> bool: - return self.get("show_progress_stepper") - - @show_progress_stepper.setter - def show_progress_stepper(self, value: bool): - setattr(self, "show_progress_stepper", value) - - @property - def signers(self) -> List[SubUnclaimedDraftSigner]: - return self.get("signers") - - @signers.setter - def signers(self, value: List[SubUnclaimedDraftSigner]): - setattr(self, "signers", value) - - @property - def signing_options(self) -> SubSigningOptions: - return self.get("signing_options") - - @signing_options.setter - def signing_options(self, value: SubSigningOptions): - setattr(self, "signing_options", value) - - @property - def signing_redirect_url(self) -> str: - return self.get("signing_redirect_url") - - @signing_redirect_url.setter - def signing_redirect_url(self, value: str): - setattr(self, "signing_redirect_url", value) - - @property - def subject(self) -> str: - return self.get("subject") - - @subject.setter - def subject(self, value: str): - setattr(self, "subject", value) - - @property - def test_mode(self) -> bool: - return self.get("test_mode") - - @test_mode.setter - def test_mode(self, value: bool): - setattr(self, "test_mode", value) - - @property - def use_preexisting_fields(self) -> bool: - return self.get("use_preexisting_fields") - - @use_preexisting_fields.setter - def use_preexisting_fields(self, value: bool): - setattr(self, "use_preexisting_fields", value) - - @property - def use_text_tags(self) -> bool: - return self.get("use_text_tags") - - @use_text_tags.setter - def use_text_tags(self, value: bool): - setattr(self, "use_text_tags", value) - - @property - def expires_at(self) -> Optional[int]: - return self.get("expires_at") - - @expires_at.setter - def expires_at(self, value: Optional[int]): - setattr(self, "expires_at", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, type, *args, **kwargs): # noqa: E501 - """UnclaimedDraftCreateRequest - a model defined in OpenAPI - - Args: - type (str): 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. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - files ([file_type]): Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.. [optional] # noqa: E501 - file_urls ([str]): 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.. [optional] # noqa: E501 - allow_decline (bool): Allows signers to decline to sign a document if `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - attachments ([SubAttachment]): A list describing the attachments. [optional] # noqa: E501 - cc_email_addresses ([str]): The email addresses that should be CCed.. [optional] # noqa: E501 - client_id (str): Client id of the app used to create the draft. Used to apply the branding and callback url defined for the app.. [optional] # noqa: E501 - custom_fields ([SubCustomField]): 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.. [optional] # noqa: E501 - field_options (SubFieldOptions): [optional] # noqa: E501 - form_field_groups ([SubFormFieldGroup]): 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`.. [optional] # noqa: E501 - form_field_rules ([SubFormFieldRule]): Conditional Logic rules for fields defined in `form_fields_per_document`.. [optional] # noqa: E501 - form_fields_per_document ([SubFormFieldsPerDocumentBase]): 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`. [optional] # noqa: E501 - hide_text_tags (bool): 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.. [optional] if omitted the server will use the default value of False # noqa: E501 - message (str): The custom message in the email that will be sent to the signers.. [optional] # noqa: E501 - metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): 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.. [optional] # noqa: E501 - show_progress_stepper (bool): When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden.. [optional] if omitted the server will use the default value of True # noqa: E501 - signers ([SubUnclaimedDraftSigner]): Add Signers to your Unclaimed Draft Signature Request.. [optional] # noqa: E501 - signing_options (SubSigningOptions): [optional] # noqa: E501 - signing_redirect_url (str): The URL you want signers redirected to after they successfully sign.. [optional] # noqa: E501 - subject (str): The subject in the email that will be sent to the signers.. [optional] # noqa: E501 - test_mode (bool): Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - use_preexisting_fields (bool): 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.. [optional] if omitted the server will use the default value of False # noqa: E501 - use_text_tags (bool): 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.. [optional] if omitted the server will use the default value of False # noqa: E501 - expires_at (int, none_type): 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.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.type = type - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, type, *args, **kwargs): # noqa: E501 - """UnclaimedDraftCreateRequest - a model defined in OpenAPI - - Args: - type (str): 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. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - files ([file_type]): Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.. [optional] # noqa: E501 - file_urls ([str]): 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.. [optional] # noqa: E501 - allow_decline (bool): Allows signers to decline to sign a document if `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - attachments ([SubAttachment]): A list describing the attachments. [optional] # noqa: E501 - cc_email_addresses ([str]): The email addresses that should be CCed.. [optional] # noqa: E501 - client_id (str): Client id of the app used to create the draft. Used to apply the branding and callback url defined for the app.. [optional] # noqa: E501 - custom_fields ([SubCustomField]): 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.. [optional] # noqa: E501 - field_options (SubFieldOptions): [optional] # noqa: E501 - form_field_groups ([SubFormFieldGroup]): 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`.. [optional] # noqa: E501 - form_field_rules ([SubFormFieldRule]): Conditional Logic rules for fields defined in `form_fields_per_document`.. [optional] # noqa: E501 - form_fields_per_document ([SubFormFieldsPerDocumentBase]): 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`. [optional] # noqa: E501 - hide_text_tags (bool): 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.. [optional] if omitted the server will use the default value of False # noqa: E501 - message (str): The custom message in the email that will be sent to the signers.. [optional] # noqa: E501 - metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): 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.. [optional] # noqa: E501 - show_progress_stepper (bool): When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden.. [optional] if omitted the server will use the default value of True # noqa: E501 - signers ([SubUnclaimedDraftSigner]): Add Signers to your Unclaimed Draft Signature Request.. [optional] # noqa: E501 - signing_options (SubSigningOptions): [optional] # noqa: E501 - signing_redirect_url (str): The URL you want signers redirected to after they successfully sign.. [optional] # noqa: E501 - subject (str): The subject in the email that will be sent to the signers.. [optional] # noqa: E501 - test_mode (bool): Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - use_preexisting_fields (bool): 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.. [optional] if omitted the server will use the default value of False # noqa: E501 - use_text_tags (bool): 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.. [optional] if omitted the server will use the default value of False # noqa: E501 - expires_at (int, none_type): 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.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.type = type - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/unclaimed_draft_create_response.py b/sdks/python/dropbox_sign/model/unclaimed_draft_create_response.py deleted file mode 100644 index eb5f1c23c..000000000 --- a/sdks/python/dropbox_sign/model/unclaimed_draft_create_response.py +++ /dev/null @@ -1,306 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.unclaimed_draft_response import UnclaimedDraftResponse - from dropbox_sign.model.warning_response import WarningResponse - - -def lazy_import(): - from dropbox_sign.model.unclaimed_draft_response import UnclaimedDraftResponse - from dropbox_sign.model.warning_response import WarningResponse - globals()['UnclaimedDraftResponse'] = UnclaimedDraftResponse - globals()['WarningResponse'] = WarningResponse - - -class UnclaimedDraftCreateResponse(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'unclaimed_draft': (UnclaimedDraftResponse,), # noqa: E501 - 'warnings': ([WarningResponse],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> UnclaimedDraftCreateResponse: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[UnclaimedDraftCreateResponse], - _check_type=True, - ) - - - attribute_map = { - 'unclaimed_draft': 'unclaimed_draft', # noqa: E501 - 'warnings': 'warnings', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def unclaimed_draft(self) -> UnclaimedDraftResponse: - return self.get("unclaimed_draft") - - @unclaimed_draft.setter - def unclaimed_draft(self, value: UnclaimedDraftResponse): - setattr(self, "unclaimed_draft", value) - - @property - def warnings(self) -> List[WarningResponse]: - return self.get("warnings") - - @warnings.setter - def warnings(self, value: List[WarningResponse]): - setattr(self, "warnings", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """UnclaimedDraftCreateResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - unclaimed_draft (UnclaimedDraftResponse): [optional] # noqa: E501 - warnings ([WarningResponse]): A list of warnings.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """UnclaimedDraftCreateResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - unclaimed_draft (UnclaimedDraftResponse): [optional] # noqa: E501 - warnings ([WarningResponse]): A list of warnings.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/unclaimed_draft_edit_and_resend_request.py b/sdks/python/dropbox_sign/model/unclaimed_draft_edit_and_resend_request.py deleted file mode 100644 index d38186bab..000000000 --- a/sdks/python/dropbox_sign/model/unclaimed_draft_edit_and_resend_request.py +++ /dev/null @@ -1,381 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError -if TYPE_CHECKING: - from dropbox_sign.model.sub_editor_options import SubEditorOptions - - -def lazy_import(): - from dropbox_sign.model.sub_editor_options import SubEditorOptions - globals()['SubEditorOptions'] = SubEditorOptions - - -class UnclaimedDraftEditAndResendRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'client_id': (str,), # noqa: E501 - 'editor_options': (SubEditorOptions,), # noqa: E501 - 'is_for_embedded_signing': (bool,), # noqa: E501 - 'requester_email_address': (str,), # noqa: E501 - 'requesting_redirect_url': (str,), # noqa: E501 - 'show_progress_stepper': (bool,), # noqa: E501 - 'signing_redirect_url': (str,), # noqa: E501 - 'test_mode': (bool,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> UnclaimedDraftEditAndResendRequest: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[UnclaimedDraftEditAndResendRequest], - _check_type=True, - ) - - - attribute_map = { - 'client_id': 'client_id', # noqa: E501 - 'editor_options': 'editor_options', # noqa: E501 - 'is_for_embedded_signing': 'is_for_embedded_signing', # noqa: E501 - 'requester_email_address': 'requester_email_address', # noqa: E501 - 'requesting_redirect_url': 'requesting_redirect_url', # noqa: E501 - 'show_progress_stepper': 'show_progress_stepper', # noqa: E501 - 'signing_redirect_url': 'signing_redirect_url', # noqa: E501 - 'test_mode': 'test_mode', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def client_id(self) -> str: - return self.get("client_id") - - @client_id.setter - def client_id(self, value: str): - setattr(self, "client_id", value) - - @property - def editor_options(self) -> SubEditorOptions: - return self.get("editor_options") - - @editor_options.setter - def editor_options(self, value: SubEditorOptions): - setattr(self, "editor_options", value) - - @property - def is_for_embedded_signing(self) -> bool: - return self.get("is_for_embedded_signing") - - @is_for_embedded_signing.setter - def is_for_embedded_signing(self, value: bool): - setattr(self, "is_for_embedded_signing", value) - - @property - def requester_email_address(self) -> str: - return self.get("requester_email_address") - - @requester_email_address.setter - def requester_email_address(self, value: str): - setattr(self, "requester_email_address", value) - - @property - def requesting_redirect_url(self) -> str: - return self.get("requesting_redirect_url") - - @requesting_redirect_url.setter - def requesting_redirect_url(self, value: str): - setattr(self, "requesting_redirect_url", value) - - @property - def show_progress_stepper(self) -> bool: - return self.get("show_progress_stepper") - - @show_progress_stepper.setter - def show_progress_stepper(self, value: bool): - setattr(self, "show_progress_stepper", value) - - @property - def signing_redirect_url(self) -> str: - return self.get("signing_redirect_url") - - @signing_redirect_url.setter - def signing_redirect_url(self, value: str): - setattr(self, "signing_redirect_url", value) - - @property - def test_mode(self) -> bool: - return self.get("test_mode") - - @test_mode.setter - def test_mode(self, value: bool): - setattr(self, "test_mode", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, client_id, *args, **kwargs): # noqa: E501 - """UnclaimedDraftEditAndResendRequest - a model defined in OpenAPI - - Args: - client_id (str): Client id of the app used to create the draft. Used to apply the branding and callback url defined for the app. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - editor_options (SubEditorOptions): [optional] # noqa: E501 - is_for_embedded_signing (bool): The request created from this draft will also be signable in embedded mode if set to `true`.. [optional] # noqa: E501 - requester_email_address (str): 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.. [optional] # noqa: E501 - requesting_redirect_url (str): The URL you want signers redirected to after they successfully request a signature.. [optional] # noqa: E501 - show_progress_stepper (bool): When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden.. [optional] if omitted the server will use the default value of True # noqa: E501 - signing_redirect_url (str): The URL you want signers redirected to after they successfully sign.. [optional] # noqa: E501 - test_mode (bool): Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.client_id = client_id - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, client_id, *args, **kwargs): # noqa: E501 - """UnclaimedDraftEditAndResendRequest - a model defined in OpenAPI - - Args: - client_id (str): Client id of the app used to create the draft. Used to apply the branding and callback url defined for the app. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - editor_options (SubEditorOptions): [optional] # noqa: E501 - is_for_embedded_signing (bool): The request created from this draft will also be signable in embedded mode if set to `true`.. [optional] # noqa: E501 - requester_email_address (str): 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.. [optional] # noqa: E501 - requesting_redirect_url (str): The URL you want signers redirected to after they successfully request a signature.. [optional] # noqa: E501 - show_progress_stepper (bool): When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden.. [optional] if omitted the server will use the default value of True # noqa: E501 - signing_redirect_url (str): The URL you want signers redirected to after they successfully sign.. [optional] # noqa: E501 - test_mode (bool): Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`.. [optional] if omitted the server will use the default value of False # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.client_id = client_id - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/unclaimed_draft_response.py b/sdks/python/dropbox_sign/model/unclaimed_draft_response.py deleted file mode 100644 index 03c72fcb1..000000000 --- a/sdks/python/dropbox_sign/model/unclaimed_draft_response.py +++ /dev/null @@ -1,343 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class UnclaimedDraftResponse(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'signature_request_id': (str, none_type,), # noqa: E501 - 'claim_url': (str,), # noqa: E501 - 'signing_redirect_url': (str, none_type,), # noqa: E501 - 'requesting_redirect_url': (str, none_type,), # noqa: E501 - 'expires_at': (int, none_type,), # noqa: E501 - 'test_mode': (bool,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> UnclaimedDraftResponse: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[UnclaimedDraftResponse], - _check_type=True, - ) - - - attribute_map = { - 'signature_request_id': 'signature_request_id', # noqa: E501 - 'claim_url': 'claim_url', # noqa: E501 - 'signing_redirect_url': 'signing_redirect_url', # noqa: E501 - 'requesting_redirect_url': 'requesting_redirect_url', # noqa: E501 - 'expires_at': 'expires_at', # noqa: E501 - 'test_mode': 'test_mode', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def signature_request_id(self) -> Optional[str]: - return self.get("signature_request_id") - - @signature_request_id.setter - def signature_request_id(self, value: Optional[str]): - setattr(self, "signature_request_id", value) - - @property - def claim_url(self) -> str: - return self.get("claim_url") - - @claim_url.setter - def claim_url(self, value: str): - setattr(self, "claim_url", value) - - @property - def signing_redirect_url(self) -> Optional[str]: - return self.get("signing_redirect_url") - - @signing_redirect_url.setter - def signing_redirect_url(self, value: Optional[str]): - setattr(self, "signing_redirect_url", value) - - @property - def requesting_redirect_url(self) -> Optional[str]: - return self.get("requesting_redirect_url") - - @requesting_redirect_url.setter - def requesting_redirect_url(self, value: Optional[str]): - setattr(self, "requesting_redirect_url", value) - - @property - def expires_at(self) -> Optional[int]: - return self.get("expires_at") - - @expires_at.setter - def expires_at(self, value: Optional[int]): - setattr(self, "expires_at", value) - - @property - def test_mode(self) -> bool: - return self.get("test_mode") - - @test_mode.setter - def test_mode(self, value: bool): - setattr(self, "test_mode", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """UnclaimedDraftResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - signature_request_id (str, none_type): The ID of the signature request that is represented by this UnclaimedDraft.. [optional] # noqa: E501 - claim_url (str): The URL to be used to claim this UnclaimedDraft.. [optional] # noqa: E501 - signing_redirect_url (str, none_type): The URL you want signers redirected to after they successfully sign.. [optional] # noqa: E501 - requesting_redirect_url (str, none_type): 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.).. [optional] # noqa: E501 - expires_at (int, none_type): When the link expires.. [optional] # noqa: E501 - test_mode (bool): Whether this is a test draft. Signature requests made from test drafts have no legal value.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """UnclaimedDraftResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - signature_request_id (str, none_type): The ID of the signature request that is represented by this UnclaimedDraft.. [optional] # noqa: E501 - claim_url (str): The URL to be used to claim this UnclaimedDraft.. [optional] # noqa: E501 - signing_redirect_url (str, none_type): The URL you want signers redirected to after they successfully sign.. [optional] # noqa: E501 - requesting_redirect_url (str, none_type): 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.).. [optional] # noqa: E501 - expires_at (int, none_type): When the link expires.. [optional] # noqa: E501 - test_mode (bool): Whether this is a test draft. Signature requests made from test drafts have no legal value.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/warning_response.py b/sdks/python/dropbox_sign/model/warning_response.py deleted file mode 100644 index d2fbd3f1f..000000000 --- a/sdks/python/dropbox_sign/model/warning_response.py +++ /dev/null @@ -1,303 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -import re # noqa: F401 -import sys # noqa: F401 -from dropbox_sign import ApiClient -from dropbox_sign.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from dropbox_sign.exceptions import ApiAttributeError - - - -class WarningResponse(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'warning_msg': (str,), # noqa: E501 - 'warning_name': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - @staticmethod - def init(data: any) -> WarningResponse: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[WarningResponse], - _check_type=True, - ) - - - attribute_map = { - 'warning_msg': 'warning_msg', # noqa: E501 - 'warning_name': 'warning_name', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @property - def warning_msg(self) -> str: - return self.get("warning_msg") - - @warning_msg.setter - def warning_msg(self, value: str): - setattr(self, "warning_msg", value) - - @property - def warning_name(self) -> str: - return self.get("warning_name") - - @warning_name.setter - def warning_name(self, value: str): - setattr(self, "warning_name", value) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, warning_msg, warning_name, *args, **kwargs): # noqa: E501 - """WarningResponse - a model defined in OpenAPI - - Args: - warning_msg (str): Warning message - warning_name (str): Warning name - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.warning_msg = warning_msg - self.warning_name = warning_name - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, warning_msg, warning_name, *args, **kwargs): # noqa: E501 - """WarningResponse - a model defined in OpenAPI - - Args: - warning_msg (str): Warning message - warning_name (str): Warning name - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.warning_msg = warning_msg - self.warning_name = warning_name - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model_utils.py b/sdks/python/dropbox_sign/model_utils.py deleted file mode 100644 index b2e911963..000000000 --- a/sdks/python/dropbox_sign/model_utils.py +++ /dev/null @@ -1,2038 +0,0 @@ -""" - Dropbox Sign API - - Dropbox Sign v3 API # noqa: E501 - - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" - - -from datetime import date, datetime # noqa: F401 -from copy import deepcopy -import inspect -import io -import os -import pprint -import re -import tempfile - -from dateutil.parser import parse - -from dropbox_sign.exceptions import ( - ApiKeyError, - ApiAttributeError, - ApiTypeError, - ApiValueError, -) - -none_type = type(None) -file_type = io.IOBase - - -def convert_js_args_to_python_args(fn): - from functools import wraps - @wraps(fn) - def wrapped_init(_self, *args, **kwargs): - """ - An attribute named `self` received from the api will conflicts with the reserved `self` - parameter of a class method. During generation, `self` attributes are mapped - to `_self` in models. Here, we name `_self` instead of `self` to avoid conflicts. - """ - spec_property_naming = kwargs.get('_spec_property_naming', False) - if spec_property_naming: - kwargs = change_keys_js_to_python(kwargs, _self if isinstance(_self, type) else _self.__class__) - return fn(_self, *args, **kwargs) - return wrapped_init - - -class cached_property(object): - # this caches the result of the function call for fn with no inputs - # use this as a decorator on function methods that you want converted - # into cached properties - result_key = '_results' - - def __init__(self, fn): - self._fn = fn - - def __get__(self, instance, cls=None): - if self.result_key in vars(self): - return vars(self)[self.result_key] - else: - result = self._fn() - setattr(self, self.result_key, result) - return result - - -PRIMITIVE_TYPES = (list, float, int, bool, datetime, date, str, file_type) - -def allows_single_value_input(cls): - """ - This function returns True if the input composed schema model or any - descendant model allows a value only input - This is true for cases where oneOf contains items like: - oneOf: - - float - - NumberWithValidation - - StringEnum - - ArrayModel - - null - TODO: lru_cache this - """ - if ( - issubclass(cls, ModelSimple) or - cls in PRIMITIVE_TYPES - ): - return True - elif issubclass(cls, ModelComposed): - if not cls._composed_schemas['oneOf']: - return False - return any(allows_single_value_input(c) for c in cls._composed_schemas['oneOf']) - return False - -def composed_model_input_classes(cls): - """ - This function returns a list of the possible models that can be accepted as - inputs. - TODO: lru_cache this - """ - if issubclass(cls, ModelSimple) or cls in PRIMITIVE_TYPES: - return [cls] - elif issubclass(cls, ModelNormal): - if cls.discriminator is None: - return [cls] - else: - return get_discriminated_classes(cls) - elif issubclass(cls, ModelComposed): - if not cls._composed_schemas['oneOf']: - return [] - if cls.discriminator is None: - input_classes = [] - for c in cls._composed_schemas['oneOf']: - input_classes.extend(composed_model_input_classes(c)) - return input_classes - else: - return get_discriminated_classes(cls) - return [] - - -class OpenApiModel(object): - """The base class for all OpenAPIModels""" - - def set_attribute(self, name, value): - # this is only used to set properties on self - - path_to_item = [] - if self._path_to_item: - path_to_item.extend(self._path_to_item) - path_to_item.append(name) - - if name in self.openapi_types: - required_types_mixed = self.openapi_types[name] - elif self.additional_properties_type is None: - raise ApiAttributeError( - "{0} has no attribute '{1}'".format( - type(self).__name__, name), - path_to_item - ) - elif self.additional_properties_type is not None: - required_types_mixed = self.additional_properties_type - - if get_simple_class(name) != str: - error_msg = type_error_message( - var_name=name, - var_value=name, - valid_classes=(str,), - key_type=True - ) - raise ApiTypeError( - error_msg, - path_to_item=path_to_item, - valid_classes=(str,), - key_type=True - ) - - if self._check_type: - value = validate_and_convert_types( - value, required_types_mixed, path_to_item, self._spec_property_naming, - self._check_type, configuration=self._configuration) - if (name,) in self.allowed_values: - check_allowed_values( - self.allowed_values, - (name,), - value - ) - if (name,) in self.validations: - check_validations( - self.validations, - (name,), - value, - self._configuration - ) - self.__dict__['_data_store'][name] = value - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other - - def __setattr__(self, attr, value): - """set the value of an attribute using dot notation: `instance.attr = val`""" - self[attr] = value - - def __getattr__(self, attr): - """get the value of an attribute using dot notation: `instance.attr`""" - return self.__getitem__(attr) - - def __copy__(self): - cls = self.__class__ - if self.get("_spec_property_naming", False): - return cls._new_from_openapi_data(**self.__dict__) - else: - return new_cls.__new__(cls, **self.__dict__) - - def __deepcopy__(self, memo): - cls = self.__class__ - - if self.get("_spec_property_naming", False): - new_inst = cls._new_from_openapi_data() - else: - new_inst = cls.__new__(cls) - - for k, v in self.__dict__.items(): - setattr(new_inst, k, deepcopy(v, memo)) - return new_inst - - - def __new__(cls, *args, **kwargs): - # this function uses the discriminator to - # pick a new schema/class to instantiate because a discriminator - # propertyName value was passed in - - if len(args) == 1: - arg = args[0] - if arg is None and is_type_nullable(cls): - # The input data is the 'null' value and the type is nullable. - return None - - if issubclass(cls, ModelComposed) and allows_single_value_input(cls): - model_kwargs = {} - oneof_instance = get_oneof_instance(cls, model_kwargs, kwargs, model_arg=arg) - return oneof_instance - - - visited_composed_classes = kwargs.get('_visited_composed_classes', ()) - if ( - cls.discriminator is None or - cls in visited_composed_classes - ): - # Use case 1: this openapi schema (cls) does not have a discriminator - # Use case 2: we have already visited this class before and are sure that we - # want to instantiate it this time. We have visited this class deserializing - # a payload with a discriminator. During that process we traveled through - # this class but did not make an instance of it. Now we are making an - # instance of a composed class which contains cls in it, so this time make an instance of cls. - # - # Here's an example of use case 2: If Animal has a discriminator - # petType and we pass in "Dog", and the class Dog - # includes Animal, we move through Animal - # once using the discriminator, and pick Dog. - # Then in the composed schema dog Dog, we will make an instance of the - # Animal class (because Dal has allOf: Animal) but this time we won't travel - # through Animal's discriminator because we passed in - # _visited_composed_classes = (Animal,) - - return super(OpenApiModel, cls).__new__(cls) - - # Get the name and value of the discriminator property. - # The discriminator name is obtained from the discriminator meta-data - # and the discriminator value is obtained from the input data. - discr_propertyname_py = list(cls.discriminator.keys())[0] - discr_propertyname_js = cls.attribute_map[discr_propertyname_py] - if discr_propertyname_js in kwargs: - discr_value = kwargs[discr_propertyname_js] - elif discr_propertyname_py in kwargs: - discr_value = kwargs[discr_propertyname_py] - else: - # The input data does not contain the discriminator property. - path_to_item = kwargs.get('_path_to_item', ()) - raise ApiValueError( - "Cannot deserialize input data due to missing discriminator. " - "The discriminator property '%s' is missing at path: %s" % - (discr_propertyname_js, path_to_item) - ) - - # Implementation note: the last argument to get_discriminator_class - # is a list of visited classes. get_discriminator_class may recursively - # call itself and update the list of visited classes, and the initial - # value must be an empty list. Hence not using 'visited_composed_classes' - new_cls = get_discriminator_class( - cls, discr_propertyname_py, discr_value, []) - if new_cls is None: - path_to_item = kwargs.get('_path_to_item', ()) - disc_prop_value = kwargs.get( - discr_propertyname_js, kwargs.get(discr_propertyname_py)) - raise ApiValueError( - "Cannot deserialize input data due to invalid discriminator " - "value. The OpenAPI document has no mapping for discriminator " - "property '%s'='%s' at path: %s" % - (discr_propertyname_js, disc_prop_value, path_to_item) - ) - - if new_cls in visited_composed_classes: - # if we are making an instance of a composed schema Descendent - # which allOf includes Ancestor, then Ancestor contains - # a discriminator that includes Descendent. - # So if we make an instance of Descendent, we have to make an - # instance of Ancestor to hold the allOf properties. - # This code detects that use case and makes the instance of Ancestor - # For example: - # When making an instance of Dog, _visited_composed_classes = (Dog,) - # then we make an instance of Animal to include in dog._composed_instances - # so when we are here, cls is Animal - # cls.discriminator != None - # cls not in _visited_composed_classes - # new_cls = Dog - # but we know we know that we already have Dog - # because it is in visited_composed_classes - # so make Animal here - return super(OpenApiModel, cls).__new__(cls) - - # Build a list containing all oneOf and anyOf descendants. - oneof_anyof_classes = None - if cls._composed_schemas is not None: - oneof_anyof_classes = ( - cls._composed_schemas.get('oneOf', ()) + - cls._composed_schemas.get('anyOf', ())) - oneof_anyof_child = new_cls in oneof_anyof_classes - kwargs['_visited_composed_classes'] = visited_composed_classes + (cls,) - - if cls._composed_schemas.get('allOf') and oneof_anyof_child: - # Validate that we can make self because when we make the - # new_cls it will not include the allOf validations in self - self_inst = super(OpenApiModel, cls).__new__(cls) - self_inst.__init__(*args, **kwargs) - - if kwargs.get("_spec_property_naming", False): - # when true, implies new is from deserialization - new_inst = new_cls._new_from_openapi_data(*args, **kwargs) - else: - new_inst = new_cls.__new__(new_cls, *args, **kwargs) - new_inst.__init__(*args, **kwargs) - - return new_inst - - - @classmethod - @convert_js_args_to_python_args - def _new_from_openapi_data(cls, *args, **kwargs): - # this function uses the discriminator to - # pick a new schema/class to instantiate because a discriminator - # propertyName value was passed in - - if len(args) == 1: - arg = args[0] - if arg is None and is_type_nullable(cls): - # The input data is the 'null' value and the type is nullable. - return None - - if issubclass(cls, ModelComposed) and allows_single_value_input(cls): - model_kwargs = {} - oneof_instance = get_oneof_instance(cls, model_kwargs, kwargs, model_arg=arg) - return oneof_instance - - - visited_composed_classes = kwargs.get('_visited_composed_classes', ()) - if ( - cls.discriminator is None or - cls in visited_composed_classes - ): - # Use case 1: this openapi schema (cls) does not have a discriminator - # Use case 2: we have already visited this class before and are sure that we - # want to instantiate it this time. We have visited this class deserializing - # a payload with a discriminator. During that process we traveled through - # this class but did not make an instance of it. Now we are making an - # instance of a composed class which contains cls in it, so this time make an instance of cls. - # - # Here's an example of use case 2: If Animal has a discriminator - # petType and we pass in "Dog", and the class Dog - # includes Animal, we move through Animal - # once using the discriminator, and pick Dog. - # Then in the composed schema dog Dog, we will make an instance of the - # Animal class (because Dal has allOf: Animal) but this time we won't travel - # through Animal's discriminator because we passed in - # _visited_composed_classes = (Animal,) - - return cls._from_openapi_data(*args, **kwargs) - - # Get the name and value of the discriminator property. - # The discriminator name is obtained from the discriminator meta-data - # and the discriminator value is obtained from the input data. - discr_propertyname_py = list(cls.discriminator.keys())[0] - discr_propertyname_js = cls.attribute_map[discr_propertyname_py] - if discr_propertyname_js in kwargs: - discr_value = kwargs[discr_propertyname_js] - elif discr_propertyname_py in kwargs: - discr_value = kwargs[discr_propertyname_py] - else: - # The input data does not contain the discriminator property. - path_to_item = kwargs.get('_path_to_item', ()) - raise ApiValueError( - "Cannot deserialize input data due to missing discriminator. " - "The discriminator property '%s' is missing at path: %s" % - (discr_propertyname_js, path_to_item) - ) - - # Implementation note: the last argument to get_discriminator_class - # is a list of visited classes. get_discriminator_class may recursively - # call itself and update the list of visited classes, and the initial - # value must be an empty list. Hence not using 'visited_composed_classes' - new_cls = get_discriminator_class( - cls, discr_propertyname_py, discr_value, []) - if new_cls is None: - path_to_item = kwargs.get('_path_to_item', ()) - disc_prop_value = kwargs.get( - discr_propertyname_js, kwargs.get(discr_propertyname_py)) - raise ApiValueError( - "Cannot deserialize input data due to invalid discriminator " - "value. The OpenAPI document has no mapping for discriminator " - "property '%s'='%s' at path: %s" % - (discr_propertyname_js, disc_prop_value, path_to_item) - ) - - if new_cls in visited_composed_classes: - # if we are making an instance of a composed schema Descendent - # which allOf includes Ancestor, then Ancestor contains - # a discriminator that includes Descendent. - # So if we make an instance of Descendent, we have to make an - # instance of Ancestor to hold the allOf properties. - # This code detects that use case and makes the instance of Ancestor - # For example: - # When making an instance of Dog, _visited_composed_classes = (Dog,) - # then we make an instance of Animal to include in dog._composed_instances - # so when we are here, cls is Animal - # cls.discriminator != None - # cls not in _visited_composed_classes - # new_cls = Dog - # but we know we know that we already have Dog - # because it is in visited_composed_classes - # so make Animal here - return cls._from_openapi_data(*args, **kwargs) - - # Build a list containing all oneOf and anyOf descendants. - oneof_anyof_classes = None - if cls._composed_schemas is not None: - oneof_anyof_classes = ( - cls._composed_schemas.get('oneOf', ()) + - cls._composed_schemas.get('anyOf', ())) - oneof_anyof_child = new_cls in oneof_anyof_classes - kwargs['_visited_composed_classes'] = visited_composed_classes + (cls,) - - if cls._composed_schemas.get('allOf') and oneof_anyof_child: - # Validate that we can make self because when we make the - # new_cls it will not include the allOf validations in self - self_inst = cls._from_openapi_data(*args, **kwargs) - - - new_inst = new_cls._new_from_openapi_data(*args, **kwargs) - return new_inst - - -class ModelSimple(OpenApiModel): - """the parent class of models whose type != object in their - swagger/openapi""" - - def __setitem__(self, name, value): - """set the value of an attribute using square-bracket notation: `instance[attr] = val`""" - if name in self.required_properties: - self.__dict__[name] = value - return - - self.set_attribute(name, value) - - def get(self, name, default=None): - """returns the value of an attribute or some default value if the attribute was not set""" - if name in self.required_properties: - return self.__dict__[name] - - return self.__dict__['_data_store'].get(name, default) - - def __getitem__(self, name): - """get the value of an attribute using square-bracket notation: `instance[attr]`""" - if name in self: - return self.get(name) - - return None - - def __contains__(self, name): - """used by `in` operator to check if an attribute value was set in an instance: `'attr' in instance`""" - if name in self.required_properties: - return name in self.__dict__ - - return name in self.__dict__['_data_store'] - - def to_str(self): - """Returns the string representation of the model""" - return str(self.value) - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, self.__class__): - return False - - this_val = self._data_store['value'] - that_val = other._data_store['value'] - types = set() - types.add(this_val.__class__) - types.add(that_val.__class__) - vals_equal = this_val == that_val - return vals_equal - - -class ModelNormal(OpenApiModel): - """the parent class of models whose type == object in their - swagger/openapi""" - - def __setitem__(self, name, value): - """set the value of an attribute using square-bracket notation: `instance[attr] = val`""" - if name in self.required_properties: - self.__dict__[name] = value - return - - self.set_attribute(name, value) - - def get(self, name, default=None): - """returns the value of an attribute or some default value if the attribute was not set""" - if name in self.required_properties: - return self.__dict__[name] - - return self.__dict__['_data_store'].get(name, default) - - def __getitem__(self, name): - """get the value of an attribute using square-bracket notation: `instance[attr]`""" - if name in self: - return self.get(name) - - return None - - def __contains__(self, name): - """used by `in` operator to check if an attribute value was set in an instance: `'attr' in instance`""" - if name in self.required_properties: - return name in self.__dict__ - - return name in self.__dict__['_data_store'] - - def to_dict(self): - """Returns the model properties as a dict""" - return model_to_dict(self, serialize=False) - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, self.__class__): - return False - - if not set(self._data_store.keys()) == set(other._data_store.keys()): - return False - for _var_name, this_val in self._data_store.items(): - that_val = other._data_store[_var_name] - types = set() - types.add(this_val.__class__) - types.add(that_val.__class__) - vals_equal = this_val == that_val - if not vals_equal: - return False - return True - - -class ModelComposed(OpenApiModel): - """the parent class of models whose type == object in their - swagger/openapi and have oneOf/allOf/anyOf - - When one sets a property we use var_name_to_model_instances to store the value in - the correct class instances + run any type checking + validation code. - When one gets a property we use var_name_to_model_instances to get the value - from the correct class instances. - This allows multiple composed schemas to contain the same property with additive - constraints on the value. - - _composed_schemas (dict) stores the anyOf/allOf/oneOf classes - key (str): allOf/oneOf/anyOf - value (list): the classes in the XOf definition. - Note: none_type can be included when the openapi document version >= 3.1.0 - _composed_instances (list): stores a list of instances of the composed schemas - defined in _composed_schemas. When properties are accessed in the self instance, - they are returned from the self._data_store or the data stores in the instances - in self._composed_schemas - _var_name_to_model_instances (dict): maps between a variable name on self and - the composed instances (self included) which contain that data - key (str): property name - value (list): list of class instances, self or instances in _composed_instances - which contain the value that the key is referring to. - """ - - def __setitem__(self, name, value): - """set the value of an attribute using square-bracket notation: `instance[attr] = val`""" - if name in self.required_properties: - self.__dict__[name] = value - return - - """ - Use cases: - 1. additional_properties_type is None (additionalProperties == False in spec) - Check for property presence in self.openapi_types - if not present then throw an error - if present set in self, set attribute - always set on composed schemas - 2. additional_properties_type exists - set attribute on self - always set on composed schemas - """ - if self.additional_properties_type is None: - """ - For an attribute to exist on a composed schema it must: - - fulfill schema_requirements in the self composed schema not considering oneOf/anyOf/allOf schemas AND - - fulfill schema_requirements in each oneOf/anyOf/allOf schemas - - schema_requirements: - For an attribute to exist on a schema it must: - - be present in properties at the schema OR - - have additionalProperties unset (defaults additionalProperties = any type) OR - - have additionalProperties set - """ - if name not in self.openapi_types: - raise ApiAttributeError( - "{0} has no attribute '{1}'".format( - type(self).__name__, name), - [e for e in [self._path_to_item, name] if e] - ) - # attribute must be set on self and composed instances - self.set_attribute(name, value) - for model_instance in self._composed_instances: - setattr(model_instance, name, value) - if name not in self._var_name_to_model_instances: - # we assigned an additional property - self.__dict__['_var_name_to_model_instances'][name] = self._composed_instances + [self] - return None - - __unset_attribute_value__ = object() - - def get(self, name, default=None): - """returns the value of an attribute or some default value if the attribute was not set""" - if name in self.required_properties: - return self.__dict__[name] - - # get the attribute from the correct instance - model_instances = self._var_name_to_model_instances.get(name) - values = [] - # A composed model stores self and child (oneof/anyOf/allOf) models under - # self._var_name_to_model_instances. - # Any property must exist in self and all model instances - # The value stored in all model instances must be the same - if model_instances: - for model_instance in model_instances: - if name in model_instance._data_store: - v = model_instance._data_store[name] - if v not in values: - values.append(v) - len_values = len(values) - if len_values == 0: - return default - elif len_values == 1: - return values[0] - elif len_values > 1: - raise ApiValueError( - "Values stored for property {0} in {1} differ when looking " - "at self and self's composed instances. All values must be " - "the same".format(name, type(self).__name__), - [e for e in [self._path_to_item, name] if e] - ) - - def __getitem__(self, name): - """get the value of an attribute using square-bracket notation: `instance[attr]`""" - value = self.get(name, self.__unset_attribute_value__) - if value is self.__unset_attribute_value__: - raise ApiAttributeError( - "{0} has no attribute '{1}'".format( - type(self).__name__, name), - [e for e in [self._path_to_item, name] if e] - ) - return value - - def __contains__(self, name): - """used by `in` operator to check if an attribute value was set in an instance: `'attr' in instance`""" - - if name in self.required_properties: - return name in self.__dict__ - - model_instances = self._var_name_to_model_instances.get( - name, self._additional_properties_model_instances) - - if model_instances: - for model_instance in model_instances: - if name in model_instance._data_store: - return True - - return False - - def to_dict(self): - """Returns the model properties as a dict""" - return model_to_dict(self, serialize=False) - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, self.__class__): - return False - - if not set(self._data_store.keys()) == set(other._data_store.keys()): - return False - for _var_name, this_val in self._data_store.items(): - that_val = other._data_store[_var_name] - types = set() - types.add(this_val.__class__) - types.add(that_val.__class__) - vals_equal = this_val == that_val - if not vals_equal: - return False - return True - - -COERCION_INDEX_BY_TYPE = { - ModelComposed: 0, - ModelNormal: 1, - ModelSimple: 2, - none_type: 3, # The type of 'None'. - list: 4, - dict: 5, - float: 6, - int: 7, - bool: 8, - datetime: 9, - date: 10, - str: 11, - file_type: 12, # 'file_type' is an alias for the built-in 'file' or 'io.IOBase' type. -} - -# these are used to limit what type conversions we try to do -# when we have a valid type already and we want to try converting -# to another type -UPCONVERSION_TYPE_PAIRS = ( - (str, datetime), - (str, date), - (int, float), # A float may be serialized as an integer, e.g. '3' is a valid serialized float. - (list, ModelComposed), - (dict, ModelComposed), - (str, ModelComposed), - (int, ModelComposed), - (float, ModelComposed), - (list, ModelComposed), - (list, ModelNormal), - (dict, ModelNormal), - (str, ModelSimple), - (int, ModelSimple), - (float, ModelSimple), - (list, ModelSimple), -) - -COERCIBLE_TYPE_PAIRS = { - False: ( # client instantiation of a model with client data - # (dict, ModelComposed), - # (list, ModelComposed), - # (dict, ModelNormal), - # (list, ModelNormal), - # (str, ModelSimple), - # (int, ModelSimple), - # (float, ModelSimple), - # (list, ModelSimple), - # (str, int), - # (str, float), - # (str, datetime), - # (str, date), - # (int, str), - # (float, str), - ), - True: ( # server -> client data - (dict, ModelComposed), - (list, ModelComposed), - (dict, ModelNormal), - (list, ModelNormal), - (str, ModelSimple), - (int, ModelSimple), - (float, ModelSimple), - (list, ModelSimple), - # (str, int), - # (str, float), - (str, datetime), - (str, date), - # (int, str), - # (float, str), - (str, file_type) - ), -} - - -def get_simple_class(input_value): - """Returns an input_value's simple class that we will use for type checking - Python2: - float and int will return int, where int is the python3 int backport - str and unicode will return str, where str is the python3 str backport - Note: float and int ARE both instances of int backport - Note: str_py2 and unicode_py2 are NOT both instances of str backport - - Args: - input_value (class/class_instance): the item for which we will return - the simple class - """ - if isinstance(input_value, type): - # input_value is a class - return input_value - elif isinstance(input_value, tuple): - return tuple - elif isinstance(input_value, list): - return list - elif isinstance(input_value, dict): - return dict - elif isinstance(input_value, none_type): - return none_type - elif isinstance(input_value, file_type): - return file_type - elif isinstance(input_value, bool): - # this must be higher than the int check because - # isinstance(True, int) == True - return bool - elif isinstance(input_value, int): - return int - elif isinstance(input_value, datetime): - # this must be higher than the date check because - # isinstance(datetime_instance, date) == True - return datetime - elif isinstance(input_value, date): - return date - elif isinstance(input_value, str): - return str - return type(input_value) - - -def check_allowed_values(allowed_values, input_variable_path, input_values): - """Raises an exception if the input_values are not allowed - - Args: - allowed_values (dict): the allowed_values dict - input_variable_path (tuple): the path to the input variable - input_values (list/str/int/float/date/datetime): the values that we - are checking to see if they are in allowed_values - """ - these_allowed_values = list(allowed_values[input_variable_path].values()) - if (isinstance(input_values, list) - and not set(input_values).issubset( - set(these_allowed_values))): - invalid_values = ", ".join( - map(str, set(input_values) - set(these_allowed_values))), - raise ApiValueError( - "Invalid values for `%s` [%s], must be a subset of [%s]" % - ( - input_variable_path[0], - invalid_values, - ", ".join(map(str, these_allowed_values)) - ) - ) - elif (isinstance(input_values, dict) - and not set( - input_values.keys()).issubset(set(these_allowed_values))): - invalid_values = ", ".join( - map(str, set(input_values.keys()) - set(these_allowed_values))) - raise ApiValueError( - "Invalid keys in `%s` [%s], must be a subset of [%s]" % - ( - input_variable_path[0], - invalid_values, - ", ".join(map(str, these_allowed_values)) - ) - ) - elif (not isinstance(input_values, (list, dict)) - and input_values not in these_allowed_values): - raise ApiValueError( - "Invalid value for `%s` (%s), must be one of %s" % - ( - input_variable_path[0], - input_values, - these_allowed_values - ) - ) - - -def is_json_validation_enabled(schema_keyword, configuration=None): - """Returns true if JSON schema validation is enabled for the specified - validation keyword. This can be used to skip JSON schema structural validation - as requested in the configuration. - - Args: - schema_keyword (string): the name of a JSON schema validation keyword. - configuration (Configuration): the configuration class. - """ - - return (configuration is None or - not hasattr(configuration, '_disabled_client_side_validations') or - schema_keyword not in configuration._disabled_client_side_validations) - - -def check_validations( - validations, input_variable_path, input_values, - configuration=None): - """Raises an exception if the input_values are invalid - - Args: - validations (dict): the validation dictionary. - input_variable_path (tuple): the path to the input variable. - input_values (list/str/int/float/date/datetime): the values that we - are checking. - configuration (Configuration): the configuration class. - """ - - if input_values is None: - return - - current_validations = validations[input_variable_path] - if (is_json_validation_enabled('multipleOf', configuration) and - 'multiple_of' in current_validations and - isinstance(input_values, (int, float)) and - not (float(input_values) / current_validations['multiple_of']).is_integer()): - # Note 'multipleOf' will be as good as the floating point arithmetic. - raise ApiValueError( - "Invalid value for `%s`, value must be a multiple of " - "`%s`" % ( - input_variable_path[0], - current_validations['multiple_of'] - ) - ) - - if (is_json_validation_enabled('maxLength', configuration) and - 'max_length' in current_validations and - len(input_values) > current_validations['max_length']): - raise ApiValueError( - "Invalid value for `%s`, length must be less than or equal to " - "`%s`" % ( - input_variable_path[0], - current_validations['max_length'] - ) - ) - - if (is_json_validation_enabled('minLength', configuration) and - 'min_length' in current_validations and - len(input_values) < current_validations['min_length']): - raise ApiValueError( - "Invalid value for `%s`, length must be greater than or equal to " - "`%s`" % ( - input_variable_path[0], - current_validations['min_length'] - ) - ) - - if (is_json_validation_enabled('maxItems', configuration) and - 'max_items' in current_validations and - len(input_values) > current_validations['max_items']): - raise ApiValueError( - "Invalid value for `%s`, number of items must be less than or " - "equal to `%s`" % ( - input_variable_path[0], - current_validations['max_items'] - ) - ) - - if (is_json_validation_enabled('minItems', configuration) and - 'min_items' in current_validations and - len(input_values) < current_validations['min_items']): - raise ValueError( - "Invalid value for `%s`, number of items must be greater than or " - "equal to `%s`" % ( - input_variable_path[0], - current_validations['min_items'] - ) - ) - - items = ('exclusive_maximum', 'inclusive_maximum', 'exclusive_minimum', - 'inclusive_minimum') - if (any(item in current_validations for item in items)): - if isinstance(input_values, list): - max_val = max(input_values) - min_val = min(input_values) - elif isinstance(input_values, dict): - max_val = max(input_values.values()) - min_val = min(input_values.values()) - else: - max_val = input_values - min_val = input_values - - if (is_json_validation_enabled('exclusiveMaximum', configuration) and - 'exclusive_maximum' in current_validations and - max_val >= current_validations['exclusive_maximum']): - raise ApiValueError( - "Invalid value for `%s`, must be a value less than `%s`" % ( - input_variable_path[0], - current_validations['exclusive_maximum'] - ) - ) - - if (is_json_validation_enabled('maximum', configuration) and - 'inclusive_maximum' in current_validations and - max_val > current_validations['inclusive_maximum']): - raise ApiValueError( - "Invalid value for `%s`, must be a value less than or equal to " - "`%s`" % ( - input_variable_path[0], - current_validations['inclusive_maximum'] - ) - ) - - if (is_json_validation_enabled('exclusiveMinimum', configuration) and - 'exclusive_minimum' in current_validations and - min_val <= current_validations['exclusive_minimum']): - raise ApiValueError( - "Invalid value for `%s`, must be a value greater than `%s`" % - ( - input_variable_path[0], - current_validations['exclusive_maximum'] - ) - ) - - if (is_json_validation_enabled('minimum', configuration) and - 'inclusive_minimum' in current_validations and - min_val < current_validations['inclusive_minimum']): - raise ApiValueError( - "Invalid value for `%s`, must be a value greater than or equal " - "to `%s`" % ( - input_variable_path[0], - current_validations['inclusive_minimum'] - ) - ) - flags = current_validations.get('regex', {}).get('flags', 0) - if (is_json_validation_enabled('pattern', configuration) and - 'regex' in current_validations and - not re.search(current_validations['regex']['pattern'], - input_values, flags=flags)): - err_msg = r"Invalid value for `%s`, must match regular expression `%s`" % ( - input_variable_path[0], - current_validations['regex']['pattern'] - ) - if flags != 0: - # Don't print the regex flags if the flags are not - # specified in the OAS document. - err_msg = r"%s with flags=`%s`" % (err_msg, flags) - raise ApiValueError(err_msg) - - -def order_response_types(required_types): - """Returns the required types sorted in coercion order - - Args: - required_types (list/tuple): collection of classes or instance of - list or dict with class information inside it. - - Returns: - (list): coercion order sorted collection of classes or instance - of list or dict with class information inside it. - """ - - def index_getter(class_or_instance): - if isinstance(class_or_instance, list): - return COERCION_INDEX_BY_TYPE[list] - elif isinstance(class_or_instance, dict): - return COERCION_INDEX_BY_TYPE[dict] - elif (inspect.isclass(class_or_instance) - and issubclass(class_or_instance, ModelComposed)): - return COERCION_INDEX_BY_TYPE[ModelComposed] - elif (inspect.isclass(class_or_instance) - and issubclass(class_or_instance, ModelNormal)): - return COERCION_INDEX_BY_TYPE[ModelNormal] - elif (inspect.isclass(class_or_instance) - and issubclass(class_or_instance, ModelSimple)): - return COERCION_INDEX_BY_TYPE[ModelSimple] - elif class_or_instance in COERCION_INDEX_BY_TYPE: - return COERCION_INDEX_BY_TYPE[class_or_instance] - raise ApiValueError("Unsupported type: %s" % class_or_instance) - - sorted_types = sorted( - required_types, - key=lambda class_or_instance: index_getter(class_or_instance) - ) - return sorted_types - - -def remove_uncoercible(required_types_classes, current_item, spec_property_naming, - must_convert=True): - """Only keeps the type conversions that are possible - - Args: - required_types_classes (tuple): tuple of classes that are required - these should be ordered by COERCION_INDEX_BY_TYPE - spec_property_naming (bool): True if the variable names in the input - data are serialized names as specified in the OpenAPI document. - False if the variables names in the input data are python - variable names in PEP-8 snake case. - current_item (any): the current item (input data) to be converted - - Keyword Args: - must_convert (bool): if True the item to convert is of the wrong - type and we want a big list of coercibles - if False, we want a limited list of coercibles - - Returns: - (list): the remaining coercible required types, classes only - """ - current_type_simple = get_simple_class(current_item) - - results_classes = [] - for required_type_class in required_types_classes: - # convert our models to OpenApiModel - required_type_class_simplified = required_type_class - if isinstance(required_type_class_simplified, type): - if issubclass(required_type_class_simplified, ModelComposed): - required_type_class_simplified = ModelComposed - elif issubclass(required_type_class_simplified, ModelNormal): - required_type_class_simplified = ModelNormal - elif issubclass(required_type_class_simplified, ModelSimple): - required_type_class_simplified = ModelSimple - - # leave ints as-is - if type(current_item) is int and required_type_class_simplified == current_type_simple: - results_classes.append(int) - if required_type_class_simplified == current_type_simple: - # don't consider converting to one's own class - continue - - class_pair = (current_type_simple, required_type_class_simplified) - if must_convert and class_pair in COERCIBLE_TYPE_PAIRS[spec_property_naming]: - results_classes.append(required_type_class) - elif class_pair in UPCONVERSION_TYPE_PAIRS: - results_classes.append(required_type_class) - # allow casting int to string - if type(current_item) is int: - results_classes.append(str) - - if type(current_item) is none_type: - results_classes.append(none_type) - return results_classes - -def get_discriminated_classes(cls): - """ - Returns all the classes that a discriminator converts to - TODO: lru_cache this - """ - possible_classes = [] - key = list(cls.discriminator.keys())[0] - if is_type_nullable(cls): - possible_classes.append(cls) - for discr_cls in cls.discriminator[key].values(): - if hasattr(discr_cls, 'discriminator') and discr_cls.discriminator is not None: - possible_classes.extend(get_discriminated_classes(discr_cls)) - else: - possible_classes.append(discr_cls) - return possible_classes - - -def get_possible_classes(cls, from_server_context): - # TODO: lru_cache this - possible_classes = [cls] - if from_server_context: - return possible_classes - if hasattr(cls, 'discriminator') and cls.discriminator is not None: - possible_classes = [] - possible_classes.extend(get_discriminated_classes(cls)) - elif issubclass(cls, ModelComposed): - possible_classes.extend(composed_model_input_classes(cls)) - return possible_classes - - -def get_required_type_classes(required_types_mixed, spec_property_naming): - """Converts the tuple required_types into a tuple and a dict described - below - - Args: - required_types_mixed (tuple/list): will contain either classes or - instance of list or dict - spec_property_naming (bool): if True these values came from the - server, and we use the data types in our endpoints. - If False, we are client side and we need to include - oneOf and discriminator classes inside the data types in our endpoints - - Returns: - (valid_classes, dict_valid_class_to_child_types_mixed): - valid_classes (tuple): the valid classes that the current item - should be - dict_valid_class_to_child_types_mixed (dict): - valid_class (class): this is the key - child_types_mixed (list/dict/tuple): describes the valid child - types - """ - valid_classes = [] - child_req_types_by_current_type = {} - for required_type in required_types_mixed: - if isinstance(required_type, list): - valid_classes.append(list) - child_req_types_by_current_type[list] = required_type - elif isinstance(required_type, tuple): - valid_classes.append(tuple) - child_req_types_by_current_type[tuple] = required_type - elif isinstance(required_type, dict): - valid_classes.append(dict) - child_req_types_by_current_type[dict] = required_type[str] - else: - valid_classes.extend(get_possible_classes(required_type, spec_property_naming)) - return tuple(valid_classes), child_req_types_by_current_type - - -def change_keys_js_to_python(input_dict, model_class): - """ - Converts from javascript_key keys in the input_dict to python_keys in - the output dict using the mapping in model_class. - If the input_dict contains a key which does not declared in the model_class, - the key is added to the output dict as is. The assumption is the model_class - may have undeclared properties (additionalProperties attribute in the OAS - document). - """ - - if getattr(model_class, 'attribute_map', None) is None: - return input_dict - output_dict = {} - reversed_attr_map = {value: key for key, value in - model_class.attribute_map.items()} - for javascript_key, value in input_dict.items(): - python_key = reversed_attr_map.get(javascript_key) - if python_key is None: - # if the key is unknown, it is in error or it is an - # additionalProperties variable - python_key = javascript_key - output_dict[python_key] = value - return output_dict - - -def get_type_error(var_value, path_to_item, valid_classes, key_type=False): - error_msg = type_error_message( - var_name=path_to_item[-1], - var_value=var_value, - valid_classes=valid_classes, - key_type=key_type - ) - return ApiTypeError( - error_msg, - path_to_item=path_to_item, - valid_classes=valid_classes, - key_type=key_type - ) - - -def deserialize_primitive(data, klass, path_to_item): - """Deserializes string to primitive type. - - :param data: str/int/float - :param klass: str/class the class to convert to - - :return: int, float, str, bool, date, datetime - """ - additional_message = "" - try: - if klass in {datetime, date}: - additional_message = ( - "If you need your parameter to have a fallback " - "string value, please set its type as `type: {}` in your " - "spec. That allows the value to be any type. " - ) - if klass == datetime: - if len(data) < 8: - raise ValueError("This is not a datetime") - # The string should be in iso8601 datetime format. - parsed_datetime = parse(data) - date_only = ( - parsed_datetime.hour == 0 and - parsed_datetime.minute == 0 and - parsed_datetime.second == 0 and - parsed_datetime.tzinfo is None and - 8 <= len(data) <= 10 - ) - if date_only: - raise ValueError("This is a date, not a datetime") - return parsed_datetime - elif klass == date: - if len(data) < 8: - raise ValueError("This is not a date") - return parse(data).date() - elif data is None: - # This SDK does not support nullable params unless they are explicitly marked as nullable - return data - else: - converted_value = klass(data) - if isinstance(data, str) and klass == float: - if str(converted_value) != data: - # '7' -> 7.0 -> '7.0' != '7' - raise ValueError('This is not a float') - return converted_value - except (OverflowError, ValueError) as ex: - # parse can raise OverflowError - raise ApiValueError( - "{0}Failed to parse {1} as {2}".format( - additional_message, repr(data), klass.__name__ - ), - path_to_item=path_to_item - ) from ex - - -def get_discriminator_class(model_class, - discr_name, - discr_value, cls_visited): - """Returns the child class specified by the discriminator. - - Args: - model_class (OpenApiModel): the model class. - discr_name (string): the name of the discriminator property. - discr_value (any): the discriminator value. - cls_visited (list): list of model classes that have been visited. - Used to determine the discriminator class without - visiting circular references indefinitely. - - Returns: - used_model_class (class/None): the chosen child class that will be used - to deserialize the data, for example dog.Dog. - If a class is not found, None is returned. - """ - - if model_class in cls_visited: - # The class has already been visited and no suitable class was found. - return None - cls_visited.append(model_class) - used_model_class = None - if discr_name in model_class.discriminator: - class_name_to_discr_class = model_class.discriminator[discr_name] - used_model_class = class_name_to_discr_class.get(discr_value) - if used_model_class is None: - # We didn't find a discriminated class in class_name_to_discr_class. - # So look in the ancestor or descendant discriminators - # The discriminator mapping may exist in a descendant (anyOf, oneOf) - # or ancestor (allOf). - # Ancestor example: in the GrandparentAnimal -> ParentPet -> ChildCat - # hierarchy, the discriminator mappings may be defined at any level - # in the hierarchy. - # Descendant example: mammal -> whale/zebra/Pig -> BasquePig/DanishPig - # if we try to make BasquePig from mammal, we need to travel through - # the oneOf descendant discriminators to find BasquePig - descendant_classes = model_class._composed_schemas.get('oneOf', ()) + \ - model_class._composed_schemas.get('anyOf', ()) - ancestor_classes = model_class._composed_schemas.get('allOf', ()) - possible_classes = descendant_classes + ancestor_classes - for cls in possible_classes: - # Check if the schema has inherited discriminators. - if hasattr(cls, 'discriminator') and cls.discriminator is not None: - used_model_class = get_discriminator_class( - cls, discr_name, discr_value, cls_visited) - if used_model_class is not None: - return used_model_class - return used_model_class - - -def deserialize_model(model_data, model_class, path_to_item, check_type, - configuration, spec_property_naming): - """Deserializes model_data to model instance. - - Args: - model_data (int/str/float/bool/none_type/list/dict): data to instantiate the model - model_class (OpenApiModel): the model class - path_to_item (list): path to the model in the received data - check_type (bool): whether to check the data tupe for the values in - the model - configuration (Configuration): the instance to use to convert files - spec_property_naming (bool): True if the variable names in the input - data are serialized names as specified in the OpenAPI document. - False if the variables names in the input data are python - variable names in PEP-8 snake case. - - Returns: - model instance - - Raise: - ApiTypeError - ApiValueError - ApiKeyError - """ - - kw_args = dict(_check_type=check_type, - _path_to_item=path_to_item, - _configuration=configuration, - _spec_property_naming=spec_property_naming) - - if issubclass(model_class, ModelSimple): - return model_class._new_from_openapi_data(model_data, **kw_args) - elif isinstance(model_data, list): - return model_class._new_from_openapi_data(*model_data, **kw_args) - if isinstance(model_data, dict): - kw_args.update(model_data) - return model_class._new_from_openapi_data(**kw_args) - elif isinstance(model_data, PRIMITIVE_TYPES): - return model_class._new_from_openapi_data(model_data, **kw_args) - - -def deserialize_file(response_data, configuration, content_disposition=None): - """Deserializes body to file - - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - - Args: - param response_data (str): the file data to write - configuration (Configuration): the instance to use to convert files - - Keyword Args: - content_disposition (str): the value of the Content-Disposition - header - - Returns: - (file_type): the deserialized file which is open - The user is responsible for closing and reading the file - """ - fd, path = tempfile.mkstemp(dir=configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - if content_disposition: - filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition).group(1) - path = os.path.join(os.path.dirname(path), filename) - - with open(path, "wb") as f: - if isinstance(response_data, str): - # change str to bytes so we can write it - response_data = response_data.encode('utf-8') - f.write(response_data) - - f = open(path, "rb") - return f - - -def attempt_convert_item(input_value, valid_classes, path_to_item, - configuration, spec_property_naming, key_type=False, - must_convert=False, check_type=True): - """ - Args: - input_value (any): the data to convert - valid_classes (any): the classes that are valid - path_to_item (list): the path to the item to convert - configuration (Configuration): the instance to use to convert files - spec_property_naming (bool): True if the variable names in the input - data are serialized names as specified in the OpenAPI document. - False if the variables names in the input data are python - variable names in PEP-8 snake case. - key_type (bool): if True we need to convert a key type (not supported) - must_convert (bool): if True we must convert - check_type (bool): if True we check the type or the returned data in - ModelComposed/ModelNormal/ModelSimple instances - - Returns: - instance (any) the fixed item - - Raises: - ApiTypeError - ApiValueError - ApiKeyError - """ - valid_classes_ordered = order_response_types(valid_classes) - valid_classes_coercible = remove_uncoercible( - valid_classes_ordered, input_value, spec_property_naming) - if not valid_classes_coercible or key_type: - if input_value is None: - return input_value - # we do not handle keytype errors, json will take care - # of this for us - if configuration is None or not configuration.discard_unknown_keys: - raise get_type_error(input_value, path_to_item, valid_classes, - key_type=key_type) - for valid_class in valid_classes_coercible: - try: - if issubclass(valid_class, OpenApiModel): - return deserialize_model(input_value, valid_class, - path_to_item, check_type, - configuration, spec_property_naming) - elif valid_class == file_type: - return deserialize_file(input_value, configuration) - return deserialize_primitive(input_value, valid_class, - path_to_item) - except (ApiTypeError, ApiValueError, ApiKeyError) as conversion_exc: - if must_convert: - raise conversion_exc - # if we have conversion errors when must_convert == False - # we ignore the exception and move on to the next class - continue - # we were unable to convert, must_convert == False - return input_value - - -def is_type_nullable(input_type): - """ - Returns true if None is an allowed value for the specified input_type. - - A type is nullable if at least one of the following conditions is true: - 1. The OAS 'nullable' attribute has been specified, - 1. The type is the 'null' type, - 1. The type is a anyOf/oneOf composed schema, and a child schema is - the 'null' type. - Args: - input_type (type): the class of the input_value that we are - checking - Returns: - bool - """ - if input_type is none_type: - return True - if issubclass(input_type, OpenApiModel) and input_type._nullable: - return True - if issubclass(input_type, ModelComposed): - # If oneOf/anyOf, check if the 'null' type is one of the allowed types. - for t in input_type._composed_schemas.get('oneOf', ()): - if is_type_nullable(t): return True - for t in input_type._composed_schemas.get('anyOf', ()): - if is_type_nullable(t): return True - return False - - -def is_valid_type(input_class_simple, valid_classes): - """ - Args: - input_class_simple (class): the class of the input_value that we are - checking - valid_classes (tuple): the valid classes that the current item - should be - Returns: - bool - """ - if issubclass(input_class_simple, OpenApiModel) and \ - valid_classes == (bool, date, datetime, dict, float, int, list, str, none_type,): - return True - valid_type = input_class_simple in valid_classes - if not valid_type and ( - issubclass(input_class_simple, OpenApiModel) or - input_class_simple is none_type): - for valid_class in valid_classes: - if input_class_simple is none_type and is_type_nullable(valid_class): - # Schema is oneOf/anyOf and the 'null' type is one of the allowed types. - return True - if not (issubclass(valid_class, OpenApiModel) and valid_class.discriminator): - continue - discr_propertyname_py = list(valid_class.discriminator.keys())[0] - discriminator_classes = ( - valid_class.discriminator[discr_propertyname_py].values() - ) - valid_type = is_valid_type(input_class_simple, discriminator_classes) - if valid_type: - return True - return valid_type - - -def validate_and_convert_types(input_value, required_types_mixed, path_to_item, - spec_property_naming, _check_type, configuration=None): - """Raises a TypeError is there is a problem, otherwise returns value - - Args: - input_value (any): the data to validate/convert - required_types_mixed (list/dict/tuple): A list of - valid classes, or a list tuples of valid classes, or a dict where - the value is a tuple of value classes - path_to_item: (list) the path to the data being validated - this stores a list of keys or indices to get to the data being - validated - spec_property_naming (bool): True if the variable names in the input - data are serialized names as specified in the OpenAPI document. - False if the variables names in the input data are python - variable names in PEP-8 snake case. - _check_type: (boolean) if true, type will be checked and conversion - will be attempted. - configuration: (Configuration): the configuration class to use - when converting file_type items. - If passed, conversion will be attempted when possible - If not passed, no conversions will be attempted and - exceptions will be raised - - Returns: - the correctly typed value - - Raises: - ApiTypeError - """ - results = get_required_type_classes(required_types_mixed, spec_property_naming) - valid_classes, child_req_types_by_current_type = results - - input_class_simple = get_simple_class(input_value) - valid_type = is_valid_type(input_class_simple, valid_classes) - if not valid_type: - if configuration: - # if input_value is not valid_type try to convert it - converted_instance = attempt_convert_item( - input_value, - valid_classes, - path_to_item, - configuration, - spec_property_naming, - key_type=False, - must_convert=True, - check_type=_check_type - ) - return converted_instance - else: - raise get_type_error(input_value, path_to_item, valid_classes, - key_type=False) - - # input_value's type is in valid_classes - if len(valid_classes) > 1 and configuration: - # there are valid classes which are not the current class - valid_classes_coercible = remove_uncoercible( - valid_classes, input_value, spec_property_naming, must_convert=False) - if valid_classes_coercible: - converted_instance = attempt_convert_item( - input_value, - valid_classes_coercible, - path_to_item, - configuration, - spec_property_naming, - key_type=False, - must_convert=False, - check_type=_check_type - ) - return converted_instance - - if child_req_types_by_current_type == {}: - # all types are of the required types and there are no more inner - # variables left to look at - return input_value - inner_required_types = child_req_types_by_current_type.get( - type(input_value) - ) - if inner_required_types is None: - # for this type, there are not more inner variables left to look at - return input_value - if isinstance(input_value, list): - if input_value == []: - # allow an empty list - return input_value - for index, inner_value in enumerate(input_value): - inner_path = list(path_to_item) - inner_path.append(index) - input_value[index] = validate_and_convert_types( - inner_value, - inner_required_types, - inner_path, - spec_property_naming, - _check_type, - configuration=configuration - ) - elif isinstance(input_value, dict): - if input_value == {}: - # allow an empty dict - return input_value - for inner_key, inner_val in input_value.items(): - inner_path = list(path_to_item) - inner_path.append(inner_key) - if get_simple_class(inner_key) != str: - raise get_type_error(inner_key, inner_path, valid_classes, - key_type=True) - input_value[inner_key] = validate_and_convert_types( - inner_val, - inner_required_types, - inner_path, - spec_property_naming, - _check_type, - configuration=configuration - ) - return input_value - - -def model_to_dict(model_instance, serialize=True): - """Returns the model properties as a dict - - Args: - model_instance (one of your model instances): the model instance that - will be converted to a dict. - - Keyword Args: - serialize (bool): if True, the keys in the dict will be values from - attribute_map - """ - result = {} - extract_item = lambda item: (item[0], model_to_dict(item[1], serialize=serialize)) if hasattr(item[1], '_data_store') else item - - model_instances = [model_instance] - if model_instance._composed_schemas: - model_instances.extend(model_instance._composed_instances) - seen_json_attribute_names = set() - used_fallback_python_attribute_names = set() - py_to_json_map = {} - for model_instance in model_instances: - for attr, value in model_instance._data_store.items(): - if serialize: - # we use get here because additional property key names do not - # exist in attribute_map - try: - attr = model_instance.attribute_map[attr] - py_to_json_map.update(model_instance.attribute_map) - seen_json_attribute_names.add(attr) - except KeyError: - used_fallback_python_attribute_names.add(attr) - result[attr] = model_to_dict_recursive(value, serialize, extract_item) - if serialize: - for python_key in used_fallback_python_attribute_names: - json_key = py_to_json_map.get(python_key) - if json_key is None: - continue - if python_key == json_key: - continue - json_key_assigned_no_need_for_python_key = json_key in seen_json_attribute_names - if json_key_assigned_no_need_for_python_key: - del result[python_key] - - return result - -def model_to_dict_recursive(value, serialize, extract_item): - if isinstance(value, list): - res = [] - - for v in value: - res.append(model_to_dict_recursive(v, serialize, extract_item)) - - return res - elif isinstance(value, dict): - return dict(map( - extract_item, - value.items() - )) - elif isinstance(value, ModelSimple): - return value.value - elif hasattr(value, '_data_store'): - return model_to_dict(value, serialize=serialize) - elif isinstance(value, io.BufferedReader): - return value.name - else: - return value - - -def type_error_message(var_value=None, var_name=None, valid_classes=None, - key_type=None): - """ - Keyword Args: - var_value (any): the variable which has the type_error - var_name (str): the name of the variable which has the typ error - valid_classes (tuple): the accepted classes for current_item's - value - key_type (bool): False if our value is a value in a dict - True if it is a key in a dict - False if our item is an item in a list - """ - key_or_value = 'value' - if key_type: - key_or_value = 'key' - valid_classes_phrase = get_valid_classes_phrase(valid_classes) - msg = ( - "Invalid type for variable '{0}'. Required {1} type {2} and " - "passed type was {3}".format( - var_name, - key_or_value, - valid_classes_phrase, - type(var_value).__name__, - ) - ) - return msg - - -def get_valid_classes_phrase(input_classes): - """Returns a string phrase describing what types are allowed - """ - all_classes = list(input_classes) - all_classes = sorted(all_classes, key=lambda cls: cls.__name__) - all_class_names = [cls.__name__ for cls in all_classes] - if len(all_class_names) == 1: - return 'is {0}'.format(all_class_names[0]) - return "is one of [{0}]".format(", ".join(all_class_names)) - - -def get_allof_instances(self, model_args, constant_args): - """ - Args: - self: the class we are handling - model_args (dict): var_name to var_value - used to make instances - constant_args (dict): - metadata arguments: - _check_type - _path_to_item - _spec_property_naming - _configuration - _visited_composed_classes - - Returns - composed_instances (list) - """ - composed_instances = [] - if 'allOf' in self._composed_schemas.keys(): - for allof_class in self._composed_schemas['allOf']: - - try: - if constant_args.get('_spec_property_naming'): - allof_instance = allof_class._from_openapi_data(**model_args, **constant_args) - else: - allof_instance = allof_class(**model_args, **constant_args) - composed_instances.append(allof_instance) - except Exception as ex: - raise ApiValueError( - "Invalid inputs given to generate an instance of '%s'. The " - "input data was invalid for the allOf schema '%s' in the composed " - "schema '%s'. Error=%s" % ( - allof_class.__name__, - allof_class.__name__, - self.__class__.__name__, - str(ex) - ) - ) from ex - return composed_instances - - -def get_oneof_instance(cls, model_kwargs, constant_kwargs, model_arg=None): - """ - Find the oneOf schema that matches the input data (e.g. payload). - If exactly one schema matches the input data, an instance of that schema - is returned. - If zero or more than one schema match the input data, an exception is raised. - In OAS 3.x, the payload MUST, by validation, match exactly one of the - schemas described by oneOf. - - Args: - cls: the class we are handling - model_kwargs (dict): var_name to var_value - The input data, e.g. the payload that must match a oneOf schema - in the OpenAPI document. - constant_kwargs (dict): var_name to var_value - args that every model requires, including configuration, server - and path to item. - - Kwargs: - model_arg: (int, float, bool, str, date, datetime, ModelSimple, None): - the value to assign to a primitive class or ModelSimple class - Notes: - - this is only passed in when oneOf includes types which are not object - - None is used to suppress handling of model_arg, nullable models are handled in __new__ - - Returns - oneof_instance (instance) - """ - if len(cls._composed_schemas['oneOf']) == 0: - return None - - oneof_instances = [] - # Iterate over each oneOf schema and determine if the input data - # matches the oneOf schemas. - for oneof_class in cls._composed_schemas['oneOf']: - # The composed oneOf schema allows the 'null' type and the input data - # is the null value. This is a OAS >= 3.1 feature. - if oneof_class is none_type: - # skip none_types because we are deserializing dict data. - # none_type deserialization is handled in the __new__ method - continue - - single_value_input = allows_single_value_input(oneof_class) - - try: - if not single_value_input: - if constant_kwargs.get('_spec_property_naming'): - oneof_instance = oneof_class._from_openapi_data(**model_kwargs, **constant_kwargs) - else: - oneof_instance = oneof_class(**model_kwargs, **constant_kwargs) - else: - if issubclass(oneof_class, ModelSimple): - if constant_kwargs.get('_spec_property_naming'): - oneof_instance = oneof_class._from_openapi_data(model_arg, **constant_kwargs) - else: - oneof_instance = oneof_class(model_arg, **constant_kwargs) - elif oneof_class in PRIMITIVE_TYPES: - oneof_instance = validate_and_convert_types( - model_arg, - (oneof_class,), - constant_kwargs['_path_to_item'], - constant_kwargs['_spec_property_naming'], - constant_kwargs['_check_type'], - configuration=constant_kwargs['_configuration'] - ) - oneof_instances.append(oneof_instance) - except Exception: - pass - if len(oneof_instances) == 0: - raise ApiValueError( - "Invalid inputs given to generate an instance of %s. None " - "of the oneOf schemas matched the input data." % - cls.__name__ - ) - elif len(oneof_instances) > 1: - raise ApiValueError( - "Invalid inputs given to generate an instance of %s. Multiple " - "oneOf schemas matched the inputs, but a max of one is allowed." % - cls.__name__ - ) - return oneof_instances[0] - - -def get_anyof_instances(self, model_args, constant_args): - """ - Args: - self: the class we are handling - model_args (dict): var_name to var_value - The input data, e.g. the payload that must match at least one - anyOf child schema in the OpenAPI document. - constant_args (dict): var_name to var_value - args that every model requires, including configuration, server - and path to item. - - Returns - anyof_instances (list) - """ - anyof_instances = [] - if len(self._composed_schemas['anyOf']) == 0: - return anyof_instances - - for anyof_class in self._composed_schemas['anyOf']: - # The composed oneOf schema allows the 'null' type and the input data - # is the null value. This is a OAS >= 3.1 feature. - if anyof_class is none_type: - # skip none_types because we are deserializing dict data. - # none_type deserialization is handled in the __new__ method - continue - - try: - if constant_args.get('_spec_property_naming'): - anyof_instance = anyof_class._from_openapi_data(**model_args, **constant_args) - else: - anyof_instance = anyof_class(**model_args, **constant_args) - anyof_instances.append(anyof_instance) - except Exception: - pass - if len(anyof_instances) == 0: - raise ApiValueError( - "Invalid inputs given to generate an instance of %s. None of the " - "anyOf schemas matched the inputs." % - self.__class__.__name__ - ) - return anyof_instances - - -def get_discarded_args(self, composed_instances, model_args): - """ - Gathers the args that were discarded by configuration.discard_unknown_keys - """ - model_arg_keys = model_args.keys() - discarded_args = set() - # arguments passed to self were already converted to python names - # before __init__ was called - for instance in composed_instances: - if instance.__class__ in self._composed_schemas['allOf']: - try: - keys = instance.to_dict().keys() - discarded_keys = model_args - keys - discarded_args.update(discarded_keys) - except Exception: - # allOf integer schema will throw exception - pass - else: - try: - all_keys = set(model_to_dict(instance, serialize=False).keys()) - js_keys = model_to_dict(instance, serialize=True).keys() - all_keys.update(js_keys) - discarded_keys = model_arg_keys - all_keys - discarded_args.update(discarded_keys) - except Exception: - # allOf integer schema will throw exception - pass - return discarded_args - - -def validate_get_composed_info(constant_args, model_args, self): - """ - For composed schemas, generate schema instances for - all schemas in the oneOf/anyOf/allOf definition. If additional - properties are allowed, also assign those properties on - all matched schemas that contain additionalProperties. - Openapi schemas are python classes. - - Exceptions are raised if: - - 0 or > 1 oneOf schema matches the model_args input data - - no anyOf schema matches the model_args input data - - any of the allOf schemas do not match the model_args input data - - Args: - constant_args (dict): these are the args that every model requires - model_args (dict): these are the required and optional spec args that - were passed in to make this model - self (class): the class that we are instantiating - This class contains self._composed_schemas - - Returns: - composed_info (list): length three - composed_instances (list): the composed instances which are not - self - var_name_to_model_instances (dict): a dict going from var_name - to the model_instance which holds that var_name - the model_instance may be self or an instance of one of the - classes in self.composed_instances() - additional_properties_model_instances (list): a list of the - model instances which have the property - additional_properties_type. This list can include self - """ - # create composed_instances - composed_instances = [] - allof_instances = get_allof_instances(self, model_args, constant_args) - composed_instances.extend(allof_instances) - oneof_instance = get_oneof_instance(self.__class__, model_args, constant_args) - if oneof_instance is not None: - composed_instances.append(oneof_instance) - anyof_instances = get_anyof_instances(self, model_args, constant_args) - composed_instances.extend(anyof_instances) - """ - set additional_properties_model_instances - additional properties must be evaluated at the schema level - so self's additional properties are most important - If self is a composed schema with: - - no properties defined in self - - additionalProperties: False - Then for object payloads every property is an additional property - and they are not allowed, so only empty dict is allowed - - Properties must be set on all matching schemas - so when a property is assigned toa composed instance, it must be set on all - composed instances regardless of additionalProperties presence - keeping it to prevent breaking changes in v5.0.1 - TODO remove cls._additional_properties_model_instances in 6.0.0 - """ - additional_properties_model_instances = [] - if self.additional_properties_type is not None: - additional_properties_model_instances = [self] - - """ - no need to set properties on self in here, they will be set in __init__ - By here all composed schema oneOf/anyOf/allOf instances have their properties set using - model_args - """ - discarded_args = get_discarded_args(self, composed_instances, model_args) - - # map variable names to composed_instances - var_name_to_model_instances = {} - for prop_name in model_args: - if prop_name not in discarded_args: - var_name_to_model_instances[prop_name] = [self] + composed_instances - - return [ - composed_instances, - var_name_to_model_instances, - additional_properties_model_instances, - discarded_args - ] diff --git a/sdks/python/dropbox_sign/models/__init__.py b/sdks/python/dropbox_sign/models/__init__.py index e568ef334..b28d4cd01 100644 --- a/sdks/python/dropbox_sign/models/__init__.py +++ b/sdks/python/dropbox_sign/models/__init__.py @@ -1,194 +1,199 @@ +# coding: utf-8 + # flake8: noqa +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 -# import all models into this package -# if you have many models here with many references from one model to another this may -# raise a RecursionError -# to avoid this, import only the models that you directly need like: -# from from dropbox_sign.model.pet import Pet -# or import this package, but before doing it, use: -# import sys -# sys.setrecursionlimit(n) -from dropbox_sign.model.account_create_request import AccountCreateRequest -from dropbox_sign.model.account_create_response import AccountCreateResponse -from dropbox_sign.model.account_get_response import AccountGetResponse -from dropbox_sign.model.account_response import AccountResponse -from dropbox_sign.model.account_response_quotas import AccountResponseQuotas -from dropbox_sign.model.account_response_usage import AccountResponseUsage -from dropbox_sign.model.account_update_request import AccountUpdateRequest -from dropbox_sign.model.account_verify_request import AccountVerifyRequest -from dropbox_sign.model.account_verify_response import AccountVerifyResponse -from dropbox_sign.model.account_verify_response_account import AccountVerifyResponseAccount -from dropbox_sign.model.api_app_create_request import ApiAppCreateRequest -from dropbox_sign.model.api_app_get_response import ApiAppGetResponse -from dropbox_sign.model.api_app_list_response import ApiAppListResponse -from dropbox_sign.model.api_app_response import ApiAppResponse -from dropbox_sign.model.api_app_response_o_auth import ApiAppResponseOAuth -from dropbox_sign.model.api_app_response_options import ApiAppResponseOptions -from dropbox_sign.model.api_app_response_owner_account import ApiAppResponseOwnerAccount -from dropbox_sign.model.api_app_response_white_labeling_options import ApiAppResponseWhiteLabelingOptions -from dropbox_sign.model.api_app_update_request import ApiAppUpdateRequest -from dropbox_sign.model.bulk_send_job_get_response import BulkSendJobGetResponse -from dropbox_sign.model.bulk_send_job_get_response_signature_requests import BulkSendJobGetResponseSignatureRequests -from dropbox_sign.model.bulk_send_job_list_response import BulkSendJobListResponse -from dropbox_sign.model.bulk_send_job_response import BulkSendJobResponse -from dropbox_sign.model.bulk_send_job_send_response import BulkSendJobSendResponse -from dropbox_sign.model.embedded_edit_url_request import EmbeddedEditUrlRequest -from dropbox_sign.model.embedded_edit_url_response import EmbeddedEditUrlResponse -from dropbox_sign.model.embedded_edit_url_response_embedded import EmbeddedEditUrlResponseEmbedded -from dropbox_sign.model.embedded_sign_url_response import EmbeddedSignUrlResponse -from dropbox_sign.model.embedded_sign_url_response_embedded import EmbeddedSignUrlResponseEmbedded -from dropbox_sign.model.error_response import ErrorResponse -from dropbox_sign.model.error_response_error import ErrorResponseError -from dropbox_sign.model.event_callback_request import EventCallbackRequest -from dropbox_sign.model.event_callback_request_event import EventCallbackRequestEvent -from dropbox_sign.model.event_callback_request_event_metadata import EventCallbackRequestEventMetadata -from dropbox_sign.model.fax_line_add_user_request import FaxLineAddUserRequest -from dropbox_sign.model.fax_line_area_code_get_country_enum import FaxLineAreaCodeGetCountryEnum -from dropbox_sign.model.fax_line_area_code_get_province_enum import FaxLineAreaCodeGetProvinceEnum -from dropbox_sign.model.fax_line_area_code_get_response import FaxLineAreaCodeGetResponse -from dropbox_sign.model.fax_line_area_code_get_state_enum import FaxLineAreaCodeGetStateEnum -from dropbox_sign.model.fax_line_create_request import FaxLineCreateRequest -from dropbox_sign.model.fax_line_delete_request import FaxLineDeleteRequest -from dropbox_sign.model.fax_line_list_response import FaxLineListResponse -from dropbox_sign.model.fax_line_remove_user_request import FaxLineRemoveUserRequest -from dropbox_sign.model.fax_line_response import FaxLineResponse -from dropbox_sign.model.fax_line_response_fax_line import FaxLineResponseFaxLine -from dropbox_sign.model.file_response import FileResponse -from dropbox_sign.model.file_response_data_uri import FileResponseDataUri -from dropbox_sign.model.list_info_response import ListInfoResponse -from dropbox_sign.model.o_auth_token_generate_request import OAuthTokenGenerateRequest -from dropbox_sign.model.o_auth_token_refresh_request import OAuthTokenRefreshRequest -from dropbox_sign.model.o_auth_token_response import OAuthTokenResponse -from dropbox_sign.model.report_create_request import ReportCreateRequest -from dropbox_sign.model.report_create_response import ReportCreateResponse -from dropbox_sign.model.report_response import ReportResponse -from dropbox_sign.model.signature_request_bulk_create_embedded_with_template_request import SignatureRequestBulkCreateEmbeddedWithTemplateRequest -from dropbox_sign.model.signature_request_bulk_send_with_template_request import SignatureRequestBulkSendWithTemplateRequest -from dropbox_sign.model.signature_request_create_embedded_request import SignatureRequestCreateEmbeddedRequest -from dropbox_sign.model.signature_request_create_embedded_with_template_request import SignatureRequestCreateEmbeddedWithTemplateRequest -from dropbox_sign.model.signature_request_get_response import SignatureRequestGetResponse -from dropbox_sign.model.signature_request_list_response import SignatureRequestListResponse -from dropbox_sign.model.signature_request_remind_request import SignatureRequestRemindRequest -from dropbox_sign.model.signature_request_response import SignatureRequestResponse -from dropbox_sign.model.signature_request_response_attachment import SignatureRequestResponseAttachment -from dropbox_sign.model.signature_request_response_custom_field_base import SignatureRequestResponseCustomFieldBase -from dropbox_sign.model.signature_request_response_custom_field_checkbox import SignatureRequestResponseCustomFieldCheckbox -from dropbox_sign.model.signature_request_response_custom_field_text import SignatureRequestResponseCustomFieldText -from dropbox_sign.model.signature_request_response_custom_field_type_enum import SignatureRequestResponseCustomFieldTypeEnum -from dropbox_sign.model.signature_request_response_data_base import SignatureRequestResponseDataBase -from dropbox_sign.model.signature_request_response_data_type_enum import SignatureRequestResponseDataTypeEnum -from dropbox_sign.model.signature_request_response_data_value_checkbox import SignatureRequestResponseDataValueCheckbox -from dropbox_sign.model.signature_request_response_data_value_checkbox_merge import SignatureRequestResponseDataValueCheckboxMerge -from dropbox_sign.model.signature_request_response_data_value_date_signed import SignatureRequestResponseDataValueDateSigned -from dropbox_sign.model.signature_request_response_data_value_dropdown import SignatureRequestResponseDataValueDropdown -from dropbox_sign.model.signature_request_response_data_value_initials import SignatureRequestResponseDataValueInitials -from dropbox_sign.model.signature_request_response_data_value_radio import SignatureRequestResponseDataValueRadio -from dropbox_sign.model.signature_request_response_data_value_signature import SignatureRequestResponseDataValueSignature -from dropbox_sign.model.signature_request_response_data_value_text import SignatureRequestResponseDataValueText -from dropbox_sign.model.signature_request_response_data_value_text_merge import SignatureRequestResponseDataValueTextMerge -from dropbox_sign.model.signature_request_response_signatures import SignatureRequestResponseSignatures -from dropbox_sign.model.signature_request_send_request import SignatureRequestSendRequest -from dropbox_sign.model.signature_request_send_with_template_request import SignatureRequestSendWithTemplateRequest -from dropbox_sign.model.signature_request_update_request import SignatureRequestUpdateRequest -from dropbox_sign.model.sub_attachment import SubAttachment -from dropbox_sign.model.sub_bulk_signer_list import SubBulkSignerList -from dropbox_sign.model.sub_bulk_signer_list_custom_field import SubBulkSignerListCustomField -from dropbox_sign.model.sub_cc import SubCC -from dropbox_sign.model.sub_custom_field import SubCustomField -from dropbox_sign.model.sub_editor_options import SubEditorOptions -from dropbox_sign.model.sub_field_options import SubFieldOptions -from dropbox_sign.model.sub_form_field_group import SubFormFieldGroup -from dropbox_sign.model.sub_form_field_rule import SubFormFieldRule -from dropbox_sign.model.sub_form_field_rule_action import SubFormFieldRuleAction -from dropbox_sign.model.sub_form_field_rule_trigger import SubFormFieldRuleTrigger -from dropbox_sign.model.sub_form_fields_per_document_base import SubFormFieldsPerDocumentBase -from dropbox_sign.model.sub_form_fields_per_document_checkbox import SubFormFieldsPerDocumentCheckbox -from dropbox_sign.model.sub_form_fields_per_document_checkbox_merge import SubFormFieldsPerDocumentCheckboxMerge -from dropbox_sign.model.sub_form_fields_per_document_date_signed import SubFormFieldsPerDocumentDateSigned -from dropbox_sign.model.sub_form_fields_per_document_dropdown import SubFormFieldsPerDocumentDropdown -from dropbox_sign.model.sub_form_fields_per_document_font_enum import SubFormFieldsPerDocumentFontEnum -from dropbox_sign.model.sub_form_fields_per_document_hyperlink import SubFormFieldsPerDocumentHyperlink -from dropbox_sign.model.sub_form_fields_per_document_initials import SubFormFieldsPerDocumentInitials -from dropbox_sign.model.sub_form_fields_per_document_radio import SubFormFieldsPerDocumentRadio -from dropbox_sign.model.sub_form_fields_per_document_signature import SubFormFieldsPerDocumentSignature -from dropbox_sign.model.sub_form_fields_per_document_text import SubFormFieldsPerDocumentText -from dropbox_sign.model.sub_form_fields_per_document_text_merge import SubFormFieldsPerDocumentTextMerge -from dropbox_sign.model.sub_form_fields_per_document_type_enum import SubFormFieldsPerDocumentTypeEnum -from dropbox_sign.model.sub_merge_field import SubMergeField -from dropbox_sign.model.sub_o_auth import SubOAuth -from dropbox_sign.model.sub_options import SubOptions -from dropbox_sign.model.sub_signature_request_grouped_signers import SubSignatureRequestGroupedSigners -from dropbox_sign.model.sub_signature_request_signer import SubSignatureRequestSigner -from dropbox_sign.model.sub_signature_request_template_signer import SubSignatureRequestTemplateSigner -from dropbox_sign.model.sub_signing_options import SubSigningOptions -from dropbox_sign.model.sub_team_response import SubTeamResponse -from dropbox_sign.model.sub_template_role import SubTemplateRole -from dropbox_sign.model.sub_unclaimed_draft_signer import SubUnclaimedDraftSigner -from dropbox_sign.model.sub_unclaimed_draft_template_signer import SubUnclaimedDraftTemplateSigner -from dropbox_sign.model.sub_white_labeling_options import SubWhiteLabelingOptions -from dropbox_sign.model.team_add_member_request import TeamAddMemberRequest -from dropbox_sign.model.team_create_request import TeamCreateRequest -from dropbox_sign.model.team_get_info_response import TeamGetInfoResponse -from dropbox_sign.model.team_get_response import TeamGetResponse -from dropbox_sign.model.team_info_response import TeamInfoResponse -from dropbox_sign.model.team_invite_response import TeamInviteResponse -from dropbox_sign.model.team_invites_response import TeamInvitesResponse -from dropbox_sign.model.team_member_response import TeamMemberResponse -from dropbox_sign.model.team_members_response import TeamMembersResponse -from dropbox_sign.model.team_parent_response import TeamParentResponse -from dropbox_sign.model.team_remove_member_request import TeamRemoveMemberRequest -from dropbox_sign.model.team_response import TeamResponse -from dropbox_sign.model.team_sub_teams_response import TeamSubTeamsResponse -from dropbox_sign.model.team_update_request import TeamUpdateRequest -from dropbox_sign.model.template_add_user_request import TemplateAddUserRequest -from dropbox_sign.model.template_create_embedded_draft_request import TemplateCreateEmbeddedDraftRequest -from dropbox_sign.model.template_create_embedded_draft_response import TemplateCreateEmbeddedDraftResponse -from dropbox_sign.model.template_create_embedded_draft_response_template import TemplateCreateEmbeddedDraftResponseTemplate -from dropbox_sign.model.template_create_request import TemplateCreateRequest -from dropbox_sign.model.template_create_response import TemplateCreateResponse -from dropbox_sign.model.template_create_response_template import TemplateCreateResponseTemplate -from dropbox_sign.model.template_edit_response import TemplateEditResponse -from dropbox_sign.model.template_get_response import TemplateGetResponse -from dropbox_sign.model.template_list_response import TemplateListResponse -from dropbox_sign.model.template_remove_user_request import TemplateRemoveUserRequest -from dropbox_sign.model.template_response import TemplateResponse -from dropbox_sign.model.template_response_account import TemplateResponseAccount -from dropbox_sign.model.template_response_account_quota import TemplateResponseAccountQuota -from dropbox_sign.model.template_response_cc_role import TemplateResponseCCRole -from dropbox_sign.model.template_response_document import TemplateResponseDocument -from dropbox_sign.model.template_response_document_custom_field_base import TemplateResponseDocumentCustomFieldBase -from dropbox_sign.model.template_response_document_custom_field_checkbox import TemplateResponseDocumentCustomFieldCheckbox -from dropbox_sign.model.template_response_document_custom_field_text import TemplateResponseDocumentCustomFieldText -from dropbox_sign.model.template_response_document_field_group import TemplateResponseDocumentFieldGroup -from dropbox_sign.model.template_response_document_field_group_rule import TemplateResponseDocumentFieldGroupRule -from dropbox_sign.model.template_response_document_form_field_base import TemplateResponseDocumentFormFieldBase -from dropbox_sign.model.template_response_document_form_field_checkbox import TemplateResponseDocumentFormFieldCheckbox -from dropbox_sign.model.template_response_document_form_field_date_signed import TemplateResponseDocumentFormFieldDateSigned -from dropbox_sign.model.template_response_document_form_field_dropdown import TemplateResponseDocumentFormFieldDropdown -from dropbox_sign.model.template_response_document_form_field_hyperlink import TemplateResponseDocumentFormFieldHyperlink -from dropbox_sign.model.template_response_document_form_field_initials import TemplateResponseDocumentFormFieldInitials -from dropbox_sign.model.template_response_document_form_field_radio import TemplateResponseDocumentFormFieldRadio -from dropbox_sign.model.template_response_document_form_field_signature import TemplateResponseDocumentFormFieldSignature -from dropbox_sign.model.template_response_document_form_field_text import TemplateResponseDocumentFormFieldText -from dropbox_sign.model.template_response_document_static_field_base import TemplateResponseDocumentStaticFieldBase -from dropbox_sign.model.template_response_document_static_field_checkbox import TemplateResponseDocumentStaticFieldCheckbox -from dropbox_sign.model.template_response_document_static_field_date_signed import TemplateResponseDocumentStaticFieldDateSigned -from dropbox_sign.model.template_response_document_static_field_dropdown import TemplateResponseDocumentStaticFieldDropdown -from dropbox_sign.model.template_response_document_static_field_hyperlink import TemplateResponseDocumentStaticFieldHyperlink -from dropbox_sign.model.template_response_document_static_field_initials import TemplateResponseDocumentStaticFieldInitials -from dropbox_sign.model.template_response_document_static_field_radio import TemplateResponseDocumentStaticFieldRadio -from dropbox_sign.model.template_response_document_static_field_signature import TemplateResponseDocumentStaticFieldSignature -from dropbox_sign.model.template_response_document_static_field_text import TemplateResponseDocumentStaticFieldText -from dropbox_sign.model.template_response_field_avg_text_length import TemplateResponseFieldAvgTextLength -from dropbox_sign.model.template_response_signer_role import TemplateResponseSignerRole -from dropbox_sign.model.template_update_files_request import TemplateUpdateFilesRequest -from dropbox_sign.model.template_update_files_response import TemplateUpdateFilesResponse -from dropbox_sign.model.template_update_files_response_template import TemplateUpdateFilesResponseTemplate -from dropbox_sign.model.unclaimed_draft_create_embedded_request import UnclaimedDraftCreateEmbeddedRequest -from dropbox_sign.model.unclaimed_draft_create_embedded_with_template_request import UnclaimedDraftCreateEmbeddedWithTemplateRequest -from dropbox_sign.model.unclaimed_draft_create_request import UnclaimedDraftCreateRequest -from dropbox_sign.model.unclaimed_draft_create_response import UnclaimedDraftCreateResponse -from dropbox_sign.model.unclaimed_draft_edit_and_resend_request import UnclaimedDraftEditAndResendRequest -from dropbox_sign.model.unclaimed_draft_response import UnclaimedDraftResponse -from dropbox_sign.model.warning_response import WarningResponse +# import models into model package +from dropbox_sign.models.account_create_request import AccountCreateRequest +from dropbox_sign.models.account_create_response import AccountCreateResponse +from dropbox_sign.models.account_get_response import AccountGetResponse +from dropbox_sign.models.account_response import AccountResponse +from dropbox_sign.models.account_response_quotas import AccountResponseQuotas +from dropbox_sign.models.account_response_usage import AccountResponseUsage +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.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_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_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_sign_url_response import EmbeddedSignUrlResponse +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.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_create_request import FaxLineCreateRequest +from dropbox_sign.models.fax_line_delete_request import FaxLineDeleteRequest +from dropbox_sign.models.fax_line_list_response import FaxLineListResponse +from dropbox_sign.models.fax_line_remove_user_request import FaxLineRemoveUserRequest +from dropbox_sign.models.fax_line_response import FaxLineResponse +from dropbox_sign.models.fax_line_response_fax_line import FaxLineResponseFaxLine +from dropbox_sign.models.file_response import FileResponse +from dropbox_sign.models.file_response_data_uri import FileResponseDataUri +from dropbox_sign.models.list_info_response import ListInfoResponse +from dropbox_sign.models.o_auth_token_generate_request import OAuthTokenGenerateRequest +from dropbox_sign.models.o_auth_token_refresh_request import OAuthTokenRefreshRequest +from dropbox_sign.models.o_auth_token_response import OAuthTokenResponse +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_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_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_cc import SubCC +from dropbox_sign.models.sub_custom_field import SubCustomField +from dropbox_sign.models.sub_editor_options import SubEditorOptions +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_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_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_signer import SubSignatureRequestSigner +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_white_labeling_options import SubWhiteLabelingOptions +from dropbox_sign.models.team_add_member_request import TeamAddMemberRequest +from dropbox_sign.models.team_create_request import TeamCreateRequest +from dropbox_sign.models.team_get_info_response import TeamGetInfoResponse +from dropbox_sign.models.team_get_response import TeamGetResponse +from dropbox_sign.models.team_info_response import TeamInfoResponse +from dropbox_sign.models.team_invite_response import TeamInviteResponse +from dropbox_sign.models.team_invites_response import TeamInvitesResponse +from dropbox_sign.models.team_member_response import TeamMemberResponse +from dropbox_sign.models.team_members_response import TeamMembersResponse +from dropbox_sign.models.team_parent_response import TeamParentResponse +from dropbox_sign.models.team_remove_member_request import TeamRemoveMemberRequest +from dropbox_sign.models.team_response import TeamResponse +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_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_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_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_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.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 new file mode 100644 index 000000000..79a85698c --- /dev/null +++ b/sdks/python/dropbox_sign/models/account_create_request.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AccountCreateRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AccountCreateRequest from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "email_address": "(str,)", + "client_id": "(str,)", + "client_secret": "(str,)", + "locale": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/account_create_response.py b/sdks/python/dropbox_sign/models/account_create_response.py new file mode 100644 index 000000000..b2fb080b1 --- /dev/null +++ b/sdks/python/dropbox_sign/models/account_create_response.py @@ -0,0 +1,138 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from dropbox_sign.models.account_response import AccountResponse +from dropbox_sign.models.o_auth_token_response import OAuthTokenResponse +from dropbox_sign.models.warning_response import WarningResponse +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class AccountCreateResponse(BaseModel): + """ + AccountCreateResponse + """ # noqa: E501 + account: Optional[AccountResponse] = None + oauth_data: Optional[OAuthTokenResponse] = None + warnings: Optional[List[WarningResponse]] = Field(default=None, description="A list of warnings.") + __properties: ClassVar[List[str]] = ["account", "oauth_data", "warnings"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AccountCreateResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of account + if self.account: + _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() + # 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 + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AccountCreateResponse from a dict""" + if obj is None: + return None + + 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 + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "account": "(AccountResponse,)", + "oauth_data": "(OAuthTokenResponse,)", + "warnings": "(List[WarningResponse],)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + "warnings", + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/account_get_response.py b/sdks/python/dropbox_sign/models/account_get_response.py new file mode 100644 index 000000000..8c57cce32 --- /dev/null +++ b/sdks/python/dropbox_sign/models/account_get_response.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from dropbox_sign.models.account_response import AccountResponse +from dropbox_sign.models.warning_response import WarningResponse +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class AccountGetResponse(BaseModel): + """ + AccountGetResponse + """ # noqa: E501 + account: Optional[AccountResponse] = None + warnings: Optional[List[WarningResponse]] = Field(default=None, description="A list of warnings.") + __properties: ClassVar[List[str]] = ["account", "warnings"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AccountGetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of account + if self.account: + _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 + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AccountGetResponse from a dict""" + if obj is None: + return None + + 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 + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "account": "(AccountResponse,)", + "warnings": "(List[WarningResponse],)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + "warnings", + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/account_response.py b/sdks/python/dropbox_sign/models/account_response.py new file mode 100644 index 000000000..26ed3ad07 --- /dev/null +++ b/sdks/python/dropbox_sign/models/account_response.py @@ -0,0 +1,173 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from dropbox_sign.models.account_response_quotas import AccountResponseQuotas +from dropbox_sign.models.account_response_usage import AccountResponseUsage +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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.") + 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.") + 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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AccountResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of quotas + if self.quotas: + _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() + # set to None if callback_url (nullable) is None + # and model_fields_set contains the field + if self.callback_url is None and "callback_url" in self.model_fields_set: + _dict['callback_url'] = None + + # set to None if role_code (nullable) is None + # and model_fields_set contains the field + if self.role_code is None and "role_code" in self.model_fields_set: + _dict['role_code'] = None + + # set to None if team_id (nullable) is None + # and model_fields_set contains the field + if self.team_id is None and "team_id" in self.model_fields_set: + _dict['team_id'] = None + + # set to None if locale (nullable) is None + # and model_fields_set contains the field + if self.locale is None and "locale" in self.model_fields_set: + _dict['locale'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AccountResponse from a dict""" + if obj is None: + return None + + 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 + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "account_id": "(str,)", + "email_address": "(str,)", + "is_locked": "(bool,)", + "is_paid_hs": "(bool,)", + "is_paid_hf": "(bool,)", + "quotas": "(AccountResponseQuotas,)", + "callback_url": "(str,)", + "role_code": "(str,)", + "team_id": "(str,)", + "locale": "(str,)", + "usage": "(AccountResponseUsage,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/account_response_quotas.py b/sdks/python/dropbox_sign/models/account_response_quotas.py new file mode 100644 index 000000000..c5e9d1b57 --- /dev/null +++ b/sdks/python/dropbox_sign/models/account_response_quotas.py @@ -0,0 +1,160 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AccountResponseQuotas from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if api_signature_requests_left (nullable) is None + # and model_fields_set contains the field + if self.api_signature_requests_left is None and "api_signature_requests_left" in self.model_fields_set: + _dict['api_signature_requests_left'] = None + + # set to None if documents_left (nullable) is None + # and model_fields_set contains the field + if self.documents_left is None and "documents_left" in self.model_fields_set: + _dict['documents_left'] = None + + # set to None if templates_total (nullable) is None + # and model_fields_set contains the field + if self.templates_total is None and "templates_total" in self.model_fields_set: + _dict['templates_total'] = None + + # set to None if templates_left (nullable) is None + # and model_fields_set contains the field + if self.templates_left is None and "templates_left" in self.model_fields_set: + _dict['templates_left'] = None + + # set to None if sms_verifications_left (nullable) is None + # and model_fields_set contains the field + if self.sms_verifications_left is None and "sms_verifications_left" in self.model_fields_set: + _dict['sms_verifications_left'] = None + + # set to None if num_fax_pages_left (nullable) is None + # and model_fields_set contains the field + if self.num_fax_pages_left is None and "num_fax_pages_left" in self.model_fields_set: + _dict['num_fax_pages_left'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AccountResponseQuotas from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "api_signature_requests_left": "(int,)", + "documents_left": "(int,)", + "templates_total": "(int,)", + "templates_left": "(int,)", + "sms_verifications_left": "(int,)", + "num_fax_pages_left": "(int,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/account_response_usage.py b/sdks/python/dropbox_sign/models/account_response_usage.py new file mode 100644 index 000000000..4feed3b21 --- /dev/null +++ b/sdks/python/dropbox_sign/models/account_response_usage.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class AccountResponseUsage(BaseModel): + """ + Details concerning monthly usage + """ # 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( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AccountResponseUsage from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if fax_pages_sent (nullable) is None + # and model_fields_set contains the field + if self.fax_pages_sent is None and "fax_pages_sent" in self.model_fields_set: + _dict['fax_pages_sent'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AccountResponseUsage from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "fax_pages_sent": obj.get("fax_pages_sent") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "fax_pages_sent": "(int,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/account_update_request.py b/sdks/python/dropbox_sign/models/account_update_request.py new file mode 100644 index 000000000..8e88c5106 --- /dev/null +++ b/sdks/python/dropbox_sign/models/account_update_request.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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.") + __properties: ClassVar[List[str]] = ["account_id", "callback_url", "locale"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AccountUpdateRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if account_id (nullable) is None + # and model_fields_set contains the field + if self.account_id is None and "account_id" in self.model_fields_set: + _dict['account_id'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AccountUpdateRequest from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "account_id": "(str,)", + "callback_url": "(str,)", + "locale": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/account_verify_request.py b/sdks/python/dropbox_sign/models/account_verify_request.py new file mode 100644 index 000000000..c1c6673c7 --- /dev/null +++ b/sdks/python/dropbox_sign/models/account_verify_request.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class AccountVerifyRequest(BaseModel): + """ + AccountVerifyRequest + """ # noqa: E501 + email_address: StrictStr = Field(description="Email address to run the verification for.") + __properties: ClassVar[List[str]] = ["email_address"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AccountVerifyRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AccountVerifyRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email_address": obj.get("email_address") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "email_address": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/account_verify_response.py b/sdks/python/dropbox_sign/models/account_verify_response.py new file mode 100644 index 000000000..71317ad11 --- /dev/null +++ b/sdks/python/dropbox_sign/models/account_verify_response.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +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.warning_response import WarningResponse +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class AccountVerifyResponse(BaseModel): + """ + AccountVerifyResponse + """ # noqa: E501 + account: Optional[AccountVerifyResponseAccount] = None + warnings: Optional[List[WarningResponse]] = Field(default=None, description="A list of warnings.") + __properties: ClassVar[List[str]] = ["account", "warnings"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AccountVerifyResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of account + if self.account: + _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 + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AccountVerifyResponse from a dict""" + if obj is None: + return None + + 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 + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "account": "(AccountVerifyResponseAccount,)", + "warnings": "(List[WarningResponse],)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + "warnings", + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/account_verify_response_account.py b/sdks/python/dropbox_sign/models/account_verify_response_account.py new file mode 100644 index 000000000..8f557854c --- /dev/null +++ b/sdks/python/dropbox_sign/models/account_verify_response_account.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class AccountVerifyResponseAccount(BaseModel): + """ + AccountVerifyResponseAccount + """ # 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( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AccountVerifyResponseAccount from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AccountVerifyResponseAccount from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email_address": obj.get("email_address") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "email_address": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/api_app_create_request.py b/sdks/python/dropbox_sign/models/api_app_create_request.py new file mode 100644 index 000000000..85975eee2 --- /dev/null +++ b/sdks/python/dropbox_sign/models/api_app_create_request.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from dropbox_sign.models.sub_o_auth import SubOAuth +from dropbox_sign.models.sub_options import SubOptions +from dropbox_sign.models.sub_white_labeling_options import SubWhiteLabelingOptions +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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.") + 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)") + 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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiAppCreateRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of oauth + if self.oauth: + _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() + # 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() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiAppCreateRequest from a dict""" + if obj is None: + return None + + 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 + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "domains": "(List[str],)", + "name": "(str,)", + "callback_url": "(str,)", + "custom_logo_file": "(io.IOBase,)", + "oauth": "(SubOAuth,)", + "options": "(SubOptions,)", + "white_labeling_options": "(SubWhiteLabelingOptions,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + "domains", + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/api_app_get_response.py b/sdks/python/dropbox_sign/models/api_app_get_response.py new file mode 100644 index 000000000..d2cf910a7 --- /dev/null +++ b/sdks/python/dropbox_sign/models/api_app_get_response.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from dropbox_sign.models.api_app_response import ApiAppResponse +from dropbox_sign.models.warning_response import WarningResponse +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class ApiAppGetResponse(BaseModel): + """ + ApiAppGetResponse + """ # noqa: E501 + api_app: Optional[ApiAppResponse] = None + warnings: Optional[List[WarningResponse]] = Field(default=None, description="A list of warnings.") + __properties: ClassVar[List[str]] = ["api_app", "warnings"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiAppGetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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() + # 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 + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiAppGetResponse from a dict""" + if obj is None: + return None + + 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 + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "api_app": "(ApiAppResponse,)", + "warnings": "(List[WarningResponse],)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + "warnings", + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/api_app_list_response.py b/sdks/python/dropbox_sign/models/api_app_list_response.py new file mode 100644 index 000000000..73246ae8b --- /dev/null +++ b/sdks/python/dropbox_sign/models/api_app_list_response.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from dropbox_sign.models.api_app_response import ApiAppResponse +from dropbox_sign.models.list_info_response import ListInfoResponse +from dropbox_sign.models.warning_response import WarningResponse +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class ApiAppListResponse(BaseModel): + """ + ApiAppListResponse + """ # noqa: E501 + api_apps: Optional[List[ApiAppResponse]] = Field(default=None, description="Contains information about API Apps.") + list_info: Optional[ListInfoResponse] = None + warnings: Optional[List[WarningResponse]] = Field(default=None, description="A list of warnings.") + __properties: ClassVar[List[str]] = ["api_apps", "list_info", "warnings"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiAppListResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in api_apps (list) + _items = [] + if self.api_apps: + for _item_api_apps in self.api_apps: + if _item_api_apps: + _items.append(_item_api_apps.to_dict()) + _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() + # 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 + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiAppListResponse from a dict""" + if obj is None: + return None + + 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 + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "api_apps": "(List[ApiAppResponse],)", + "list_info": "(ListInfoResponse,)", + "warnings": "(List[WarningResponse],)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + "api_apps", + "warnings", + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/api_app_response.py b/sdks/python/dropbox_sign/models/api_app_response.py new file mode 100644 index 000000000..7d1320403 --- /dev/null +++ b/sdks/python/dropbox_sign/models/api_app_response.py @@ -0,0 +1,179 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +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 typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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") + 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") + 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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiAppResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of oauth + if self.oauth: + _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() + # 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() + # 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() + # set to None if callback_url (nullable) is None + # and model_fields_set contains the field + if self.callback_url is None and "callback_url" in self.model_fields_set: + _dict['callback_url'] = None + + # set to None if oauth (nullable) is None + # and model_fields_set contains the field + if self.oauth is None and "oauth" in self.model_fields_set: + _dict['oauth'] = None + + # set to None if options (nullable) is None + # and model_fields_set contains the field + if self.options is None and "options" in self.model_fields_set: + _dict['options'] = None + + # set to None if white_labeling_options (nullable) is None + # and model_fields_set contains the field + if self.white_labeling_options is None and "white_labeling_options" in self.model_fields_set: + _dict['white_labeling_options'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiAppResponse from a dict""" + if obj is None: + return None + + 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 + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "callback_url": "(str,)", + "client_id": "(str,)", + "created_at": "(int,)", + "domains": "(List[str],)", + "name": "(str,)", + "is_approved": "(bool,)", + "oauth": "(ApiAppResponseOAuth,)", + "options": "(ApiAppResponseOptions,)", + "owner_account": "(ApiAppResponseOwnerAccount,)", + "white_labeling_options": "(ApiAppResponseWhiteLabelingOptions,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + "domains", + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..c3778a168 --- /dev/null +++ b/sdks/python/dropbox_sign/models/api_app_response_o_auth.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiAppResponseOAuth from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiAppResponseOAuth from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "callback_url": "(str,)", + "secret": "(str,)", + "scopes": "(List[str],)", + "charges_users": "(bool,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + "scopes", + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/api_app_response_options.py b/sdks/python/dropbox_sign/models/api_app_response_options.py new file mode 100644 index 000000000..6ffb071a3 --- /dev/null +++ b/sdks/python/dropbox_sign/models/api_app_response_options.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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") + __properties: ClassVar[List[str]] = ["can_insert_everywhere"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiAppResponseOptions from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiAppResponseOptions from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "can_insert_everywhere": obj.get("can_insert_everywhere") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "can_insert_everywhere": "(bool,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..a5951ab54 --- /dev/null +++ b/sdks/python/dropbox_sign/models/api_app_response_owner_account.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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") + __properties: ClassVar[List[str]] = ["account_id", "email_address"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiAppResponseOwnerAccount from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiAppResponseOwnerAccount from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "account_id": "(str,)", + "email_address": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..d076a3eba --- /dev/null +++ b/sdks/python/dropbox_sign/models/api_app_response_white_labeling_options.py @@ -0,0 +1,154 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class ApiAppResponseWhiteLabelingOptions(BaseModel): + """ + An object with options to customize the app's signer page + """ # noqa: E501 + header_background_color: Optional[StrictStr] = None + legal_version: Optional[StrictStr] = None + link_color: Optional[StrictStr] = None + page_background_color: Optional[StrictStr] = None + primary_button_color: Optional[StrictStr] = None + primary_button_color_hover: Optional[StrictStr] = None + primary_button_text_color: Optional[StrictStr] = None + primary_button_text_color_hover: Optional[StrictStr] = None + secondary_button_color: Optional[StrictStr] = None + secondary_button_color_hover: Optional[StrictStr] = None + secondary_button_text_color: Optional[StrictStr] = None + 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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiAppResponseWhiteLabelingOptions from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiAppResponseWhiteLabelingOptions from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "header_background_color": "(str,)", + "legal_version": "(str,)", + "link_color": "(str,)", + "page_background_color": "(str,)", + "primary_button_color": "(str,)", + "primary_button_color_hover": "(str,)", + "primary_button_text_color": "(str,)", + "primary_button_text_color_hover": "(str,)", + "secondary_button_color": "(str,)", + "secondary_button_color_hover": "(str,)", + "secondary_button_text_color": "(str,)", + "secondary_button_text_color_hover": "(str,)", + "text_color1": "(str,)", + "text_color2": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/api_app_update_request.py b/sdks/python/dropbox_sign/models/api_app_update_request.py new file mode 100644 index 000000000..523f17634 --- /dev/null +++ b/sdks/python/dropbox_sign/models/api_app_update_request.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from dropbox_sign.models.sub_o_auth import SubOAuth +from dropbox_sign.models.sub_options import SubOptions +from dropbox_sign.models.sub_white_labeling_options import SubWhiteLabelingOptions +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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.") + 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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiAppUpdateRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of oauth + if self.oauth: + _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() + # 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() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiAppUpdateRequest from a dict""" + if obj is None: + return None + + 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 + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "callback_url": "(str,)", + "custom_logo_file": "(io.IOBase,)", + "domains": "(List[str],)", + "name": "(str,)", + "oauth": "(SubOAuth,)", + "options": "(SubOptions,)", + "white_labeling_options": "(SubWhiteLabelingOptions,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + "domains", + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..abff8fb5c --- /dev/null +++ b/sdks/python/dropbox_sign/models/bulk_send_job_get_response.py @@ -0,0 +1,150 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +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_response import BulkSendJobResponse +from dropbox_sign.models.list_info_response import ListInfoResponse +from dropbox_sign.models.warning_response import WarningResponse +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class BulkSendJobGetResponse(BaseModel): + """ + BulkSendJobGetResponse + """ # noqa: E501 + bulk_send_job: Optional[BulkSendJobResponse] = None + list_info: Optional[ListInfoResponse] = None + signature_requests: Optional[List[BulkSendJobGetResponseSignatureRequests]] = Field(default=None, 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, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BulkSendJobGetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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() + # 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() + # 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 + # 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 + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BulkSendJobGetResponse from a dict""" + if obj is None: + return None + + 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 + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "bulk_send_job": "(BulkSendJobResponse,)", + "list_info": "(ListInfoResponse,)", + "signature_requests": "(List[BulkSendJobGetResponseSignatureRequests],)", + "warnings": "(List[WarningResponse],)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + "signature_requests", + "warnings", + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..864949a43 --- /dev/null +++ b/sdks/python/dropbox_sign/models/bulk_send_job_get_response_signature_requests.py @@ -0,0 +1,275 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +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 typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BulkSendJobGetResponseSignatureRequests from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 + # 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 + # 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 + # 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 + # set to None if test_mode (nullable) is None + # and model_fields_set contains the field + if self.test_mode is None and "test_mode" in self.model_fields_set: + _dict['test_mode'] = None + + # set to None if subject (nullable) is None + # and model_fields_set contains the field + if self.subject is None and "subject" in self.model_fields_set: + _dict['subject'] = None + + # set to None if message (nullable) is None + # and model_fields_set contains the field + if self.message is None and "message" in self.model_fields_set: + _dict['message'] = None + + # set to None if signing_url (nullable) is None + # and model_fields_set contains the field + if self.signing_url is None and "signing_url" in self.model_fields_set: + _dict['signing_url'] = None + + # set to None if signing_redirect_url (nullable) is None + # and model_fields_set contains the field + if self.signing_redirect_url is None and "signing_redirect_url" in self.model_fields_set: + _dict['signing_redirect_url'] = None + + # set to None if final_copy_uri (nullable) is None + # and model_fields_set contains the field + if self.final_copy_uri is None and "final_copy_uri" in self.model_fields_set: + _dict['final_copy_uri'] = None + + # set to None if template_ids (nullable) is None + # and model_fields_set contains the field + if self.template_ids is None and "template_ids" in self.model_fields_set: + _dict['template_ids'] = None + + # set to None if custom_fields (nullable) is None + # and model_fields_set contains the field + if self.custom_fields is None and "custom_fields" in self.model_fields_set: + _dict['custom_fields'] = None + + # set to None if attachments (nullable) is None + # and model_fields_set contains the field + if self.attachments is None and "attachments" in self.model_fields_set: + _dict['attachments'] = None + + # set to None if response_data (nullable) is None + # and model_fields_set contains the field + if self.response_data is None and "response_data" in self.model_fields_set: + _dict['response_data'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BulkSendJobGetResponseSignatureRequests from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "test_mode": "(bool,)", + "signature_request_id": "(str,)", + "requester_email_address": "(str,)", + "title": "(str,)", + "original_title": "(str,)", + "subject": "(str,)", + "message": "(str,)", + "metadata": "(object,)", + "created_at": "(int,)", + "expires_at": "(int,)", + "is_complete": "(bool,)", + "is_declined": "(bool,)", + "has_error": "(bool,)", + "files_url": "(str,)", + "signing_url": "(str,)", + "details_url": "(str,)", + "cc_email_addresses": "(List[str],)", + "signing_redirect_url": "(str,)", + "final_copy_uri": "(str,)", + "template_ids": "(List[str],)", + "custom_fields": "(List[SignatureRequestResponseCustomFieldBase],)", + "attachments": "(List[SignatureRequestResponseAttachment],)", + "response_data": "(List[SignatureRequestResponseDataBase],)", + "signatures": "(List[SignatureRequestResponseSignatures],)", + "bulk_send_job_id": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + "cc_email_addresses", + "template_ids", + "custom_fields", + "attachments", + "response_data", + "signatures", + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..4c44d210a --- /dev/null +++ b/sdks/python/dropbox_sign/models/bulk_send_job_list_response.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +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 +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class BulkSendJobListResponse(BaseModel): + """ + BulkSendJobListResponse + """ # noqa: E501 + bulk_send_jobs: Optional[List[BulkSendJobResponse]] = Field(default=None, description="Contains a list of BulkSendJobs that the API caller has access to.") + list_info: Optional[ListInfoResponse] = None + 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( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BulkSendJobListResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in bulk_send_jobs (list) + _items = [] + if self.bulk_send_jobs: + 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 + # 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() + # 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 + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BulkSendJobListResponse from a dict""" + if obj is None: + return None + + 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 + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "bulk_send_jobs": "(List[BulkSendJobResponse],)", + "list_info": "(ListInfoResponse,)", + "warnings": "(List[WarningResponse],)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + "bulk_send_jobs", + "warnings", + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/bulk_send_job_response.py b/sdks/python/dropbox_sign/models/bulk_send_job_response.py new file mode 100644 index 000000000..6be8d79f7 --- /dev/null +++ b/sdks/python/dropbox_sign/models/bulk_send_job_response.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BulkSendJobResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if bulk_send_job_id (nullable) is None + # and model_fields_set contains the field + if self.bulk_send_job_id is None and "bulk_send_job_id" in self.model_fields_set: + _dict['bulk_send_job_id'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BulkSendJobResponse from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "bulk_send_job_id": "(str,)", + "total": "(int,)", + "is_creator": "(bool,)", + "created_at": "(int,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..07dca961d --- /dev/null +++ b/sdks/python/dropbox_sign/models/bulk_send_job_send_response.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from dropbox_sign.models.bulk_send_job_response import BulkSendJobResponse +from dropbox_sign.models.warning_response import WarningResponse +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class BulkSendJobSendResponse(BaseModel): + """ + BulkSendJobSendResponse + """ # noqa: E501 + bulk_send_job: Optional[BulkSendJobResponse] = None + warnings: Optional[List[WarningResponse]] = Field(default=None, description="A list of warnings.") + __properties: ClassVar[List[str]] = ["bulk_send_job", "warnings"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BulkSendJobSendResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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() + # 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 + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BulkSendJobSendResponse from a dict""" + if obj is None: + return None + + 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 + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "bulk_send_job": "(BulkSendJobResponse,)", + "warnings": "(List[WarningResponse],)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + "warnings", + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/embedded_edit_url_request.py b/sdks/python/dropbox_sign/models/embedded_edit_url_request.py new file mode 100644 index 000000000..16e5aec39 --- /dev/null +++ b/sdks/python/dropbox_sign/models/embedded_edit_url_request.py @@ -0,0 +1,156 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from dropbox_sign.models.sub_editor_options import SubEditorOptions +from dropbox_sign.models.sub_merge_field import SubMergeField +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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.") + 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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EmbeddedEditUrlRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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() + # 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 + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EmbeddedEditUrlRequest from a dict""" + if obj is None: + return None + + 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 + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "allow_edit_ccs": "(bool,)", + "cc_roles": "(List[str],)", + "editor_options": "(SubEditorOptions,)", + "force_signer_roles": "(bool,)", + "force_subject_message": "(bool,)", + "merge_fields": "(List[SubMergeField],)", + "preview_only": "(bool,)", + "show_preview": "(bool,)", + "show_progress_stepper": "(bool,)", + "test_mode": "(bool,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + "cc_roles", + "merge_fields", + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/embedded_edit_url_response.py b/sdks/python/dropbox_sign/models/embedded_edit_url_response.py new file mode 100644 index 000000000..33273e216 --- /dev/null +++ b/sdks/python/dropbox_sign/models/embedded_edit_url_response.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +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.warning_response import WarningResponse +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class EmbeddedEditUrlResponse(BaseModel): + """ + EmbeddedEditUrlResponse + """ # noqa: E501 + embedded: Optional[EmbeddedEditUrlResponseEmbedded] = None + warnings: Optional[List[WarningResponse]] = Field(default=None, description="A list of warnings.") + __properties: ClassVar[List[str]] = ["embedded", "warnings"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EmbeddedEditUrlResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of embedded + if self.embedded: + _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 + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EmbeddedEditUrlResponse from a dict""" + if obj is None: + return None + + 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 + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "embedded": "(EmbeddedEditUrlResponseEmbedded,)", + "warnings": "(List[WarningResponse],)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + "warnings", + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..faa8ea65f --- /dev/null +++ b/sdks/python/dropbox_sign/models/embedded_edit_url_response_embedded.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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.") + __properties: ClassVar[List[str]] = ["edit_url", "expires_at"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EmbeddedEditUrlResponseEmbedded from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EmbeddedEditUrlResponseEmbedded from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "edit_url": "(str,)", + "expires_at": "(int,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/embedded_sign_url_response.py b/sdks/python/dropbox_sign/models/embedded_sign_url_response.py new file mode 100644 index 000000000..0ea5ea54a --- /dev/null +++ b/sdks/python/dropbox_sign/models/embedded_sign_url_response.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +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.warning_response import WarningResponse +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class EmbeddedSignUrlResponse(BaseModel): + """ + EmbeddedSignUrlResponse + """ # noqa: E501 + embedded: Optional[EmbeddedSignUrlResponseEmbedded] = None + warnings: Optional[List[WarningResponse]] = Field(default=None, description="A list of warnings.") + __properties: ClassVar[List[str]] = ["embedded", "warnings"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EmbeddedSignUrlResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of embedded + if self.embedded: + _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 + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EmbeddedSignUrlResponse from a dict""" + if obj is None: + return None + + 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 + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "embedded": "(EmbeddedSignUrlResponseEmbedded,)", + "warnings": "(List[WarningResponse],)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + "warnings", + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..28bfcc34e --- /dev/null +++ b/sdks/python/dropbox_sign/models/embedded_sign_url_response_embedded.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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.") + __properties: ClassVar[List[str]] = ["sign_url", "expires_at"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EmbeddedSignUrlResponseEmbedded from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EmbeddedSignUrlResponseEmbedded from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "sign_url": "(str,)", + "expires_at": "(int,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/error_response.py b/sdks/python/dropbox_sign/models/error_response.py new file mode 100644 index 000000000..c26f8f21b --- /dev/null +++ b/sdks/python/dropbox_sign/models/error_response.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from dropbox_sign.models.error_response_error import ErrorResponseError +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class ErrorResponse(BaseModel): + """ + ErrorResponse + """ # noqa: E501 + error: ErrorResponseError + __properties: ClassVar[List[str]] = ["error"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ErrorResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of error + if self.error: + _dict['error'] = self.error.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ErrorResponse from a dict""" + if obj is None: + return None + + 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 + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "error": "(ErrorResponseError,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/error_response_error.py b/sdks/python/dropbox_sign/models/error_response_error.py new file mode 100644 index 000000000..210eca755 --- /dev/null +++ b/sdks/python/dropbox_sign/models/error_response_error.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class ErrorResponseError(BaseModel): + """ + Contains information about an error that occurred. + """ # 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.") + __properties: ClassVar[List[str]] = ["error_msg", "error_name", "error_path"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ErrorResponseError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ErrorResponseError from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "error_msg": "(str,)", + "error_name": "(str,)", + "error_path": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/event_callback_request.py b/sdks/python/dropbox_sign/models/event_callback_request.py new file mode 100644 index 000000000..c74d0e115 --- /dev/null +++ b/sdks/python/dropbox_sign/models/event_callback_request.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from dropbox_sign.models.account_response import AccountResponse +from dropbox_sign.models.event_callback_request_event import EventCallbackRequestEvent +from dropbox_sign.models.signature_request_response import SignatureRequestResponse +from dropbox_sign.models.template_response import TemplateResponse +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class EventCallbackRequest(BaseModel): + """ + EventCallbackRequest + """ # 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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EventCallbackRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of event + if self.event: + _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() + # 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() + # override the default output from pydantic by calling `to_dict()` of template + if self.template: + _dict['template'] = self.template.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EventCallbackRequest from a dict""" + if obj is None: + return None + + 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 + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "event": "(EventCallbackRequestEvent,)", + "account": "(AccountResponse,)", + "signature_request": "(SignatureRequestResponse,)", + "template": "(TemplateResponse,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/event_callback_request_event.py b/sdks/python/dropbox_sign/models/event_callback_request_event.py new file mode 100644 index 000000000..c564a0515 --- /dev/null +++ b/sdks/python/dropbox_sign/models/event_callback_request_event.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +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 typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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"] + + @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')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EventCallbackRequestEvent from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EventCallbackRequestEvent from a dict""" + if obj is None: + return None + + 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 + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "event_time": "(str,)", + "event_type": "(str,)", + "event_hash": "(str,)", + "event_metadata": "(EventCallbackRequestEventMetadata,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..e962564f6 --- /dev/null +++ b/sdks/python/dropbox_sign/models/event_callback_request_event_metadata.py @@ -0,0 +1,144 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EventCallbackRequestEventMetadata from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if related_signature_id (nullable) is None + # and model_fields_set contains the field + if self.related_signature_id is None and "related_signature_id" in self.model_fields_set: + _dict['related_signature_id'] = None + + # set to None if reported_for_account_id (nullable) is None + # and model_fields_set contains the field + if self.reported_for_account_id is None and "reported_for_account_id" in self.model_fields_set: + _dict['reported_for_account_id'] = None + + # set to None if reported_for_app_id (nullable) is None + # and model_fields_set contains the field + if self.reported_for_app_id is None and "reported_for_app_id" in self.model_fields_set: + _dict['reported_for_app_id'] = None + + # set to None if event_message (nullable) is None + # and model_fields_set contains the field + if self.event_message is None and "event_message" in self.model_fields_set: + _dict['event_message'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EventCallbackRequestEventMetadata from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "related_signature_id": "(str,)", + "reported_for_account_id": "(str,)", + "reported_for_app_id": "(str,)", + "event_message": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..2d6259598 --- /dev/null +++ b/sdks/python/dropbox_sign/models/fax_line_add_user_request.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class FaxLineAddUserRequest(BaseModel): + """ + FaxLineAddUserRequest + """ # 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") + __properties: ClassVar[List[str]] = ["number", "account_id", "email_address"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FaxLineAddUserRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FaxLineAddUserRequest from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "number": "(str,)", + "account_id": "(str,)", + "email_address": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..f76331e63 --- /dev/null +++ b/sdks/python/dropbox_sign/models/fax_line_area_code_get_country_enum.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class FaxLineAreaCodeGetCountryEnum(str, Enum): + """ + FaxLineAreaCodeGetCountryEnum + """ + + """ + allowed enum values + """ + 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 new file mode 100644 index 000000000..cb6625d7d --- /dev/null +++ b/sdks/python/dropbox_sign/models/fax_line_area_code_get_province_enum.py @@ -0,0 +1,49 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class FaxLineAreaCodeGetProvinceEnum(str, Enum): + """ + FaxLineAreaCodeGetProvinceEnum + """ + + """ + 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' + + @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 new file mode 100644 index 000000000..523c3be6b --- /dev/null +++ b/sdks/python/dropbox_sign/models/fax_line_area_code_get_response.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class FaxLineAreaCodeGetResponse(BaseModel): + """ + FaxLineAreaCodeGetResponse + """ # noqa: E501 + area_codes: Optional[List[StrictInt]] = None + __properties: ClassVar[List[str]] = ["area_codes"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FaxLineAreaCodeGetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FaxLineAreaCodeGetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "area_codes": obj.get("area_codes") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "area_codes": "(List[int],)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + "area_codes", + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..29b8f70ff --- /dev/null +++ b/sdks/python/dropbox_sign/models/fax_line_area_code_get_state_enum.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class FaxLineAreaCodeGetStateEnum(str, Enum): + """ + FaxLineAreaCodeGetStateEnum + """ + + """ + 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' + + @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 new file mode 100644 index 000000000..5afd37096 --- /dev/null +++ b/sdks/python/dropbox_sign/models/fax_line_create_request.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class FaxLineCreateRequest(BaseModel): + """ + FaxLineCreateRequest + """ # 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') + def country_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['CA', 'US', 'UK']): + raise ValueError("must be one of enum values ('CA', 'US', 'UK')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FaxLineCreateRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FaxLineCreateRequest from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "area_code": "(int,)", + "country": "(str,)", + "city": "(str,)", + "account_id": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/fax_line_delete_request.py b/sdks/python/dropbox_sign/models/fax_line_delete_request.py new file mode 100644 index 000000000..0cdd94db1 --- /dev/null +++ b/sdks/python/dropbox_sign/models/fax_line_delete_request.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class FaxLineDeleteRequest(BaseModel): + """ + FaxLineDeleteRequest + """ # noqa: E501 + number: StrictStr = Field(description="The Fax Line number.") + __properties: ClassVar[List[str]] = ["number"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FaxLineDeleteRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FaxLineDeleteRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "number": obj.get("number") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "number": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/fax_line_list_response.py b/sdks/python/dropbox_sign/models/fax_line_list_response.py new file mode 100644 index 000000000..040d9e604 --- /dev/null +++ b/sdks/python/dropbox_sign/models/fax_line_list_response.py @@ -0,0 +1,138 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from dropbox_sign.models.fax_line_response_fax_line import FaxLineResponseFaxLine +from dropbox_sign.models.list_info_response import ListInfoResponse +from dropbox_sign.models.warning_response import WarningResponse +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class FaxLineListResponse(BaseModel): + """ + FaxLineListResponse + """ # noqa: E501 + list_info: Optional[ListInfoResponse] = None + fax_lines: Optional[List[FaxLineResponseFaxLine]] = None + warnings: Optional[WarningResponse] = None + __properties: ClassVar[List[str]] = ["list_info", "fax_lines", "warnings"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FaxLineListResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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() + # 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 + # override the default output from pydantic by calling `to_dict()` of warnings + if self.warnings: + _dict['warnings'] = self.warnings.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FaxLineListResponse from a dict""" + if obj is None: + return None + + 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 + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "list_info": "(ListInfoResponse,)", + "fax_lines": "(List[FaxLineResponseFaxLine],)", + "warnings": "(WarningResponse,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + "fax_lines", + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..ba5531e6a --- /dev/null +++ b/sdks/python/dropbox_sign/models/fax_line_remove_user_request.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class FaxLineRemoveUserRequest(BaseModel): + """ + FaxLineRemoveUserRequest + """ # 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") + __properties: ClassVar[List[str]] = ["number", "account_id", "email_address"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FaxLineRemoveUserRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FaxLineRemoveUserRequest from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "number": "(str,)", + "account_id": "(str,)", + "email_address": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/fax_line_response.py b/sdks/python/dropbox_sign/models/fax_line_response.py new file mode 100644 index 000000000..8583d1670 --- /dev/null +++ b/sdks/python/dropbox_sign/models/fax_line_response.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from dropbox_sign.models.fax_line_response_fax_line import FaxLineResponseFaxLine +from dropbox_sign.models.warning_response import WarningResponse +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class FaxLineResponse(BaseModel): + """ + FaxLineResponse + """ # noqa: E501 + fax_line: Optional[FaxLineResponseFaxLine] = None + warnings: Optional[WarningResponse] = None + __properties: ClassVar[List[str]] = ["fax_line", "warnings"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FaxLineResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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() + # override the default output from pydantic by calling `to_dict()` of warnings + if self.warnings: + _dict['warnings'] = self.warnings.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FaxLineResponse from a dict""" + if obj is None: + return None + + 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 + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "fax_line": "(FaxLineResponseFaxLine,)", + "warnings": "(WarningResponse,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..b803d7eba --- /dev/null +++ b/sdks/python/dropbox_sign/models/fax_line_response_fax_line.py @@ -0,0 +1,133 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from dropbox_sign.models.account_response import AccountResponse +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class FaxLineResponseFaxLine(BaseModel): + """ + FaxLineResponseFaxLine + """ # 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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FaxLineResponseFaxLine from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FaxLineResponseFaxLine from a dict""" + if obj is None: + return None + + 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 + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "number": "(str,)", + "created_at": "(int,)", + "updated_at": "(int,)", + "accounts": "(List[AccountResponse],)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + "accounts", + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/file_response.py b/sdks/python/dropbox_sign/models/file_response.py new file mode 100644 index 000000000..0e3ac5281 --- /dev/null +++ b/sdks/python/dropbox_sign/models/file_response.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class FileResponse(BaseModel): + """ + FileResponse + """ # noqa: E501 + file_url: Optional[StrictStr] = Field(default=None, description="URL to the file.") + expires_at: Optional[StrictInt] = Field(default=None, description="When the link expires.") + __properties: ClassVar[List[str]] = ["file_url", "expires_at"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FileResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FileResponse from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "file_url": "(str,)", + "expires_at": "(int,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/file_response_data_uri.py b/sdks/python/dropbox_sign/models/file_response_data_uri.py new file mode 100644 index 000000000..562253a3c --- /dev/null +++ b/sdks/python/dropbox_sign/models/file_response_data_uri.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class FileResponseDataUri(BaseModel): + """ + FileResponseDataUri + """ # noqa: E501 + data_uri: Optional[StrictStr] = Field(default=None, description="File as base64 encoded string.") + __properties: ClassVar[List[str]] = ["data_uri"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FileResponseDataUri from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FileResponseDataUri from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data_uri": obj.get("data_uri") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "data_uri": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/list_info_response.py b/sdks/python/dropbox_sign/models/list_info_response.py new file mode 100644 index 000000000..4b2242fda --- /dev/null +++ b/sdks/python/dropbox_sign/models/list_info_response.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ListInfoResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if num_results (nullable) is None + # and model_fields_set contains the field + if self.num_results is None and "num_results" in self.model_fields_set: + _dict['num_results'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ListInfoResponse from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "num_pages": "(int,)", + "num_results": "(int,)", + "page": "(int,)", + "page_size": "(int,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..812275242 --- /dev/null +++ b/sdks/python/dropbox_sign/models/o_auth_token_generate_request.py @@ -0,0 +1,127 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class OAuthTokenGenerateRequest(BaseModel): + """ + OAuthTokenGenerateRequest + """ # 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`.") + state: StrictStr = Field(description="Same as the state you specified earlier.") + __properties: ClassVar[List[str]] = ["client_id", "client_secret", "code", "grant_type", "state"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OAuthTokenGenerateRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OAuthTokenGenerateRequest from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "client_id": "(str,)", + "client_secret": "(str,)", + "code": "(str,)", + "grant_type": "(str,)", + "state": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..e1c4953e2 --- /dev/null +++ b/sdks/python/dropbox_sign/models/o_auth_token_refresh_request.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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.") + __properties: ClassVar[List[str]] = ["grant_type", "refresh_token"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OAuthTokenRefreshRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OAuthTokenRefreshRequest from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "grant_type": "(str,)", + "refresh_token": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/o_auth_token_response.py b/sdks/python/dropbox_sign/models/o_auth_token_response.py new file mode 100644 index 000000000..229f826cb --- /dev/null +++ b/sdks/python/dropbox_sign/models/o_auth_token_response.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class OAuthTokenResponse(BaseModel): + """ + OAuthTokenResponse + """ # 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.") + state: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["access_token", "token_type", "refresh_token", "expires_in", "state"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OAuthTokenResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if state (nullable) is None + # and model_fields_set contains the field + if self.state is None and "state" in self.model_fields_set: + _dict['state'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OAuthTokenResponse from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "access_token": "(str,)", + "token_type": "(str,)", + "refresh_token": "(str,)", + "expires_in": "(int,)", + "state": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/report_create_request.py b/sdks/python/dropbox_sign/models/report_create_request.py new file mode 100644 index 000000000..47983e178 --- /dev/null +++ b/sdks/python/dropbox_sign/models/report_create_request.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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.") + __properties: ClassVar[List[str]] = ["end_date", "report_type", "start_date"] + + @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')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ReportCreateRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ReportCreateRequest from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "end_date": "(str,)", + "report_type": "(List[str],)", + "start_date": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + "report_type", + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/report_create_response.py b/sdks/python/dropbox_sign/models/report_create_response.py new file mode 100644 index 000000000..e409c9806 --- /dev/null +++ b/sdks/python/dropbox_sign/models/report_create_response.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from dropbox_sign.models.report_response import ReportResponse +from dropbox_sign.models.warning_response import WarningResponse +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class ReportCreateResponse(BaseModel): + """ + ReportCreateResponse + """ # noqa: E501 + report: Optional[ReportResponse] = None + warnings: Optional[List[WarningResponse]] = Field(default=None, description="A list of warnings.") + __properties: ClassVar[List[str]] = ["report", "warnings"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ReportCreateResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of report + if self.report: + _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 + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ReportCreateResponse from a dict""" + if obj is None: + return None + + 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 + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "report": "(ReportResponse,)", + "warnings": "(List[WarningResponse],)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + "warnings", + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/report_response.py b/sdks/python/dropbox_sign/models/report_response.py new file mode 100644 index 000000000..8432a4368 --- /dev/null +++ b/sdks/python/dropbox_sign/models/report_response.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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') + 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')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ReportResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ReportResponse from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "success": "(str,)", + "start_date": "(str,)", + "end_date": "(str,)", + "report_type": "(List[str],)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + "report_type", + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..e21ba0476 --- /dev/null +++ b/sdks/python/dropbox_sign/models/signature_request_bulk_create_embedded_with_template_request.py @@ -0,0 +1,180 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from dropbox_sign.models.sub_bulk_signer_list import SubBulkSignerList +from dropbox_sign.models.sub_cc import SubCC +from dropbox_sign.models.sub_custom_field import SubCustomField +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SignatureRequestBulkCreateEmbeddedWithTemplateRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in signer_list (list) + _items = [] + if self.signer_list: + for _item_signer_list in self.signer_list: + if _item_signer_list: + _items.append(_item_signer_list.to_dict()) + _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 + # 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 + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SignatureRequestBulkCreateEmbeddedWithTemplateRequest from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "template_ids": "(List[str],)", + "client_id": "(str,)", + "signer_file": "(io.IOBase,)", + "signer_list": "(List[SubBulkSignerList],)", + "allow_decline": "(bool,)", + "ccs": "(List[SubCC],)", + "custom_fields": "(List[SubCustomField],)", + "message": "(str,)", + "metadata": "(Dict[str, object],)", + "signing_redirect_url": "(str,)", + "subject": "(str,)", + "test_mode": "(bool,)", + "title": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + "template_ids", + "signer_list", + "ccs", + "custom_fields", + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..ecb149c5e --- /dev/null +++ b/sdks/python/dropbox_sign/models/signature_request_bulk_send_with_template_request.py @@ -0,0 +1,180 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from dropbox_sign.models.sub_bulk_signer_list import SubBulkSignerList +from dropbox_sign.models.sub_cc import SubCC +from dropbox_sign.models.sub_custom_field import SubCustomField +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SignatureRequestBulkSendWithTemplateRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in signer_list (list) + _items = [] + if self.signer_list: + for _item_signer_list in self.signer_list: + if _item_signer_list: + _items.append(_item_signer_list.to_dict()) + _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 + # 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 + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SignatureRequestBulkSendWithTemplateRequest from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "template_ids": "(List[str],)", + "signer_file": "(io.IOBase,)", + "signer_list": "(List[SubBulkSignerList],)", + "allow_decline": "(bool,)", + "ccs": "(List[SubCC],)", + "client_id": "(str,)", + "custom_fields": "(List[SubCustomField],)", + "message": "(str,)", + "metadata": "(Dict[str, object],)", + "signing_redirect_url": "(str,)", + "subject": "(str,)", + "test_mode": "(bool,)", + "title": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + "template_ids", + "signer_list", + "ccs", + "custom_fields", + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..276be674d --- /dev/null +++ b/sdks/python/dropbox_sign/models/signature_request_create_embedded_request.py @@ -0,0 +1,264 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +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 +from dropbox_sign.models.sub_custom_field import SubCustomField +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_signature_request_signer import SubSignatureRequestSigner +from dropbox_sign.models.sub_signing_options import SubSigningOptions +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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.") + 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.") + 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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SignatureRequestCreateEmbeddedRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 + # 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 + # 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 + # 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 + # 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() + # 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 + # 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 + # 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 + # 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() + # set to None if expires_at (nullable) is None + # and model_fields_set contains the field + if self.expires_at is None and "expires_at" in self.model_fields_set: + _dict['expires_at'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SignatureRequestCreateEmbeddedRequest from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "client_id": "(str,)", + "files": "(List[io.IOBase],)", + "file_urls": "(List[str],)", + "signers": "(List[SubSignatureRequestSigner],)", + "grouped_signers": "(List[SubSignatureRequestGroupedSigners],)", + "allow_decline": "(bool,)", + "allow_reassign": "(bool,)", + "attachments": "(List[SubAttachment],)", + "cc_email_addresses": "(List[str],)", + "custom_fields": "(List[SubCustomField],)", + "field_options": "(SubFieldOptions,)", + "form_field_groups": "(List[SubFormFieldGroup],)", + "form_field_rules": "(List[SubFormFieldRule],)", + "form_fields_per_document": "(List[SubFormFieldsPerDocumentBase],)", + "hide_text_tags": "(bool,)", + "message": "(str,)", + "metadata": "(Dict[str, object],)", + "signing_options": "(SubSigningOptions,)", + "subject": "(str,)", + "test_mode": "(bool,)", + "title": "(str,)", + "use_text_tags": "(bool,)", + "populate_auto_fill_fields": "(bool,)", + "expires_at": "(int,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + "files", + "file_urls", + "signers", + "grouped_signers", + "attachments", + "cc_email_addresses", + "custom_fields", + "form_field_groups", + "form_field_rules", + "form_fields_per_document", + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..d6bb039d8 --- /dev/null +++ b/sdks/python/dropbox_sign/models/signature_request_create_embedded_with_template_request.py @@ -0,0 +1,192 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +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_signing_options import SubSigningOptions +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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.") + 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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SignatureRequestCreateEmbeddedWithTemplateRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 + # 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 + # 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 + # 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() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SignatureRequestCreateEmbeddedWithTemplateRequest from a dict""" + if obj is None: + return None + + 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 + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "template_ids": "(List[str],)", + "client_id": "(str,)", + "signers": "(List[SubSignatureRequestTemplateSigner],)", + "allow_decline": "(bool,)", + "ccs": "(List[SubCC],)", + "custom_fields": "(List[SubCustomField],)", + "files": "(List[io.IOBase],)", + "file_urls": "(List[str],)", + "message": "(str,)", + "metadata": "(Dict[str, object],)", + "signing_options": "(SubSigningOptions,)", + "subject": "(str,)", + "test_mode": "(bool,)", + "title": "(str,)", + "populate_auto_fill_fields": "(bool,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + "template_ids", + "signers", + "ccs", + "custom_fields", + "files", + "file_urls", + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/signature_request_get_response.py b/sdks/python/dropbox_sign/models/signature_request_get_response.py new file mode 100644 index 000000000..779b1f16b --- /dev/null +++ b/sdks/python/dropbox_sign/models/signature_request_get_response.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from dropbox_sign.models.signature_request_response import SignatureRequestResponse +from dropbox_sign.models.warning_response import WarningResponse +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class SignatureRequestGetResponse(BaseModel): + """ + SignatureRequestGetResponse + """ # noqa: E501 + signature_request: Optional[SignatureRequestResponse] = None + warnings: Optional[List[WarningResponse]] = Field(default=None, description="A list of warnings.") + __properties: ClassVar[List[str]] = ["signature_request", "warnings"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SignatureRequestGetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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() + # 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 + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SignatureRequestGetResponse from a dict""" + if obj is None: + return None + + 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 + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "signature_request": "(SignatureRequestResponse,)", + "warnings": "(List[WarningResponse],)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + "warnings", + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/signature_request_list_response.py b/sdks/python/dropbox_sign/models/signature_request_list_response.py new file mode 100644 index 000000000..051d535a0 --- /dev/null +++ b/sdks/python/dropbox_sign/models/signature_request_list_response.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from dropbox_sign.models.list_info_response import ListInfoResponse +from dropbox_sign.models.signature_request_response import SignatureRequestResponse +from dropbox_sign.models.warning_response import WarningResponse +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class SignatureRequestListResponse(BaseModel): + """ + SignatureRequestListResponse + """ # noqa: E501 + signature_requests: Optional[List[SignatureRequestResponse]] = Field(default=None, description="Contains information about signature requests.") + list_info: Optional[ListInfoResponse] = None + warnings: Optional[List[WarningResponse]] = Field(default=None, description="A list of warnings.") + __properties: ClassVar[List[str]] = ["signature_requests", "list_info", "warnings"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SignatureRequestListResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 + # 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() + # 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 + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SignatureRequestListResponse from a dict""" + if obj is None: + return None + + 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 + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "signature_requests": "(List[SignatureRequestResponse],)", + "list_info": "(ListInfoResponse,)", + "warnings": "(List[WarningResponse],)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + "signature_requests", + "warnings", + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/signature_request_remind_request.py b/sdks/python/dropbox_sign/models/signature_request_remind_request.py new file mode 100644 index 000000000..590f0f43e --- /dev/null +++ b/sdks/python/dropbox_sign/models/signature_request_remind_request.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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.") + __properties: ClassVar[List[str]] = ["email_address", "name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SignatureRequestRemindRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SignatureRequestRemindRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email_address": obj.get("email_address"), + "name": obj.get("name") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "email_address": "(str,)", + "name": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/signature_request_response.py b/sdks/python/dropbox_sign/models/signature_request_response.py new file mode 100644 index 000000000..7de733db4 --- /dev/null +++ b/sdks/python/dropbox_sign/models/signature_request_response.py @@ -0,0 +1,280 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +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 typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SignatureRequestResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 + # 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 + # 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 + # 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 + # set to None if test_mode (nullable) is None + # and model_fields_set contains the field + if self.test_mode is None and "test_mode" in self.model_fields_set: + _dict['test_mode'] = None + + # set to None if subject (nullable) is None + # and model_fields_set contains the field + if self.subject is None and "subject" in self.model_fields_set: + _dict['subject'] = None + + # set to None if message (nullable) is None + # and model_fields_set contains the field + if self.message is None and "message" in self.model_fields_set: + _dict['message'] = None + + # set to None if signing_url (nullable) is None + # and model_fields_set contains the field + if self.signing_url is None and "signing_url" in self.model_fields_set: + _dict['signing_url'] = None + + # set to None if signing_redirect_url (nullable) is None + # and model_fields_set contains the field + if self.signing_redirect_url is None and "signing_redirect_url" in self.model_fields_set: + _dict['signing_redirect_url'] = None + + # set to None if final_copy_uri (nullable) is None + # and model_fields_set contains the field + if self.final_copy_uri is None and "final_copy_uri" in self.model_fields_set: + _dict['final_copy_uri'] = None + + # set to None if template_ids (nullable) is None + # and model_fields_set contains the field + if self.template_ids is None and "template_ids" in self.model_fields_set: + _dict['template_ids'] = None + + # set to None if custom_fields (nullable) is None + # and model_fields_set contains the field + if self.custom_fields is None and "custom_fields" in self.model_fields_set: + _dict['custom_fields'] = None + + # set to None if attachments (nullable) is None + # and model_fields_set contains the field + if self.attachments is None and "attachments" in self.model_fields_set: + _dict['attachments'] = None + + # set to None if response_data (nullable) is None + # and model_fields_set contains the field + if self.response_data is None and "response_data" in self.model_fields_set: + _dict['response_data'] = None + + # set to None if bulk_send_job_id (nullable) is None + # and model_fields_set contains the field + if self.bulk_send_job_id is None and "bulk_send_job_id" in self.model_fields_set: + _dict['bulk_send_job_id'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SignatureRequestResponse from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "test_mode": "(bool,)", + "signature_request_id": "(str,)", + "requester_email_address": "(str,)", + "title": "(str,)", + "original_title": "(str,)", + "subject": "(str,)", + "message": "(str,)", + "metadata": "(object,)", + "created_at": "(int,)", + "expires_at": "(int,)", + "is_complete": "(bool,)", + "is_declined": "(bool,)", + "has_error": "(bool,)", + "files_url": "(str,)", + "signing_url": "(str,)", + "details_url": "(str,)", + "cc_email_addresses": "(List[str],)", + "signing_redirect_url": "(str,)", + "final_copy_uri": "(str,)", + "template_ids": "(List[str],)", + "custom_fields": "(List[SignatureRequestResponseCustomFieldBase],)", + "attachments": "(List[SignatureRequestResponseAttachment],)", + "response_data": "(List[SignatureRequestResponseDataBase],)", + "signatures": "(List[SignatureRequestResponseSignatures],)", + "bulk_send_job_id": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + "cc_email_addresses", + "template_ids", + "custom_fields", + "attachments", + "response_data", + "signatures", + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/signature_request_response_attachment.py b/sdks/python/dropbox_sign/models/signature_request_response_attachment.py new file mode 100644 index 000000000..5a7081491 --- /dev/null +++ b/sdks/python/dropbox_sign/models/signature_request_response_attachment.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class SignatureRequestResponseAttachment(BaseModel): + """ + Signer attachments. + """ # noqa: E501 + id: StrictStr = Field(description="The unique ID for this attachment.") + signer: StrictStr = 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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SignatureRequestResponseAttachment from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if instructions (nullable) is None + # and model_fields_set contains the field + if self.instructions is None and "instructions" in self.model_fields_set: + _dict['instructions'] = None + + # set to None if uploaded_at (nullable) is None + # and model_fields_set contains the field + if self.uploaded_at is None and "uploaded_at" in self.model_fields_set: + _dict['uploaded_at'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SignatureRequestResponseAttachment from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "id": "(str,)", + "signer": "(str,)", + "name": "(str,)", + "required": "(bool,)", + "instructions": "(str,)", + "uploaded_at": "(int,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..5998bb547 --- /dev/null +++ b/sdks/python/dropbox_sign/models/signature_request_response_custom_field_base.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from importlib import import_module +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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 + +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.") + 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.") + __properties: ClassVar[List[str]] = ["type", "name", "required", "api_id", "editor"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + # JSON field name that stores the object type + __discriminator_property_name: ClassVar[str] = 'type' + + # discriminator mappings + __discriminator_value_class_map: ClassVar[Dict[str, str]] = { + 'checkbox': 'SignatureRequestResponseCustomFieldCheckbox','text': 'SignatureRequestResponseCustomFieldText' + } + + @classmethod + def get_discriminator_value(cls, obj: Dict[str, Any]) -> Optional[str]: + """Returns the discriminator value (object type) of the data""" + discriminator_value = obj[cls.__discriminator_property_name] + if discriminator_value: + return cls.__discriminator_value_class_map.get(discriminator_value) + else: + return None + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + 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)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + 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)) + + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "type": "(str,)", + "name": "(str,)", + "required": "(bool,)", + "api_id": "(str,)", + "editor": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..6b7430327 --- /dev/null +++ b/sdks/python/dropbox_sign/models/signature_request_response_custom_field_checkbox.py @@ -0,0 +1,127 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +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 typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SignatureRequestResponseCustomFieldCheckbox from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SignatureRequestResponseCustomFieldCheckbox from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "type": "(str,)", + "name": "(str,)", + "value": "(bool,)", + "required": "(bool,)", + "api_id": "(str,)", + "editor": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..a0917369a --- /dev/null +++ b/sdks/python/dropbox_sign/models/signature_request_response_custom_field_text.py @@ -0,0 +1,127 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +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 typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SignatureRequestResponseCustomFieldText from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SignatureRequestResponseCustomFieldText from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "type": "(str,)", + "name": "(str,)", + "value": "(str,)", + "required": "(bool,)", + "api_id": "(str,)", + "editor": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..b8cd0e748 --- /dev/null +++ b/sdks/python/dropbox_sign/models/signature_request_response_custom_field_type_enum.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class SignatureRequestResponseCustomFieldTypeEnum(str, Enum): + """ + SignatureRequestResponseCustomFieldTypeEnum + """ + + """ + allowed enum values + """ + 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 new file mode 100644 index 000000000..59db1c3cb --- /dev/null +++ b/sdks/python/dropbox_sign/models/signature_request_response_data_base.py @@ -0,0 +1,161 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from importlib import import_module +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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 + +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.") + type: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["api_id", "signature_id", "name", "required", "type"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + # JSON field name that stores the object 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' + } + + @classmethod + def get_discriminator_value(cls, obj: Dict[str, Any]) -> Optional[str]: + """Returns the discriminator value (object type) of the data""" + discriminator_value = obj[cls.__discriminator_property_name] + if discriminator_value: + return cls.__discriminator_value_class_map.get(discriminator_value) + else: + return None + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + 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)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + 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)) + + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "api_id": "(str,)", + "signature_id": "(str,)", + "name": "(str,)", + "required": "(bool,)", + "type": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..17f8831e8 --- /dev/null +++ b/sdks/python/dropbox_sign/models/signature_request_response_data_type_enum.py @@ -0,0 +1,45 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class SignatureRequestResponseDataTypeEnum(str, Enum): + """ + SignatureRequestResponseDataTypeEnum + """ + + """ + 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' + + @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 new file mode 100644 index 000000000..7737d3069 --- /dev/null +++ b/sdks/python/dropbox_sign/models/signature_request_response_data_value_checkbox.py @@ -0,0 +1,127 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +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 typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SignatureRequestResponseDataValueCheckbox from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SignatureRequestResponseDataValueCheckbox from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "type": "(str,)", + "value": "(bool,)", + "api_id": "(str,)", + "signature_id": "(str,)", + "name": "(str,)", + "required": "(bool,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..cd3d29cfe --- /dev/null +++ b/sdks/python/dropbox_sign/models/signature_request_response_data_value_checkbox_merge.py @@ -0,0 +1,127 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +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 typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SignatureRequestResponseDataValueCheckboxMerge from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SignatureRequestResponseDataValueCheckboxMerge from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "type": "(str,)", + "value": "(str,)", + "api_id": "(str,)", + "signature_id": "(str,)", + "name": "(str,)", + "required": "(bool,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..8fa45af57 --- /dev/null +++ b/sdks/python/dropbox_sign/models/signature_request_response_data_value_date_signed.py @@ -0,0 +1,127 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +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 typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SignatureRequestResponseDataValueDateSigned from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SignatureRequestResponseDataValueDateSigned from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "type": "(str,)", + "value": "(str,)", + "api_id": "(str,)", + "signature_id": "(str,)", + "name": "(str,)", + "required": "(bool,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..135859d75 --- /dev/null +++ b/sdks/python/dropbox_sign/models/signature_request_response_data_value_dropdown.py @@ -0,0 +1,127 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +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 typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SignatureRequestResponseDataValueDropdown from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SignatureRequestResponseDataValueDropdown from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "type": "(str,)", + "value": "(str,)", + "api_id": "(str,)", + "signature_id": "(str,)", + "name": "(str,)", + "required": "(bool,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..b4ea18d5d --- /dev/null +++ b/sdks/python/dropbox_sign/models/signature_request_response_data_value_initials.py @@ -0,0 +1,127 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +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 typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SignatureRequestResponseDataValueInitials from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SignatureRequestResponseDataValueInitials from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "type": "(str,)", + "value": "(str,)", + "api_id": "(str,)", + "signature_id": "(str,)", + "name": "(str,)", + "required": "(bool,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..3f319cd19 --- /dev/null +++ b/sdks/python/dropbox_sign/models/signature_request_response_data_value_radio.py @@ -0,0 +1,127 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +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 typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SignatureRequestResponseDataValueRadio from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SignatureRequestResponseDataValueRadio from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "type": "(str,)", + "value": "(bool,)", + "api_id": "(str,)", + "signature_id": "(str,)", + "name": "(str,)", + "required": "(bool,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..800c3e128 --- /dev/null +++ b/sdks/python/dropbox_sign/models/signature_request_response_data_value_signature.py @@ -0,0 +1,127 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +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 typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SignatureRequestResponseDataValueSignature from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SignatureRequestResponseDataValueSignature from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "type": "(str,)", + "value": "(str,)", + "api_id": "(str,)", + "signature_id": "(str,)", + "name": "(str,)", + "required": "(bool,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..c30f858ee --- /dev/null +++ b/sdks/python/dropbox_sign/models/signature_request_response_data_value_text.py @@ -0,0 +1,127 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +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 typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SignatureRequestResponseDataValueText from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SignatureRequestResponseDataValueText from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "type": "(str,)", + "value": "(str,)", + "api_id": "(str,)", + "signature_id": "(str,)", + "name": "(str,)", + "required": "(bool,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..eed5f633c --- /dev/null +++ b/sdks/python/dropbox_sign/models/signature_request_response_data_value_text_merge.py @@ -0,0 +1,127 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +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 typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SignatureRequestResponseDataValueTextMerge from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SignatureRequestResponseDataValueTextMerge from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "type": "(str,)", + "value": "(str,)", + "api_id": "(str,)", + "signature_id": "(str,)", + "name": "(str,)", + "required": "(bool,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/signature_request_response_signatures.py b/sdks/python/dropbox_sign/models/signature_request_response_signatures.py new file mode 100644 index 000000000..245243026 --- /dev/null +++ b/sdks/python/dropbox_sign/models/signature_request_response_signatures.py @@ -0,0 +1,244 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SignatureRequestResponseSignatures from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if signer_group_guid (nullable) is None + # and model_fields_set contains the field + if self.signer_group_guid is None and "signer_group_guid" in self.model_fields_set: + _dict['signer_group_guid'] = None + + # set to None if signer_name (nullable) is None + # and model_fields_set contains the field + if self.signer_name is None and "signer_name" in self.model_fields_set: + _dict['signer_name'] = None + + # set to None if signer_role (nullable) is None + # and model_fields_set contains the field + if self.signer_role is None and "signer_role" in self.model_fields_set: + _dict['signer_role'] = None + + # set to None if order (nullable) is None + # and model_fields_set contains the field + if self.order is None and "order" in self.model_fields_set: + _dict['order'] = None + + # set to None if decline_reason (nullable) is None + # and model_fields_set contains the field + if self.decline_reason is None and "decline_reason" in self.model_fields_set: + _dict['decline_reason'] = None + + # set to None if signed_at (nullable) is None + # and model_fields_set contains the field + if self.signed_at is None and "signed_at" in self.model_fields_set: + _dict['signed_at'] = None + + # set to None if last_viewed_at (nullable) is None + # and model_fields_set contains the field + if self.last_viewed_at is None and "last_viewed_at" in self.model_fields_set: + _dict['last_viewed_at'] = None + + # set to None if last_reminded_at (nullable) is None + # and model_fields_set contains the field + if self.last_reminded_at is None and "last_reminded_at" in self.model_fields_set: + _dict['last_reminded_at'] = None + + # set to None if has_sms_auth (nullable) is None + # and model_fields_set contains the field + if self.has_sms_auth is None and "has_sms_auth" in self.model_fields_set: + _dict['has_sms_auth'] = None + + # set to None if has_sms_delivery (nullable) is None + # and model_fields_set contains the field + if self.has_sms_delivery is None and "has_sms_delivery" in self.model_fields_set: + _dict['has_sms_delivery'] = None + + # set to None if sms_phone_number (nullable) is None + # and model_fields_set contains the field + if self.sms_phone_number is None and "sms_phone_number" in self.model_fields_set: + _dict['sms_phone_number'] = None + + # set to None if reassigned_by (nullable) is None + # and model_fields_set contains the field + if self.reassigned_by is None and "reassigned_by" in self.model_fields_set: + _dict['reassigned_by'] = None + + # set to None if reassignment_reason (nullable) is None + # and model_fields_set contains the field + if self.reassignment_reason is None and "reassignment_reason" in self.model_fields_set: + _dict['reassignment_reason'] = None + + # set to None if reassigned_from (nullable) is None + # and model_fields_set contains the field + if self.reassigned_from is None and "reassigned_from" in self.model_fields_set: + _dict['reassigned_from'] = None + + # set to None if error (nullable) is None + # and model_fields_set contains the field + if self.error is None and "error" in self.model_fields_set: + _dict['error'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SignatureRequestResponseSignatures from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "signature_id": "(str,)", + "signer_group_guid": "(str,)", + "signer_email_address": "(str,)", + "signer_name": "(str,)", + "signer_role": "(str,)", + "order": "(int,)", + "status_code": "(str,)", + "decline_reason": "(str,)", + "signed_at": "(int,)", + "last_viewed_at": "(int,)", + "last_reminded_at": "(int,)", + "has_pin": "(bool,)", + "has_sms_auth": "(bool,)", + "has_sms_delivery": "(bool,)", + "sms_phone_number": "(str,)", + "reassigned_by": "(str,)", + "reassignment_reason": "(str,)", + "reassigned_from": "(str,)", + "error": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/signature_request_send_request.py b/sdks/python/dropbox_sign/models/signature_request_send_request.py new file mode 100644 index 000000000..e520ac9d6 --- /dev/null +++ b/sdks/python/dropbox_sign/models/signature_request_send_request.py @@ -0,0 +1,219 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +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 +from dropbox_sign.models.sub_custom_field import SubCustomField +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_signature_request_signer import SubSignatureRequestSigner +from dropbox_sign.models.sub_signing_options import SubSigningOptions +from typing import Optional, Set +from typing_extensions import Self +import io + +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.") + 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.") + 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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SignatureRequestSendRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 + # 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 + # 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 + # 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 + # 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() + # 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 + # 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 + # 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 + # 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() + # set to None if expires_at (nullable) is None + # and model_fields_set contains the field + if self.expires_at is None and "expires_at" in self.model_fields_set: + _dict['expires_at'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SignatureRequestSendRequest from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..f26530e6b --- /dev/null +++ b/sdks/python/dropbox_sign/models/signature_request_send_with_template_request.py @@ -0,0 +1,198 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +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_signing_options import SubSigningOptions +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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.") + 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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SignatureRequestSendWithTemplateRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 + # 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 + # 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 + # 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() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SignatureRequestSendWithTemplateRequest from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "template_ids": "(List[str],)", + "signers": "(List[SubSignatureRequestTemplateSigner],)", + "allow_decline": "(bool,)", + "ccs": "(List[SubCC],)", + "client_id": "(str,)", + "custom_fields": "(List[SubCustomField],)", + "files": "(List[io.IOBase],)", + "file_urls": "(List[str],)", + "is_qualified_signature": "(bool,)", + "is_eid": "(bool,)", + "message": "(str,)", + "metadata": "(Dict[str, object],)", + "signing_options": "(SubSigningOptions,)", + "signing_redirect_url": "(str,)", + "subject": "(str,)", + "test_mode": "(bool,)", + "title": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + "template_ids", + "signers", + "ccs", + "custom_fields", + "files", + "file_urls", + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/signature_request_update_request.py b/sdks/python/dropbox_sign/models/signature_request_update_request.py new file mode 100644 index 000000000..401c55241 --- /dev/null +++ b/sdks/python/dropbox_sign/models/signature_request_update_request.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class SignatureRequestUpdateRequest(BaseModel): + """ + SignatureRequestUpdateRequest + """ # 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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SignatureRequestUpdateRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if expires_at (nullable) is None + # and model_fields_set contains the field + if self.expires_at is None and "expires_at" in self.model_fields_set: + _dict['expires_at'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SignatureRequestUpdateRequest from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "signature_id": "(str,)", + "email_address": "(str,)", + "name": "(str,)", + "expires_at": "(int,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/sub_attachment.py b/sdks/python/dropbox_sign/models/sub_attachment.py new file mode 100644 index 000000000..cecd70255 --- /dev/null +++ b/sdks/python/dropbox_sign/models/sub_attachment.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class SubAttachment(BaseModel): + """ + SubAttachment + """ # 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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SubAttachment from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SubAttachment from a dict""" + if obj is None: + return None + + 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 + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "name": "(str,)", + "signer_index": "(int,)", + "instructions": "(str,)", + "required": "(bool,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/sub_bulk_signer_list.py b/sdks/python/dropbox_sign/models/sub_bulk_signer_list.py new file mode 100644 index 000000000..e08fcd586 --- /dev/null +++ b/sdks/python/dropbox_sign/models/sub_bulk_signer_list.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +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 typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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.") + __properties: ClassVar[List[str]] = ["custom_fields", "signers"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SubBulkSignerList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 + # 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 + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SubBulkSignerList from a dict""" + if obj is None: + return None + + 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 + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "custom_fields": "(List[SubBulkSignerListCustomField],)", + "signers": "(List[SubSignatureRequestTemplateSigner],)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + "custom_fields", + "signers", + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..da5c90a65 --- /dev/null +++ b/sdks/python/dropbox_sign/models/sub_bulk_signer_list_custom_field.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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`.") + value: StrictStr = Field(description="The value of the custom field.") + __properties: ClassVar[List[str]] = ["name", "value"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SubBulkSignerListCustomField from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SubBulkSignerListCustomField from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "value": obj.get("value") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "name": "(str,)", + "value": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/sub_cc.py b/sdks/python/dropbox_sign/models/sub_cc.py new file mode 100644 index 000000000..5c37419eb --- /dev/null +++ b/sdks/python/dropbox_sign/models/sub_cc.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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.") + __properties: ClassVar[List[str]] = ["role", "email_address"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SubCC from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SubCC from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "role": obj.get("role"), + "email_address": obj.get("email_address") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "role": "(str,)", + "email_address": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/sub_custom_field.py b/sdks/python/dropbox_sign/models/sub_custom_field.py new file mode 100644 index 000000000..85a4cbfdb --- /dev/null +++ b/sdks/python/dropbox_sign/models/sub_custom_field.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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.") + __properties: ClassVar[List[str]] = ["name", "editor", "required", "value"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SubCustomField from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SubCustomField from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "name": "(str,)", + "editor": "(str,)", + "required": "(bool,)", + "value": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/sub_editor_options.py b/sdks/python/dropbox_sign/models/sub_editor_options.py new file mode 100644 index 000000000..09e47bbe4 --- /dev/null +++ b/sdks/python/dropbox_sign/models/sub_editor_options.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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") + __properties: ClassVar[List[str]] = ["allow_edit_signers", "allow_edit_documents"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SubEditorOptions from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SubEditorOptions from a dict""" + if obj is None: + return None + + 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 + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "allow_edit_signers": "(bool,)", + "allow_edit_documents": "(bool,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/sub_field_options.py b/sdks/python/dropbox_sign/models/sub_field_options.py new file mode 100644 index 000000000..d3b0f338c --- /dev/null +++ b/sdks/python/dropbox_sign/models/sub_field_options.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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.") + __properties: ClassVar[List[str]] = ["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')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SubFieldOptions from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SubFieldOptions from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "date_format": obj.get("date_format") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "date_format": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/sub_form_field_group.py b/sdks/python/dropbox_sign/models/sub_form_field_group.py new file mode 100644 index 000000000..d4c82993d --- /dev/null +++ b/sdks/python/dropbox_sign/models/sub_form_field_group.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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`.") + 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.") + __properties: ClassVar[List[str]] = ["group_id", "group_label", "requirement"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SubFormFieldGroup from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SubFormFieldGroup from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "group_id": "(str,)", + "group_label": "(str,)", + "requirement": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/sub_form_field_rule.py b/sdks/python/dropbox_sign/models/sub_form_field_rule.py new file mode 100644 index 000000000..5c304b185 --- /dev/null +++ b/sdks/python/dropbox_sign/models/sub_form_field_rule.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from dropbox_sign.models.sub_form_field_rule_action import SubFormFieldRuleAction +from dropbox_sign.models.sub_form_field_rule_trigger import SubFormFieldRuleTrigger +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class SubFormFieldRule(BaseModel): + """ + SubFormFieldRule + """ # 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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SubFormFieldRule from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in triggers (list) + _items = [] + if self.triggers: + for _item_triggers in self.triggers: + if _item_triggers: + _items.append(_item_triggers.to_dict()) + _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 + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SubFormFieldRule from a dict""" + if obj is None: + return None + + 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 + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "id": "(str,)", + "trigger_operator": "(str,)", + "triggers": "(List[SubFormFieldRuleTrigger],)", + "actions": "(List[SubFormFieldRuleAction],)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + "triggers", + "actions", + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..4f19ad097 --- /dev/null +++ b/sdks/python/dropbox_sign/models/sub_form_field_rule_action.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +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 +import io + +class SubFormFieldRuleAction(BaseModel): + """ + SubFormFieldRuleAction + """ # 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.") + __properties: ClassVar[List[str]] = ["hidden", "type", "field_id", "group_id"] + + @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')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SubFormFieldRuleAction from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SubFormFieldRuleAction from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "hidden": "(bool,)", + "type": "(str,)", + "field_id": "(str,)", + "group_id": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..9e91e53be --- /dev/null +++ b/sdks/python/dropbox_sign/models/sub_form_field_rule_trigger.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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`") + __properties: ClassVar[List[str]] = ["id", "operator", "value", "values"] + + @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')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SubFormFieldRuleTrigger from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SubFormFieldRuleTrigger from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "id": "(str,)", + "operator": "(str,)", + "value": "(str,)", + "values": "(List[str],)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + "values", + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..2e5f5ea81 --- /dev/null +++ b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_base.py @@ -0,0 +1,181 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from importlib import import_module +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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 + +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.") + 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.") + 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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + # JSON field name that stores the object 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' + } + + @classmethod + def get_discriminator_value(cls, obj: Dict[str, Any]) -> Optional[str]: + """Returns the discriminator value (object type) of the data""" + discriminator_value = obj[cls.__discriminator_property_name] + if discriminator_value: + return cls.__discriminator_value_class_map.get(discriminator_value) + else: + return None + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + 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)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if page (nullable) is None + # and model_fields_set contains the field + if self.page is None and "page" in self.model_fields_set: + _dict['page'] = None + + return _dict + + @classmethod + 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)) + + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "document_index": "(int,)", + "api_id": "(str,)", + "height": "(int,)", + "required": "(bool,)", + "signer": "(int, str,)", + "type": "(str,)", + "width": "(int,)", + "x": "(int,)", + "y": "(int,)", + "name": "(str,)", + "page": "(int,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..081c8632e --- /dev/null +++ b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_checkbox.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +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 typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SubFormFieldsPerDocumentCheckbox from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if page (nullable) is None + # and model_fields_set contains the field + if self.page is None and "page" in self.model_fields_set: + _dict['page'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SubFormFieldsPerDocumentCheckbox from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "type": "(str,)", + "is_checked": "(bool,)", + "document_index": "(int,)", + "api_id": "(str,)", + "height": "(int,)", + "required": "(bool,)", + "signer": "(int, str,)", + "width": "(int,)", + "x": "(int,)", + "y": "(int,)", + "group": "(str,)", + "name": "(str,)", + "page": "(int,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..96de218a2 --- /dev/null +++ b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_checkbox_merge.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +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 typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SubFormFieldsPerDocumentCheckboxMerge from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if page (nullable) is None + # and model_fields_set contains the field + if self.page is None and "page" in self.model_fields_set: + _dict['page'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SubFormFieldsPerDocumentCheckboxMerge from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "type": "(str,)", + "document_index": "(int,)", + "api_id": "(str,)", + "height": "(int,)", + "required": "(bool,)", + "signer": "(int, str,)", + "width": "(int,)", + "x": "(int,)", + "y": "(int,)", + "name": "(str,)", + "page": "(int,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..62cd38e5b --- /dev/null +++ b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_date_signed.py @@ -0,0 +1,157 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +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 typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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"] + + @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')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SubFormFieldsPerDocumentDateSigned from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if page (nullable) is None + # and model_fields_set contains the field + if self.page is None and "page" in self.model_fields_set: + _dict['page'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SubFormFieldsPerDocumentDateSigned from a dict""" + if obj is None: + return None + + 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 + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "type": "(str,)", + "document_index": "(int,)", + "api_id": "(str,)", + "height": "(int,)", + "required": "(bool,)", + "signer": "(int, str,)", + "width": "(int,)", + "x": "(int,)", + "y": "(int,)", + "font_family": "(str,)", + "font_size": "(int,)", + "name": "(str,)", + "page": "(int,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..108960a03 --- /dev/null +++ b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_dropdown.py @@ -0,0 +1,165 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +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 typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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') + 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')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SubFormFieldsPerDocumentDropdown from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if page (nullable) is None + # and model_fields_set contains the field + if self.page is None and "page" in self.model_fields_set: + _dict['page'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SubFormFieldsPerDocumentDropdown from a dict""" + if obj is None: + return None + + 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 + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "type": "(str,)", + "options": "(List[str],)", + "document_index": "(int,)", + "api_id": "(str,)", + "height": "(int,)", + "required": "(bool,)", + "signer": "(int, str,)", + "width": "(int,)", + "x": "(int,)", + "y": "(int,)", + "content": "(str,)", + "font_family": "(str,)", + "font_size": "(int,)", + "name": "(str,)", + "page": "(int,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + "options", + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..3b95a6b6b --- /dev/null +++ b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_font_enum.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class SubFormFieldsPerDocumentFontEnum(str, Enum): + """ + SubFormFieldsPerDocumentFontEnum + """ + + """ + 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' + + @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 new file mode 100644 index 000000000..14d29ae0f --- /dev/null +++ b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_hyperlink.py @@ -0,0 +1,163 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +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 typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class SubFormFieldsPerDocumentHyperlink(SubFormFieldsPerDocumentBase): + """ + This class extends `SubFormFieldsPerDocumentBase`. + """ # 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') + 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')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SubFormFieldsPerDocumentHyperlink from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if page (nullable) is None + # and model_fields_set contains the field + if self.page is None and "page" in self.model_fields_set: + _dict['page'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SubFormFieldsPerDocumentHyperlink from a dict""" + if obj is None: + return None + + 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 + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "type": "(str,)", + "content": "(str,)", + "content_url": "(str,)", + "document_index": "(int,)", + "api_id": "(str,)", + "height": "(int,)", + "required": "(bool,)", + "signer": "(int, str,)", + "width": "(int,)", + "x": "(int,)", + "y": "(int,)", + "font_family": "(str,)", + "font_size": "(int,)", + "name": "(str,)", + "page": "(int,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..c45f92fc8 --- /dev/null +++ b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_initials.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +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 typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SubFormFieldsPerDocumentInitials from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if page (nullable) is None + # and model_fields_set contains the field + if self.page is None and "page" in self.model_fields_set: + _dict['page'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SubFormFieldsPerDocumentInitials from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "type": "(str,)", + "document_index": "(int,)", + "api_id": "(str,)", + "height": "(int,)", + "required": "(bool,)", + "signer": "(int, str,)", + "width": "(int,)", + "x": "(int,)", + "y": "(int,)", + "name": "(str,)", + "page": "(int,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..90b7e4668 --- /dev/null +++ b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_radio.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +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 typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SubFormFieldsPerDocumentRadio from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if page (nullable) is None + # and model_fields_set contains the field + if self.page is None and "page" in self.model_fields_set: + _dict['page'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SubFormFieldsPerDocumentRadio from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "type": "(str,)", + "group": "(str,)", + "is_checked": "(bool,)", + "document_index": "(int,)", + "api_id": "(str,)", + "height": "(int,)", + "required": "(bool,)", + "signer": "(int, str,)", + "width": "(int,)", + "x": "(int,)", + "y": "(int,)", + "name": "(str,)", + "page": "(int,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..1048b27bc --- /dev/null +++ b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_signature.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +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 typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SubFormFieldsPerDocumentSignature from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if page (nullable) is None + # and model_fields_set contains the field + if self.page is None and "page" in self.model_fields_set: + _dict['page'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SubFormFieldsPerDocumentSignature from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "type": "(str,)", + "document_index": "(int,)", + "api_id": "(str,)", + "height": "(int,)", + "required": "(bool,)", + "signer": "(int, str,)", + "width": "(int,)", + "x": "(int,)", + "y": "(int,)", + "name": "(str,)", + "page": "(int,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..868c1d563 --- /dev/null +++ b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_text.py @@ -0,0 +1,191 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +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 typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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.") + 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') + 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')") + return value + + @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')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SubFormFieldsPerDocumentText from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if page (nullable) is None + # and model_fields_set contains the field + if self.page is None and "page" in self.model_fields_set: + _dict['page'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SubFormFieldsPerDocumentText from a dict""" + if obj is None: + return None + + 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 + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "type": "(str,)", + "document_index": "(int,)", + "api_id": "(str,)", + "height": "(int,)", + "required": "(bool,)", + "signer": "(int, str,)", + "width": "(int,)", + "x": "(int,)", + "y": "(int,)", + "placeholder": "(str,)", + "auto_fill_type": "(str,)", + "link_id": "(str,)", + "masked": "(bool,)", + "validation_type": "(str,)", + "validation_custom_regex": "(str,)", + "validation_custom_regex_format_label": "(str,)", + "content": "(str,)", + "font_family": "(str,)", + "font_size": "(int,)", + "name": "(str,)", + "page": "(int,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..ba94c956d --- /dev/null +++ b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_text_merge.py @@ -0,0 +1,157 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +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 typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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"] + + @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')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SubFormFieldsPerDocumentTextMerge from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if page (nullable) is None + # and model_fields_set contains the field + if self.page is None and "page" in self.model_fields_set: + _dict['page'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SubFormFieldsPerDocumentTextMerge from a dict""" + if obj is None: + return None + + 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 + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "type": "(str,)", + "document_index": "(int,)", + "api_id": "(str,)", + "height": "(int,)", + "required": "(bool,)", + "signer": "(int, str,)", + "width": "(int,)", + "x": "(int,)", + "y": "(int,)", + "font_family": "(str,)", + "font_size": "(int,)", + "name": "(str,)", + "page": "(int,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..3ad73f880 --- /dev/null +++ b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_type_enum.py @@ -0,0 +1,46 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class SubFormFieldsPerDocumentTypeEnum(str, Enum): + """ + SubFormFieldsPerDocumentTypeEnum + """ + + """ + 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' + + @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 new file mode 100644 index 000000000..fc728892e --- /dev/null +++ b/sdks/python/dropbox_sign/models/sub_merge_field.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class SubMergeField(BaseModel): + """ + SubMergeField + """ # 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') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['text', 'checkbox']): + raise ValueError("must be one of enum values ('text', 'checkbox')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SubMergeField from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SubMergeField from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "type": obj.get("type") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "name": "(str,)", + "type": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/sub_o_auth.py b/sdks/python/dropbox_sign/models/sub_o_auth.py new file mode 100644 index 000000000..fa1fe8418 --- /dev/null +++ b/sdks/python/dropbox_sign/models/sub_o_auth.py @@ -0,0 +1,130 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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).") + __properties: ClassVar[List[str]] = ["callback_url", "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', '')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SubOAuth from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SubOAuth from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "callback_url": obj.get("callback_url"), + "scopes": obj.get("scopes") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "callback_url": "(str,)", + "scopes": "(List[str],)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + "scopes", + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/sub_options.py b/sdks/python/dropbox_sign/models/sub_options.py new file mode 100644 index 000000000..633bb9674 --- /dev/null +++ b/sdks/python/dropbox_sign/models/sub_options.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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.") + __properties: ClassVar[List[str]] = ["can_insert_everywhere"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SubOptions from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SubOptions from a dict""" + if obj is None: + return None + + 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 + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "can_insert_everywhere": "(bool,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..bf2ef4e91 --- /dev/null +++ b/sdks/python/dropbox_sign/models/sub_signature_request_grouped_signers.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from dropbox_sign.models.sub_signature_request_signer import SubSignatureRequestSigner +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class SubSignatureRequestGroupedSigners(BaseModel): + """ + SubSignatureRequestGroupedSigners + """ # 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`.") + __properties: ClassVar[List[str]] = ["group", "signers", "order"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SubSignatureRequestGroupedSigners from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 + # set to None if order (nullable) is None + # and model_fields_set contains the field + if self.order is None and "order" in self.model_fields_set: + _dict['order'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SubSignatureRequestGroupedSigners from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "group": "(str,)", + "signers": "(List[SubSignatureRequestSigner],)", + "order": "(int,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + "signers", + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/sub_signature_request_signer.py b/sdks/python/dropbox_sign/models/sub_signature_request_signer.py new file mode 100644 index 000000000..32aa0f1f0 --- /dev/null +++ b/sdks/python/dropbox_sign/models/sub_signature_request_signer.py @@ -0,0 +1,146 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class SubSignatureRequestSigner(BaseModel): + """ + SubSignatureRequestSigner + """ # 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') + 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')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SubSignatureRequestSigner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if order (nullable) is None + # and model_fields_set contains the field + if self.order is None and "order" in self.model_fields_set: + _dict['order'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SubSignatureRequestSigner from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "name": "(str,)", + "email_address": "(str,)", + "order": "(int,)", + "pin": "(str,)", + "sms_phone_number": "(str,)", + "sms_phone_number_type": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..ab456bcfa --- /dev/null +++ b/sdks/python/dropbox_sign/models/sub_signature_request_template_signer.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class SubSignatureRequestTemplateSigner(BaseModel): + """ + SubSignatureRequestTemplateSigner + """ # 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') + 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')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SubSignatureRequestTemplateSigner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SubSignatureRequestTemplateSigner from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "role": "(str,)", + "name": "(str,)", + "email_address": "(str,)", + "pin": "(str,)", + "sms_phone_number": "(str,)", + "sms_phone_number_type": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/sub_signing_options.py b/sdks/python/dropbox_sign/models/sub_signing_options.py new file mode 100644 index 000000000..c7789f2f7 --- /dev/null +++ b/sdks/python/dropbox_sign/models/sub_signing_options.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +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 +import io + +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') + 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')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SubSigningOptions from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SubSigningOptions from a dict""" + if obj is None: + return None + + 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 + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "default_type": "(str,)", + "draw": "(bool,)", + "phone": "(bool,)", + "type": "(bool,)", + "upload": "(bool,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/sub_team_response.py b/sdks/python/dropbox_sign/models/sub_team_response.py new file mode 100644 index 000000000..639ed6946 --- /dev/null +++ b/sdks/python/dropbox_sign/models/sub_team_response.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class SubTeamResponse(BaseModel): + """ + SubTeamResponse + """ # 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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SubTeamResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SubTeamResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "team_id": obj.get("team_id"), + "name": obj.get("name") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "team_id": "(str,)", + "name": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/sub_template_role.py b/sdks/python/dropbox_sign/models/sub_template_role.py new file mode 100644 index 000000000..df6c62998 --- /dev/null +++ b/sdks/python/dropbox_sign/models/sub_template_role.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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.") + __properties: ClassVar[List[str]] = ["name", "order"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SubTemplateRole from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if order (nullable) is None + # and model_fields_set contains the field + if self.order is None and "order" in self.model_fields_set: + _dict['order'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SubTemplateRole from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "order": obj.get("order") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "name": "(str,)", + "order": "(int,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/sub_unclaimed_draft_signer.py b/sdks/python/dropbox_sign/models/sub_unclaimed_draft_signer.py new file mode 100644 index 000000000..e115f1670 --- /dev/null +++ b/sdks/python/dropbox_sign/models/sub_unclaimed_draft_signer.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class SubUnclaimedDraftSigner(BaseModel): + """ + SubUnclaimedDraftSigner + """ # 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.") + __properties: ClassVar[List[str]] = ["email_address", "name", "order"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SubUnclaimedDraftSigner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if order (nullable) is None + # and model_fields_set contains the field + if self.order is None and "order" in self.model_fields_set: + _dict['order'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SubUnclaimedDraftSigner from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "email_address": "(str,)", + "name": "(str,)", + "order": "(int,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..7d11022b2 --- /dev/null +++ b/sdks/python/dropbox_sign/models/sub_unclaimed_draft_template_signer.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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`.") + __properties: ClassVar[List[str]] = ["role", "name", "email_address"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SubUnclaimedDraftTemplateSigner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SubUnclaimedDraftTemplateSigner from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "role": "(str,)", + "name": "(str,)", + "email_address": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/sub_white_labeling_options.py b/sdks/python/dropbox_sign/models/sub_white_labeling_options.py new file mode 100644 index 000000000..1b15fb818 --- /dev/null +++ b/sdks/python/dropbox_sign/models/sub_white_labeling_options.py @@ -0,0 +1,167 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +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 +import io + +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') + def legal_version_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['terms1', 'terms2']): + raise ValueError("must be one of enum values ('terms1', 'terms2')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SubWhiteLabelingOptions from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SubWhiteLabelingOptions from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "header_background_color": "(str,)", + "legal_version": "(str,)", + "link_color": "(str,)", + "page_background_color": "(str,)", + "primary_button_color": "(str,)", + "primary_button_color_hover": "(str,)", + "primary_button_text_color": "(str,)", + "primary_button_text_color_hover": "(str,)", + "secondary_button_color": "(str,)", + "secondary_button_color_hover": "(str,)", + "secondary_button_text_color": "(str,)", + "secondary_button_text_color_hover": "(str,)", + "text_color1": "(str,)", + "text_color2": "(str,)", + "reset_to_default": "(bool,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/team_add_member_request.py b/sdks/python/dropbox_sign/models/team_add_member_request.py new file mode 100644 index 000000000..ab8116266 --- /dev/null +++ b/sdks/python/dropbox_sign/models/team_add_member_request.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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.") + __properties: ClassVar[List[str]] = ["account_id", "email_address", "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')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TeamAddMemberRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TeamAddMemberRequest from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "account_id": "(str,)", + "email_address": "(str,)", + "role": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/team_create_request.py b/sdks/python/dropbox_sign/models/team_create_request.py new file mode 100644 index 000000000..7ebd6b393 --- /dev/null +++ b/sdks/python/dropbox_sign/models/team_create_request.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class TeamCreateRequest(BaseModel): + """ + TeamCreateRequest + """ # noqa: E501 + name: Optional[StrictStr] = Field(default='Untitled Team', description="The name of your Team.") + __properties: ClassVar[List[str]] = ["name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TeamCreateRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TeamCreateRequest from a dict""" + if obj is None: + return None + + 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' + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "name": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/team_get_info_response.py b/sdks/python/dropbox_sign/models/team_get_info_response.py new file mode 100644 index 000000000..97837743f --- /dev/null +++ b/sdks/python/dropbox_sign/models/team_get_info_response.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from dropbox_sign.models.team_info_response import TeamInfoResponse +from dropbox_sign.models.warning_response import WarningResponse +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class TeamGetInfoResponse(BaseModel): + """ + TeamGetInfoResponse + """ # noqa: E501 + team: Optional[TeamInfoResponse] = None + warnings: Optional[List[WarningResponse]] = Field(default=None, description="A list of warnings.") + __properties: ClassVar[List[str]] = ["team", "warnings"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TeamGetInfoResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of team + if self.team: + _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 + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TeamGetInfoResponse from a dict""" + if obj is None: + return None + + 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 + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "team": "(TeamInfoResponse,)", + "warnings": "(List[WarningResponse],)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + "warnings", + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/team_get_response.py b/sdks/python/dropbox_sign/models/team_get_response.py new file mode 100644 index 000000000..534dd9224 --- /dev/null +++ b/sdks/python/dropbox_sign/models/team_get_response.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from dropbox_sign.models.team_response import TeamResponse +from dropbox_sign.models.warning_response import WarningResponse +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class TeamGetResponse(BaseModel): + """ + TeamGetResponse + """ # noqa: E501 + team: Optional[TeamResponse] = None + warnings: Optional[List[WarningResponse]] = Field(default=None, description="A list of warnings.") + __properties: ClassVar[List[str]] = ["team", "warnings"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TeamGetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of team + if self.team: + _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 + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TeamGetResponse from a dict""" + if obj is None: + return None + + 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 + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "team": "(TeamResponse,)", + "warnings": "(List[WarningResponse],)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + "warnings", + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/team_info_response.py b/sdks/python/dropbox_sign/models/team_info_response.py new file mode 100644 index 000000000..032763673 --- /dev/null +++ b/sdks/python/dropbox_sign/models/team_info_response.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from dropbox_sign.models.team_parent_response import TeamParentResponse +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class TeamInfoResponse(BaseModel): + """ + TeamInfoResponse + """ # 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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TeamInfoResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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() + # set to None if team_parent (nullable) is None + # and model_fields_set contains the field + if self.team_parent is None and "team_parent" in self.model_fields_set: + _dict['team_parent'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TeamInfoResponse from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "team_id": "(str,)", + "team_parent": "(TeamParentResponse,)", + "name": "(str,)", + "num_members": "(int,)", + "num_sub_teams": "(int,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/team_invite_response.py b/sdks/python/dropbox_sign/models/team_invite_response.py new file mode 100644 index 000000000..0a7988d5d --- /dev/null +++ b/sdks/python/dropbox_sign/models/team_invite_response.py @@ -0,0 +1,130 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class TeamInviteResponse(BaseModel): + """ + TeamInviteResponse + """ # 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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TeamInviteResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TeamInviteResponse from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "email_address": "(str,)", + "team_id": "(str,)", + "role": "(str,)", + "sent_at": "(int,)", + "redeemed_at": "(int,)", + "expires_at": "(int,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/team_invites_response.py b/sdks/python/dropbox_sign/models/team_invites_response.py new file mode 100644 index 000000000..35fdf9135 --- /dev/null +++ b/sdks/python/dropbox_sign/models/team_invites_response.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from dropbox_sign.models.team_invite_response import TeamInviteResponse +from dropbox_sign.models.warning_response import WarningResponse +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class TeamInvitesResponse(BaseModel): + """ + TeamInvitesResponse + """ # noqa: E501 + team_invites: Optional[List[TeamInviteResponse]] = Field(default=None, description="Contains a list of team invites and their roles.") + warnings: Optional[List[WarningResponse]] = None + __properties: ClassVar[List[str]] = ["team_invites", "warnings"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TeamInvitesResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in team_invites (list) + _items = [] + if self.team_invites: + for _item_team_invites in self.team_invites: + if _item_team_invites: + _items.append(_item_team_invites.to_dict()) + _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 + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TeamInvitesResponse from a dict""" + if obj is None: + return None + + 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 + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "team_invites": "(List[TeamInviteResponse],)", + "warnings": "(List[WarningResponse],)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + "team_invites", + "warnings", + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/team_member_response.py b/sdks/python/dropbox_sign/models/team_member_response.py new file mode 100644 index 000000000..0967c3922 --- /dev/null +++ b/sdks/python/dropbox_sign/models/team_member_response.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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.") + __properties: ClassVar[List[str]] = ["account_id", "email_address", "role"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TeamMemberResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TeamMemberResponse from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "account_id": "(str,)", + "email_address": "(str,)", + "role": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/team_members_response.py b/sdks/python/dropbox_sign/models/team_members_response.py new file mode 100644 index 000000000..1c6d90e24 --- /dev/null +++ b/sdks/python/dropbox_sign/models/team_members_response.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from dropbox_sign.models.list_info_response import ListInfoResponse +from dropbox_sign.models.team_member_response import TeamMemberResponse +from dropbox_sign.models.warning_response import WarningResponse +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class TeamMembersResponse(BaseModel): + """ + TeamMembersResponse + """ # noqa: E501 + team_members: Optional[List[TeamMemberResponse]] = Field(default=None, description="Contains a list of team members and their roles for a specific team.") + list_info: Optional[ListInfoResponse] = None + warnings: Optional[List[WarningResponse]] = None + __properties: ClassVar[List[str]] = ["team_members", "list_info", "warnings"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TeamMembersResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in team_members (list) + _items = [] + if self.team_members: + for _item_team_members in self.team_members: + if _item_team_members: + _items.append(_item_team_members.to_dict()) + _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() + # 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 + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TeamMembersResponse from a dict""" + if obj is None: + return None + + 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 + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "team_members": "(List[TeamMemberResponse],)", + "list_info": "(ListInfoResponse,)", + "warnings": "(List[WarningResponse],)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + "team_members", + "warnings", + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/team_parent_response.py b/sdks/python/dropbox_sign/models/team_parent_response.py new file mode 100644 index 000000000..e61fb4d2c --- /dev/null +++ b/sdks/python/dropbox_sign/models/team_parent_response.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class TeamParentResponse(BaseModel): + """ + Information about the parent team if a team has one, set to `null` otherwise. + """ # 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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TeamParentResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TeamParentResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "team_id": obj.get("team_id"), + "name": obj.get("name") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "team_id": "(str,)", + "name": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/team_remove_member_request.py b/sdks/python/dropbox_sign/models/team_remove_member_request.py new file mode 100644 index 000000000..e11765024 --- /dev/null +++ b/sdks/python/dropbox_sign/models/team_remove_member_request.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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') + 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')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TeamRemoveMemberRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TeamRemoveMemberRequest from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "account_id": "(str,)", + "email_address": "(str,)", + "new_owner_email_address": "(str,)", + "new_team_id": "(str,)", + "new_role": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/team_response.py b/sdks/python/dropbox_sign/models/team_response.py new file mode 100644 index 000000000..d7467e954 --- /dev/null +++ b/sdks/python/dropbox_sign/models/team_response.py @@ -0,0 +1,142 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from dropbox_sign.models.account_response import AccountResponse +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class TeamResponse(BaseModel): + """ + Contains information about your team and its members + """ # 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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TeamResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 + # 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 + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TeamResponse from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "name": "(str,)", + "accounts": "(List[AccountResponse],)", + "invited_accounts": "(List[AccountResponse],)", + "invited_emails": "(List[str],)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + "accounts", + "invited_accounts", + "invited_emails", + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/team_sub_teams_response.py b/sdks/python/dropbox_sign/models/team_sub_teams_response.py new file mode 100644 index 000000000..43f1c42be --- /dev/null +++ b/sdks/python/dropbox_sign/models/team_sub_teams_response.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from dropbox_sign.models.list_info_response import ListInfoResponse +from dropbox_sign.models.sub_team_response import SubTeamResponse +from dropbox_sign.models.warning_response import WarningResponse +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class TeamSubTeamsResponse(BaseModel): + """ + TeamSubTeamsResponse + """ # noqa: E501 + sub_teams: Optional[List[SubTeamResponse]] = Field(default=None, description="Contains a list with sub teams.") + list_info: Optional[ListInfoResponse] = None + warnings: Optional[List[WarningResponse]] = None + __properties: ClassVar[List[str]] = ["sub_teams", "list_info", "warnings"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TeamSubTeamsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in sub_teams (list) + _items = [] + if self.sub_teams: + for _item_sub_teams in self.sub_teams: + if _item_sub_teams: + _items.append(_item_sub_teams.to_dict()) + _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() + # 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 + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TeamSubTeamsResponse from a dict""" + if obj is None: + return None + + 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 + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "sub_teams": "(List[SubTeamResponse],)", + "list_info": "(ListInfoResponse,)", + "warnings": "(List[WarningResponse],)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + "sub_teams", + "warnings", + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/team_update_request.py b/sdks/python/dropbox_sign/models/team_update_request.py new file mode 100644 index 000000000..f30c01eae --- /dev/null +++ b/sdks/python/dropbox_sign/models/team_update_request.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class TeamUpdateRequest(BaseModel): + """ + TeamUpdateRequest + """ # noqa: E501 + name: Optional[StrictStr] = Field(default=None, description="The name of your Team.") + __properties: ClassVar[List[str]] = ["name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TeamUpdateRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TeamUpdateRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "name": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/template_add_user_request.py b/sdks/python/dropbox_sign/models/template_add_user_request.py new file mode 100644 index 000000000..1ac3e7c42 --- /dev/null +++ b/sdks/python/dropbox_sign/models/template_add_user_request.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TemplateAddUserRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TemplateAddUserRequest from a dict""" + if obj is None: + return None + + 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 + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "account_id": "(str,)", + "email_address": "(str,)", + "skip_notification": "(bool,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..10e039868 --- /dev/null +++ b/sdks/python/dropbox_sign/models/template_create_embedded_draft_request.py @@ -0,0 +1,253 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from dropbox_sign.models.sub_attachment import SubAttachment +from dropbox_sign.models.sub_editor_options import SubEditorOptions +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_merge_field import SubMergeField +from dropbox_sign.models.sub_template_role import SubTemplateRole +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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") + 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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TemplateCreateEmbeddedDraftRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 + # 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() + # 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() + # 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 + # 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 + # 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 + # 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 + # 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 + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TemplateCreateEmbeddedDraftRequest from a dict""" + if obj is None: + return None + + 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 + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "client_id": "(str,)", + "files": "(List[io.IOBase],)", + "file_urls": "(List[str],)", + "allow_ccs": "(bool,)", + "allow_reassign": "(bool,)", + "attachments": "(List[SubAttachment],)", + "cc_roles": "(List[str],)", + "editor_options": "(SubEditorOptions,)", + "field_options": "(SubFieldOptions,)", + "force_signer_roles": "(bool,)", + "force_subject_message": "(bool,)", + "form_field_groups": "(List[SubFormFieldGroup],)", + "form_field_rules": "(List[SubFormFieldRule],)", + "form_fields_per_document": "(List[SubFormFieldsPerDocumentBase],)", + "merge_fields": "(List[SubMergeField],)", + "message": "(str,)", + "metadata": "(Dict[str, object],)", + "show_preview": "(bool,)", + "show_progress_stepper": "(bool,)", + "signer_roles": "(List[SubTemplateRole],)", + "skip_me_now": "(bool,)", + "subject": "(str,)", + "test_mode": "(bool,)", + "title": "(str,)", + "use_preexisting_fields": "(bool,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + "files", + "file_urls", + "attachments", + "cc_roles", + "form_field_groups", + "form_field_rules", + "form_fields_per_document", + "merge_fields", + "signer_roles", + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..f46da8cf0 --- /dev/null +++ b/sdks/python/dropbox_sign/models/template_create_embedded_draft_response.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +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.warning_response import WarningResponse +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class TemplateCreateEmbeddedDraftResponse(BaseModel): + """ + TemplateCreateEmbeddedDraftResponse + """ # noqa: E501 + template: Optional[TemplateCreateEmbeddedDraftResponseTemplate] = None + warnings: Optional[List[WarningResponse]] = Field(default=None, description="A list of warnings.") + __properties: ClassVar[List[str]] = ["template", "warnings"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TemplateCreateEmbeddedDraftResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of template + if self.template: + _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 + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TemplateCreateEmbeddedDraftResponse from a dict""" + if obj is None: + return None + + 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 + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "template": "(TemplateCreateEmbeddedDraftResponseTemplate,)", + "warnings": "(List[WarningResponse],)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + "warnings", + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..dc845ed0d --- /dev/null +++ b/sdks/python/dropbox_sign/models/template_create_embedded_draft_response_template.py @@ -0,0 +1,133 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from dropbox_sign.models.warning_response import WarningResponse +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TemplateCreateEmbeddedDraftResponseTemplate from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TemplateCreateEmbeddedDraftResponseTemplate from a dict""" + if obj is None: + return None + + 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 + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "template_id": "(str,)", + "edit_url": "(str,)", + "expires_at": "(int,)", + "warnings": "(List[WarningResponse],)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + "warnings", + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/template_create_request.py b/sdks/python/dropbox_sign/models/template_create_request.py new file mode 100644 index 000000000..09f3c62a5 --- /dev/null +++ b/sdks/python/dropbox_sign/models/template_create_request.py @@ -0,0 +1,228 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from dropbox_sign.models.sub_attachment import SubAttachment +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_merge_field import SubMergeField +from dropbox_sign.models.sub_template_role import SubTemplateRole +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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.") + 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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TemplateCreateRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 + # 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 + # 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 + # 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() + # 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 + # 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 + # 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 + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TemplateCreateRequest from a dict""" + if obj is None: + return None + + 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 + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "form_fields_per_document": "(List[SubFormFieldsPerDocumentBase],)", + "signer_roles": "(List[SubTemplateRole],)", + "files": "(List[io.IOBase],)", + "file_urls": "(List[str],)", + "allow_reassign": "(bool,)", + "attachments": "(List[SubAttachment],)", + "cc_roles": "(List[str],)", + "client_id": "(str,)", + "field_options": "(SubFieldOptions,)", + "form_field_groups": "(List[SubFormFieldGroup],)", + "form_field_rules": "(List[SubFormFieldRule],)", + "merge_fields": "(List[SubMergeField],)", + "message": "(str,)", + "metadata": "(Dict[str, object],)", + "subject": "(str,)", + "test_mode": "(bool,)", + "title": "(str,)", + "use_preexisting_fields": "(bool,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + "form_fields_per_document", + "signer_roles", + "files", + "file_urls", + "attachments", + "cc_roles", + "form_field_groups", + "form_field_rules", + "merge_fields", + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/template_create_response.py b/sdks/python/dropbox_sign/models/template_create_response.py new file mode 100644 index 000000000..6990df31c --- /dev/null +++ b/sdks/python/dropbox_sign/models/template_create_response.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +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.warning_response import WarningResponse +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class TemplateCreateResponse(BaseModel): + """ + TemplateCreateResponse + """ # noqa: E501 + template: Optional[TemplateCreateResponseTemplate] = None + warnings: Optional[List[WarningResponse]] = Field(default=None, description="A list of warnings.") + __properties: ClassVar[List[str]] = ["template", "warnings"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TemplateCreateResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of template + if self.template: + _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 + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TemplateCreateResponse from a dict""" + if obj is None: + return None + + 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 + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "template": "(TemplateCreateResponseTemplate,)", + "warnings": "(List[WarningResponse],)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + "warnings", + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/template_create_response_template.py b/sdks/python/dropbox_sign/models/template_create_response_template.py new file mode 100644 index 000000000..4b2e1b424 --- /dev/null +++ b/sdks/python/dropbox_sign/models/template_create_response_template.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class TemplateCreateResponseTemplate(BaseModel): + """ + Template object with parameters: `template_id`. + """ # noqa: E501 + template_id: Optional[StrictStr] = Field(default=None, description="The id of the Template.") + __properties: ClassVar[List[str]] = ["template_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TemplateCreateResponseTemplate from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TemplateCreateResponseTemplate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "template_id": obj.get("template_id") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "template_id": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/template_edit_response.py b/sdks/python/dropbox_sign/models/template_edit_response.py new file mode 100644 index 000000000..fcdd1c364 --- /dev/null +++ b/sdks/python/dropbox_sign/models/template_edit_response.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class TemplateEditResponse(BaseModel): + """ + TemplateEditResponse + """ # noqa: E501 + template_id: Optional[StrictStr] = Field(default=None, description="The id of the Template.") + __properties: ClassVar[List[str]] = ["template_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TemplateEditResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TemplateEditResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "template_id": obj.get("template_id") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "template_id": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/template_get_response.py b/sdks/python/dropbox_sign/models/template_get_response.py new file mode 100644 index 000000000..48cfdf091 --- /dev/null +++ b/sdks/python/dropbox_sign/models/template_get_response.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from dropbox_sign.models.template_response import TemplateResponse +from dropbox_sign.models.warning_response import WarningResponse +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class TemplateGetResponse(BaseModel): + """ + TemplateGetResponse + """ # noqa: E501 + template: Optional[TemplateResponse] = None + warnings: Optional[List[WarningResponse]] = Field(default=None, description="A list of warnings.") + __properties: ClassVar[List[str]] = ["template", "warnings"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TemplateGetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of template + if self.template: + _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 + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TemplateGetResponse from a dict""" + if obj is None: + return None + + 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 + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "template": "(TemplateResponse,)", + "warnings": "(List[WarningResponse],)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + "warnings", + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/template_list_response.py b/sdks/python/dropbox_sign/models/template_list_response.py new file mode 100644 index 000000000..b69461a44 --- /dev/null +++ b/sdks/python/dropbox_sign/models/template_list_response.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from dropbox_sign.models.list_info_response import ListInfoResponse +from dropbox_sign.models.template_response import TemplateResponse +from dropbox_sign.models.warning_response import WarningResponse +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class TemplateListResponse(BaseModel): + """ + TemplateListResponse + """ # noqa: E501 + templates: Optional[List[TemplateResponse]] = Field(default=None, description="List of templates that the API caller has access to.") + list_info: Optional[ListInfoResponse] = None + warnings: Optional[List[WarningResponse]] = Field(default=None, description="A list of warnings.") + __properties: ClassVar[List[str]] = ["templates", "list_info", "warnings"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TemplateListResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in templates (list) + _items = [] + if self.templates: + for _item_templates in self.templates: + if _item_templates: + _items.append(_item_templates.to_dict()) + _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() + # 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 + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TemplateListResponse from a dict""" + if obj is None: + return None + + 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 + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "templates": "(List[TemplateResponse],)", + "list_info": "(ListInfoResponse,)", + "warnings": "(List[WarningResponse],)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + "templates", + "warnings", + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/template_remove_user_request.py b/sdks/python/dropbox_sign/models/template_remove_user_request.py new file mode 100644 index 000000000..5371e565f --- /dev/null +++ b/sdks/python/dropbox_sign/models/template_remove_user_request.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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.") + __properties: ClassVar[List[str]] = ["account_id", "email_address"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TemplateRemoveUserRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TemplateRemoveUserRequest from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "account_id": "(str,)", + "email_address": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/template_response.py b/sdks/python/dropbox_sign/models/template_response.py new file mode 100644 index 000000000..96d680e0b --- /dev/null +++ b/sdks/python/dropbox_sign/models/template_response.py @@ -0,0 +1,246 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +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_signer_role import TemplateResponseSignerRole +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TemplateResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 + # 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 + # 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 + # 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 + # 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 + # 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 + # set to None if is_embedded (nullable) is None + # and model_fields_set contains the field + if self.is_embedded is None and "is_embedded" in self.model_fields_set: + _dict['is_embedded'] = None + + # set to None if is_creator (nullable) is None + # and model_fields_set contains the field + if self.is_creator is None and "is_creator" in self.model_fields_set: + _dict['is_creator'] = None + + # set to None if can_edit (nullable) is None + # and model_fields_set contains the field + if self.can_edit is None and "can_edit" in self.model_fields_set: + _dict['can_edit'] = None + + # set to None if is_locked (nullable) is None + # and model_fields_set contains the field + if self.is_locked is None and "is_locked" in self.model_fields_set: + _dict['is_locked'] = None + + # set to None if custom_fields (nullable) is None + # and model_fields_set contains the field + if self.custom_fields is None and "custom_fields" in self.model_fields_set: + _dict['custom_fields'] = None + + # set to None if named_form_fields (nullable) is None + # and model_fields_set contains the field + if self.named_form_fields is None and "named_form_fields" in self.model_fields_set: + _dict['named_form_fields'] = None + + # set to None if accounts (nullable) is None + # and model_fields_set contains the field + if self.accounts is None and "accounts" in self.model_fields_set: + _dict['accounts'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TemplateResponse from a dict""" + if obj is None: + return None + + 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 + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "template_id": "(str,)", + "title": "(str,)", + "message": "(str,)", + "updated_at": "(int,)", + "is_embedded": "(bool,)", + "is_creator": "(bool,)", + "can_edit": "(bool,)", + "is_locked": "(bool,)", + "metadata": "(object,)", + "signer_roles": "(List[TemplateResponseSignerRole],)", + "cc_roles": "(List[TemplateResponseCCRole],)", + "documents": "(List[TemplateResponseDocument],)", + "custom_fields": "(List[TemplateResponseDocumentCustomFieldBase],)", + "named_form_fields": "(List[TemplateResponseDocumentFormFieldBase],)", + "accounts": "(List[TemplateResponseAccount],)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + "signer_roles", + "cc_roles", + "documents", + "custom_fields", + "named_form_fields", + "accounts", + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/template_response_account.py b/sdks/python/dropbox_sign/models/template_response_account.py new file mode 100644 index 000000000..6e7f7dfb7 --- /dev/null +++ b/sdks/python/dropbox_sign/models/template_response_account.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +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 typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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.") + quotas: Optional[TemplateResponseAccountQuota] = None + __properties: ClassVar[List[str]] = ["account_id", "email_address", "is_locked", "is_paid_hs", "is_paid_hf", "quotas"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TemplateResponseAccount from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of quotas + if self.quotas: + _dict['quotas'] = self.quotas.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TemplateResponseAccount from a dict""" + if obj is None: + return None + + 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 + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "account_id": "(str,)", + "email_address": "(str,)", + "is_locked": "(bool,)", + "is_paid_hs": "(bool,)", + "is_paid_hf": "(bool,)", + "quotas": "(TemplateResponseAccountQuota,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/template_response_account_quota.py b/sdks/python/dropbox_sign/models/template_response_account_quota.py new file mode 100644 index 000000000..d4b6bb1da --- /dev/null +++ b/sdks/python/dropbox_sign/models/template_response_account_quota.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TemplateResponseAccountQuota from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TemplateResponseAccountQuota from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "templates_left": "(int,)", + "api_signature_requests_left": "(int,)", + "documents_left": "(int,)", + "sms_verifications_left": "(int,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/template_response_cc_role.py b/sdks/python/dropbox_sign/models/template_response_cc_role.py new file mode 100644 index 000000000..d3a6a6f9b --- /dev/null +++ b/sdks/python/dropbox_sign/models/template_response_cc_role.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class TemplateResponseCCRole(BaseModel): + """ + TemplateResponseCCRole + """ # noqa: E501 + name: Optional[StrictStr] = Field(default=None, description="The name of the Role.") + __properties: ClassVar[List[str]] = ["name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TemplateResponseCCRole from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TemplateResponseCCRole from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "name": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/template_response_document.py b/sdks/python/dropbox_sign/models/template_response_document.py new file mode 100644 index 000000000..16caa7149 --- /dev/null +++ b/sdks/python/dropbox_sign/models/template_response_document.py @@ -0,0 +1,171 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +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 typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TemplateResponseDocument from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in field_groups (list) + _items = [] + if self.field_groups: + for _item_field_groups in self.field_groups: + if _item_field_groups: + _items.append(_item_field_groups.to_dict()) + _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 + # 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 + # 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 + # set to None if static_fields (nullable) is None + # and model_fields_set contains the field + if self.static_fields is None and "static_fields" in self.model_fields_set: + _dict['static_fields'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TemplateResponseDocument from a dict""" + if obj is None: + return None + + 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 + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "name": "(str,)", + "index": "(int,)", + "field_groups": "(List[TemplateResponseDocumentFieldGroup],)", + "form_fields": "(List[TemplateResponseDocumentFormFieldBase],)", + "custom_fields": "(List[TemplateResponseDocumentCustomFieldBase],)", + "static_fields": "(List[TemplateResponseDocumentStaticFieldBase],)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + "field_groups", + "form_fields", + "custom_fields", + "static_fields", + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..b7cb21a56 --- /dev/null +++ b/sdks/python/dropbox_sign/models/template_response_document_custom_field_base.py @@ -0,0 +1,160 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from importlib import import_module +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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 + +class TemplateResponseDocumentCustomFieldBase(BaseModel): + """ + An array of Form Field objects containing the name and type of each named field. + """ # 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: Optional[StrictStr] = Field(default=None, 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, + validate_assignment=True, + protected_namespaces=(), + ) + + + # JSON field name that stores the object type + __discriminator_property_name: ClassVar[str] = 'type' + + # discriminator mappings + __discriminator_value_class_map: ClassVar[Dict[str, str]] = { + 'checkbox': 'TemplateResponseDocumentCustomFieldCheckbox','text': 'TemplateResponseDocumentCustomFieldText' + } + + @classmethod + def get_discriminator_value(cls, obj: Dict[str, Any]) -> Optional[str]: + """Returns the discriminator value (object type) of the data""" + discriminator_value = obj[cls.__discriminator_property_name] + if discriminator_value: + return cls.__discriminator_value_class_map.get(discriminator_value) + else: + return None + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + 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)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if signer (nullable) is None + # and model_fields_set contains the field + if self.signer is None and "signer" in self.model_fields_set: + _dict['signer'] = None + + # set to None if group (nullable) is None + # and model_fields_set contains the field + if self.group is None and "group" in self.model_fields_set: + _dict['group'] = None + + return _dict + + @classmethod + 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)) + + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "type": "(str,)", + "api_id": "(str,)", + "name": "(str,)", + "signer": "(str,)", + "x": "(int,)", + "y": "(int,)", + "width": "(int,)", + "height": "(int,)", + "required": "(bool,)", + "group": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..c1c930015 --- /dev/null +++ b/sdks/python/dropbox_sign/models/template_response_document_custom_field_checkbox.py @@ -0,0 +1,144 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +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 typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TemplateResponseDocumentCustomFieldCheckbox from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if signer (nullable) is None + # and model_fields_set contains the field + if self.signer is None and "signer" in self.model_fields_set: + _dict['signer'] = None + + # set to None if group (nullable) is None + # and model_fields_set contains the field + if self.group is None and "group" in self.model_fields_set: + _dict['group'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TemplateResponseDocumentCustomFieldCheckbox from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "type": "(str,)", + "api_id": "(str,)", + "name": "(str,)", + "signer": "(str,)", + "x": "(int,)", + "y": "(int,)", + "width": "(int,)", + "height": "(int,)", + "required": "(bool,)", + "group": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..ebe65e6e1 --- /dev/null +++ b/sdks/python/dropbox_sign/models/template_response_document_custom_field_text.py @@ -0,0 +1,160 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +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 typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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`") + 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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TemplateResponseDocumentCustomFieldText from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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() + # set to None if signer (nullable) is None + # and model_fields_set contains the field + if self.signer is None and "signer" in self.model_fields_set: + _dict['signer'] = None + + # set to None if group (nullable) is None + # and model_fields_set contains the field + if self.group is None and "group" in self.model_fields_set: + _dict['group'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TemplateResponseDocumentCustomFieldText from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "type": "(str,)", + "avg_text_length": "(TemplateResponseFieldAvgTextLength,)", + "is_multiline": "(bool,)", + "original_font_size": "(int,)", + "font_family": "(str,)", + "api_id": "(str,)", + "name": "(str,)", + "signer": "(str,)", + "x": "(int,)", + "y": "(int,)", + "width": "(int,)", + "height": "(int,)", + "required": "(bool,)", + "group": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..e37cc7f08 --- /dev/null +++ b/sdks/python/dropbox_sign/models/template_response_document_field_group.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +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 typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class TemplateResponseDocumentFieldGroup(BaseModel): + """ + TemplateResponseDocumentFieldGroup + """ # 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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TemplateResponseDocumentFieldGroup from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of rule + if self.rule: + _dict['rule'] = self.rule.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TemplateResponseDocumentFieldGroup from a dict""" + if obj is None: + return None + + 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 + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "name": "(str,)", + "rule": "(TemplateResponseDocumentFieldGroupRule,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..9edef01c6 --- /dev/null +++ b/sdks/python/dropbox_sign/models/template_response_document_field_group_rule.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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") + __properties: ClassVar[List[str]] = ["requirement", "groupLabel"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TemplateResponseDocumentFieldGroupRule from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TemplateResponseDocumentFieldGroupRule from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "requirement": obj.get("requirement"), + "groupLabel": obj.get("groupLabel") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "requirement": "(str,)", + "group_label": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..0e0d13d0a --- /dev/null +++ b/sdks/python/dropbox_sign/models/template_response_document_form_field_base.py @@ -0,0 +1,173 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from importlib import import_module +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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 + +class TemplateResponseDocumentFormFieldBase(BaseModel): + """ + An array of Form Field objects containing the name and type of each named field. + """ # 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: Optional[StrictStr] = Field(default=None, 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, + validate_assignment=True, + protected_namespaces=(), + ) + + + # JSON field name that stores the object 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' + } + + @classmethod + def get_discriminator_value(cls, obj: Dict[str, Any]) -> Optional[str]: + """Returns the discriminator value (object type) of the data""" + discriminator_value = obj[cls.__discriminator_property_name] + if discriminator_value: + return cls.__discriminator_value_class_map.get(discriminator_value) + else: + return None + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + 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)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if group (nullable) is None + # and model_fields_set contains the field + if self.group is None and "group" in self.model_fields_set: + _dict['group'] = None + + return _dict + + @classmethod + 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)) + + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "type": "(str,)", + "api_id": "(str,)", + "name": "(str,)", + "signer": "(str,)", + "x": "(int,)", + "y": "(int,)", + "width": "(int,)", + "height": "(int,)", + "required": "(bool,)", + "group": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..7c4c7f083 --- /dev/null +++ b/sdks/python/dropbox_sign/models/template_response_document_form_field_checkbox.py @@ -0,0 +1,139 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +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 typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TemplateResponseDocumentFormFieldCheckbox from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if group (nullable) is None + # and model_fields_set contains the field + if self.group is None and "group" in self.model_fields_set: + _dict['group'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TemplateResponseDocumentFormFieldCheckbox from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "type": "(str,)", + "api_id": "(str,)", + "name": "(str,)", + "signer": "(str,)", + "x": "(int,)", + "y": "(int,)", + "width": "(int,)", + "height": "(int,)", + "required": "(bool,)", + "group": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..2ed1a56b7 --- /dev/null +++ b/sdks/python/dropbox_sign/models/template_response_document_form_field_date_signed.py @@ -0,0 +1,139 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +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 typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TemplateResponseDocumentFormFieldDateSigned from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if group (nullable) is None + # and model_fields_set contains the field + if self.group is None and "group" in self.model_fields_set: + _dict['group'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TemplateResponseDocumentFormFieldDateSigned from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "type": "(str,)", + "api_id": "(str,)", + "name": "(str,)", + "signer": "(str,)", + "x": "(int,)", + "y": "(int,)", + "width": "(int,)", + "height": "(int,)", + "required": "(bool,)", + "group": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..b72f40cba --- /dev/null +++ b/sdks/python/dropbox_sign/models/template_response_document_form_field_dropdown.py @@ -0,0 +1,139 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +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 typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TemplateResponseDocumentFormFieldDropdown from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if group (nullable) is None + # and model_fields_set contains the field + if self.group is None and "group" in self.model_fields_set: + _dict['group'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TemplateResponseDocumentFormFieldDropdown from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "type": "(str,)", + "api_id": "(str,)", + "name": "(str,)", + "signer": "(str,)", + "x": "(int,)", + "y": "(int,)", + "width": "(int,)", + "height": "(int,)", + "required": "(bool,)", + "group": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..8ff5ffb8d --- /dev/null +++ b/sdks/python/dropbox_sign/models/template_response_document_form_field_hyperlink.py @@ -0,0 +1,155 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +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 typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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`") + 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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TemplateResponseDocumentFormFieldHyperlink from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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() + # set to None if group (nullable) is None + # and model_fields_set contains the field + if self.group is None and "group" in self.model_fields_set: + _dict['group'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TemplateResponseDocumentFormFieldHyperlink from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "type": "(str,)", + "avg_text_length": "(TemplateResponseFieldAvgTextLength,)", + "is_multiline": "(bool,)", + "original_font_size": "(int,)", + "font_family": "(str,)", + "api_id": "(str,)", + "name": "(str,)", + "signer": "(str,)", + "x": "(int,)", + "y": "(int,)", + "width": "(int,)", + "height": "(int,)", + "required": "(bool,)", + "group": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..5743cfe3c --- /dev/null +++ b/sdks/python/dropbox_sign/models/template_response_document_form_field_initials.py @@ -0,0 +1,139 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +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 typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TemplateResponseDocumentFormFieldInitials from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if group (nullable) is None + # and model_fields_set contains the field + if self.group is None and "group" in self.model_fields_set: + _dict['group'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TemplateResponseDocumentFormFieldInitials from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "type": "(str,)", + "api_id": "(str,)", + "name": "(str,)", + "signer": "(str,)", + "x": "(int,)", + "y": "(int,)", + "width": "(int,)", + "height": "(int,)", + "required": "(bool,)", + "group": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..559d22d62 --- /dev/null +++ b/sdks/python/dropbox_sign/models/template_response_document_form_field_radio.py @@ -0,0 +1,139 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +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 typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TemplateResponseDocumentFormFieldRadio from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if group (nullable) is None + # and model_fields_set contains the field + if self.group is None and "group" in self.model_fields_set: + _dict['group'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TemplateResponseDocumentFormFieldRadio from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "type": "(str,)", + "group": "(str,)", + "api_id": "(str,)", + "name": "(str,)", + "signer": "(str,)", + "x": "(int,)", + "y": "(int,)", + "width": "(int,)", + "height": "(int,)", + "required": "(bool,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..bd78200dc --- /dev/null +++ b/sdks/python/dropbox_sign/models/template_response_document_form_field_signature.py @@ -0,0 +1,139 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +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 typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TemplateResponseDocumentFormFieldSignature from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if group (nullable) is None + # and model_fields_set contains the field + if self.group is None and "group" in self.model_fields_set: + _dict['group'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TemplateResponseDocumentFormFieldSignature from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "type": "(str,)", + "api_id": "(str,)", + "name": "(str,)", + "signer": "(str,)", + "x": "(int,)", + "y": "(int,)", + "width": "(int,)", + "height": "(int,)", + "required": "(bool,)", + "group": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..e2ea3ffaa --- /dev/null +++ b/sdks/python/dropbox_sign/models/template_response_document_form_field_text.py @@ -0,0 +1,173 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +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 typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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"] + + @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')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TemplateResponseDocumentFormFieldText from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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() + # set to None if group (nullable) is None + # and model_fields_set contains the field + if self.group is None and "group" in self.model_fields_set: + _dict['group'] = None + + # set to None if validation_type (nullable) is None + # and model_fields_set contains the field + if self.validation_type is None and "validation_type" in self.model_fields_set: + _dict['validation_type'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TemplateResponseDocumentFormFieldText from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "type": "(str,)", + "avg_text_length": "(TemplateResponseFieldAvgTextLength,)", + "is_multiline": "(bool,)", + "original_font_size": "(int,)", + "font_family": "(str,)", + "validation_type": "(str,)", + "api_id": "(str,)", + "name": "(str,)", + "signer": "(str,)", + "x": "(int,)", + "y": "(int,)", + "width": "(int,)", + "height": "(int,)", + "required": "(bool,)", + "group": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..b2fbc96b5 --- /dev/null +++ b/sdks/python/dropbox_sign/models/template_response_document_static_field_base.py @@ -0,0 +1,173 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from importlib import import_module +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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 + +class TemplateResponseDocumentStaticFieldBase(BaseModel): + """ + An array describing static overlay fields. **NOTE:** Only available for certain subscriptions. + """ # 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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + # JSON field name that stores the object 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' + } + + @classmethod + def get_discriminator_value(cls, obj: Dict[str, Any]) -> Optional[str]: + """Returns the discriminator value (object type) of the data""" + discriminator_value = obj[cls.__discriminator_property_name] + if discriminator_value: + return cls.__discriminator_value_class_map.get(discriminator_value) + else: + return None + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + 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)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if group (nullable) is None + # and model_fields_set contains the field + if self.group is None and "group" in self.model_fields_set: + _dict['group'] = None + + return _dict + + @classmethod + 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)) + + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "type": "(str,)", + "api_id": "(str,)", + "name": "(str,)", + "signer": "(str,)", + "x": "(int,)", + "y": "(int,)", + "width": "(int,)", + "height": "(int,)", + "required": "(bool,)", + "group": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..9c265f41c --- /dev/null +++ b/sdks/python/dropbox_sign/models/template_response_document_static_field_checkbox.py @@ -0,0 +1,139 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +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 typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TemplateResponseDocumentStaticFieldCheckbox from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if group (nullable) is None + # and model_fields_set contains the field + if self.group is None and "group" in self.model_fields_set: + _dict['group'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TemplateResponseDocumentStaticFieldCheckbox from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "type": "(str,)", + "api_id": "(str,)", + "name": "(str,)", + "signer": "(str,)", + "x": "(int,)", + "y": "(int,)", + "width": "(int,)", + "height": "(int,)", + "required": "(bool,)", + "group": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..8173416f4 --- /dev/null +++ b/sdks/python/dropbox_sign/models/template_response_document_static_field_date_signed.py @@ -0,0 +1,139 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +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 typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TemplateResponseDocumentStaticFieldDateSigned from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if group (nullable) is None + # and model_fields_set contains the field + if self.group is None and "group" in self.model_fields_set: + _dict['group'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TemplateResponseDocumentStaticFieldDateSigned from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "type": "(str,)", + "api_id": "(str,)", + "name": "(str,)", + "signer": "(str,)", + "x": "(int,)", + "y": "(int,)", + "width": "(int,)", + "height": "(int,)", + "required": "(bool,)", + "group": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..e02a3465f --- /dev/null +++ b/sdks/python/dropbox_sign/models/template_response_document_static_field_dropdown.py @@ -0,0 +1,139 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +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 typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TemplateResponseDocumentStaticFieldDropdown from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if group (nullable) is None + # and model_fields_set contains the field + if self.group is None and "group" in self.model_fields_set: + _dict['group'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TemplateResponseDocumentStaticFieldDropdown from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "type": "(str,)", + "api_id": "(str,)", + "name": "(str,)", + "signer": "(str,)", + "x": "(int,)", + "y": "(int,)", + "width": "(int,)", + "height": "(int,)", + "required": "(bool,)", + "group": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..d72e743a8 --- /dev/null +++ b/sdks/python/dropbox_sign/models/template_response_document_static_field_hyperlink.py @@ -0,0 +1,139 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +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 typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TemplateResponseDocumentStaticFieldHyperlink from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if group (nullable) is None + # and model_fields_set contains the field + if self.group is None and "group" in self.model_fields_set: + _dict['group'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TemplateResponseDocumentStaticFieldHyperlink from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "type": "(str,)", + "api_id": "(str,)", + "name": "(str,)", + "signer": "(str,)", + "x": "(int,)", + "y": "(int,)", + "width": "(int,)", + "height": "(int,)", + "required": "(bool,)", + "group": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..9509a8949 --- /dev/null +++ b/sdks/python/dropbox_sign/models/template_response_document_static_field_initials.py @@ -0,0 +1,139 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +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 typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TemplateResponseDocumentStaticFieldInitials from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if group (nullable) is None + # and model_fields_set contains the field + if self.group is None and "group" in self.model_fields_set: + _dict['group'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TemplateResponseDocumentStaticFieldInitials from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "type": "(str,)", + "api_id": "(str,)", + "name": "(str,)", + "signer": "(str,)", + "x": "(int,)", + "y": "(int,)", + "width": "(int,)", + "height": "(int,)", + "required": "(bool,)", + "group": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..b1c697bdc --- /dev/null +++ b/sdks/python/dropbox_sign/models/template_response_document_static_field_radio.py @@ -0,0 +1,139 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +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 typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TemplateResponseDocumentStaticFieldRadio from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if group (nullable) is None + # and model_fields_set contains the field + if self.group is None and "group" in self.model_fields_set: + _dict['group'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TemplateResponseDocumentStaticFieldRadio from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "type": "(str,)", + "api_id": "(str,)", + "name": "(str,)", + "signer": "(str,)", + "x": "(int,)", + "y": "(int,)", + "width": "(int,)", + "height": "(int,)", + "required": "(bool,)", + "group": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..87c40f6b2 --- /dev/null +++ b/sdks/python/dropbox_sign/models/template_response_document_static_field_signature.py @@ -0,0 +1,139 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +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 typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TemplateResponseDocumentStaticFieldSignature from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if group (nullable) is None + # and model_fields_set contains the field + if self.group is None and "group" in self.model_fields_set: + _dict['group'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TemplateResponseDocumentStaticFieldSignature from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "type": "(str,)", + "api_id": "(str,)", + "name": "(str,)", + "signer": "(str,)", + "x": "(int,)", + "y": "(int,)", + "width": "(int,)", + "height": "(int,)", + "required": "(bool,)", + "group": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..35c83d653 --- /dev/null +++ b/sdks/python/dropbox_sign/models/template_response_document_static_field_text.py @@ -0,0 +1,139 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +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 typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TemplateResponseDocumentStaticFieldText from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if group (nullable) is None + # and model_fields_set contains the field + if self.group is None and "group" in self.model_fields_set: + _dict['group'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TemplateResponseDocumentStaticFieldText from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "type": "(str,)", + "api_id": "(str,)", + "name": "(str,)", + "signer": "(str,)", + "x": "(int,)", + "y": "(int,)", + "width": "(int,)", + "height": "(int,)", + "required": "(bool,)", + "group": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..35ea8a659 --- /dev/null +++ b/sdks/python/dropbox_sign/models/template_response_field_avg_text_length.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class TemplateResponseFieldAvgTextLength(BaseModel): + """ + Average text length in this field. + """ # 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.") + __properties: ClassVar[List[str]] = ["num_lines", "num_chars_per_line"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TemplateResponseFieldAvgTextLength from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TemplateResponseFieldAvgTextLength from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "num_lines": "(int,)", + "num_chars_per_line": "(int,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/template_response_signer_role.py b/sdks/python/dropbox_sign/models/template_response_signer_role.py new file mode 100644 index 000000000..3d874d174 --- /dev/null +++ b/sdks/python/dropbox_sign/models/template_response_signer_role.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class TemplateResponseSignerRole(BaseModel): + """ + TemplateResponseSignerRole + """ # 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.") + __properties: ClassVar[List[str]] = ["name", "order"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TemplateResponseSignerRole from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TemplateResponseSignerRole from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "order": obj.get("order") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "name": "(str,)", + "order": "(int,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/template_update_files_request.py b/sdks/python/dropbox_sign/models/template_update_files_request.py new file mode 100644 index 000000000..025f5c44f --- /dev/null +++ b/sdks/python/dropbox_sign/models/template_update_files_request.py @@ -0,0 +1,133 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TemplateUpdateFilesRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TemplateUpdateFilesRequest from a dict""" + if obj is None: + return None + + 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 + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "client_id": "(str,)", + "files": "(List[io.IOBase],)", + "file_urls": "(List[str],)", + "message": "(str,)", + "subject": "(str,)", + "test_mode": "(bool,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + "files", + "file_urls", + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/template_update_files_response.py b/sdks/python/dropbox_sign/models/template_update_files_response.py new file mode 100644 index 000000000..30aa99fd9 --- /dev/null +++ b/sdks/python/dropbox_sign/models/template_update_files_response.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from dropbox_sign.models.template_update_files_response_template import TemplateUpdateFilesResponseTemplate +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class TemplateUpdateFilesResponse(BaseModel): + """ + TemplateUpdateFilesResponse + """ # noqa: E501 + template: Optional[TemplateUpdateFilesResponseTemplate] = None + __properties: ClassVar[List[str]] = ["template"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TemplateUpdateFilesResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of template + if self.template: + _dict['template'] = self.template.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TemplateUpdateFilesResponse from a dict""" + if obj is None: + return None + + 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 + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "template": "(TemplateUpdateFilesResponseTemplate,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..2415503e6 --- /dev/null +++ b/sdks/python/dropbox_sign/models/template_update_files_response_template.py @@ -0,0 +1,127 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from dropbox_sign.models.warning_response import WarningResponse +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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.") + __properties: ClassVar[List[str]] = ["template_id", "warnings"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TemplateUpdateFilesResponseTemplate from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TemplateUpdateFilesResponseTemplate from a dict""" + if obj is None: + return None + + 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 + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "template_id": "(str,)", + "warnings": "(List[WarningResponse],)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + "warnings", + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..9d6f9dedf --- /dev/null +++ b/sdks/python/dropbox_sign/models/unclaimed_draft_create_embedded_request.py @@ -0,0 +1,305 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +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 +from dropbox_sign.models.sub_custom_field import SubCustomField +from dropbox_sign.models.sub_editor_options import SubEditorOptions +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_signing_options import SubSigningOptions +from dropbox_sign.models.sub_unclaimed_draft_signer import SubUnclaimedDraftSigner +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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.") + 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.") + 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"] + + @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')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UnclaimedDraftCreateEmbeddedRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 + # 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 + # 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() + # 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() + # 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 + # 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 + # 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 + # 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 + # 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() + # set to None if expires_at (nullable) is None + # and model_fields_set contains the field + if self.expires_at is None and "expires_at" in self.model_fields_set: + _dict['expires_at'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UnclaimedDraftCreateEmbeddedRequest from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "client_id": "(str,)", + "requester_email_address": "(str,)", + "files": "(List[io.IOBase],)", + "file_urls": "(List[str],)", + "allow_ccs": "(bool,)", + "allow_decline": "(bool,)", + "allow_reassign": "(bool,)", + "attachments": "(List[SubAttachment],)", + "cc_email_addresses": "(List[str],)", + "custom_fields": "(List[SubCustomField],)", + "editor_options": "(SubEditorOptions,)", + "field_options": "(SubFieldOptions,)", + "force_signer_page": "(bool,)", + "force_subject_message": "(bool,)", + "form_field_groups": "(List[SubFormFieldGroup],)", + "form_field_rules": "(List[SubFormFieldRule],)", + "form_fields_per_document": "(List[SubFormFieldsPerDocumentBase],)", + "hide_text_tags": "(bool,)", + "hold_request": "(bool,)", + "is_for_embedded_signing": "(bool,)", + "message": "(str,)", + "metadata": "(Dict[str, object],)", + "requesting_redirect_url": "(str,)", + "show_preview": "(bool,)", + "show_progress_stepper": "(bool,)", + "signers": "(List[SubUnclaimedDraftSigner],)", + "signing_options": "(SubSigningOptions,)", + "signing_redirect_url": "(str,)", + "skip_me_now": "(bool,)", + "subject": "(str,)", + "test_mode": "(bool,)", + "type": "(str,)", + "use_preexisting_fields": "(bool,)", + "use_text_tags": "(bool,)", + "populate_auto_fill_fields": "(bool,)", + "expires_at": "(int,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + "files", + "file_urls", + "attachments", + "cc_email_addresses", + "custom_fields", + "form_field_groups", + "form_field_rules", + "form_fields_per_document", + "signers", + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..31d9757a1 --- /dev/null +++ b/sdks/python/dropbox_sign/models/unclaimed_draft_create_embedded_with_template_request.py @@ -0,0 +1,245 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +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_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 typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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.") + 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.") + 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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UnclaimedDraftCreateEmbeddedWithTemplateRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 + # 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 + # 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() + # 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() + # 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 + # 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() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UnclaimedDraftCreateEmbeddedWithTemplateRequest from a dict""" + if obj is None: + return None + + 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 + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "client_id": "(str,)", + "requester_email_address": "(str,)", + "template_ids": "(List[str],)", + "allow_decline": "(bool,)", + "allow_reassign": "(bool,)", + "ccs": "(List[SubCC],)", + "custom_fields": "(List[SubCustomField],)", + "editor_options": "(SubEditorOptions,)", + "field_options": "(SubFieldOptions,)", + "files": "(List[io.IOBase],)", + "file_urls": "(List[str],)", + "force_signer_roles": "(bool,)", + "force_subject_message": "(bool,)", + "hold_request": "(bool,)", + "is_for_embedded_signing": "(bool,)", + "message": "(str,)", + "metadata": "(Dict[str, object],)", + "preview_only": "(bool,)", + "requesting_redirect_url": "(str,)", + "show_preview": "(bool,)", + "show_progress_stepper": "(bool,)", + "signers": "(List[SubUnclaimedDraftTemplateSigner],)", + "signing_options": "(SubSigningOptions,)", + "signing_redirect_url": "(str,)", + "skip_me_now": "(bool,)", + "subject": "(str,)", + "test_mode": "(bool,)", + "title": "(str,)", + "populate_auto_fill_fields": "(bool,)", + "allow_ccs": "(bool,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + "template_ids", + "ccs", + "custom_fields", + "files", + "file_urls", + "signers", + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/unclaimed_draft_create_request.py b/sdks/python/dropbox_sign/models/unclaimed_draft_create_request.py new file mode 100644 index 000000000..ce8f02175 --- /dev/null +++ b/sdks/python/dropbox_sign/models/unclaimed_draft_create_request.py @@ -0,0 +1,262 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +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 +from dropbox_sign.models.sub_custom_field import SubCustomField +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_signing_options import SubSigningOptions +from dropbox_sign.models.sub_unclaimed_draft_signer import SubUnclaimedDraftSigner +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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.") + 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.") + 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"] + + @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')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UnclaimedDraftCreateRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 + # 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 + # 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() + # 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 + # 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 + # 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 + # 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 + # 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() + # set to None if expires_at (nullable) is None + # and model_fields_set contains the field + if self.expires_at is None and "expires_at" in self.model_fields_set: + _dict['expires_at'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UnclaimedDraftCreateRequest from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "type": "(str,)", + "files": "(List[io.IOBase],)", + "file_urls": "(List[str],)", + "allow_decline": "(bool,)", + "attachments": "(List[SubAttachment],)", + "cc_email_addresses": "(List[str],)", + "client_id": "(str,)", + "custom_fields": "(List[SubCustomField],)", + "field_options": "(SubFieldOptions,)", + "form_field_groups": "(List[SubFormFieldGroup],)", + "form_field_rules": "(List[SubFormFieldRule],)", + "form_fields_per_document": "(List[SubFormFieldsPerDocumentBase],)", + "hide_text_tags": "(bool,)", + "message": "(str,)", + "metadata": "(Dict[str, object],)", + "show_progress_stepper": "(bool,)", + "signers": "(List[SubUnclaimedDraftSigner],)", + "signing_options": "(SubSigningOptions,)", + "signing_redirect_url": "(str,)", + "subject": "(str,)", + "test_mode": "(bool,)", + "use_preexisting_fields": "(bool,)", + "use_text_tags": "(bool,)", + "expires_at": "(int,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + "files", + "file_urls", + "attachments", + "cc_email_addresses", + "custom_fields", + "form_field_groups", + "form_field_rules", + "form_fields_per_document", + "signers", + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/unclaimed_draft_create_response.py b/sdks/python/dropbox_sign/models/unclaimed_draft_create_response.py new file mode 100644 index 000000000..248c53ee8 --- /dev/null +++ b/sdks/python/dropbox_sign/models/unclaimed_draft_create_response.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from dropbox_sign.models.unclaimed_draft_response import UnclaimedDraftResponse +from dropbox_sign.models.warning_response import WarningResponse +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class UnclaimedDraftCreateResponse(BaseModel): + """ + UnclaimedDraftCreateResponse + """ # noqa: E501 + unclaimed_draft: Optional[UnclaimedDraftResponse] = None + warnings: Optional[List[WarningResponse]] = Field(default=None, description="A list of warnings.") + __properties: ClassVar[List[str]] = ["unclaimed_draft", "warnings"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UnclaimedDraftCreateResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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() + # 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 + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UnclaimedDraftCreateResponse from a dict""" + if obj is None: + return None + + 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 + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "unclaimed_draft": "(UnclaimedDraftResponse,)", + "warnings": "(List[WarningResponse],)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + "warnings", + ] + + model_config = { + "arbitrary_types_allowed": True + } + 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 new file mode 100644 index 000000000..9865efaae --- /dev/null +++ b/sdks/python/dropbox_sign/models/unclaimed_draft_edit_and_resend_request.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from dropbox_sign.models.sub_editor_options import SubEditorOptions +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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.") + 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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UnclaimedDraftEditAndResendRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UnclaimedDraftEditAndResendRequest from a dict""" + if obj is None: + return None + + 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 + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "client_id": "(str,)", + "editor_options": "(SubEditorOptions,)", + "is_for_embedded_signing": "(bool,)", + "requester_email_address": "(str,)", + "requesting_redirect_url": "(str,)", + "show_progress_stepper": "(bool,)", + "signing_redirect_url": "(str,)", + "test_mode": "(bool,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/unclaimed_draft_response.py b/sdks/python/dropbox_sign/models/unclaimed_draft_response.py new file mode 100644 index 000000000..a8dd3ac7b --- /dev/null +++ b/sdks/python/dropbox_sign/models/unclaimed_draft_response.py @@ -0,0 +1,150 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UnclaimedDraftResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if signature_request_id (nullable) is None + # and model_fields_set contains the field + if self.signature_request_id is None and "signature_request_id" in self.model_fields_set: + _dict['signature_request_id'] = None + + # set to None if signing_redirect_url (nullable) is None + # and model_fields_set contains the field + if self.signing_redirect_url is None and "signing_redirect_url" in self.model_fields_set: + _dict['signing_redirect_url'] = None + + # set to None if requesting_redirect_url (nullable) is None + # and model_fields_set contains the field + if self.requesting_redirect_url is None and "requesting_redirect_url" in self.model_fields_set: + _dict['requesting_redirect_url'] = None + + # set to None if expires_at (nullable) is None + # and model_fields_set contains the field + if self.expires_at is None and "expires_at" in self.model_fields_set: + _dict['expires_at'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UnclaimedDraftResponse from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "signature_request_id": "(str,)", + "claim_url": "(str,)", + "signing_redirect_url": "(str,)", + "requesting_redirect_url": "(str,)", + "expires_at": "(int,)", + "test_mode": "(bool,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/models/warning_response.py b/sdks/python/dropbox_sign/models/warning_response.py new file mode 100644 index 000000000..d754ccb4e --- /dev/null +++ b/sdks/python/dropbox_sign/models/warning_response.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io + +class WarningResponse(BaseModel): + """ + A list of warnings. + """ # noqa: E501 + warning_msg: StrictStr = Field(description="Warning message") + warning_name: StrictStr = Field(description="Warning name") + __properties: ClassVar[List[str]] = ["warning_msg", "warning_name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of WarningResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of WarningResponse from a dict""" + if obj is None: + return None + + 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") + }) + return _obj + + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "warning_msg": "(str,)", + "warning_name": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + ] + + model_config = { + "arbitrary_types_allowed": True + } + diff --git a/sdks/python/dropbox_sign/py.typed b/sdks/python/dropbox_sign/py.typed new file mode 100644 index 000000000..e69de29bb diff --git a/sdks/python/dropbox_sign/rest.py b/sdks/python/dropbox_sign/rest.py index 005879fc3..0c57b2c6b 100644 --- a/sdks/python/dropbox_sign/rest.py +++ b/sdks/python/dropbox_sign/rest.py @@ -1,55 +1,69 @@ +# coding: utf-8 + """ Dropbox Sign API - Dropbox Sign v3 API # noqa: E501 + Dropbox Sign v3 API The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 import io import json -import logging import re import ssl -from urllib.parse import urlencode -from urllib.parse import urlparse -from urllib.request import proxy_bypass_environment + import urllib3 -import ipaddress -from dropbox_sign.exceptions import ApiException, UnauthorizedException, ForbiddenException, NotFoundException, ServiceException, ApiValueError +from dropbox_sign.exceptions import ApiException, ApiValueError +SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"} +RESTResponseType = urllib3.HTTPResponse -logger = logging.getLogger(__name__) + +def is_socks_proxy_url(url): + if url is None: + return False + split_section = url.split("://") + if len(split_section) < 2: + return False + else: + return split_section[0].lower() in SUPPORTED_SOCKS_PROXIES class RESTResponse(io.IOBase): - def __init__(self, resp): - self.urllib3_response = resp + def __init__(self, resp) -> None: + self.response = resp self.status = resp.status self.reason = resp.reason - self.data = resp.data + self.data = None + + def read(self): + if self.data is None: + self.data = self.response.data + return self.data def getheaders(self): """Returns a dictionary of the response headers.""" - return self.urllib3_response.getheaders() + return self.response.headers def getheader(self, name, default=None): """Returns a given response header.""" - return self.urllib3_response.getheader(name, default) + return self.response.headers.get(name, default) -class RESTClientObject(object): +class RESTClientObject: - def __init__(self, configuration, pools_size=4, maxsize=None): + def __init__(self, configuration) -> None: # urllib3.PoolManager will pass all kw parameters to connectionpool # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 - # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 # cert_reqs @@ -58,70 +72,79 @@ def __init__(self, configuration, pools_size=4, maxsize=None): else: cert_reqs = ssl.CERT_NONE - addition_pool_args = {} + pool_args = { + "cert_reqs": cert_reqs, + "ca_certs": configuration.ssl_ca_cert, + "cert_file": configuration.cert_file, + "key_file": configuration.key_file, + } if configuration.assert_hostname is not None: - addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 + pool_args['assert_hostname'] = ( + configuration.assert_hostname + ) if configuration.retries is not None: - addition_pool_args['retries'] = configuration.retries + pool_args['retries'] = configuration.retries + + if configuration.tls_server_name: + pool_args['server_hostname'] = configuration.tls_server_name + if configuration.socket_options is not None: - addition_pool_args['socket_options'] = configuration.socket_options + pool_args['socket_options'] = configuration.socket_options - if maxsize is None: - if configuration.connection_pool_maxsize is not None: - maxsize = configuration.connection_pool_maxsize - else: - maxsize = 4 + if configuration.connection_pool_maxsize is not None: + pool_args['maxsize'] = configuration.connection_pool_maxsize # https pool manager - if configuration.proxy and not should_bypass_proxies(configuration.host, no_proxy=configuration.no_proxy or ''): - self.pool_manager = urllib3.ProxyManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - proxy_url=configuration.proxy, - proxy_headers=configuration.proxy_headers, - **addition_pool_args - ) + self.pool_manager: urllib3.PoolManager + + 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) + else: + pool_args["proxy_url"] = configuration.proxy + pool_args["proxy_headers"] = configuration.proxy_headers + self.pool_manager = urllib3.ProxyManager(**pool_args) else: - self.pool_manager = urllib3.PoolManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - **addition_pool_args - ) - - def request(self, method, url, query_params=None, headers=None, - body=None, post_params=None, _preload_content=True, - _request_timeout=None): + self.pool_manager = urllib3.PoolManager(**pool_args) + + def request( + self, + method, + url, + headers=None, + body=None, + post_params=None, + _request_timeout=None + ): """Perform requests. :param method: http request method :param url: http request url - :param query_params: query parameters in the url :param headers: http request headers :param body: request json body, for `application/json` :param post_params: request post parameters, `application/x-www-form-urlencoded` and `multipart/form-data` - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. """ 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( @@ -133,60 +156,83 @@ def request(self, method, url, query_params=None, headers=None, timeout = None if _request_timeout: - if isinstance(_request_timeout, (int, float)): # noqa: E501,F821 + 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']: - # Only set a default Content-Type for POST, PUT, PATCH and OPTIONS requests - if (method != 'DELETE') and ('Content-Type' not in headers): - headers['Content-Type'] = 'application/json' - if query_params: - url += '?' + urlencode(query_params) - if ('Content-Type' not in headers) or (re.search('json', headers['Content-Type'], re.IGNORECASE)): + + # 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) + ): request_body = None if body is not None: request_body = json.dumps(body) r = self.pool_manager.request( - method, url, + method, + url, body=request_body, - preload_content=_preload_content, timeout=timeout, - headers=headers) - elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 + headers=headers, + preload_content=False + ) + elif content_type == 'application/x-www-form-urlencoded': r = self.pool_manager.request( - method, url, + method, + url, fields=post_params, encode_multipart=False, - preload_content=_preload_content, timeout=timeout, - headers=headers) - elif headers['Content-Type'] == 'multipart/form-data': + headers=headers, + preload_content=False + ) + 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'] + # 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] r = self.pool_manager.request( - method, url, + method, + url, fields=post_params, encode_multipart=True, - preload_content=_preload_content, timeout=timeout, - headers=headers) + headers=headers, + preload_content=False + ) # Pass a `string` parameter directly in the body to support - # other content types than Json when `body` argument is - # provided in serialized form + # other content types than JSON when `body` argument is + # provided in serialized form. elif isinstance(body, str) or isinstance(body, bytes): - request_body = body r = self.pool_manager.request( - method, url, + method, + url, + body=body, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif headers['Content-Type'] == 'text/plain' and isinstance(body, bool): + request_body = "true" if body else "false" + r = self.pool_manager.request( + method, + url, body=request_body, - preload_content=_preload_content, + preload_content=False, timeout=timeout, headers=headers) else: @@ -197,151 +243,16 @@ def request(self, method, url, query_params=None, headers=None, raise ApiException(status=0, reason=msg) # For `GET`, `HEAD` else: - r = self.pool_manager.request(method, url, - fields=query_params, - preload_content=_preload_content, - timeout=timeout, - headers=headers) + r = self.pool_manager.request( + method, + url, + fields={}, + timeout=timeout, + headers=headers, + preload_content=False + ) except urllib3.exceptions.SSLError as e: - msg = "{0}\n{1}".format(type(e).__name__, str(e)) + msg = "\n".join([type(e).__name__, str(e)]) raise ApiException(status=0, reason=msg) - if _preload_content: - r = RESTResponse(r) - - # log response body - logger.debug("response body: %s", r.data) - - if not 200 <= r.status <= 299: - if r.status == 401: - raise UnauthorizedException(http_resp=r) - - if r.status == 403: - raise ForbiddenException(http_resp=r) - - if r.status == 404: - raise NotFoundException(http_resp=r) - - if 500 <= r.status <= 599: - raise ServiceException(http_resp=r) - - raise ApiException(http_resp=r) - - return r - - def GET(self, url, headers=None, query_params=None, _preload_content=True, - _request_timeout=None): - return self.request("GET", url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params) - - def HEAD(self, url, headers=None, query_params=None, _preload_content=True, - _request_timeout=None): - return self.request("HEAD", url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params) - - def OPTIONS(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("OPTIONS", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def DELETE(self, url, headers=None, query_params=None, body=None, - _preload_content=True, _request_timeout=None): - return self.request("DELETE", url, - headers=headers, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def POST(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("POST", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def PUT(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("PUT", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def PATCH(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("PATCH", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - -# end of class RESTClientObject -def is_ipv4(target): - """ Test if IPv4 address or not - """ - try: - chk = ipaddress.IPv4Address(target) - return True - except ipaddress.AddressValueError: - return False - -def in_ipv4net(target, net): - """ Test if target belongs to given IPv4 network - """ - try: - nw = ipaddress.IPv4Network(net) - ip = ipaddress.IPv4Address(target) - if ip in nw: - return True - return False - except ipaddress.AddressValueError: - return False - except ipaddress.NetmaskValueError: - return False - -def should_bypass_proxies(url, no_proxy=None): - """ Yet another requests.should_bypass_proxies - Test if proxies should not be used for a particular url. - """ - - parsed = urlparse(url) - - # special cases - if parsed.hostname in [None, '']: - return True - - # special cases - if no_proxy in [None , '']: - return False - if no_proxy == '*': - return True - - no_proxy = no_proxy.lower().replace(' ',''); - entries = ( - host for host in no_proxy.split(',') if host - ) - - if is_ipv4(parsed.hostname): - for item in entries: - if in_ipv4net(parsed.hostname, item): - return True - return proxy_bypass_environment(parsed.hostname, {'no': no_proxy} ) + return RESTResponse(r) diff --git a/sdks/python/git_push.sh b/sdks/python/git_push.sh new file mode 100644 index 000000000..f53a75d4f --- /dev/null +++ b/sdks/python/git_push.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' diff --git a/sdks/python/openapi-config.yaml b/sdks/python/openapi-config.yaml index 3bd18d629..dbfc1db30 100644 --- a/sdks/python/openapi-config.yaml +++ b/sdks/python/openapi-config.yaml @@ -1,10 +1,11 @@ generatorName: python -typeMappings: {} +typeMappings: + "bytearray": "io.IOBase" additionalProperties: generatorLanguageVersion: ">=3.7" packageName: dropbox_sign projectName: dropbox-sign - packageVersion: 1.5-dev + packageVersion: 2.0-dev sortModelPropertiesByRequiredFlag: true legacyDiscriminatorBehavior: true packageAuthor: Dropbox Sign API Team @@ -12,6 +13,9 @@ additionalProperties: infoName: Official Python SDK for the Dropbox Sign API useCustomTemplateCode: true files: + __init__apis.mustache: + templateType: SupportingFiles + destinationFilename: dropbox_sign/apis/__init__.py event_callback_helper.mustache: templateType: SupportingFiles destinationFilename: dropbox_sign/event_callback_helper.py diff --git a/sdks/python/pyproject.toml b/sdks/python/pyproject.toml new file mode 100644 index 000000000..dea9190b4 --- /dev/null +++ b/sdks/python/pyproject.toml @@ -0,0 +1,71 @@ +[tool.poetry] +name = "dropbox_sign" +version = "2.0-dev" +description = "Dropbox Sign API" +authors = ["Official Python SDK for the Dropbox Sign API "] +license = "MIT" +readme = "README.md" +repository = "https://github.com/GIT_USER_ID/GIT_REPO_ID" +keywords = ["OpenAPI", "OpenAPI-Generator", "Dropbox Sign API"] +include = ["dropbox_sign/py.typed"] + +[tool.poetry.dependencies] +python = "^3.7" + +urllib3 = ">= 1.25.3" +python-dateutil = ">=2.8.2" +pydantic = ">=2" +typing-extensions = ">=4.7.1" + +[tool.poetry.dev-dependencies] +pytest = ">=7.2.1" +tox = ">=3.9.0" +flake8 = ">=4.0.0" +types-python-dateutil = ">=2.8.19.14" +mypy = "1.4.1" + + +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[tool.pylint.'MESSAGES CONTROL'] +extension-pkg-whitelist = "pydantic" + +[tool.mypy] +files = [ + "dropbox_sign", + #"test", # auto-generated tests + "tests", # hand-written tests +] +# TODO: enable "strict" once all these individual checks are passing +# strict = true + +# List from: https://mypy.readthedocs.io/en/stable/existing_code.html#introduce-stricter-options +warn_unused_configs = true +warn_redundant_casts = true +warn_unused_ignores = true + +## Getting these passing should be easy +strict_equality = true +strict_concatenate = true + +## Strongly recommend enabling this one as soon as you can +check_untyped_defs = true + +## These shouldn't be too much additional work, but may be tricky to +## get passing if you use a lot of untyped libraries +disallow_subclassing_any = true +disallow_untyped_decorators = true +disallow_any_generics = true + +### These next few are various gradations of forcing use of type annotations +#disallow_untyped_calls = true +#disallow_incomplete_defs = true +#disallow_untyped_defs = true +# +### This one isn't too hard to get passing, but return on investment is lower +#no_implicit_reexport = true +# +### This one can be tricky to get passing if you use a lot of untyped libraries +#warn_return_any = true diff --git a/sdks/python/requirements.txt b/sdks/python/requirements.txt index 96947f604..cc85509ec 100644 --- a/sdks/python/requirements.txt +++ b/sdks/python/requirements.txt @@ -1,3 +1,5 @@ python_dateutil >= 2.5.3 setuptools >= 21.0.0 -urllib3 >= 1.25.3 +urllib3 >= 1.25.3, < 2.1.0 +pydantic >= 2 +typing-extensions >= 4.7.1 diff --git a/sdks/python/run-build b/sdks/python/run-build index 2f30b4783..e63d14ce1 100755 --- a/sdks/python/run-build +++ b/sdks/python/run-build @@ -1,54 +1,22 @@ #!/usr/bin/env bash -# see https://github.com/OpenAPITools/openapi-generator/tree/v5.4.0/modules/openapi-generator/src/main/resources/python +# see https://github.com/OpenAPITools/openapi-generator/tree/v7.8.0/modules/openapi-generator/src/main/resources/python set -e DIR=$(cd `dirname $0` && pwd) WORKING_DIR="/app/python" -# must use v5.3.0 generator as v5.4.0 has a bug preventing generating SDK docker run --rm \ -v "${DIR}/:/local" \ - openapitools/openapi-generator-cli:v5.3.0 generate \ + openapitools/openapi-generator-cli:v7.8.0 generate \ -i "/local/openapi-sdk.yaml" \ -c "/local/openapi-config.yaml" \ -t "/local/templates" \ -o "/local/" -printf "\nInstalling composer dependencies ...\n" -mkdir -p "${DIR}/vendor" -bash "${DIR}/bin/php" composer install -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" - find "${DIR}/docs/" -type f -exec chmod 644 {} \; - find "${DIR}/examples/" -type f -exec chmod 644 {} \; - find "${DIR}/test_fixtures/" -type f -exec chmod 644 {} \; - find "${DIR}/dropbox_sign/" -type f -exec chmod 644 {} \; -fi - printf "Replacing strings ...\n" docker run --rm \ -v "${DIR}:${WORKING_DIR}" \ -w "${WORKING_DIR}" \ perl bash ./bin/replace - -printf "Scanning for prohibited keywords ...\n" -docker run --rm \ - -v "${DIR}:${WORKING_DIR}" \ - -w "${WORKING_DIR}" \ - perl bash ./bin/scan_for - -printf "Running tests ...\n" -bash "${DIR}/bin/python" python -m unittest discover tests - -printf "Success!\n" diff --git a/sdks/python/setup.py b/sdks/python/setup.py index aab74260f..83d9c0950 100644 --- a/sdks/python/setup.py +++ b/sdks/python/setup.py @@ -1,29 +1,35 @@ +# coding: utf-8 + """ Dropbox Sign API - Dropbox Sign v3 API # noqa: E501 + Dropbox Sign v3 API The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 from setuptools import setup, find_packages # noqa: H301 from pathlib import Path -NAME = "dropbox-sign" -VERSION = "1.5-dev" # To install the library, run the following # # python setup.py install # # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools - +NAME = "dropbox-sign" +VERSION = "2.0-dev" +PYTHON_REQUIRES = ">=3.7" REQUIRES = [ - "urllib3 >= 1.25.3", - "python-dateutil", + "urllib3 >= 1.25.3, < 2.1.0", + "python-dateutil", + "pydantic >= 2", + "typing-extensions >= 4.7.1", ] this_directory = Path(__file__).parent @@ -37,11 +43,11 @@ author_email="apisupport@hellosign.com", url="https://github.com/hellosign/dropbox-sign-python", keywords=["OpenAPI", "OpenAPI-Generator", "Dropbox Sign API"], - python_requires=">=3.7", install_requires=REQUIRES, packages=find_packages(exclude=["test", "tests"]), include_package_data=True, license="MIT", long_description=long_description, - long_description_content_type='text/markdown' + long_description_content_type='text/markdown', + package_data={"dropbox_sign": ["py.typed"]}, ) diff --git a/sdks/python/templates/README.mustache b/sdks/python/templates/README.mustache index ed6bdcd29..bceb88f3b 100644 --- a/sdks/python/templates/README.mustache +++ b/sdks/python/templates/README.mustache @@ -3,7 +3,6 @@ {{{.}}} {{/appDescriptionWithNewLines}} -{{^useCustomTemplateCode}} This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: {{appVersion}} @@ -11,6 +10,7 @@ This Python package is automatically generated by the [OpenAPI Generator](https: {{^hideGenerationTimestamp}} - Build date: {{generatedDate}} {{/hideGenerationTimestamp}} +- Generator version: {{generatorVersion}} - Build package: {{generatorClass}} {{#infoUrl}} For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) @@ -43,73 +43,18 @@ Install via [Setuptools](http://pypi.python.org/pypi/setuptools). python setup.py install --user ``` (or `sudo python setup.py install` to install the package for all users) -{{/useCustomTemplateCode}} -{{#useCustomTemplateCode}} -## Migrating from legacy SDK - -This SDK is generated from our officially maintained [OpenAPI spec](https://github.com/hellosign/hellosign-openapi/blob/main/openapi.yaml). -We've made important updates that introduce new functionality and create feature parity between the Dropbox Sign API and the SDK. -However, some of these changes are considered "breaking" in the sense that they'll require you to update your existing code in order to continue using the SDK. -Please refer to this [migration guide](https://developers.hellosign.com/docs/sdks/python/migration-guide/) for more information. - -## Contributing - -This repo is no longer accepting new issues or Pull Requests. All issues or -Pull Requests *must* be opened against the -[hellosign/hellosign-openapi](https://github.com/hellosign/hellosign-openapi) repo! - -### Changes to the SDK code - -You must make SDK code changes in the mustache file within the `templates` -directory that corresponds to the file you want updated. - -We use [OpenAPI Generator](https://openapi-generator.tech/) to automatically -generate this SDK from the OAS, using the template files. - -### Building - -You must have `docker` (or `podman` linked to `docker`) installed. Highly -recommended to use -[rootless docker](https://docs.docker.com/engine/security/rootless/). - -Run the following and everything is done for you: - -```shell -./run-build -``` - -*Attention*: Any changes you have made to the SDK code that you have not made -to the OAS file and/or the mustache template files _will be lost_ when you run -this command. - -## Installation & Usage - -### Requirements. - -Python {{{generatorLanguageVersion}}} - -### pip - -Install using `pip`: - -```shell -python3 -m pip install dropbox-sign=={{packageVersion}} -``` - -Alternatively: - -```shell -pip install git+https://github.com/hellosign/dropbox-sign-python.git -``` -{{/useCustomTemplateCode}} Then import the package: ```python import {{{packageName}}} ``` +### Tests + +Execute `pytest` to run the tests. + ## Getting Started Please follow the [installation procedure](#installation--usage) and then run the following: -{{> README_common }} +{{> common_README }} diff --git a/sdks/python/templates/README_common.mustache b/sdks/python/templates/README_common.mustache deleted file mode 100644 index 21b8d378b..000000000 --- a/sdks/python/templates/README_common.mustache +++ /dev/null @@ -1,143 +0,0 @@ -{{^useCustomTemplateCode}} -```python -{{#apiInfo}}{{#apis}}{{#-last}}{{#hasHttpSignatureMethods}}import datetime{{/hasHttpSignatureMethods}}{{/-last}}{{/apis}}{{/apiInfo}} -import time -import {{{packageName}}} -from pprint import pprint -{{#apiInfo}} -{{#apis}} -{{#-first}} -from {{apiPackage}} import {{classFilename}} -{{#imports}} -{{{import}}} -{{/imports}} -{{#operations}} -{{#operation}} -{{#-first}} -{{> python_doc_auth_partial}} - -# Enter a context with an instance of the API client -with {{{packageName}}}.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = {{classFilename}}.{{{classname}}}(api_client) - {{#allParams}}{{paramName}} = {{{example}}} # {{{dataType}}} | {{{description}}}{{^required}} (optional){{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} - {{/allParams}} - - try: - {{#summary}} # {{{.}}} - {{/summary}} {{#returnType}}api_response = {{/returnType}}api_instance.{{{operationId}}}({{#allParams}}{{#required}}{{paramName}}{{/required}}{{^required}}{{paramName}}={{paramName}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}){{#returnType}} - pprint(api_response){{/returnType}} - except {{{packageName}}}.ApiException as e: - print("Exception when calling {{classname}}->{{operationId}}: %s\n" % e) -{{/-first}} -{{/operation}} -{{/operations}} -{{/-first}} -{{/apis}} -{{/apiInfo}} -``` -{{/useCustomTemplateCode}} -{{#useCustomTemplateCode}} -{{#apiInfo}}{{#apis}}{{#-first}}{{#operations}}{{#operation}}{{#-first}} -```python -REPLACE_ME_WITH_EXAMPLE_FOR__{{{operationId}}}_Python_CODE -``` -{{/-first}}{{/operation}}{{/operations}}{{/-first}}{{/apis}}{{/apiInfo}} -{{/useCustomTemplateCode}} - -## Documentation for API Endpoints - -All URIs are relative to *{{basePath}}* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -{{^useCustomTemplateCode}} -{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{summary}} -{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} -{{/useCustomTemplateCode}} -{{#useCustomTemplateCode}} -{{#apiInfo}}{{#apis}}{{#operations}}|{{#operation}}```{{classname}}``` | [```{{operationId}}```]({{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | ```{{httpMethod}} {{path}}``` | {{summary}}| -{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} -{{/useCustomTemplateCode}} - -## Documentation For Models - -{{#models}}{{#model}} - [{{{classname}}}]({{modelDocPath}}{{{classname}}}.md) -{{/model}}{{/models}} - -## Documentation For Authorization - -{{^authMethods}} - All endpoints do not require authorization. -{{/authMethods}} -{{#authMethods}} -{{#last}} Authentication schemes defined for the API:{{/last}} -## {{{name}}} - -{{#isApiKey}} -- **Type**: API key -- **API key parameter name**: {{{keyParamName}}} -- **Location**: {{#isKeyInQuery}}URL query string{{/isKeyInQuery}}{{#isKeyInHeader}}HTTP header{{/isKeyInHeader}} -{{/isApiKey}} -{{#isBasic}} -{{#isBasicBasic}} -- **Type**: HTTP basic authentication -{{/isBasicBasic}} -{{#isBasicBearer}} -- **Type**: Bearer authentication{{#bearerFormat}} ({{{.}}}){{/bearerFormat}} -{{/isBasicBearer}} -{{#isHttpSignature}} -- **Type**: HTTP signature authentication -{{/isHttpSignature}} -{{/isBasic}} -{{#isOAuth}} -- **Type**: OAuth -- **Flow**: {{{flow}}} -- **Authorization URL**: {{{authorizationUrl}}} -- **Scopes**: {{^scopes}}N/A{{/scopes}} -{{#scopes}} - **{{{scope}}}**: {{{description}}} -{{/scopes}} -{{/isOAuth}} - -{{/authMethods}} - -## Author - -{{#apiInfo}}{{#apis}}{{#-last}}{{infoEmail}} -{{/-last}}{{/apis}}{{/apiInfo}} - -{{^useCustomTemplateCode}} -## Notes for Large OpenAPI documents -If the OpenAPI document is large, imports in {{{packageName}}}.apis and {{{packageName}}}.models may fail with a -RecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions: - -Solution 1: -Use specific imports for apis and models like: -- `from {{{packageName}}}.api.default_api import DefaultApi` -- `from {{{packageName}}}.model.pet import Pet` - -Solution 2: -Before importing the package, adjust the maximum recursion limit as shown below: -``` -import sys -sys.setrecursionlimit(1500) -import {{{packageName}}} -from {{{packageName}}}.apis import * -from {{{packageName}}}.models import * -``` -{{/useCustomTemplateCode}} -{{#useCustomTemplateCode}} -## About this package - -This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - -- API version: {{appVersion}} -- Package version: {{packageVersion}} -{{^hideGenerationTimestamp}} - - Build date: {{generatedDate}} -{{/hideGenerationTimestamp}} -- Build package: {{generatorClass}} -{{#infoUrl}} - For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) -{{/infoUrl}} -{{/useCustomTemplateCode}} diff --git a/sdks/python/templates/README_onlypackage.mustache b/sdks/python/templates/README_onlypackage.mustache index ba08a3acf..ae547b1e6 100644 --- a/sdks/python/templates/README_onlypackage.mustache +++ b/sdks/python/templates/README_onlypackage.mustache @@ -10,6 +10,7 @@ The `{{packageName}}` package is automatically generated by the [OpenAPI Generat {{^hideGenerationTimestamp}} - Build date: {{generatedDate}} {{/hideGenerationTimestamp}} +- Generator version: {{generatorVersion}} - Build package: {{generatorClass}} {{#infoUrl}} For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) @@ -33,10 +34,11 @@ To be able to use it, you will need these dependencies in your own package that {{#tornado}} * tornado>=4.2,<5 {{/tornado}} +* pydantic ## Getting Started In your own code, to use this library to connect and interact with {{{projectName}}}, you can run the following: -{{> README_common }} +{{> common_README }} diff --git a/sdks/python/templates/__init__api.mustache b/sdks/python/templates/__init__api.mustache index 8a9e6b91b..8870835c8 100644 --- a/sdks/python/templates/__init__api.mustache +++ b/sdks/python/templates/__init__api.mustache @@ -1,9 +1,5 @@ -{{#apiInfo}} -{{#apis}} -{{#-first}} -# do not import all apis into this module because that uses a lot of memory and stack frames -# if you need the ability to import all apis from one package, import them with -# from {{packageName}}.apis import {{classname}} -{{/-first}} -{{/apis}} -{{/apiInfo}} +# flake8: noqa + +# import apis into api package +{{#apiInfo}}{{#apis}}from {{apiPackage}}.{{classFilename}} import {{classname}} +{{/apis}}{{/apiInfo}} diff --git a/sdks/python/templates/__init__apis.mustache b/sdks/python/templates/__init__apis.mustache index 927bb6d52..868a7a603 100644 --- a/sdks/python/templates/__init__apis.mustache +++ b/sdks/python/templates/__init__apis.mustache @@ -1,23 +1,12 @@ +{{#useCustomTemplateCode}} {{#apiInfo}} {{#apis}} {{#-first}} - # flake8: noqa -# Import all APIs into this package. -# If you have many APIs here with many many models used in each API this may -# raise a `RecursionError`. -# In order to avoid this, import only the API that you directly need like: -# -# from {{packagename}}.api.{{classFilename}} import {{classname}} -# -# or import this package, but before doing it, use: -# -# import sys -# sys.setrecursionlimit(n) - # Import APIs into API package: {{/-first}} from {{apiPackage}}.{{classFilename}} import {{classname}} {{/apis}} {{/apiInfo}} +{{/useCustomTemplateCode}} diff --git a/sdks/python/templates/__init__model.mustache b/sdks/python/templates/__init__model.mustache index cfe32b784..0e1b55e2a 100644 --- a/sdks/python/templates/__init__model.mustache +++ b/sdks/python/templates/__init__model.mustache @@ -1,5 +1,11 @@ -# we can not import model classes here because that would create a circular -# reference which would not work in python2 -# do not import all models into this module because that uses a lot of memory and stack frames -# if you need the ability to import all models from one package, import them with -# from {{packageName}.models import ModelA, ModelB +# coding: utf-8 + +# flake8: noqa +{{>partial_header}} + +# import models into model package +{{#models}} +{{#model}} +from {{modelPackage}}.{{classFilename}} import {{classname}} +{{/model}} +{{/models}} diff --git a/sdks/python/templates/__init__models.mustache b/sdks/python/templates/__init__models.mustache deleted file mode 100644 index 76d91fc5d..000000000 --- a/sdks/python/templates/__init__models.mustache +++ /dev/null @@ -1,16 +0,0 @@ -# flake8: noqa - -# import all models into this package -# if you have many models here with many references from one model to another this may -# raise a RecursionError -# to avoid this, import only the models that you directly need like: -# from from {{modelPackage}}.pet import Pet -# or import this package, but before doing it, use: -# import sys -# sys.setrecursionlimit(n) - -{{#models}} -{{#model}} -from {{modelPackage}}.{{classFilename}} import {{classname}} -{{/model}} -{{/models}} diff --git a/sdks/python/templates/__init__package.mustache b/sdks/python/templates/__init__package.mustache index bb49d0c07..e4d04b65b 100644 --- a/sdks/python/templates/__init__package.mustache +++ b/sdks/python/templates/__init__package.mustache @@ -1,30 +1,44 @@ +# coding: utf-8 + # flake8: noqa {{>partial_header}} __version__ = "{{packageVersion}}" +# import apis into sdk package +{{^useCustomTemplateCode}} +{{#apiInfo}}{{#apis}}from {{apiPackage}}.{{classFilename}} import {{classname}} +{{/apis}}{{/apiInfo}} +{{/useCustomTemplateCode}} +{{#useCustomTemplateCode}} +from dropbox_sign.apis import * + +{{/useCustomTemplateCode}} # import ApiClient +from {{packageName}}.api_response import ApiResponse from {{packageName}}.api_client import ApiClient - -# import Configuration from {{packageName}}.configuration import Configuration -{{#hasHttpSignatureMethods}} -from {{packageName}}.signing import HttpSigningConfiguration -{{/hasHttpSignatureMethods}} - -# import exceptions from {{packageName}}.exceptions import OpenApiException -from {{packageName}}.exceptions import ApiAttributeError from {{packageName}}.exceptions import ApiTypeError from {{packageName}}.exceptions import ApiValueError from {{packageName}}.exceptions import ApiKeyError +from {{packageName}}.exceptions import ApiAttributeError from {{packageName}}.exceptions import ApiException +{{#hasHttpSignatureMethods}} +from {{packageName}}.signing import HttpSigningConfiguration +{{/hasHttpSignatureMethods}} + +# import models into sdk package +{{#models}} +{{#model}} +from {{modelPackage}}.{{classFilename}} import {{classname}} +{{/model}} +{{/models}} +{{#useCustomTemplateCode}} +from dropbox_sign.event_callback_helper import EventCallbackHelper +{{/useCustomTemplateCode}} {{#recursionLimit}} __import__('sys').setrecursionlimit({{{.}}}) {{/recursionLimit}} - -{{#useCustomTemplateCode}} -from dropbox_sign.event_callback_helper import EventCallbackHelper -{{/useCustomTemplateCode}} \ No newline at end of file diff --git a/sdks/python/templates/api.mustache b/sdks/python/templates/api.mustache index e70c8ca1e..08c6f1563 100644 --- a/sdks/python/templates/api.mustache +++ b/sdks/python/templates/api.mustache @@ -1,393 +1,268 @@ +# coding: utf-8 + {{>partial_header}} +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated -{{#useCustomTemplateCode}} -from __future__ import annotations -{{/useCustomTemplateCode}} -import re # noqa: F401 -import sys # noqa: F401 +{{#imports}} +{{import}} +{{/imports}} -{{^useCustomTemplateCode}} -from {{packageName}}.api_client import ApiClient, Endpoint as _Endpoint -{{/useCustomTemplateCode}} +from {{packageName}}.api_client import ApiClient, RequestSerialized +from {{packageName}}.api_response import ApiResponse +from {{packageName}}.rest import RESTResponseType {{#useCustomTemplateCode}} -from {{packageName}}.api_client import ApiClient, ApiException, Endpoint as _Endpoint +import io {{/useCustomTemplateCode}} -from {{packageName}}.model_utils import ( # noqa: F401 - check_allowed_values, - check_validations, - date, - datetime, - file_type, - none_type, - validate_and_convert_types -) -{{#imports}} -{{{import}}} -{{/imports}} -class {{classname}}(object): +{{#operations}} +class {{classname}}: """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech Do not edit the class manually. """ - def __init__(self, api_client=None): + def __init__(self, api_client=None) -> None: if api_client is None: - api_client = ApiClient() + api_client = ApiClient.get_default() self.api_client = api_client -{{#operations}} {{#operation}} - self.{{operationId}}_endpoint = _Endpoint( - settings={ - 'response_type': {{#returnType}}({{{.}}},){{/returnType}}{{^returnType}}None{{/returnType}}, -{{#authMethods}} -{{#-first}} - 'auth': [ -{{/-first}} - '{{name}}'{{^-last}},{{/-last}} -{{#-last}} - ], -{{/-last}} -{{/authMethods}} -{{^authMethods}} - 'auth': [], -{{/authMethods}} - 'endpoint_path': '{{{path}}}', - 'operation_id': '{{operationId}}', - 'http_method': '{{httpMethod}}', -{{#servers}} -{{#-first}} - 'servers': [ -{{/-first}} - { - 'url': "{{{url}}}", - 'description': "{{{description}}}{{^description}}No description provided{{/description}}", - {{#variables}} - {{#-first}} - 'variables': { - {{/-first}} - '{{{name}}}': { - 'description': "{{{description}}}{{^description}}No description provided{{/description}}", - 'default_value': "{{{defaultValue}}}", - {{#enumValues}} - {{#-first}} - 'enum_values': [ - {{/-first}} - "{{{.}}}"{{^-last}},{{/-last}} - {{#-last}} - ] - {{/-last}} - {{/enumValues}} - }{{^-last}},{{/-last}} - {{#-last}} - } - {{/-last}} - {{/variables}} - }, -{{#-last}} - ] -{{/-last}} -{{/servers}} -{{^servers}} - 'servers': None, -{{/servers}} - }, - params_map={ - 'all': [ -{{#allParams}} - '{{paramName}}', -{{/allParams}} - ], -{{#requiredParams}} -{{#-first}} - 'required': [ -{{/-first}} - '{{paramName}}', -{{#-last}} - ], -{{/-last}} -{{/requiredParams}} -{{^requiredParams}} - 'required': [], -{{/requiredParams}} - 'nullable': [ -{{#allParams}} -{{#isNullable}} - '{{paramName}}', -{{/isNullable}} -{{/allParams}} - ], - 'enum': [ -{{#allParams}} -{{#isEnum}} - '{{paramName}}', -{{/isEnum}} -{{/allParams}} - ], - 'validation': [ -{{#allParams}} -{{#hasValidation}} - '{{paramName}}', -{{/hasValidation}} -{{/allParams}} - ] - }, - root_map={ - 'validations': { -{{#allParams}} -{{#hasValidation}} - ('{{paramName}}',): { -{{#maxLength}} - 'max_length': {{.}},{{/maxLength}}{{#minLength}} - 'min_length': {{.}},{{/minLength}}{{#maxItems}} - 'max_items': {{.}},{{/maxItems}}{{#minItems}} - 'min_items': {{.}},{{/minItems}}{{#maximum}} - {{#exclusiveMaximum}}'exclusive_maximum'{{/exclusiveMaximum}}{{^exclusiveMaximum}}'inclusive_maximum'{{/exclusiveMaximum}}: {{maximum}},{{/maximum}}{{#minimum}} - {{#exclusiveMinimum}}'exclusive_minimum'{{/exclusiveMinimum}}{{^exclusiveMinimum}}'inclusive_minimum'{{/exclusiveMinimum}}: {{minimum}},{{/minimum}}{{#pattern}} - 'regex': { - 'pattern': r'{{{vendorExtensions.x-regex}}}', # noqa: E501{{#vendorExtensions.x-modifiers}} - {{#-first}}'flags': (re.{{.}}{{/-first}}{{^-first}} re.{{.}}{{/-first}}{{^-last}} | {{/-last}}{{#-last}}){{/-last}}{{/vendorExtensions.x-modifiers}} - },{{/pattern}} - }, -{{/hasValidation}} -{{/allParams}} - }, - 'allowed_values': { -{{#allParams}} -{{#isEnum}} - ('{{paramName}}',): { -{{#isNullable}} - 'None': None,{{/isNullable}}{{#allowableValues}}{{#enumVars}} - "{{name}}": {{{value}}}{{^-last}},{{/-last}}{{/enumVars}}{{/allowableValues}} - }, -{{/isEnum}} -{{/allParams}} - }, - 'openapi_types': { -{{#allParams}} - '{{paramName}}': - ({{{dataType}}},), -{{/allParams}} - }, - 'attribute_map': { -{{#allParams}} -{{^isBodyParam}} - '{{paramName}}': '{{baseName}}', -{{/isBodyParam}} -{{/allParams}} - }, - 'location_map': { -{{#allParams}} - '{{paramName}}': '{{#isFormParam}}form{{/isFormParam}}{{#isQueryParam}}query{{/isQueryParam}}{{#isPathParam}}path{{/isPathParam}}{{#isHeaderParam}}header{{/isHeaderParam}}{{#isCookieParam}}cookie{{/isCookieParam}}{{#isBodyParam}}body{{/isBodyParam}}', -{{/allParams}} - }, - 'collection_format_map': { -{{#allParams}} -{{#collectionFormat}} - '{{paramName}}': '{{collectionFormat}}', -{{/collectionFormat}} -{{/allParams}} - } - }, - headers_map={ -{{#hasProduces}} - 'accept': [ -{{#produces}} - '{{{mediaType}}}'{{^-last}},{{/-last}} -{{/produces}} - ], -{{/hasProduces}} -{{^hasProduces}} - 'accept': [], -{{/hasProduces}} -{{#hasConsumes}} - 'content_type': [ -{{#consumes}} - '{{{mediaType}}}'{{^-last}},{{/-last}} -{{/consumes}} - ] -{{/hasConsumes}} -{{^hasConsumes}} - 'content_type': [], -{{/hasConsumes}} - }, - api_client=api_client + + + @validate_call + {{#asyncio}}async {{/asyncio}}def {{operationId}}{{>partial_api_args}} -> {{{returnType}}}{{^returnType}}None{{/returnType}}: +{{>partial_api}} + response_data = {{#asyncio}}await {{/asyncio}}self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) -{{/operation}} -{{/operations}} + {{#asyncio}}await {{/asyncio}}response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data -{{#operations}} -{{#operation}} - def {{operationId}}( + + @validate_call + {{#asyncio}}async {{/asyncio}}def {{operationId}}_with_http_info{{>partial_api_args}} -> ApiResponse[{{{returnType}}}{{^returnType}}None{{/returnType}}]: +{{>partial_api}} + response_data = {{#asyncio}}await {{/asyncio}}self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + {{#asyncio}}await {{/asyncio}}response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + {{#asyncio}}async {{/asyncio}}def {{operationId}}_without_preload_content{{>partial_api_args}} -> RESTResponseType: +{{>partial_api}} + response_data = {{#asyncio}}await {{/asyncio}}self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _{{operationId}}_serialize( self, -{{#requiredParams}} -{{^defaultValue}} + {{#allParams}} {{paramName}}, -{{/defaultValue}} -{{/requiredParams}} -{{#requiredParams}} -{{#defaultValue}} - {{paramName}}={{{defaultValue}}}, -{{/defaultValue}} -{{/requiredParams}} - **kwargs -{{^useCustomTemplateCode}} - ): -{{/useCustomTemplateCode}} -{{#useCustomTemplateCode}} - ) -> {{#returnType}}{{.}}{{/returnType}}{{^returnType}}None{{/returnType}}: -{{/useCustomTemplateCode}} - """{{{summary}}}{{^summary}}{{operationId}}{{/summary}} # noqa: E501 + {{/allParams}} + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: -{{#notes}} - {{{.}}} # noqa: E501 -{{/notes}} - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True + {{#servers.0}} + _hosts = [{{#servers}} + '{{{url}}}'{{^-last}},{{/-last}}{{/servers}} + ] + _host = _hosts[_host_index] + {{/servers.0}} + {{^servers.0}} + _host = None + {{/servers.0}} - >>> thread = api.{{operationId}}({{#requiredParams}}{{^defaultValue}}{{paramName}}, {{/defaultValue}}{{/requiredParams}}{{#requiredParams}}{{#defaultValue}}{{paramName}}={{{defaultValue}}}, {{/defaultValue}}{{/requiredParams}}async_req=True) - >>> result = thread.get() + _collection_formats: Dict[str, str] = { + {{#allParams}} + {{#isArray}} + '{{baseName}}': '{{collectionFormat}}', + {{/isArray}} + {{/allParams}} + } -{{#requiredParams}} -{{#-last}} - Args: -{{/-last}} -{{/requiredParams}} -{{#requiredParams}} -{{^defaultValue}} - {{paramName}} ({{dataType}}):{{#description}} {{{.}}}{{/description}} -{{/defaultValue}} -{{/requiredParams}} -{{#requiredParams}} -{{#defaultValue}} - {{paramName}} ({{dataType}}):{{#description}} {{{.}}}.{{/description}} defaults to {{{defaultValue}}}, must be one of [{{{defaultValue}}}] -{{/defaultValue}} -{{/requiredParams}} + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None - Keyword Args:{{#optionalParams}} - {{paramName}} ({{dataType}}):{{#description}} {{{.}}}.{{/description}} [optional]{{#defaultValue}} if omitted the server will use the default value of {{{.}}}{{/defaultValue}}{{/optionalParams}} - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously +{{#useCustomTemplateCode}} + {{#bodyParam}} + has_files = False + body_param = {{#bodyParam}}{{paramName}}{{/bodyParam}} + excluded_json_fields = set([]) + for param_name, param_type in body_param.openapi_types().items(): + param_value = getattr(body_param, param_name) + if param_value is None: + continue - Returns: - {{returnType}}{{^returnType}}None{{/returnType}} - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') -{{#requiredParams}} - kwargs['{{paramName}}'] = \ - {{paramName}} -{{/requiredParams}} + if "io.IOBase" in param_type: + has_files = True + _content_type = "multipart/form-data" + excluded_json_fields.add(param_name) + + if isinstance(param_value, list): + for index, item in enumerate(param_value): + _files[f'{param_name}[{index}]'] = item + else: + _files[param_name] = param_value + + _form_params = body_param.to_json_form_params(excluded_json_fields) + + {{/bodyParam}} +{{/useCustomTemplateCode}} + # process the path parameters +{{#pathParams}} + if {{paramName}} is not None: + _path_params['{{baseName}}'] = {{paramName}}{{#isEnumRef}}.value{{/isEnumRef}} +{{/pathParams}} + # process the query parameters +{{#queryParams}} + if {{paramName}} is not None: + {{#isDateTime}} + if isinstance({{paramName}}, datetime): + _query_params.append( + ( + '{{baseName}}', + {{paramName}}.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('{{baseName}}', {{paramName}})) + {{/isDateTime}} + {{#isDate}} + if isinstance({{paramName}}, date): + _query_params.append( + ( + '{{baseName}}', + {{paramName}}.strftime( + self.api_client.configuration.date_format + ) + ) + ) + else: + _query_params.append(('{{baseName}}', {{paramName}})) + {{/isDate}} + {{^isDateTime}}{{^isDate}} + _query_params.append(('{{baseName}}', {{paramName}}{{#isEnumRef}}.value{{/isEnumRef}})) + {{/isDate}}{{/isDateTime}} +{{/queryParams}} + # process the header parameters +{{#headerParams}} + if {{paramName}} is not None: + _header_params['{{baseName}}'] = {{paramName}} +{{/headerParams}} + # process the form parameters +{{#formParams}} + if {{paramName}} is not None: + {{#isFile}} + _files['{{{baseName}}}'] = {{paramName}} + {{/isFile}} + {{^isFile}} + _form_params.append(('{{{baseName}}}', {{paramName}})) + {{/isFile}} +{{/formParams}} + # process the body parameter +{{#bodyParam}} {{^useCustomTemplateCode}} - return self.{{operationId}}_endpoint.call_with_http_info(**kwargs) + if {{paramName}} is not None: {{/useCustomTemplateCode}} {{#useCustomTemplateCode}} - {{^returnType}} - return self.{{operationId}}_endpoint.call_with_http_info(**kwargs) - {{/returnType}} - {{#returnType}} - try: - return self.{{operationId}}_endpoint.call_with_http_info(**kwargs) - except ApiException as e: - {{#responses}} - {{#dataType}} - {{^isWildcard}} - {{^isRange}} - if e.status == {{code}}: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[{{{dataType}}}], - _check_type=True, - ) + if {{paramName}} is not None and has_files is False: +{{/useCustomTemplateCode}} + {{#isBinary}} + # convert to byte array if the input is a file name (str) + if isinstance({{paramName}}, str): + with open({{paramName}}, "rb") as _fp: + _body_params = _fp.read() + else: + _body_params = {{paramName}} + {{/isBinary}} + {{^isBinary}} + _body_params = {{paramName}} + {{/isBinary}} +{{/bodyParam}} - raise e - {{/isRange}} - {{/isWildcard}} - {{/dataType}} - {{/responses}} - {{#responses}} - {{#dataType}} - {{#isRange}} - range_code = "{{code}}"[0] - range_code_left = int(f"{range_code}00") - range_code_right = int(f"{range_code}99") + {{#constantParams}} + {{#isQueryParam}} + # Set client side default value of Query Param "{{baseName}}". + _query_params.append(('{{baseName}}', {{#_enum}}'{{{.}}}'{{/_enum}})) + {{/isQueryParam}} + {{#isHeaderParam}} + # Set client side default value of Header Param "{{baseName}}". + _header_params['{{baseName}}'] = {{#_enum}}'{{{.}}}'{{/_enum}} + {{/isHeaderParam}} + {{/constantParams}} - if range_code_left <= e.status <= range_code_right: - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[{{{dataType}}}], - _check_type=True, - ) + {{#hasProduces}} + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [{{#produces}} + '{{{mediaType}}}'{{^-last}}, {{/-last}}{{/produces}} + ] + ) + {{/hasProduces}} - raise e - {{/isRange}} - {{/dataType}} - {{/responses}} - {{#responses}} - {{#dataType}} - {{#isWildcard}} - e.body = self.api_client.deserialize( - response=type('obj_dict', (object,), {'data': e.body}), - response_type=[{{{dataType}}}], - _check_type=True, + {{#hasConsumes}} + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [{{#consumes}} + '{{{mediaType}}}'{{^-last}}, {{/-last}}{{/consumes}} + ] + ) ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + {{/hasConsumes}} + + # authentication setting + _auth_settings: List[str] = [{{#authMethods}} + '{{name}}'{{^-last}}, {{/-last}}{{/authMethods}} + ] + + return self.api_client.param_serialize( + method='{{httpMethod}}', + resource_path='{{{path}}}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) - raise e - {{/isWildcard}} - {{/dataType}} - {{/responses}} - {{/returnType}} -{{/useCustomTemplateCode}} {{/operation}} {{/operations}} diff --git a/sdks/python/templates/api_client.mustache b/sdks/python/templates/api_client.mustache index 087a84a69..69e75c9db 100644 --- a/sdks/python/templates/api_client.mustache +++ b/sdks/python/templates/api_client.mustache @@ -1,40 +1,44 @@ +# coding: utf-8 + {{>partial_header}} +import datetime +from dateutil.parser import parse +from enum import Enum +import decimal import json -import atexit import mimetypes -from multiprocessing.pool import ThreadPool -import io import os import re -import typing -from urllib.parse import quote -from urllib3.fields import RequestField +import tempfile +{{#useCustomTemplateCode}} +import io +{{/useCustomTemplateCode}} +from urllib.parse import quote +from typing import Tuple, Optional, List, Dict, Union +from pydantic import SecretStr {{#tornado}} import tornado.gen {{/tornado}} -from {{packageName}} import rest from {{packageName}}.configuration import Configuration -from {{packageName}}.exceptions import ApiTypeError, ApiValueError, ApiException -from {{packageName}}.model_utils import ( - ModelNormal, - ModelSimple, - ModelComposed, - check_allowed_values, - check_validations, - date, - datetime, - deserialize_file, - file_type, - model_to_dict, - none_type, - validate_and_convert_types +from {{packageName}}.api_response import ApiResponse, T as ApiResponseT +import {{modelPackage}} +from {{packageName}} import rest +from {{packageName}}.exceptions import ( + ApiValueError, + ApiException, + BadRequestException, + UnauthorizedException, + ForbiddenException, + NotFoundException, + ServiceException ) +RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]] -class ApiClient(object): +class ApiClient: """Generic API client for OpenAPI client library builds. OpenAPI generic API client. This client handles the client- @@ -42,28 +46,39 @@ class ApiClient(object): the methods and models for each application are generated from the OpenAPI templates. - NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - Do not edit the class manually. - :param configuration: .Configuration object for this client :param header_name: a header to pass when making calls to the API. :param header_value: a header value to pass when making calls to the API. :param cookie: a cookie to include in the header when making calls to the API - :param pool_threads: The number of threads to use for async requests - to the API. More threads means more concurrent API requests. """ + 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, + } _pool = None - def __init__(self, configuration=None, header_name=None, header_value=None, - cookie=None, pool_threads=1): + def __init__( + self, + configuration=None, + header_name=None, + header_value=None, + cookie=None + ) -> None: + # use default configuration if none is provided if configuration is None: - configuration = Configuration.get_default_copy() + configuration = Configuration.get_default() self.configuration = configuration - self.pool_threads = pool_threads self.rest_client = rest.RESTClientObject(configuration) self.default_headers = {} @@ -72,30 +87,25 @@ class ApiClient(object): self.cookie = cookie # Set default User-Agent. self.user_agent = '{{{httpUserAgent}}}{{^httpUserAgent}}OpenAPI-Generator/{{{packageVersion}}}/python{{/httpUserAgent}}' + self.client_side_validation = configuration.client_side_validation - def __enter__(self): +{{#asyncio}} + async def __aenter__(self): return self - def __exit__(self, exc_type, exc_value, traceback): - self.close() + async def __aexit__(self, exc_type, exc_value, traceback): + await self.close() - def close(self): - if self._pool: - self._pool.close() - self._pool.join() - self._pool = None - if hasattr(atexit, 'unregister'): - atexit.unregister(self.close) + async def close(self): + await self.rest_client.close() +{{/asyncio}} +{{^asyncio}} + def __enter__(self): + return self - @property - def pool(self): - """Create thread pool on first request - avoids instantiating unused threadpool for blocking clients. - """ - if self._pool is None: - atexit.register(self.close) - self._pool = ThreadPool(self.pool_threads) - return self._pool + def __exit__(self, exc_type, exc_value, traceback): + pass +{{/asyncio}} @property def user_agent(self): @@ -109,29 +119,69 @@ class ApiClient(object): def set_default_header(self, header_name, header_value): self.default_headers[header_name] = header_value - {{#tornado}} - @tornado.gen.coroutine - {{/tornado}} - {{#asyncio}}async {{/asyncio}}def __call_api( + + _default = None + + @classmethod + def get_default(cls): + """Return new instance of ApiClient. + + This method returns newly created, based on default constructor, + object of ApiClient class or returns a copy of default + ApiClient. + + :return: The ApiClient object. + """ + if cls._default is None: + cls._default = ApiClient() + return cls._default + + @classmethod + def set_default(cls, default): + """Set default instance of ApiClient. + + It stores default ApiClient. + + :param default: object of ApiClient. + """ + cls._default = default + + def param_serialize( self, - resource_path: str, - method: str, - path_params: typing.Optional[typing.Dict[str, typing.Any]] = None, - query_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None, - header_params: typing.Optional[typing.Dict[str, typing.Any]] = None, - body: typing.Optional[typing.Any] = None, - post_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None, - files: typing.Optional[typing.Dict[str, typing.List[io.IOBase]]] = None, - response_type: typing.Optional[typing.Tuple[typing.Any]] = None, - auth_settings: typing.Optional[typing.List[str]] = None, - _return_http_data_only: typing.Optional[bool] = None, - collection_formats: typing.Optional[typing.Dict[str, str]] = None, - _preload_content: bool = True, - _request_timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - _host: typing.Optional[str] = None, - _check_type: typing.Optional[bool] = None, - _content_type: typing.Optional[str] = None - ): + method, + resource_path, + path_params=None, + query_params=None, + header_params=None, + body=None, + post_params=None, + files=None, auth_settings=None, + collection_formats=None, + _host=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. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :return: tuple of form (path, http_method, query_params, header_params, + body, post_params, files) + """ config = self.configuration @@ -142,14 +192,17 @@ class ApiClient(object): 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)) + header_params = dict( + 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( @@ -157,352 +210,272 @@ class ApiClient(object): quote(str(v), safe=config.safe_chars_for_path_param) ) - # query parameters - if query_params: - query_params = self.sanitize_for_serialization(query_params) - query_params = self.parameters_to_tuples(query_params, - collection_formats) - # 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.extend(self.files_parameters(files)) - if header_params['Content-Type'].startswith("multipart"): - post_params = self.parameters_to_multipart(post_params, - (dict) ) + post_params = self.parameters_to_tuples( + post_params, + collection_formats + ) + if files: + post_params.extend(self.files_parameters(files)) + + # auth setting + self.update_params_for_auth( + header_params, + query_params, + auth_settings, + resource_path, + method, + body, + request_auth=_request_auth + ) # body if body: body = self.sanitize_for_serialization(body) - # auth setting - self.update_params_for_auth(header_params, query_params, - auth_settings, resource_path, method, body) - # request url - if _host is None: + if _host is None or self.configuration.ignore_operation_servers: url = self.configuration.host + resource_path else: # use server/host defined in path or operation instead url = _host + resource_path + # 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 += "?" + url_query + + return method, url, header_params, body, post_params + + + {{#tornado}} + @tornado.gen.coroutine + {{/tornado}} + {{#asyncio}}async {{/asyncio}}def call_api( + self, + method, + url, + header_params=None, + body=None, + post_params=None, + _request_timeout=None + ) -> rest.RESTResponse: + """Makes the HTTP request (synchronous) + :param method: Method to call. + :param url: Path to method endpoint. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param _request_timeout: timeout setting for this request. + :return: RESTResponse + """ + try: # perform request and return response - response_data = {{#asyncio}}await {{/asyncio}}{{#tornado}}yield {{/tornado}}self.request( - method, url, query_params=query_params, headers=header_params, - post_params=post_params, body=body, - _preload_content=_preload_content, - _request_timeout=_request_timeout) + response_data = {{#asyncio}}await {{/asyncio}}{{#tornado}}yield {{/tornado}}self.rest_client.request( + method, url, + headers=header_params, + body=body, post_params=post_params, + _request_timeout=_request_timeout + ) + except ApiException as e: - e.body = e.body.decode('utf-8') raise e - self.last_response = response_data + return response_data + + def response_deserialize( + self, + response_data: rest.RESTResponse, + response_types_map: Optional[Dict[str, ApiResponseT]]=None + ) -> ApiResponse[ApiResponseT]: + """Deserializes response into an object. + :param response_data: RESTResponse object to be deserialized. + :param response_types_map: dict of response types. + :return: ApiResponse + """ - return_data = response_data + msg = "RESTResponse.read() must be called before passing it to response_deserialize()" + assert response_data.data is not None, msg - if not _preload_content: - {{^tornado}} - return (return_data) - {{/tornado}} - {{#tornado}} - raise tornado.gen.Return(return_data) - {{/tornado}} - return return_data + 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 found, look for '1XX', '2XX', etc. + response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) # deserialize response data - if response_type: - if response_type != (file_type,): - encoding = "utf-8" + response_text = None + return_data = None + try: + if response_type == "bytearray": + return_data = response_data.data + elif response_type == "file": + return_data = self.__deserialize_file(response_data) + elif response_type is not None: + match = None 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) - if match: - encoding = match.group(1) - response_data.data = response_data.data.decode(encoding) - - return_data = self.deserialize( - response_data, - response_type, - _check_type - ) - else: - return_data = None - -{{^tornado}} - if _return_http_data_only: - return (return_data) - else: - return (return_data, response_data.status, - response_data.getheaders()) -{{/tornado}} -{{#tornado}} - if _return_http_data_only: - raise tornado.gen.Return(return_data) - else: - raise tornado.gen.Return((return_data, response_data.status, - response_data.getheaders())) -{{/tornado}} + 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) + finally: + if not 200 <= response_data.status <= 299: + raise ApiException.from_response( + http_resp=response_data, + body=response_text, + data=return_data, + ) - def parameters_to_multipart(self, params, collection_types): - """Get parameters as list of tuples, formatting as json if value is collection_types + return ApiResponse( + status_code = response_data.status, + data = return_data, + headers = response_data.getheaders(), + raw_data = response_data.data + ) - :param params: Parameters as list of two-tuples - :param dict collection_types: Parameter collection types - :return: Parameters as list of tuple or urllib3.fields.RequestField - """ - new_params = [] - if collection_types is None: - collection_types = (dict) - for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 - if isinstance(v, collection_types): # v is instance of collection_type, formatting as application/json - v = json.dumps(v, ensure_ascii=False).encode("utf-8") - field = RequestField(k, v) - field.make_multipart(content_type="application/json; charset=utf-8") - new_params.append(field) - else: - new_params.append((k, v)) - return new_params + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. - @classmethod - def sanitize_for_serialization(cls, obj): - """Prepares data for transmission before it is sent with the rest client If obj is None, return None. + If obj is SecretStr, return obj.get_secret_value() If obj is str, int, long, float, bool, return directly. If obj is datetime.datetime, datetime.date convert to string in iso8601 format. + If obj is decimal.Decimal return string representation. If obj is list, sanitize each element in the list. If obj is dict, return the dict. If obj is OpenAPI model, return the properties dict. - If obj is io.IOBase, return the bytes + :param obj: The data to serialize. :return: The serialized form of data. """ - if isinstance(obj, (ModelNormal, ModelComposed)): - return { - key: cls.sanitize_for_serialization(val) for key, val in model_to_dict(obj, serialize=True).items() - } - elif isinstance(obj, io.IOBase): - return cls.get_file_data_and_close_file(obj) - elif isinstance(obj, (str, int, float, none_type, bool)): + if obj is None: + return None + elif isinstance(obj, Enum): + return obj.value + elif isinstance(obj, SecretStr): + return obj.get_secret_value() + elif isinstance(obj, self.PRIMITIVE_TYPES): return obj - elif isinstance(obj, (datetime, date)): + elif isinstance(obj, list): + 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 + ) + elif isinstance(obj, (datetime.datetime, datetime.date)): return obj.isoformat() - elif isinstance(obj, ModelSimple): - return cls.sanitize_for_serialization(obj.value) - elif isinstance(obj, (list, tuple)): - return [cls.sanitize_for_serialization(item) for item in obj] - if isinstance(obj, dict): - return {key: cls.sanitize_for_serialization(val) for key, val in obj.items()} - raise ApiValueError('Unable to prepare type {} for serialization'.format(obj.__class__.__name__)) - - def deserialize(self, response, response_type, _check_type): + elif isinstance(obj, decimal.Decimal): + return str(obj) + + elif isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `openapi_types`, `attribute_map` + # 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')): + obj_dict = obj.to_dict() + else: + obj_dict = obj.__dict__ + + return { + 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]): """Deserializes response into an object. :param response: RESTResponse object to be deserialized. - :param response_type: For the response, a tuple containing: - valid classes - a list containing valid classes (for list schemas) - a dict containing a tuple of valid classes as the value - Example values: - (str,) - (Pet,) - (float, none_type) - ([int, none_type],) - ({str: (bool, str, int, float, date, datetime, str, none_type)},) - :param _check_type: boolean, whether to check the types of the data - received from the server - :type _check_type: bool + :param response_type: class literal for + deserialized object, or string of class name. + :param content_type: content type of response. :return: deserialized object. """ - # handle file downloading - # save response body into a tmp file and return the instance - if response_type == (file_type,): - content_disposition = response.getheader("Content-Disposition") - return deserialize_file(response.data, self.configuration, - content_disposition=content_disposition) # fetch data from response object - try: - received_data = json.loads(response.data) -{{#useCustomTemplateCode}} - except TypeError: - received_data = response.data -{{/useCustomTemplateCode}} - except ValueError: - received_data = response.data - - # store our data under the key of 'received_data' so users have some - # context if they are deserializing a string and the data type is wrong - deserialized_data = validate_and_convert_types( - received_data, - response_type, - ['received_data'], - True, - _check_type, - configuration=self.configuration - ) - return deserialized_data + if content_type is None: + try: + data = json.loads(response_text) + except ValueError: + data = response_text + elif content_type.startswith("application/json"): + if response_text == "": + data = "" + else: + data = json.loads(response_text) + elif content_type.startswith("text/plain"): + data = response_text + else: + raise ApiException( + status=0, + reason="Unsupported content type: {0}".format(content_type) + ) - def call_api( - self, - resource_path: str, - method: str, - path_params: typing.Optional[typing.Dict[str, typing.Any]] = None, - query_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None, - header_params: typing.Optional[typing.Dict[str, typing.Any]] = None, - body: typing.Optional[typing.Any] = None, - post_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None, - files: typing.Optional[typing.Dict[str, typing.List[io.IOBase]]] = None, - response_type: typing.Optional[typing.Tuple[typing.Any]] = None, - auth_settings: typing.Optional[typing.List[str]] = None, - async_req: typing.Optional[bool] = None, - _return_http_data_only: typing.Optional[bool] = None, - collection_formats: typing.Optional[typing.Dict[str, str]] = None, - _preload_content: bool = True, - _request_timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - _host: typing.Optional[str] = None, - _check_type: typing.Optional[bool] = None - ): - """Makes the HTTP request (synchronous) and returns deserialized data. - - To make an async_req request, set the async_req parameter. + return self.__deserialize(data, response_type) - :param resource_path: Path to method endpoint. - :param method: Method to call. - :param path_params: Path parameters in the url. - :param query_params: Query parameters in the url. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param auth_settings list: Auth Settings names for the request. - :param response_type: For the response, a tuple containing: - valid classes - a list containing valid classes (for list schemas) - a dict containing a tuple of valid classes as the value - Example values: - (str,) - (Pet,) - (float, none_type) - ([int, none_type],) - ({str: (bool, str, int, float, date, datetime, str, none_type)},) - :param files: key -> field name, value -> a list of open file - objects for `multipart/form-data`. - :type files: dict - :param async_req bool: execute request asynchronously - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param collection_formats: dict of collection formats for path, query, - header, and post parameters. - :type collection_formats: dict, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _check_type: boolean describing if the data back from the server - should have its type checked. - :type _check_type: bool, optional - :return: - If async_req parameter is True, - the request will be called asynchronously. - The method will return the request thread. - If parameter async_req is False or missing, - then the method will return the response directly. + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. """ - if not async_req: - return self.__call_api(resource_path, method, - path_params, query_params, header_params, - body, post_params, files, - response_type, auth_settings, - _return_http_data_only, collection_formats, - _preload_content, _request_timeout, _host, - _check_type) - - return self.pool.apply_async(self.__call_api, (resource_path, - method, path_params, - query_params, - header_params, body, - post_params, files, - response_type, - auth_settings, - _return_http_data_only, - collection_formats, - _preload_content, - _request_timeout, - _host, _check_type)) - - def request(self, method, url, query_params=None, headers=None, - post_params=None, body=None, _preload_content=True, - _request_timeout=None): - """Makes the HTTP request using RESTClient.""" - if method == "GET": - return self.rest_client.GET(url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers) - elif method == "HEAD": - return self.rest_client.HEAD(url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers) - elif method == "OPTIONS": - return self.rest_client.OPTIONS(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "POST": - return self.rest_client.POST(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "PUT": - return self.rest_client.PUT(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "PATCH": - return self.rest_client.PATCH(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "DELETE": - return self.rest_client.DELETE(url, - query_params=query_params, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) + if data is None: + return None + + if isinstance(klass, str): + 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] + + 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()} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr({{modelPackage}}, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_datetime(data) + elif klass == decimal.Decimal: + return decimal.Decimal(data) + elif issubclass(klass, Enum): + return self.__deserialize_enum(data, klass) else: - raise ApiValueError( - "http method must be `GET`, `HEAD`, `OPTIONS`," - " `POST`, `PATCH`, `PUT` or `DELETE`." - ) + return self.__deserialize_model(data, klass) def parameters_to_tuples(self, params, collection_formats): """Get parameters as list of tuples, formatting collections. @@ -511,10 +484,10 @@ class ApiClient(object): :param dict collection_formats: Parameter collection formats :return: Parameters as list of tuples, collections formatted """ - new_params = [] + new_params: List[Tuple[str, str]] = [] if collection_formats is None: collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 + 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': @@ -534,417 +507,312 @@ class ApiClient(object): new_params.append((k, v)) return new_params - @staticmethod - def get_file_data_and_close_file(file_instance: io.IOBase) -> bytes: - file_data = file_instance.read() - file_instance.close() - return file_data - - def files_parameters(self, files: typing.Optional[typing.Dict[str, typing.List[io.IOBase]]] = None): - """Builds form parameters. + def parameters_to_url_query(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. - :param files: None or a dict with key=param_name and - value is a list of open file objects - :return: List of tuples of form parameters with file data + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: URL query string (e.g. a=Hello%20World&b=123) """ - if files is None: - return [] + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if isinstance(v, bool): + v = str(v).lower() + if isinstance(v, (int, float)): + v = str(v) + if isinstance(v, dict): + v = json.dumps(v) - params = [] - for param_name, file_instances in files.items(): - if file_instances is None: - # if the file field is nullable, skip None values - continue - for file_instance in file_instances: - if file_instance is None: - # if the file field is nullable, skip None values - continue - if file_instance.closed is True: - raise ApiValueError( - "Cannot read a closed file. The passed in file_type " - "for %s must be open." % param_name + if k in collection_formats: + collection_format = collection_formats[k] + 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 = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(quote(str(value)) for value in v)) ) - filename = os.path.basename(file_instance.name) - filedata = self.get_file_data_and_close_file(file_instance) - mimetype = (mimetypes.guess_type(filename)[0] or - 'application/octet-stream') - params.append( - tuple([param_name, tuple([filename, filedata, mimetype])])) + else: + new_params.append((k, quote(str(v)))) + + return "&".join(["=".join(map(str, item)) for item in new_params]) + +{{^useCustomTemplateCode}} + def files_parameters(self, files: Dict[str, Union[str, bytes]]): +{{/useCustomTemplateCode}} +{{#useCustomTemplateCode}} + def files_parameters(self, files: Dict[str, Union[str, bytes, io.IOBase]]): +{{/useCustomTemplateCode}} + """Builds form parameters. + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + for k, v in files.items(): + if isinstance(v, str): + with open(v, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + elif isinstance(v, bytes): + filename = k + filedata = v +{{#useCustomTemplateCode}} + elif isinstance(v, io.IOBase): + filename = os.path.basename(v.name) + filedata = v.read() +{{/useCustomTemplateCode}} + else: + raise ValueError("Unsupported file value") + 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): + def select_header_accept(self, accepts: List[str]) -> Optional[str]: """Returns `Accept` based on an array of accepts provided. :param accepts: List of headers. :return: Accept (e.g. application/json). """ if not accepts: - return + return None - accepts = [x.lower() for x in accepts] + for accept in accepts: + if re.search('json', accept, re.IGNORECASE): + return accept - if 'application/json' in accepts: - return 'application/json' - else: - return ', '.join(accepts) + return accepts[0] - def select_header_content_type(self, content_types, method=None, body=None): + def select_header_content_type(self, content_types): """Returns `Content-Type` based on an array of content_types provided. :param content_types: List of content-types. - :param method: http method (e.g. POST, PATCH). - :param body: http body to send. :return: Content-Type (e.g. application/json). """ if not content_types: - return 'application/json' - - content_types = [x.lower() for x in content_types] + return None - if (method == 'PATCH' and - 'application/json-patch+json' in content_types and - isinstance(body, list)): - return 'application/json-patch+json' + for content_type in content_types: + if re.search('json', content_type, re.IGNORECASE): + return content_type - if 'application/json' in content_types or '*/*' in content_types: - return 'application/json' - else: - return content_types[0] + return content_types[0] - def update_params_for_auth(self, headers, queries, auth_settings, - resource_path, method, body): + def update_params_for_auth( + self, + headers, + queries, + auth_settings, + resource_path, + method, + body, + request_auth=None + ) -> None: """Updates header and query params based on authentication setting. :param headers: Header parameters dict to be updated. :param queries: Query parameters tuple list to be updated. :param auth_settings: Authentication setting identifiers list. - :param resource_path: A string representation of the HTTP request resource path. - :param method: A string representation of the HTTP request method. - :param body: A object representing the body of the HTTP request. - The object type is the return value of _encoder.default(). + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param request_auth: if set, the provided settings will + override the token in the configuration. """ if not auth_settings: return - for auth in auth_settings: - auth_setting = self.configuration.auth_settings().get(auth) - if auth_setting: - 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'] -{{#hasHttpSignatureMethods}} - else: - # The HTTP signature scheme requires multiple HTTP headers - # that are calculated dynamically. - signing_info = self.configuration.signing_info - auth_headers = signing_info.get_http_signature_headers( - resource_path, method, headers, body, queries) - headers.update(auth_headers) -{{/hasHttpSignatureMethods}} - elif auth_setting['in'] == 'query': - queries.append((auth_setting['key'], auth_setting['value'])) - else: - raise ApiValueError( - 'Authentication token must be in `query` or `header`' + if request_auth: + self._apply_auth_params( + 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 ) + def _apply_auth_params( + self, + headers, + queries, + resource_path, + method, + body, + auth_setting + ) -> None: + """Updates the request parameters based on a single auth_setting -class Endpoint(object): - def __init__(self, settings=None, params_map=None, root_map=None, - headers_map=None, api_client=None, callable=None): - """Creates an endpoint - - Args: - settings (dict): see below key value pairs - 'response_type' (tuple/None): response type - 'auth' (list): a list of auth type keys - 'endpoint_path' (str): the endpoint path - 'operation_id' (str): endpoint string identifier - 'http_method' (str): POST/PUT/PATCH/GET etc - 'servers' (list): list of str servers that this endpoint is at - params_map (dict): see below key value pairs - 'all' (list): list of str endpoint parameter names - 'required' (list): list of required parameter names - 'nullable' (list): list of nullable parameter names - 'enum' (list): list of parameters with enum values - 'validation' (list): list of parameters with validations - root_map - 'validations' (dict): the dict mapping endpoint parameter tuple - paths to their validation dictionaries - 'allowed_values' (dict): the dict mapping endpoint parameter - tuple paths to their allowed_values (enum) dictionaries - 'openapi_types' (dict): param_name to openapi type - 'attribute_map' (dict): param_name to camelCase name - 'location_map' (dict): param_name to 'body', 'file', 'form', - 'header', 'path', 'query' - collection_format_map (dict): param_name to `csv` etc. - headers_map (dict): see below key value pairs - 'accept' (list): list of Accept header strings - 'content_type' (list): list of Content-Type header strings - api_client (ApiClient) api client instance - callable (function): the function which is invoked when the - Endpoint is called + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param auth_setting: auth settings for the endpoint """ - self.settings = settings - self.params_map = params_map - self.params_map['all'].extend([ - 'async_req', - '_host_index', - '_preload_content', - '_request_timeout', - '_return_http_data_only', - '_check_input_type', - '_check_return_type', - '_content_type', - '_spec_property_naming' - ]) - self.params_map['nullable'].extend(['_request_timeout']) - self.validations = root_map['validations'] - self.allowed_values = root_map['allowed_values'] - self.openapi_types = root_map['openapi_types'] - extra_types = { - 'async_req': (bool,), - '_host_index': (none_type, int), - '_preload_content': (bool,), - '_request_timeout': (none_type, float, (float,), [float], int, (int,), [int]), - '_return_http_data_only': (bool,), - '_check_input_type': (bool,), - '_check_return_type': (bool,), - '_spec_property_naming': (bool,), - '_content_type': (none_type, str) - } - self.openapi_types.update(extra_types) - self.attribute_map = root_map['attribute_map'] - self.location_map = root_map['location_map'] - self.collection_format_map = root_map['collection_format_map'] - self.headers_map = headers_map - self.api_client = api_client - self.callable = callable - - def __validate_inputs(self, kwargs): - for param in self.params_map['enum']: - if param in kwargs: - check_allowed_values( - self.allowed_values, - (param,), - kwargs[param] - ) + 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'] + {{#hasHttpSignatureMethods}} + else: + # The HTTP signature scheme requires multiple HTTP headers + # that are calculated dynamically. + signing_info = self.configuration.signing_info + auth_headers = signing_info.get_http_signature_headers( + resource_path, method, headers, body, queries) + headers.update(auth_headers) + {{/hasHttpSignatureMethods}} + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) - for param in self.params_map['validation']: - if param in kwargs: - check_validations( - self.validations, - (param,), - kwargs[param], - configuration=self.api_client.configuration - ) + def __deserialize_file(self, response): + """Deserializes body to file - if kwargs['_check_input_type'] is False: - return + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + handle file downloading + save response body into a tmp file and return the instance - for key, value in kwargs.items(): - fixed_val = validate_and_convert_types( - value, - self.openapi_types[key], - [key], - kwargs['_spec_property_naming'], - kwargs['_check_input_type'], - configuration=self.api_client.configuration + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + m = re.search( + r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition ) - kwargs[key] = fixed_val - - def __gather_params(self, kwargs): - params = { - 'body': None, - 'collection_format': {}, - 'file': {}, - 'form': [], - 'header': {}, - 'path': {}, - 'query': [] - } + assert m is not None, "Unexpected 'content-disposition' header value" + filename = m.group(1) + path = os.path.join(os.path.dirname(path), filename) - for param_name, param_value in kwargs.items(): - param_location = self.location_map.get(param_name) - if param_location is None: - continue - if param_location: - if param_location == 'body': -{{^useCustomTemplateCode}} - params['body'] = param_value -{{/useCustomTemplateCode}} -{{#useCustomTemplateCode}} - """We want to support a single typed object parameter for all endpoints, - including of multipart/form-data content-types. - """ - body = param_value.to_dict() - remove_files = [] - - for oas_name in param_value.openapi_types: - if hasattr(param_value, oas_name): - obj = param_value[oas_name] - if isinstance(obj, file_type): - params['file'][oas_name] = [obj] - remove_files.append(oas_name) - elif isinstance(obj, list): - i = 0 - for obj_value in obj: - if isinstance(obj_value, file_type): - key = oas_name + '[' + str(i) + ']' - params['file'][key] = [obj_value] - remove_files.append(oas_name) - i += 1 - - # remove duplicates - remove_files = list(set(remove_files)) - - for remove in remove_files: - body.pop(remove) - - if len(remove_files): - for param in body: - param_value_full = (param, body[param]) - - # do not change non-JSON values - if (not isinstance(body[param], (str, bool, int, float))): - param_value_full = (param, json.dumps(body[param])) - - params['form'].append(param_value_full) - else: - params['body'] = param_value -{{/useCustomTemplateCode}} - continue - base_name = self.attribute_map[param_name] - if (param_location == 'form' and - self.openapi_types[param_name] == (file_type,)): - params['file'][base_name] = [param_value] - elif (param_location == 'form' and - self.openapi_types[param_name] == ([file_type],)): - # param_value is already a list - params['file'][base_name] = param_value - elif param_location in {'form', 'query'}: - param_value_full = (base_name, param_value) - params[param_location].append(param_value_full) - if param_location not in {'form', 'query'}: - params[param_location][base_name] = param_value - collection_format = self.collection_format_map.get(param_name) - if collection_format: - params['collection_format'][base_name] = collection_format + with open(path, "wb") as f: + f.write(response.data) - return params + return path + + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. - def __call__(self, *args, **kwargs): - """ This method is invoked when endpoints are called - Example: -{{#apiInfo}}{{#apis}}{{#-first}}{{#operations}}{{#operation}}{{#-first}} - api_instance = {{classname}}() - api_instance.{{operationId}} # this is an instance of the class Endpoint - api_instance.{{operationId}}() # this invokes api_instance.{{operationId}}.__call__() - which then invokes the callable functions stored in that endpoint at - api_instance.{{operationId}}.callable or self.callable in this class -{{/-first}}{{/operation}}{{/operations}}{{/-first}}{{/apis}}{{/apiInfo}} + :return: int, long, float, str, bool. """ - return self.callable(self, *args, **kwargs) + try: + return klass(data) + except UnicodeEncodeError: + return str(data) + except TypeError: + return data - def call_with_http_info(self, **kwargs): + def __deserialize_object(self, value): + """Return an original value. + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ try: - index = self.api_client.configuration.server_operation_index.get( - self.settings['operation_id'], self.api_client.configuration.server_index - ) if kwargs['_host_index'] is None else kwargs['_host_index'] - server_variables = self.api_client.configuration.server_operation_variables.get( - self.settings['operation_id'], self.api_client.configuration.server_variables - ) - _host = self.api_client.configuration.get_host_from_settings( - index, variables=server_variables, servers=self.settings['servers'] + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) ) - except IndexError: - if self.settings['servers']: - raise ApiValueError( - "Invalid host index. Must be 0 <= index < %s" % - len(self.settings['servers']) - ) - _host = None - - for key, value in kwargs.items(): - if key not in self.params_map['all']: - raise ApiTypeError( - "Got an unexpected parameter '%s'" - " to method `%s`" % - (key, self.settings['operation_id']) - ) - # only throw this nullable ApiValueError if _check_input_type - # is False, if _check_input_type==True we catch this case - # in self.__validate_inputs - if (key not in self.params_map['nullable'] and value is None - and kwargs['_check_input_type'] is False): - raise ApiValueError( - "Value may not be None for non-nullable parameter `%s`" - " when calling `%s`" % - (key, self.settings['operation_id']) - ) - for key in self.params_map['required']: - if key not in kwargs.keys(): - raise ApiValueError( - "Missing the required parameter `%s` when calling " - "`%s`" % (key, self.settings['operation_id']) - ) + def __deserialize_datetime(self, string): + """Deserializes string to datetime. - self.__validate_inputs(kwargs) + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) + ) - params = self.__gather_params(kwargs) + def __deserialize_enum(self, data, klass): + """Deserializes primitive type to enum. -{{#useCustomTemplateCode}} - # Remove None values from query parameters - query_to_keep = [] - for key, value in params['query']: - if value is not None: - query_to_keep = query_to_keep + [(key, value)] + :param data: primitive type. + :param klass: class literal. + :return: enum value. + """ + try: + return klass(data) + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as `{1}`" + .format(data, klass) + ) + ) - params['query'] = query_to_keep + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. -{{/useCustomTemplateCode}} - accept_headers_list = self.headers_map['accept'] - if accept_headers_list: - params['header']['Accept'] = self.api_client.select_header_accept( - accept_headers_list) + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ - if kwargs.get('_content_type'): - params['header']['Content-Type'] = kwargs['_content_type'] - else: - content_type_headers_list = self.headers_map['content_type'] - if content_type_headers_list: -{{^useCustomTemplateCode}} - if params['body'] != "": -{{/useCustomTemplateCode}} -{{#useCustomTemplateCode}} - if len(params['form']) > 0 or ('file' in params.keys() and len(params['file']) > 0): - params['header']['Content-Type'] = 'multipart/form-data' - elif params['body'] != "": -{{/useCustomTemplateCode}} - header_list = self.api_client.select_header_content_type( - content_type_headers_list, self.settings['http_method'], - params['body']) - params['header']['Content-Type'] = header_list - - return self.api_client.call_api( - self.settings['endpoint_path'], self.settings['http_method'], - params['path'], - params['query'], - params['header'], - body=params['body'], - post_params=params['form'], - files=params['file'], - response_type=self.settings['response_type'], - auth_settings=self.settings['auth'], - async_req=kwargs['async_req'], - _check_type=kwargs['_check_return_type'], - _return_http_data_only=kwargs['_return_http_data_only'], - _preload_content=kwargs['_preload_content'], - _request_timeout=kwargs['_request_timeout'], - _host=_host, - collection_formats=params['collection_format']) + return klass.from_dict(data) diff --git a/sdks/python/templates/api_doc.mustache b/sdks/python/templates/api_doc.mustache index afe8e68d1..ac6d3f8f2 100644 --- a/sdks/python/templates/api_doc.mustache +++ b/sdks/python/templates/api_doc.mustache @@ -24,7 +24,7 @@ Method | HTTP request | Description {{#operation}} {{^useCustomTemplateCode}} # **{{{operationId}}}** -> {{#returnType}}{{{.}}} {{/returnType}}{{{operationId}}}({{#requiredParams}}{{^defaultValue}}{{paramName}}{{^-last}}, {{/-last}}{{/defaultValue}}{{/requiredParams}}) +> {{#returnType}}{{{.}}} {{/returnType}}{{{operationId}}}({{#allParams}}{{#required}}{{{paramName}}}{{/required}}{{^required}}{{{paramName}}}={{{paramName}}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) {{/useCustomTemplateCode}} {{#useCustomTemplateCode}} # ```{{{operationId}}}``` @@ -55,7 +55,6 @@ Method | HTTP request | Description {{/isOAuth }} {{/authMethods}} {{/hasAuthMethods}} - {{> api_doc_example }} ### Parameters @@ -63,10 +62,8 @@ Method | HTTP request | Description {{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}} Name | Type | Description | Notes ------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}} -{{#requiredParams}}{{^defaultValue}} **{{paramName}}** | {{^baseType}}**{{dataType}}**{{/baseType}}{{#baseType}}[**{{dataType}}**]({{baseType}}.md){{/baseType}}| {{description}} | -{{/defaultValue}}{{/requiredParams}}{{#requiredParams}}{{#defaultValue}} **{{paramName}}** | {{^baseType}}**{{dataType}}**{{/baseType}}{{#baseType}}[**{{dataType}}**]({{baseType}}.md){{/baseType}}| {{description}} | defaults to {{{.}}} -{{/defaultValue}}{{/requiredParams}}{{#optionalParams}} **{{paramName}}** | {{^baseType}}**{{dataType}}**{{/baseType}}{{#baseType}}[**{{dataType}}**]({{baseType}}.md){{/baseType}}| {{description}} | [optional]{{#defaultValue}} if omitted the server will use the default value of {{{.}}}{{/defaultValue}} -{{/optionalParams}} +{{#allParams}} **{{paramName}}** | {{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{baseType}}.md){{/isPrimitiveType}}{{/isFile}}| {{description}} | {{^required}}[optional] {{/required}}{{#defaultValue}}[default to {{.}}]{{/defaultValue}} +{{/allParams}} {{/useCustomTemplateCode}} {{#useCustomTemplateCode}} {{^allParams}} @@ -95,7 +92,6 @@ This endpoint does not need any parameter. - **Accept**: {{#produces}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/produces}}{{^produces}}Not defined{{/produces}} {{#responses.0}} - ### HTTP response details | Status code | Description | Response headers | diff --git a/sdks/python/templates/api_doc_example.mustache b/sdks/python/templates/api_doc_example.mustache index 04b812687..2392430e9 100644 --- a/sdks/python/templates/api_doc_example.mustache +++ b/sdks/python/templates/api_doc_example.mustache @@ -1,81 +1,45 @@ -```python + {{^useCustomTemplateCode}} -import time +```python import {{{packageName}}} -from {{apiPackage}} import {{classFilename}} -{{#imports}} +{{#vendorExtensions.x-py-example-import}} {{{.}}} -{{/imports}} +{{/vendorExtensions.x-py-example-import}} +from {{{packageName}}}.rest import ApiException from pprint import pprint + {{> python_doc_auth_partial}} # Enter a context with an instance of the API client -{{#hasAuthMethods}} -with {{{packageName}}}.ApiClient(configuration) as api_client: -{{/hasAuthMethods}} -{{^hasAuthMethods}} -with {{{packageName}}}.ApiClient() as api_client: -{{/hasAuthMethods}} +{{#asyncio}}async {{/asyncio}}with {{{packageName}}}.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = {{classFilename}}.{{{classname}}}(api_client) -{{#requiredParams}} -{{^defaultValue}} - {{paramName}} = {{{example}}} # {{{dataType}}} | {{{description}}} -{{/defaultValue}} -{{/requiredParams}} -{{#optionalParams}} - {{paramName}} = {{{example}}} # {{{dataType}}} | {{{description}}}{{^required}} (optional){{/required}}{{#defaultValue}} if omitted the server will use the default value of {{{.}}}{{/defaultValue}} -{{/optionalParams}} -{{#requiredParams}} -{{#-last}} - - # example passing only required values which don't have defaults set - try: -{{#summary}} - # {{{.}}} -{{/summary}} - {{#returnType}}api_response = {{/returnType}}api_instance.{{{operationId}}}({{#requiredParams}}{{^defaultValue}}{{paramName}}{{^-last}}, {{/-last}}{{/defaultValue}}{{/requiredParams}}) -{{#returnType}} - pprint(api_response) -{{/returnType}} - except {{{packageName}}}.ApiException as e: - print("Exception when calling {{classname}}->{{operationId}}: %s\n" % e) -{{/-last}} -{{/requiredParams}} -{{#optionalParams}} -{{#-last}} + api_instance = {{{packageName}}}.{{{classname}}}(api_client) + {{#allParams}} + {{paramName}} = {{{example}}} # {{{dataType}}} | {{{description}}}{{^required}} (optional){{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} + {{/allParams}} - # example passing only required values which don't have defaults set - # and optional values try: -{{#summary}} + {{#summary}} # {{{.}}} -{{/summary}} - {{#returnType}}api_response = {{/returnType}}api_instance.{{{operationId}}}({{#requiredParams}}{{^defaultValue}}{{paramName}}, {{/defaultValue}}{{/requiredParams}}{{#optionalParams}}{{paramName}}={{paramName}}{{^-last}}, {{/-last}}{{/optionalParams}}) -{{#returnType}} + {{/summary}} + {{#returnType}}api_response = {{/returnType}}{{#asyncio}}await {{/asyncio}}api_instance.{{{operationId}}}({{#allParams}}{{#required}}{{paramName}}{{/required}}{{^required}}{{paramName}}={{paramName}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) + {{#returnType}} + print("The response of {{classname}}->{{operationId}}:\n") pprint(api_response) -{{/returnType}} - except {{{packageName}}}.ApiException as e: + {{/returnType}} + except Exception as e: print("Exception when calling {{classname}}->{{operationId}}: %s\n" % e) -{{/-last}} -{{/optionalParams}} -{{^requiredParams}} -{{^optionalParams}} +``` - # example, this endpoint has no required or optional parameters - try: -{{#summary}} - # {{{.}}} -{{/summary}} - {{#returnType}}api_response = {{/returnType}}api_instance.{{{operationId}}}() -{{#returnType}} - pprint(api_response) -{{/returnType}} - except {{{packageName}}}.ApiException as e: - print("Exception when calling {{classname}}->{{operationId}}: %s\n" % e) -{{/optionalParams}} -{{/requiredParams}} +{{#vendorExtensions.x-py-postponed-example-imports.size}} +{{#vendorExtensions.x-py-postponed-example-imports}} +{{{.}}} +{{/vendorExtensions.x-py-postponed-example-imports}} +{{classname}}.update_forward_refs() +{{/vendorExtensions.x-py-postponed-example-imports.size}} {{/useCustomTemplateCode}} {{#useCustomTemplateCode}} +```python REPLACE_ME_WITH_EXAMPLE_FOR__{{{operationId}}}_Python_CODE -{{/useCustomTemplateCode}} ``` +{{/useCustomTemplateCode}} +``` \ No newline at end of file diff --git a/sdks/python/templates/api_response.mustache b/sdks/python/templates/api_response.mustache new file mode 100644 index 000000000..9bc7c11f6 --- /dev/null +++ b/sdks/python/templates/api_response.mustache @@ -0,0 +1,21 @@ +"""API response object.""" + +from __future__ import annotations +from typing import Optional, Generic, Mapping, TypeVar +from pydantic import Field, StrictInt, StrictBytes, BaseModel + +T = TypeVar("T") + +class ApiResponse(BaseModel, Generic[T]): + """ + API response object + """ + + status_code: StrictInt = Field(description="HTTP status code") + headers: Optional[Mapping[str, str]] = Field(None, description="HTTP headers") + 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 + } diff --git a/sdks/python/templates/api_test.mustache b/sdks/python/templates/api_test.mustache index 8f3d764d0..5354d3cba 100644 --- a/sdks/python/templates/api_test.mustache +++ b/sdks/python/templates/api_test.mustache @@ -1,26 +1,27 @@ +# coding: utf-8 + {{>partial_header}} import unittest -import {{packageName}} -from {{apiPackage}}.{{classFilename}} import {{classname}} # noqa: E501 +from {{apiPackage}}.{{classFilename}} import {{classname}} class {{#operations}}Test{{classname}}(unittest.TestCase): """{{classname}} unit test stubs""" - def setUp(self): - self.api = {{classname}}() # noqa: E501 + def setUp(self) -> None: + self.api = {{classname}}() - def tearDown(self): + def tearDown(self) -> None: pass {{#operation}} - def test_{{operationId}}(self): + def test_{{operationId}}(self) -> None: """Test case for {{{operationId}}} {{#summary}} - {{{.}}} # noqa: E501 + {{{.}}} {{/summary}} """ pass diff --git a/sdks/python/templates/asyncio/rest.mustache b/sdks/python/templates/asyncio/rest.mustache index d69e7fd83..c3f864368 100644 --- a/sdks/python/templates/asyncio/rest.mustache +++ b/sdks/python/templates/asyncio/rest.mustache @@ -1,46 +1,54 @@ +# coding: utf-8 + {{>partial_header}} import io import json -import logging import re import ssl +from typing import Optional, Union import aiohttp -# python 2 and python 3 compatibility library -from six.moves.urllib.parse import urlencode +import aiohttp_retry from {{packageName}}.exceptions import ApiException, ApiValueError -logger = logging.getLogger(__name__) +RESTResponseType = aiohttp.ClientResponse +ALLOW_RETRY_METHODS = frozenset({'DELETE', 'GET', 'HEAD', 'OPTIONS', 'PUT', 'TRACE'}) class RESTResponse(io.IOBase): - def __init__(self, resp, data): - self.aiohttp_response = resp + def __init__(self, resp) -> None: + self.response = resp self.status = resp.status self.reason = resp.reason - self.data = data + self.data = None + + async def read(self): + if self.data is None: + self.data = await self.response.read() + return self.data def getheaders(self): """Returns a CIMultiDictProxy of the response headers.""" - return self.aiohttp_response.headers + return self.response.headers def getheader(self, name, default=None): """Returns a given response header.""" - return self.aiohttp_response.headers.get(name, default) + return self.response.headers.get(name, default) -class RESTClientObject(object): +class RESTClientObject: - def __init__(self, configuration, pools_size=4, maxsize=None): + def __init__(self, configuration) -> None: # maxsize is number of requests to host that are allowed in parallel - if maxsize is None: - maxsize = configuration.connection_pool_maxsize + maxsize = configuration.connection_pool_maxsize - ssl_context = ssl.create_default_context(cafile=configuration.ssl_ca_cert) + ssl_context = ssl.create_default_context( + cafile=configuration.ssl_ca_cert + ) if configuration.cert_file: ssl_context.load_cert_chain( configuration.cert_file, keyfile=configuration.key_file @@ -64,32 +72,59 @@ class RESTClientObject(object): trust_env=True ) + retries = configuration.retries + self.retry_client: Optional[aiohttp_retry.RetryClient] + if retries is not None: + self.retry_client = aiohttp_retry.RetryClient( + client_session=self.pool_manager, + retry_options=aiohttp_retry.ExponentialRetry( + attempts=retries, + factor=2.0, + start_timeout=0.1, + max_timeout=120.0 + ) + ) + else: + self.retry_client = None + async def close(self): await self.pool_manager.close() - - async def request(self, method, url, query_params=None, headers=None, - body=None, post_params=None, _preload_content=True, - _request_timeout=None): + if self.retry_client is not None: + await self.retry_client.close() + + async def request( + self, + method, + url, + headers=None, + body=None, + post_params=None, + _request_timeout=None + ): """Execute request :param method: http request method :param url: http request url - :param query_params: query parameters in the url :param headers: http request headers :param body: request json body, for `application/json` :param post_params: request post parameters, `application/x-www-form-urlencoded` and `multipart/form-data` - :param _preload_content: this is a non-applicable field for - the AiohttpClient. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. """ method = method.upper() - assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', - 'PATCH', 'OPTIONS'] + assert method in [ + 'GET', + 'HEAD', + 'DELETE', + 'POST', + 'PUT', + 'PATCH', + 'OPTIONS' + ] if post_params and body: raise ApiValueError( @@ -98,6 +133,7 @@ class RESTClientObject(object): post_params = post_params or {} headers = headers or {} + # url already contains the URL query string timeout = _request_timeout or 5 * 60 if 'Content-Type' not in headers: @@ -115,16 +151,13 @@ class RESTClientObject(object): if self.proxy_headers: args["proxy_headers"] = self.proxy_headers - if query_params: - args["url"] += '?' + urlencode(query_params) - # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: if re.search('json', headers['Content-Type'], re.IGNORECASE): if body is not None: body = json.dumps(body) args["data"] = body - elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 + elif headers['Content-Type'] == 'application/x-www-form-urlencoded': args["data"] = aiohttp.FormData(post_params) elif headers['Content-Type'] == 'multipart/form-data': # must del headers['Content-Type'], or the correct @@ -134,18 +167,20 @@ class RESTClientObject(object): for param in post_params: k, v = param if isinstance(v, tuple) and len(v) == 3: - data.add_field(k, - value=v[1], - filename=v[0], - content_type=v[2]) + data.add_field( + k, + value=v[1], + filename=v[0], + content_type=v[2] + ) else: data.add_field(k, v) args["data"] = data - # Pass a `bytes` parameter directly in the body to support + # Pass a `bytes` or `str` parameter directly in the body to support # other content types than Json when `body` argument is provided # in serialized form - elif isinstance(body, bytes): + elif isinstance(body, str) or isinstance(body, bytes): args["data"] = body else: # Cannot generate the request from given parameters @@ -154,84 +189,17 @@ class RESTClientObject(object): declared content type.""" raise ApiException(status=0, reason=msg) - r = await self.pool_manager.request(**args) - if _preload_content: - - data = await r.read() - r = RESTResponse(r, data) - - # log response body - logger.debug("response body: %s", r.data) - - if not 200 <= r.status <= 299: - raise ApiException(http_resp=r) - - return r - - async def GET(self, url, headers=None, query_params=None, - _preload_content=True, _request_timeout=None): - return (await self.request("GET", url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params)) - - async def HEAD(self, url, headers=None, query_params=None, - _preload_content=True, _request_timeout=None): - return (await self.request("HEAD", url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params)) - - async def OPTIONS(self, url, headers=None, query_params=None, - post_params=None, body=None, _preload_content=True, - _request_timeout=None): - return (await self.request("OPTIONS", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body)) - - async def DELETE(self, url, headers=None, query_params=None, body=None, - _preload_content=True, _request_timeout=None): - return (await self.request("DELETE", url, - headers=headers, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body)) - - async def POST(self, url, headers=None, query_params=None, - post_params=None, body=None, _preload_content=True, - _request_timeout=None): - return (await self.request("POST", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body)) - - async def PUT(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return (await self.request("PUT", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body)) - - async def PATCH(self, url, headers=None, query_params=None, - post_params=None, body=None, _preload_content=True, - _request_timeout=None): - return (await self.request("PATCH", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body)) + pool_manager: Union[aiohttp.ClientSession, aiohttp_retry.RetryClient] + if self.retry_client is not None and method in ALLOW_RETRY_METHODS: + pool_manager = self.retry_client + else: + pool_manager = self.pool_manager + + r = await pool_manager.request(**args) + + return RESTResponse(r) + + + + + diff --git a/sdks/python/templates/common_README.mustache b/sdks/python/templates/common_README.mustache new file mode 100644 index 000000000..b7ce4615d --- /dev/null +++ b/sdks/python/templates/common_README.mustache @@ -0,0 +1,84 @@ +```python +{{#apiInfo}}{{#apis}}{{#-last}}{{#hasHttpSignatureMethods}}import datetime{{/hasHttpSignatureMethods}}{{/-last}}{{/apis}}{{/apiInfo}} +import {{{packageName}}} +from {{{packageName}}}.rest import ApiException +from pprint import pprint +{{#apiInfo}}{{#apis}}{{#-first}}{{#operations}}{{#operation}}{{#-first}} +{{> python_doc_auth_partial}} + +# Enter a context with an instance of the API client +{{#asyncio}}async {{/asyncio}}with {{{packageName}}}.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = {{{packageName}}}.{{{classname}}}(api_client) + {{#allParams}} + {{paramName}} = {{{example}}} # {{{dataType}}} | {{{description}}}{{^required}} (optional){{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} + {{/allParams}} + + try: + {{#summary}} + # {{{.}}} + {{/summary}} + {{#returnType}}api_response = {{/returnType}}{{#asyncio}}await {{/asyncio}}api_instance.{{{operationId}}}({{#allParams}}{{#required}}{{paramName}}{{/required}}{{^required}}{{paramName}}={{paramName}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) + {{#returnType}} + print("The response of {{classname}}->{{operationId}}:\n") + pprint(api_response) + {{/returnType}} + except ApiException as e: + print("Exception when calling {{classname}}->{{operationId}}: %s\n" % e) +{{/-first}}{{/operation}}{{/operations}}{{/-first}}{{/apis}}{{/apiInfo}} +``` + +## Documentation for API Endpoints + +All URIs are relative to *{{{basePath}}}* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{summary}} +{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} + +## Documentation For Models + +{{#models}}{{#model}} - [{{{classname}}}]({{modelDocPath}}{{{classname}}}.md) +{{/model}}{{/models}} + + +## Documentation For Authorization + +{{^authMethods}}Endpoints do not require authorization.{{/authMethods}} +{{#hasAuthMethods}}Authentication schemes defined for the API:{{/hasAuthMethods}} +{{#authMethods}} + +### {{{name}}} + +{{#isApiKey}} +- **Type**: API key +- **API key parameter name**: {{{keyParamName}}} +- **Location**: {{#isKeyInQuery}}URL query string{{/isKeyInQuery}}{{#isKeyInHeader}}HTTP header{{/isKeyInHeader}} +{{/isApiKey}} +{{#isBasic}} +{{#isBasicBasic}} +- **Type**: HTTP basic authentication +{{/isBasicBasic}} +{{#isBasicBearer}} +- **Type**: Bearer authentication{{#bearerFormat}} ({{{.}}}){{/bearerFormat}} +{{/isBasicBearer}} +{{#isHttpSignature}} +- **Type**: HTTP signature authentication +{{/isHttpSignature}} +{{/isBasic}} +{{#isOAuth}} +- **Type**: OAuth +- **Flow**: {{{flow}}} +- **Authorization URL**: {{{authorizationUrl}}} +- **Scopes**: {{^scopes}}N/A{{/scopes}} +{{#scopes}} - **{{{scope}}}**: {{{description}}} +{{/scopes}} +{{/isOAuth}} + +{{/authMethods}} + +## Author + +{{#apiInfo}}{{#apis}}{{#-last}}{{infoEmail}} +{{/-last}}{{/apis}}{{/apiInfo}} diff --git a/sdks/python/templates/configuration.mustache b/sdks/python/templates/configuration.mustache index 1d518a715..009658941 100644 --- a/sdks/python/templates/configuration.mustache +++ b/sdks/python/templates/configuration.mustache @@ -1,16 +1,18 @@ +# coding: utf-8 + {{>partial_header}} import copy import logging +from logging import FileHandler {{^asyncio}} import multiprocessing {{/asyncio}} import sys +from typing import Optional import urllib3 -from http import client as http_client -from {{packageName}}.exceptions import ApiValueError - +import http.client as httplib JSON_SCHEMA_VALIDATION_KEYWORDS = { 'multipleOf', 'maximum', 'exclusiveMaximum', @@ -18,46 +20,23 @@ JSON_SCHEMA_VALIDATION_KEYWORDS = { 'minLength', 'pattern', 'maxItems', 'minItems' } -class Configuration(object): - """NOTE: This class is auto generated by OpenAPI Generator +class Configuration: + """This class contains various settings of the API client. - Ref: https://openapi-generator.tech - Do not edit the class manually. - - :param host: Base url + :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) + :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 discard_unknown_keys: Boolean value indicating whether to discard - unknown properties. A server may send a response that includes additional - properties that are not known by the client in the following scenarios: - 1. The OpenAPI document is incomplete, i.e. it does not match the server - implementation. - 2. The client was generated using an older version of the OpenAPI document - and the server has been upgraded since then. - If a schema in the OpenAPI document defines the additionalProperties attribute, - then all undeclared properties received by the server are injected into the - additional properties map. In that case, there are undeclared properties, and - nothing to discard. - :param disabled_client_side_validations (string): Comma-separated list of - JSON schema validation keywords to disable JSON schema structural validation - rules. The following keywords may be specified: multipleOf, maximum, - exclusiveMaximum, minimum, exclusiveMinimum, maxLength, minLength, pattern, - maxItems, minItems. - By default, the validation is performed for data generated locally by the client - and data received from the server, independent of any validation performed by - the server side. If the input data does not satisfy the JSON schema validation - rules specified in the OpenAPI document, an exception is raised. - If disabled_client_side_validations is set, structural validation is - disabled. This can be useful to troubleshoot data validation problem, such as - when the OpenAPI document validation rules do not match the actual API data - received by the server. + :param username: Username for HTTP basic authentication. + :param password: Password for HTTP basic authentication. + :param access_token: Access token. {{#hasHttpSignatureMethods}} :param signing_info: Configuration parameters for the HTTP signature security scheme. Must be an instance of {{{packageName}}}.signing.HttpSigningConfiguration @@ -70,9 +49,11 @@ class Configuration(object): 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. + 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 + in PEM format. + :param retries: Number of retries for API requests. {{#hasAuthMethods}} :Example: @@ -110,8 +91,13 @@ conf = {{{packageName}}}.Configuration( Configure API client with HTTP basic authentication: conf = {{{packageName}}}.Configuration( +{{^useCustomTemplateCode}} username='the-user', password='the-password', +{{/useCustomTemplateCode}} +{{#useCustomTemplateCode}} + username='YOUR_API_KEY', +{{/useCustomTemplateCode}} ) {{/hasHttpBasicMethods}} @@ -163,17 +149,19 @@ conf = {{{packageName}}}.Configuration( def __init__(self, host=None, api_key=None, api_key_prefix=None, - access_token=None, username=None, password=None, - discard_unknown_keys=False, - disabled_client_side_validations="", + access_token=None, {{#hasHttpSignatureMethods}} signing_info=None, {{/hasHttpSignatureMethods}} 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 = "{{{basePath}}}" if host is None else host @@ -187,13 +175,20 @@ conf = {{{packageName}}}.Configuration( self.server_operation_variables = server_operation_variables or {} """Default server variables """ + self.ignore_operation_servers = ignore_operation_servers + """Ignore operation servers + """ self.temp_folder_path = None """Temp file folder for downloading files """ # Authentication Settings - self.access_token = access_token self.api_key = {} +{{^useCustomTemplateCode}} if api_key: +{{/useCustomTemplateCode}} +{{#useCustomTemplateCode}} + if api_key and not username: +{{/useCustomTemplateCode}} self.api_key = api_key """dict to store API key(s) """ @@ -211,8 +206,9 @@ conf = {{{packageName}}}.Configuration( self.password = password """Password for HTTP basic authentication """ - self.discard_unknown_keys = discard_unknown_keys - self.disabled_client_side_validations = disabled_client_side_validations + self.access_token = access_token + """Access token + """ {{#hasHttpSignatureMethods}} if signing_info is not None: signing_info.host = host @@ -231,13 +227,16 @@ conf = {{{packageName}}}.Configuration( self.logger_stream_handler = None """Log stream handler """ - self.logger_file_handler = None + self.logger_file_handler: Optional[FileHandler] = None """Log file handler """ self.logger_file = None """Debug file location """ - self.debug = False + if debug is not None: + self.debug = debug + else: + self.__debug = False """Debug switch """ @@ -258,6 +257,10 @@ conf = {{{packageName}}}.Configuration( self.assert_hostname = None """Set this to True/False to enable/disable SSL hostname verification. """ + self.tls_server_name = None + """SSL/TLS Server Name Indication (SNI) + Set this to the SNI value expected by the server. + """ {{#asyncio}} self.connection_pool_maxsize = 100 @@ -275,26 +278,32 @@ conf = {{{packageName}}}.Configuration( """ {{/asyncio}} - self.proxy = None + self.proxy: Optional[str] = None """Proxy URL """ - self.no_proxy = None - """bypass proxy for host in the no_proxy list. - """ self.proxy_headers = None """Proxy headers """ self.safe_chars_for_path_param = '' """Safe chars for path_param """ - self.retries = None + self.retries = retries """Adding retries to override urllib3 default value 3 """ # Enable client side validation self.client_side_validation = True - # Options to pass down to the underlying urllib3 socket self.socket_options = None + """Options to pass down to the underlying urllib3 socket + """ + + self.datetime_format = "{{{datetimeFormat}}}" + """datetime format + """ + + self.date_format = "{{{dateFormat}}}" + """date format + """ def __deepcopy__(self, memo): cls = self.__class__ @@ -312,13 +321,6 @@ conf = {{{packageName}}}.Configuration( def __setattr__(self, name, value): object.__setattr__(self, name, value) - if name == 'disabled_client_side_validations': - s = set(filter(None, value.split(','))) - for v in s: - if v not in JSON_SCHEMA_VALIDATION_KEYWORDS: - raise ApiValueError( - "Invalid keyword: '{0}''".format(v)) - self._disabled_client_side_validations = s {{#hasHttpSignatureMethods}} if name == "signing_info" and value is not None: # Ensure the host parameter from signing info is the same as @@ -335,21 +337,31 @@ conf = {{{packageName}}}.Configuration( :param default: object of Configuration """ - cls._default = copy.deepcopy(default) + cls._default = default @classmethod def get_default_copy(cls): - """Return new instance of configuration. + """Deprecated. Please use `get_default` instead. + + Deprecated. Please use `get_default` instead. + + :return: The configuration object. + """ + return cls.get_default() + + @classmethod + def get_default(cls): + """Return the default configuration. This method returns newly created, based on default constructor, object of Configuration class or returns a copy of default - configuration passed by the set_default method. + configuration. :return: The configuration object. """ - if cls._default is not None: - return copy.deepcopy(cls._default) - return Configuration() + if cls._default is None: + cls._default = Configuration() + return cls._default @property def logger_file(self): @@ -403,15 +415,15 @@ conf = {{{packageName}}}.Configuration( # if debug status is True, turn on debug logging for _, logger in self.logger.items(): logger.setLevel(logging.DEBUG) - # turn on http_client debug - http_client.HTTPConnection.debuglevel = 1 + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 else: # if debug status is False, turn off debug logging, # setting log level to default `logging.WARNING` for _, logger in self.logger.items(): logger.setLevel(logging.WARNING) - # turn off http_client debug - http_client.HTTPConnection.debuglevel = 0 + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 @property def logger_format(self): @@ -493,7 +505,7 @@ conf = {{{packageName}}}.Configuration( if self.username is not None and self.password is not None: {{/useCustomTemplateCode}} {{#useCustomTemplateCode}} - if self.username is not None or self.password is not None: + if self.username is not None: {{/useCustomTemplateCode}} auth['{{name}}'] = { 'type': 'basic', diff --git a/sdks/python/templates/exceptions.mustache b/sdks/python/templates/exceptions.mustache index 046dcd9a5..a690ceb92 100644 --- a/sdks/python/templates/exceptions.mustache +++ b/sdks/python/templates/exceptions.mustache @@ -1,5 +1,8 @@ -{{>partial_header}} +# coding: utf-8 +{{>partial_header}} +from typing import Any, Optional +from typing_extensions import Self class OpenApiException(Exception): """The base exception class for all OpenAPIExceptions""" @@ -7,7 +10,7 @@ class OpenApiException(Exception): class ApiTypeError(OpenApiException, TypeError): def __init__(self, msg, path_to_item=None, valid_classes=None, - key_type=None): + key_type=None) -> None: """ Raises an exception for TypeErrors Args: @@ -35,7 +38,7 @@ class ApiTypeError(OpenApiException, TypeError): class ApiValueError(OpenApiException, ValueError): - def __init__(self, msg, path_to_item=None): + def __init__(self, msg, path_to_item=None) -> None: """ Args: msg (str): the exception message @@ -53,7 +56,7 @@ class ApiValueError(OpenApiException, ValueError): class ApiAttributeError(OpenApiException, AttributeError): - def __init__(self, msg, path_to_item=None): + def __init__(self, msg, path_to_item=None) -> None: """ Raised when an attribute reference or assignment fails. @@ -72,7 +75,7 @@ class ApiAttributeError(OpenApiException, AttributeError): class ApiKeyError(OpenApiException, KeyError): - def __init__(self, msg, path_to_item=None): + def __init__(self, msg, path_to_item=None) -> None: """ Args: msg (str): the exception message @@ -90,17 +93,56 @@ class ApiKeyError(OpenApiException, KeyError): class ApiException(OpenApiException): - def __init__(self, status=None, reason=None, http_resp=None): + def __init__( + self, + status=None, + reason=None, + http_resp=None, + *, + body: Optional[str] = None, + data: Optional[Any] = None, + ) -> None: + self.status = status + self.reason = reason + self.body = body + self.data = data + self.headers = None + if http_resp: - self.status = http_resp.status - self.reason = http_resp.reason - self.body = http_resp.data + if self.status is None: + self.status = http_resp.status + if self.reason is None: + self.reason = http_resp.reason + if self.body is None: + try: + self.body = http_resp.data.decode('utf-8') + except Exception: + pass self.headers = http_resp.getheaders() - else: - self.status = status - self.reason = reason - self.body = None - self.headers = None + + @classmethod + def from_response( + cls, + *, + http_resp, + body: Optional[str], + data: Optional[Any], + ) -> Self: + if http_resp.status == 400: + raise BadRequestException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 401: + raise UnauthorizedException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 403: + raise ForbiddenException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 404: + raise NotFoundException(http_resp=http_resp, body=body, data=data) + + if 500 <= http_resp.status <= 599: + raise ServiceException(http_resp=http_resp, body=body, data=data) + raise ApiException(http_resp=http_resp, body=body, data=data) def __str__(self): """Custom error messages for exception""" @@ -110,34 +152,30 @@ class ApiException(OpenApiException): error_message += "HTTP response headers: {0}\n".format( self.headers) - if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) + if self.data or self.body: + error_message += "HTTP response body: {0}\n".format(self.data or self.body) return error_message -class NotFoundException(ApiException): +class BadRequestException(ApiException): + pass - def __init__(self, status=None, reason=None, http_resp=None): - super(NotFoundException, self).__init__(status, reason, http_resp) +class NotFoundException(ApiException): + pass -class UnauthorizedException(ApiException): - def __init__(self, status=None, reason=None, http_resp=None): - super(UnauthorizedException, self).__init__(status, reason, http_resp) +class UnauthorizedException(ApiException): + pass class ForbiddenException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None): - super(ForbiddenException, self).__init__(status, reason, http_resp) + pass class ServiceException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None): - super(ServiceException, self).__init__(status, reason, http_resp) + pass def render_path(path_to_item): diff --git a/sdks/python/templates/github-workflow.mustache b/sdks/python/templates/github-workflow.mustache new file mode 100644 index 000000000..868124c0b --- /dev/null +++ b/sdks/python/templates/github-workflow.mustache @@ -0,0 +1,39 @@ +# NOTE: This file is auto generated by OpenAPI Generator. +# URL: https://openapi-generator.tech +# +# ref: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python + +name: {{packageName}} Python package +{{=<% %>=}} + +on: [push, pull_request] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] + + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install flake8 pytest + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + if [ -f test-requirements.txt ]; then pip install -r test-requirements.txt; fi + - name: Lint with flake8 + run: | + # stop the build if there are Python syntax errors or undefined names + flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide + flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + - name: Test with pytest + run: | + pytest diff --git a/sdks/python/templates/gitignore.mustache b/sdks/python/templates/gitignore.mustache index e0dc5325d..609c20138 100644 --- a/sdks/python/templates/gitignore.mustache +++ b/sdks/python/templates/gitignore.mustache @@ -66,5 +66,6 @@ target/ .ipynb_checkpoints {{#useCustomTemplateCode}} +.openapi-generator /vendor {{/useCustomTemplateCode}} \ No newline at end of file diff --git a/sdks/python/templates/gitlab-ci.mustache b/sdks/python/templates/gitlab-ci.mustache index cf785a80a..8a6130a2f 100644 --- a/sdks/python/templates/gitlab-ci.mustache +++ b/sdks/python/templates/gitlab-ci.mustache @@ -1,29 +1,31 @@ +# NOTE: This file is auto generated by OpenAPI Generator. +# URL: https://openapi-generator.tech +# # ref: https://docs.gitlab.com/ee/ci/README.html +# ref: https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Python.gitlab-ci.yml stages: - test -.tests: +.pytest: stage: test script: - pip install -r requirements.txt - pip install -r test-requirements.txt - {{#useNose}} - - nosetests - {{/useNose}} - {{^useNose}} - pytest --cov={{{packageName}}} - {{/useNose}} -test-3.6: - extends: .tests - image: python:3.6-alpine -test-3.7: - extends: .tests +pytest-3.7: + extends: .pytest image: python:3.7-alpine -test-3.8: - extends: .tests +pytest-3.8: + extends: .pytest image: python:3.8-alpine -test-3.9: - extends: .tests +pytest-3.9: + extends: .pytest image: python:3.9-alpine +pytest-3.10: + extends: .pytest + image: python:3.10-alpine +pytest-3.11: + extends: .pytest + image: python:3.11-alpine diff --git a/sdks/python/templates/model.mustache b/sdks/python/templates/model.mustache index 14d8e5e49..84792dde1 100644 --- a/sdks/python/templates/model.mustache +++ b/sdks/python/templates/model.mustache @@ -1,94 +1,14 @@ -{{> partial_header }} +# coding: utf-8 -{{#useCustomTemplateCode}} -from __future__ import annotations -from typing import TYPE_CHECKING, Optional, List, Dict, Union -import json # noqa: F401 -{{/useCustomTemplateCode}} -import re # noqa: F401 -import sys # noqa: F401 -{{#useCustomTemplateCode}} -from {{packageName}} import ApiClient -{{/useCustomTemplateCode}} -from {{packageName}}.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from {{packageName}}.exceptions import ApiAttributeError -{{#useCustomTemplateCode}} -{{#imports}} -{{#-first}} -if TYPE_CHECKING: -{{/-first}} - {{{import}}} -{{/imports}} -{{/useCustomTemplateCode}} +{{>partial_header}} {{#models}} {{#model}} -{{#useCustomTemplateCode}} -{{#discriminator}} -{{#-first}} -if TYPE_CHECKING: -{{/-first}} -{{#discriminator.mappedModels}} - from {{packageName}}.models import {{modelName}} -{{#-last}} - -{{/-last}} -{{/discriminator.mappedModels}} - -def lazy_import(): -{{#discriminator.mappedModels}} - from {{packageName}}.models import {{modelName}} -{{/discriminator.mappedModels}} -{{#discriminator.mappedModels}} - globals()['{{modelName}}'] = {{modelName}} -{{/discriminator.mappedModels}} -{{/discriminator}} -{{/useCustomTemplateCode}} -{{#imports}} -{{#-first}} - -def lazy_import(): -{{/-first}} - {{{.}}} -{{/imports}} - - -{{^interfaces}} -{{#isArray}} -{{> model_templates/model_simple }} -{{/isArray}} {{#isEnum}} -{{> model_templates/model_simple }} +{{>model_enum}} {{/isEnum}} -{{#isAlias}} -{{> model_templates/model_simple }} -{{/isAlias}} -{{^isArray}} {{^isEnum}} -{{^isAlias}} -{{> model_templates/model_normal }} -{{/isAlias}} +{{#oneOf}}{{#-first}}{{>model_oneof}}{{/-first}}{{/oneOf}}{{^oneOf}}{{#anyOf}}{{#-first}}{{>model_anyof}}{{/-first}}{{/anyOf}}{{^anyOf}}{{>model_generic}}{{/anyOf}}{{/oneOf}} {{/isEnum}} -{{/isArray}} -{{/interfaces}} -{{#interfaces}} -{{#-last}} -{{> model_templates/model_composed }} -{{/-last}} -{{/interfaces}} {{/model}} -{{/models}} +{{/models}} \ No newline at end of file diff --git a/sdks/python/templates/model_anyof.mustache b/sdks/python/templates/model_anyof.mustache new file mode 100644 index 000000000..e035e4829 --- /dev/null +++ b/sdks/python/templates/model_anyof.mustache @@ -0,0 +1,182 @@ +from __future__ import annotations +from inspect import getfullargspec +import json +import pprint +import re # noqa: F401 +{{#vendorExtensions.x-py-other-imports}} +{{{.}}} +{{/vendorExtensions.x-py-other-imports}} +{{#vendorExtensions.x-py-model-imports}} +{{{.}}} +{{/vendorExtensions.x-py-model-imports}} +from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict +from typing_extensions import Literal, Self +from pydantic import Field + +{{#lambda.uppercase}}{{{classname}}}{{/lambda.uppercase}}_ANY_OF_SCHEMAS = [{{#anyOf}}"{{.}}"{{^-last}}, {{/-last}}{{/anyOf}}] + +class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}}): + """ + {{{description}}}{{^description}}{{{classname}}}{{/description}} + """ + +{{#composedSchemas.anyOf}} + # data type: {{{dataType}}} + {{vendorExtensions.x-py-name}}: {{{vendorExtensions.x-py-typing}}} +{{/composedSchemas.anyOf}} + if TYPE_CHECKING: + actual_instance: Optional[Union[{{#anyOf}}{{{.}}}{{^-last}}, {{/-last}}{{/anyOf}}]] = None + else: + actual_instance: Any = None + any_of_schemas: Set[str] = { {{#anyOf}}"{{.}}"{{^-last}}, {{/-last}}{{/anyOf}} } + + model_config = { + "validate_assignment": True, + "protected_namespaces": (), + } +{{#discriminator}} + + discriminator_value_class_map: Dict[str, str] = { +{{#children}} + '{{^vendorExtensions.x-discriminator-value}}{{name}}{{/vendorExtensions.x-discriminator-value}}{{#vendorExtensions.x-discriminator-value}}{{{vendorExtensions.x-discriminator-value}}}{{/vendorExtensions.x-discriminator-value}}': '{{{classname}}}'{{^-last}},{{/-last}} +{{/children}} + } +{{/discriminator}} + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_anyof(cls, v): + {{#isNullable}} + if v is None: + return v + + {{/isNullable}} + instance = {{{classname}}}.model_construct() + error_messages = [] + {{#composedSchemas.anyOf}} + # validate data type: {{{dataType}}} + {{#isContainer}} + try: + instance.{{vendorExtensions.x-py-name}} = v + return v + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + {{/isContainer}} + {{^isContainer}} + {{#isPrimitiveType}} + try: + instance.{{vendorExtensions.x-py-name}} = v + return v + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + {{/isPrimitiveType}} + {{^isPrimitiveType}} + if not isinstance(v, {{{dataType}}}): + error_messages.append(f"Error! Input type `{type(v)}` is not `{{{dataType}}}`") + else: + return v + + {{/isPrimitiveType}} + {{/isContainer}} + {{/composedSchemas.anyOf}} + if error_messages: + # no match + raise ValueError("No match found when setting the actual_instance in {{{classname}}} with anyOf schemas: {{#anyOf}}{{{.}}}{{^-last}}, {{/-last}}{{/anyOf}}. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Dict[str, Any]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + {{#isNullable}} + if json_str is None: + return instance + + {{/isNullable}} + error_messages = [] + {{#composedSchemas.anyOf}} + {{#isContainer}} + # deserialize data into {{{dataType}}} + try: + # validation + instance.{{vendorExtensions.x-py-name}} = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.{{vendorExtensions.x-py-name}} + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + {{/isContainer}} + {{^isContainer}} + {{#isPrimitiveType}} + # deserialize data into {{{dataType}}} + try: + # validation + instance.{{vendorExtensions.x-py-name}} = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.{{vendorExtensions.x-py-name}} + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + {{/isPrimitiveType}} + {{^isPrimitiveType}} + # {{vendorExtensions.x-py-name}}: {{{vendorExtensions.x-py-typing}}} + try: + instance.actual_instance = {{{dataType}}}.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + {{/isPrimitiveType}} + {{/isContainer}} + {{/composedSchemas.anyOf}} + + if error_messages: + # no match + raise ValueError("No match found when deserializing the JSON string into {{{classname}}} with anyOf schemas: {{#anyOf}}{{{.}}}{{^-last}}, {{/-last}}{{/anyOf}}. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], {{#anyOf}}{{.}}{{^-last}}, {{/-last}}{{/anyOf}}]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + +{{#vendorExtensions.x-py-postponed-model-imports.size}} +{{#vendorExtensions.x-py-postponed-model-imports}} +{{{.}}} +{{/vendorExtensions.x-py-postponed-model-imports}} +# TODO: Rewrite to not use raise_errors +{{classname}}.model_rebuild(raise_errors=False) +{{/vendorExtensions.x-py-postponed-model-imports.size}} diff --git a/sdks/python/templates/model_doc.mustache b/sdks/python/templates/model_doc.mustache index f9060e9f6..a63aea6a0 100644 --- a/sdks/python/templates/model_doc.mustache +++ b/sdks/python/templates/model_doc.mustache @@ -8,41 +8,49 @@ {{unescapedDescription}} {{/useCustomTemplateCode}} +{{^useCustomTemplateCode}} +{{^isEnum}} ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -{{^useCustomTemplateCode}} +{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} +{{/vars}} + +## Example + +```python +from {{modelPackage}}.{{#lambda.snakecase}}{{classname}}{{/lambda.snakecase}} import {{classname}} + +# TODO update the JSON string below +json = "{}" +# create an instance of {{classname}} from a JSON string +{{#lambda.snakecase}}{{classname}}{{/lambda.snakecase}}_instance = {{classname}}.from_json(json) +# print the JSON string representation of the object +print({{classname}}.to_json()) + +# convert the object into a dict +{{#lambda.snakecase}}{{classname}}{{/lambda.snakecase}}_dict = {{#lambda.snakecase}}{{classname}}{{/lambda.snakecase}}_instance.to_dict() +# create an instance of {{classname}} from a dict +{{#lambda.snakecase}}{{classname}}{{/lambda.snakecase}}_from_dict = {{classname}}.from_dict({{#lambda.snakecase}}{{classname}}{{/lambda.snakecase}}_dict) +``` +{{/isEnum}} {{#isEnum}} -**value** | {{^arrayModelType}}**{{dataType}}**{{/arrayModelType}} | {{description}} | {{#defaultValue}}{{#hasRequired}} if omitted the server will use the default value of {{/hasRequired}}{{^hasRequired}}defaults to {{/hasRequired}}{{{.}}}{{/defaultValue}}{{#allowableValues}}{{#defaultValue}}, {{/defaultValue}} must be one of [{{#enumVars}}{{{value}}}, {{/enumVars}}]{{/allowableValues}} +## Enum +{{#allowableValues}}{{#enumVars}} +* `{{name}}` (value: `{{{value}}}`) +{{/enumVars}}{{/allowableValues}} {{/isEnum}} -{{#isAlias}} -**value** | {{^arrayModelType}}**{{dataType}}**{{/arrayModelType}} | {{description}} | {{#defaultValue}}{{#hasRequired}} if omitted the server will use the default value of {{/hasRequired}}{{^hasRequired}}defaults to {{/hasRequired}}{{{.}}}{{/defaultValue}} -{{/isAlias}} -{{#isArray}} -**value** | {{^arrayModelType}}**{{dataType}}**{{/arrayModelType}}{{#arrayModelType}}[**{{dataType}}**]({{arrayModelType}}.md){{/arrayModelType}} | {{description}} | {{#defaultValue}}{{#hasRequired}} if omitted the server will use the default value of {{/hasRequired}}{{^hasRequired}}defaults to {{/hasRequired}}{{{.}}}{{/defaultValue}} -{{/isArray}} -{{#requiredVars}} -{{^defaultValue}} -**{{name}}** | {{^complexType}}**{{dataType}}**{{/complexType}}{{#complexType}}[**{{dataType}}**]({{complexType}}.md){{/complexType}} | {{description}} | {{#isReadOnly}}[readonly] {{/isReadOnly}} -{{/defaultValue}} -{{/requiredVars}} -{{#requiredVars}} -{{#defaultValue}} -**{{name}}** | {{^complexType}}**{{dataType}}**{{/complexType}}{{#complexType}}[**{{dataType}}**]({{complexType}}.md){{/complexType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}defaults to {{{.}}}{{/defaultValue}} -{{/defaultValue}} -{{/requiredVars}} -{{#optionalVars}} -**{{name}}** | {{^complexType}}**{{dataType}}**{{/complexType}}{{#complexType}}[**{{dataType}}**]({{complexType}}.md){{/complexType}} | {{description}} | [optional] {{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}} if omitted the server will use the default value of {{{.}}}{{/defaultValue}} -{{/optionalVars}} -{{#additionalProperties}} -**any string name** | {{^complexType}}**{{dataType}}**{{/complexType}}{{#complexType}}[**{{dataType}}**]({{complexType}}.md){{/complexType}} | any string name can be used but the value must be the correct type | [optional] -{{/additionalProperties}} +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) {{/useCustomTemplateCode}} {{#useCustomTemplateCode}} +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- {{#vars}}| `{{name}}`{{#required}}*_required_{{/required}} | {{#isPrimitiveType}}```{{{dataType}}}```{{/isPrimitiveType}}{{^isPrimitiveType}}[```{{{dataType}}}```]({{complexType}}.md){{/isPrimitiveType}} | REPLACE_ME_WITH_DESCRIPTION_BEGIN {{unescapedDescription}} REPLACE_ME_WITH_DESCRIPTION_END | {{#isReadOnly}} [readonly]{{/isReadOnly}}{{#defaultValue}} [default to {{{.}}}]{{/defaultValue}} | {{/vars}} -{{/useCustomTemplateCode}} [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) +{{/useCustomTemplateCode}} -{{/model}}{{/models}} +{{/model}}{{/models}} \ No newline at end of file diff --git a/sdks/python/templates/model_enum.mustache b/sdks/python/templates/model_enum.mustache new file mode 100644 index 000000000..3f449b121 --- /dev/null +++ b/sdks/python/templates/model_enum.mustache @@ -0,0 +1,36 @@ +from __future__ import annotations +import json +from enum import Enum +{{#vendorExtensions.x-py-other-imports}} +{{{.}}} +{{/vendorExtensions.x-py-other-imports}} +from typing_extensions import Self + + +class {{classname}}({{vendorExtensions.x-py-enum-type}}, Enum): + """ + {{{description}}}{{^description}}{{{classname}}}{{/description}} + """ + + """ + allowed enum values + """ +{{#allowableValues}} + {{#enumVars}} + {{{name}}} = {{{value}}} + {{/enumVars}} + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of {{classname}} from a JSON string""" + return cls(json.loads(json_str)) + + {{#defaultValue}} + + # + @classmethod + def _missing_value_(cls, value): + if value is no_arg: + return cls.{{{.}}} + {{/defaultValue}} +{{/allowableValues}} diff --git a/sdks/python/templates/model_generic.mustache b/sdks/python/templates/model_generic.mustache new file mode 100644 index 000000000..e44116d09 --- /dev/null +++ b/sdks/python/templates/model_generic.mustache @@ -0,0 +1,466 @@ +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +{{#vendorExtensions.x-py-other-imports}} +{{{.}}} +{{/vendorExtensions.x-py-other-imports}} +{{#vendorExtensions.x-py-model-imports}} +{{{.}}} +{{/vendorExtensions.x-py-model-imports}} +{{^useCustomTemplateCode}} +from typing import Optional, Set +{{/useCustomTemplateCode}} +{{#useCustomTemplateCode}} +from typing import Optional, Set, Tuple +{{/useCustomTemplateCode}} +from typing_extensions import Self +{{#useCustomTemplateCode}} +import io +{{/useCustomTemplateCode}} + +{{#hasChildren}} +{{#discriminator}} +{{! If this model is a super class, importlib is used. So import the necessary modules for the type here. }} +from typing import TYPE_CHECKING +if TYPE_CHECKING: +{{#mappedModels}} + from {{packageName}}.models.{{model.classVarName}} import {{modelName}} +{{/mappedModels}} + +{{/discriminator}} +{{/hasChildren}} +class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}}): + """ + {{#description}}{{{description}}}{{/description}}{{^description}}{{{classname}}}{{/description}} + """ # noqa: E501 +{{#vars}} +{{^useCustomTemplateCode}} + {{name}}: {{{vendorExtensions.x-py-typing}}} +{{/useCustomTemplateCode}} +{{#useCustomTemplateCode}} + {{name}}: {{#vendorExtensions.x-int-or-string}}Union[StrictStr, StrictInt]{{#description}} = Field(description="{{{description}}}"){{/description}}{{/vendorExtensions.x-int-or-string}}{{^vendorExtensions.x-int-or-string}}{{{vendorExtensions.x-py-typing}}}{{/vendorExtensions.x-int-or-string}} +{{/useCustomTemplateCode}} +{{/vars}} +{{#isAdditionalPropertiesTrue}} + additional_properties: Dict[str, Any] = {} +{{/isAdditionalPropertiesTrue}} + __properties: ClassVar[List[str]] = [{{#allVars}}"{{baseName}}"{{^-last}}, {{/-last}}{{/allVars}}] +{{#vars}} + {{#vendorExtensions.x-regex}} + + @field_validator('{{{name}}}') + def {{{name}}}_validate_regular_expression(cls, value): + """Validates the regular expression""" + {{^required}} + if value is None: + return value + + {{/required}} + {{#required}} + {{#isNullable}} + if value is None: + return value + + {{/isNullable}} + {{/required}} + if not re.match(r"{{{.}}}", value{{#vendorExtensions.x-modifiers}} ,re.{{{.}}}{{/vendorExtensions.x-modifiers}}): + raise ValueError(r"must validate the regular expression {{{vendorExtensions.x-pattern}}}") + return value + {{/vendorExtensions.x-regex}} + {{#isEnum}} + + @field_validator('{{{name}}}') + def {{{name}}}_validate_enum(cls, value): + """Validates the enum""" + {{^required}} + if value is None: + return value + + {{/required}} + {{#required}} + {{#isNullable}} + if value is None: + return value + + {{/isNullable}} + {{/required}} + {{#isArray}} + for i in value: + if i not in set([{{#allowableValues}}{{#enumVars}}{{{value}}}{{^-last}}, {{/-last}}{{/enumVars}}{{/allowableValues}}]): + raise ValueError("each list item must be one of ({{#allowableValues}}{{#enumVars}}{{{value}}}{{^-last}}, {{/-last}}{{/enumVars}}{{/allowableValues}})") + {{/isArray}} + {{^isArray}} + if value not in set([{{#allowableValues}}{{#enumVars}}{{{value}}}{{^-last}}, {{/-last}}{{/enumVars}}{{/allowableValues}}]): + raise ValueError("must be one of enum values ({{#allowableValues}}{{#enumVars}}{{{value}}}{{^-last}}, {{/-last}}{{/enumVars}}{{/allowableValues}})") + {{/isArray}} + return value + {{/isEnum}} +{{/vars}} + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + +{{#hasChildren}} +{{#discriminator}} + # JSON field name that stores the object type + __discriminator_property_name: ClassVar[str] = '{{discriminator.propertyBaseName}}' + + # discriminator mappings + __discriminator_value_class_map: ClassVar[Dict[str, str]] = { + {{#mappedModels}}'{{{mappingName}}}': '{{{modelName}}}'{{^-last}},{{/-last}}{{/mappedModels}} + } + + @classmethod + def get_discriminator_value(cls, obj: Dict[str, Any]) -> Optional[str]: + """Returns the discriminator value (object type) of the data""" + discriminator_value = obj[cls.__discriminator_property_name] + if discriminator_value: + return cls.__discriminator_value_class_map.get(discriminator_value) + else: + return None + +{{/discriminator}} +{{/hasChildren}} + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + +{{^useCustomTemplateCode}} + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) +{{/useCustomTemplateCode}} +{{#useCustomTemplateCode}} + def to_json(self, excluded_fields: Set[str] = None) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data +{{/useCustomTemplateCode}} + + @classmethod + def from_json(cls, json_str: str) -> Optional[{{^hasChildren}}Self{{/hasChildren}}{{#hasChildren}}{{#discriminator}}Union[{{#mappedModels}}{{{modelName}}}{{^-last}}, {{/-last}}{{/mappedModels}}]{{/discriminator}}{{^discriminator}}Self{{/discriminator}}{{/hasChildren}}]: + """Create an instance of {{{classname}}} from a JSON string""" + return cls.from_dict(json.loads(json_str)) + +{{^useCustomTemplateCode}} + def to_dict(self) -> Dict[str, Any]: +{{/useCustomTemplateCode}} +{{#useCustomTemplateCode}} + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: +{{/useCustomTemplateCode}} + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + {{#vendorExtensions.x-py-readonly}} + * OpenAPI `readOnly` fields are excluded. + {{/vendorExtensions.x-py-readonly}} + {{#isAdditionalPropertiesTrue}} + * Fields in `self.additional_properties` are added to the output dict. + {{/isAdditionalPropertiesTrue}} + """ +{{^useCustomTemplateCode}} + excluded_fields: Set[str] = set([ + {{#vendorExtensions.x-py-readonly}} + "{{{.}}}", + {{/vendorExtensions.x-py-readonly}} + {{#isAdditionalPropertiesTrue}} + "additional_properties", + {{/isAdditionalPropertiesTrue}} + ]) +{{/useCustomTemplateCode}} + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + {{#allVars}} + {{#isContainer}} + {{#isArray}} + {{#items.isArray}} + {{^items.items.isPrimitiveType}} + # override the default output from pydantic by calling `to_dict()` of each item in {{{name}}} (list of list) + _items = [] + if self.{{{name}}}: + for _item_{{{name}}} in self.{{{name}}}: + if _item_{{{name}}}: + _items.append( + [_inner_item.to_dict() for _inner_item in _item_{{{name}}} if _inner_item is not None] + ) + _dict['{{{baseName}}}'] = _items + {{/items.items.isPrimitiveType}} + {{/items.isArray}} + {{^items.isArray}} + {{^items.isPrimitiveType}} + {{^items.isEnumOrRef}} + # override the default output from pydantic by calling `to_dict()` of each item in {{{name}}} (list) + _items = [] + if self.{{{name}}}: + for _item_{{{name}}} in self.{{{name}}}: + if _item_{{{name}}}: + _items.append(_item_{{{name}}}.to_dict()) + _dict['{{{baseName}}}'] = _items + {{/items.isEnumOrRef}} + {{/items.isPrimitiveType}} + {{/items.isArray}} + {{/isArray}} + {{#isMap}} + {{#items.isArray}} + {{^items.items.isPrimitiveType}} + # override the default output from pydantic by calling `to_dict()` of each value in {{{name}}} (dict of array) + _field_dict_of_array = {} + if self.{{{name}}}: + for _key_{{{name}}} in self.{{{name}}}: + if self.{{{name}}}[_key_{{{name}}}] is not None: + _field_dict_of_array[_key_{{{name}}}] = [ + _item.to_dict() for _item in self.{{{name}}}[_key_{{{name}}}] + ] + _dict['{{{baseName}}}'] = _field_dict_of_array + {{/items.items.isPrimitiveType}} + {{/items.isArray}} + {{^items.isArray}} + {{^items.isPrimitiveType}} + {{^items.isEnumOrRef}} + # override the default output from pydantic by calling `to_dict()` of each value in {{{name}}} (dict) + _field_dict = {} + if self.{{{name}}}: + for _key_{{{name}}} in self.{{{name}}}: + if self.{{{name}}}[_key_{{{name}}}]: + _field_dict[_key_{{{name}}}] = self.{{{name}}}[_key_{{{name}}}].to_dict() + _dict['{{{baseName}}}'] = _field_dict + {{/items.isEnumOrRef}} + {{/items.isPrimitiveType}} + {{/items.isArray}} + {{/isMap}} + {{/isContainer}} + {{^isContainer}} + {{^isPrimitiveType}} + {{^isEnumOrRef}} + # override the default output from pydantic by calling `to_dict()` of {{{name}}} + if self.{{{name}}}: + _dict['{{{baseName}}}'] = self.{{{name}}}.to_dict() + {{/isEnumOrRef}} + {{/isPrimitiveType}} + {{/isContainer}} + {{/allVars}} + {{#isAdditionalPropertiesTrue}} + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + {{/isAdditionalPropertiesTrue}} + {{#allVars}} + {{#isNullable}} + # set to None if {{{name}}} (nullable) is None + # and model_fields_set contains the field + if self.{{name}} is None and "{{{name}}}" in self.model_fields_set: + _dict['{{{baseName}}}'] = None + + {{/isNullable}} + {{/allVars}} + return _dict + + {{#hasChildren}} + @classmethod + def from_dict(cls, obj: Dict[str, Any]) -> Optional[{{#discriminator}}Union[{{#mappedModels}}{{{modelName}}}{{^-last}}, {{/-last}}{{/mappedModels}}]{{/discriminator}}{{^discriminator}}Self{{/discriminator}}]: + """Create an instance of {{{classname}}} from a dict""" + {{#discriminator}} + # look up the object type based on discriminator mapping + object_type = cls.get_discriminator_value(obj) + {{#mappedModels}} + if object_type == '{{{modelName}}}': + return import_module("{{packageName}}.models.{{model.classVarName}}").{{modelName}}.from_dict(obj) + {{/mappedModels}} + + raise ValueError("{{{classname}}} failed to lookup discriminator value from " + + json.dumps(obj) + ". Discriminator property name: " + cls.__discriminator_property_name + + ", mapping: " + json.dumps(cls.__discriminator_value_class_map)) + {{/discriminator}} + {{/hasChildren}} + {{^hasChildren}} + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of {{{classname}}} from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + {{#disallowAdditionalPropertiesIfNotPresent}} + {{^isAdditionalPropertiesTrue}} + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in {{classname}}) in the input: " + _key) + + {{/isAdditionalPropertiesTrue}} + {{/disallowAdditionalPropertiesIfNotPresent}} + _obj = cls.model_validate({ + {{#allVars}} + {{#isContainer}} + {{#isArray}} + {{#items.isArray}} + {{#items.items.isPrimitiveType}} + "{{{baseName}}}": obj.get("{{{baseName}}}"){{^-last}},{{/-last}} + {{/items.items.isPrimitiveType}} + {{^items.items.isPrimitiveType}} + "{{{baseName}}}": [ + [{{{items.items.dataType}}}.from_dict(_inner_item) for _inner_item in _item] + for _item in obj["{{{baseName}}}"] + ] if obj.get("{{{baseName}}}") is not None else None{{^-last}},{{/-last}} + {{/items.items.isPrimitiveType}} + {{/items.isArray}} + {{^items.isArray}} + {{^items.isPrimitiveType}} + {{#items.isEnumOrRef}} + "{{{baseName}}}": obj.get("{{{baseName}}}"){{^-last}},{{/-last}} + {{/items.isEnumOrRef}} + {{^items.isEnumOrRef}} + "{{{baseName}}}": [{{{items.dataType}}}.from_dict(_item) for _item in obj["{{{baseName}}}"]] if obj.get("{{{baseName}}}") is not None else None{{^-last}},{{/-last}} + {{/items.isEnumOrRef}} + {{/items.isPrimitiveType}} + {{#items.isPrimitiveType}} + "{{{baseName}}}": obj.get("{{{baseName}}}"){{^-last}},{{/-last}} + {{/items.isPrimitiveType}} + {{/items.isArray}} + {{/isArray}} + {{#isMap}} + {{^items.isPrimitiveType}} + {{^items.isEnumOrRef}} + {{#items.isContainer}} + {{#items.isMap}} + "{{{baseName}}}": dict( + (_k, dict( + (_ik, {{{items.items.dataType}}}.from_dict(_iv)) + for _ik, _iv in _v.items() + ) + if _v is not None + else None + ) + for _k, _v in obj.get("{{{baseName}}}").items() + ) + if obj.get("{{{baseName}}}") is not None + else None{{^-last}},{{/-last}} + {{/items.isMap}} + {{#items.isArray}} + "{{{baseName}}}": dict( + (_k, + [{{{items.items.dataType}}}.from_dict(_item) for _item in _v] + if _v is not None + else None + ) + for _k, _v in obj.get("{{{baseName}}}", {}).items() + ){{^-last}},{{/-last}} + {{/items.isArray}} + {{/items.isContainer}} + {{^items.isContainer}} + "{{{baseName}}}": dict( + (_k, {{{items.dataType}}}.from_dict(_v)) + for _k, _v in obj["{{{baseName}}}"].items() + ) + if obj.get("{{{baseName}}}") is not None + else None{{^-last}},{{/-last}} + {{/items.isContainer}} + {{/items.isEnumOrRef}} + {{#items.isEnumOrRef}} + "{{{baseName}}}": dict((_k, _v) for _k, _v in obj.get("{{{baseName}}}").items()){{^-last}},{{/-last}} + {{/items.isEnumOrRef}} + {{/items.isPrimitiveType}} + {{#items.isPrimitiveType}} + "{{{baseName}}}": obj.get("{{{baseName}}}"){{^-last}},{{/-last}} + {{/items.isPrimitiveType}} + {{/isMap}} + {{/isContainer}} + {{^isContainer}} + {{^isPrimitiveType}} + {{^isEnumOrRef}} + "{{{baseName}}}": {{{dataType}}}.from_dict(obj["{{{baseName}}}"]) if obj.get("{{{baseName}}}") is not None else None{{^-last}},{{/-last}} + {{/isEnumOrRef}} + {{#isEnumOrRef}} + "{{{baseName}}}": obj.get("{{{baseName}}}"){{#defaultValue}} if obj.get("{{baseName}}") is not None else {{defaultValue}}{{/defaultValue}}{{^-last}},{{/-last}} + {{/isEnumOrRef}} + {{/isPrimitiveType}} + {{#isPrimitiveType}} + {{#defaultValue}} + "{{{baseName}}}": obj.get("{{{baseName}}}") if obj.get("{{{baseName}}}") is not None else {{{defaultValue}}}{{^-last}},{{/-last}} + {{/defaultValue}} + {{^defaultValue}} + "{{{baseName}}}": obj.get("{{{baseName}}}"){{^-last}},{{/-last}} + {{/defaultValue}} + {{/isPrimitiveType}} + {{/isContainer}} + {{/allVars}} + }) + {{#isAdditionalPropertiesTrue}} + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + {{/isAdditionalPropertiesTrue}} + return _obj + {{/hasChildren}} + +{{#useCustomTemplateCode}} +{{^discriminator}} + @classmethod + def init(cls, data: Optional[Dict[str, Any]]) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + return cls.from_dict(data) +{{/discriminator}} + + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { +{{#requiredVars}} + "{{name}}": "({{#vendorExtensions.x-int-or-string}}int, str{{/vendorExtensions.x-int-or-string}}{{^vendorExtensions.x-int-or-string}}{{{dataType}}}{{/vendorExtensions.x-int-or-string}},)", +{{/requiredVars}} +{{#optionalVars}} + "{{name}}": "({{#vendorExtensions.x-int-or-string}}int, str{{/vendorExtensions.x-int-or-string}}{{^vendorExtensions.x-int-or-string}}{{{dataType}}}{{/vendorExtensions.x-int-or-string}},)", +{{/optionalVars}} + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + {{#vars}} + {{#isArray}} + "{{{name}}}", + {{/isArray}} + {{/vars}} + ] + + model_config = { + "arbitrary_types_allowed": True + } +{{/useCustomTemplateCode}} +{{#vendorExtensions.x-py-postponed-model-imports.size}} +{{#vendorExtensions.x-py-postponed-model-imports}} +{{{.}}} +{{/vendorExtensions.x-py-postponed-model-imports}} +# TODO: Rewrite to not use raise_errors +{{classname}}.model_rebuild(raise_errors=False) +{{/vendorExtensions.x-py-postponed-model-imports.size}} diff --git a/sdks/python/templates/model_oneof.mustache b/sdks/python/templates/model_oneof.mustache new file mode 100644 index 000000000..07a4d93f9 --- /dev/null +++ b/sdks/python/templates/model_oneof.mustache @@ -0,0 +1,209 @@ +from __future__ import annotations +import json +import pprint +{{#vendorExtensions.x-py-other-imports}} +{{{.}}} +{{/vendorExtensions.x-py-other-imports}} +{{#vendorExtensions.x-py-model-imports}} +{{{.}}} +{{/vendorExtensions.x-py-model-imports}} +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +{{#lambda.uppercase}}{{{classname}}}{{/lambda.uppercase}}_ONE_OF_SCHEMAS = [{{#oneOf}}"{{.}}"{{^-last}}, {{/-last}}{{/oneOf}}] + +class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}}): + """ + {{{description}}}{{^description}}{{{classname}}}{{/description}} + """ +{{#composedSchemas.oneOf}} + # data type: {{{dataType}}} + {{vendorExtensions.x-py-name}}: {{{vendorExtensions.x-py-typing}}} +{{/composedSchemas.oneOf}} + actual_instance: Optional[Union[{{#oneOf}}{{{.}}}{{^-last}}, {{/-last}}{{/oneOf}}]] = None + one_of_schemas: Set[str] = { {{#oneOf}}"{{.}}"{{^-last}}, {{/-last}}{{/oneOf}} } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + +{{#discriminator}} + + discriminator_value_class_map: Dict[str, str] = { +{{#children}} + '{{^vendorExtensions.x-discriminator-value}}{{name}}{{/vendorExtensions.x-discriminator-value}}{{#vendorExtensions.x-discriminator-value}}{{{vendorExtensions.x-discriminator-value}}}{{/vendorExtensions.x-discriminator-value}}': '{{{classname}}}'{{^-last}},{{/-last}} +{{/children}} + } +{{/discriminator}} + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + {{#isNullable}} + if v is None: + return v + + {{/isNullable}} + instance = {{{classname}}}.model_construct() + error_messages = [] + match = 0 + {{#composedSchemas.oneOf}} + # validate data type: {{{dataType}}} + {{#isContainer}} + try: + instance.{{vendorExtensions.x-py-name}} = v + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + {{/isContainer}} + {{^isContainer}} + {{#isPrimitiveType}} + try: + instance.{{vendorExtensions.x-py-name}} = v + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + {{/isPrimitiveType}} + {{^isPrimitiveType}} + if not isinstance(v, {{{dataType}}}): + error_messages.append(f"Error! Input type `{type(v)}` is not `{{{dataType}}}`") + else: + match += 1 + {{/isPrimitiveType}} + {{/isContainer}} + {{/composedSchemas.oneOf}} + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in {{{classname}}} with oneOf schemas: {{#oneOf}}{{{.}}}{{^-last}}, {{/-last}}{{/oneOf}}. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in {{{classname}}} with oneOf schemas: {{#oneOf}}{{{.}}}{{^-last}}, {{/-last}}{{/oneOf}}. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + {{#isNullable}} + def from_json(cls, json_str: Optional[str]) -> Self: + {{/isNullable}} + {{^isNullable}} + def from_json(cls, json_str: str) -> Self: + {{/isNullable}} + """Returns the object represented by the json string""" + instance = cls.model_construct() + {{#isNullable}} + if json_str is None: + return instance + + {{/isNullable}} + error_messages = [] + match = 0 + + {{#useOneOfDiscriminatorLookup}} + {{#discriminator}} + {{#mappedModels}} + {{#-first}} + # use oneOf discriminator to lookup the data type + _data_type = json.loads(json_str).get("{{{propertyBaseName}}}") + if not _data_type: + raise ValueError("Failed to lookup data type from the field `{{{propertyBaseName}}}` in the input.") + + {{/-first}} + # check if data type is `{{{modelName}}}` + if _data_type == "{{{mappingName}}}": + instance.actual_instance = {{{modelName}}}.from_json(json_str) + return instance + + {{/mappedModels}} + {{/discriminator}} + {{/useOneOfDiscriminatorLookup}} + {{#composedSchemas.oneOf}} + {{#isContainer}} + # deserialize data into {{{dataType}}} + try: + # validation + instance.{{vendorExtensions.x-py-name}} = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.{{vendorExtensions.x-py-name}} + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + {{/isContainer}} + {{^isContainer}} + {{#isPrimitiveType}} + # deserialize data into {{{dataType}}} + try: + # validation + instance.{{vendorExtensions.x-py-name}} = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.{{vendorExtensions.x-py-name}} + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + {{/isPrimitiveType}} + {{^isPrimitiveType}} + # deserialize data into {{{dataType}}} + try: + instance.actual_instance = {{{dataType}}}.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + {{/isPrimitiveType}} + {{/isContainer}} + {{/composedSchemas.oneOf}} + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into {{{classname}}} with oneOf schemas: {{#oneOf}}{{{.}}}{{^-last}}, {{/-last}}{{/oneOf}}. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into {{{classname}}} with oneOf schemas: {{#oneOf}}{{{.}}}{{^-last}}, {{/-last}}{{/oneOf}}. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], {{#oneOf}}{{{.}}}{{^-last}}, {{/-last}}{{/oneOf}}]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + +{{#vendorExtensions.x-py-postponed-model-imports.size}} +{{#vendorExtensions.x-py-postponed-model-imports}} +{{{.}}} +{{/vendorExtensions.x-py-postponed-model-imports}} +# TODO: Rewrite to not use raise_errors +{{classname}}.model_rebuild(raise_errors=False) +{{/vendorExtensions.x-py-postponed-model-imports.size}} diff --git a/sdks/python/templates/model_templates/classvars.mustache b/sdks/python/templates/model_templates/classvars.mustache deleted file mode 100644 index c6d24167d..000000000 --- a/sdks/python/templates/model_templates/classvars.mustache +++ /dev/null @@ -1,201 +0,0 @@ - allowed_values = { -{{#isEnum}} - ('value',): { -{{#isNullable}} - 'None': None, -{{/isNullable}} -{{#allowableValues}} -{{#enumVars}} - '{{name}}': {{{value}}}, -{{/enumVars}} -{{/allowableValues}} - }, -{{/isEnum}} -{{#requiredVars}} -{{#isEnum}} - ('{{name}}',): { -{{#isNullable}} - 'None': None, -{{/isNullable}} -{{#allowableValues}} -{{#enumVars}} - '{{name}}': {{{value}}}, -{{/enumVars}} -{{/allowableValues}} - }, -{{/isEnum}} -{{/requiredVars}} -{{#optionalVars}} -{{#isEnum}} - ('{{name}}',): { -{{#isNullable}} - 'None': None, -{{/isNullable}} -{{#allowableValues}} -{{#enumVars}} - '{{name}}': {{{value}}}, -{{/enumVars}} -{{/allowableValues}} - }, -{{/isEnum}} -{{/optionalVars}} - } - - validations = { -{{#hasValidation}} - ('value',): { -{{> model_templates/validations }} -{{/hasValidation}} -{{#requiredVars}} -{{#hasValidation}} - ('{{name}}',): { -{{> model_templates/validations }} -{{/hasValidation}} -{{/requiredVars}} -{{#optionalVars}} -{{#hasValidation}} - ('{{name}}',): { -{{> model_templates/validations }} -{{/hasValidation}} -{{/optionalVars}} - } - -{{#additionalProperties}} - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ -{{#useCustomTemplateCode}} -{{#discriminator}} -{{^imports}} - lazy_import() -{{/imports}} -{{/discriminator}} -{{/useCustomTemplateCode}} -{{#imports}} -{{#-first}} - lazy_import() -{{/-first}} -{{/imports}} - return ({{{dataType}}},) # noqa: E501 -{{/additionalProperties}} -{{^additionalProperties}} - additional_properties_type = None -{{/additionalProperties}} - - _nullable = {{#isNullable}}True{{/isNullable}}{{^isNullable}}False{{/isNullable}} - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ -{{#useCustomTemplateCode}} -{{#discriminator}} -{{^imports}} - lazy_import() -{{/imports}} -{{/discriminator}} -{{/useCustomTemplateCode}} -{{#imports}} -{{#-first}} - lazy_import() -{{/-first}} -{{/imports}} - return { -{{#isAlias}} -{{^useCustomTemplateCode}} - 'value': ({{{dataType}}},), -{{/useCustomTemplateCode}} -{{#useCustomTemplateCode}} - 'value': ({{#vendorExtensions.x-int-or-string}}int, str{{/vendorExtensions.x-int-or-string}}{{^vendorExtensions.x-int-or-string}}{{{dataType}}}{{/vendorExtensions.x-int-or-string}},), -{{/useCustomTemplateCode}} -{{/isAlias}} -{{#isEnum}} -{{^useCustomTemplateCode}} - 'value': ({{{dataType}}},), -{{/useCustomTemplateCode}} -{{#useCustomTemplateCode}} - 'value': ({{#vendorExtensions.x-int-or-string}}int, str{{/vendorExtensions.x-int-or-string}}{{^vendorExtensions.x-int-or-string}}{{{dataType}}}{{/vendorExtensions.x-int-or-string}},), -{{/useCustomTemplateCode}} -{{/isEnum}} -{{#isArray}} -{{^useCustomTemplateCode}} - 'value': ({{{dataType}}},), -{{/useCustomTemplateCode}} -{{#useCustomTemplateCode}} - 'value': ({{#vendorExtensions.x-int-or-string}}int, str{{/vendorExtensions.x-int-or-string}}{{^vendorExtensions.x-int-or-string}}{{{dataType}}}{{/vendorExtensions.x-int-or-string}},), -{{/useCustomTemplateCode}} -{{/isArray}} -{{#requiredVars}} -{{^useCustomTemplateCode}} - '{{name}}': ({{{dataType}}},), # noqa: E501 -{{/useCustomTemplateCode}} -{{#useCustomTemplateCode}} - '{{name}}': ({{#vendorExtensions.x-int-or-string}}int, str{{/vendorExtensions.x-int-or-string}}{{^vendorExtensions.x-int-or-string}}{{{dataType}}}{{/vendorExtensions.x-int-or-string}},), # noqa: E501 -{{/useCustomTemplateCode}} -{{/requiredVars}} -{{#optionalVars}} -{{^useCustomTemplateCode}} - '{{name}}': ({{{dataType}}},), # noqa: E501 -{{/useCustomTemplateCode}} -{{#useCustomTemplateCode}} - '{{name}}': ({{#vendorExtensions.x-int-or-string}}int, str{{/vendorExtensions.x-int-or-string}}{{^vendorExtensions.x-int-or-string}}{{{dataType}}}{{/vendorExtensions.x-int-or-string}},), # noqa: E501 -{{/useCustomTemplateCode}} -{{/optionalVars}} - } - - @cached_property - def discriminator(): -{{^discriminator}} - return None -{{/discriminator}} -{{#discriminator}} -{{^useCustomTemplateCode}} -{{#mappedModels}} -{{#-first}} -{{#imports}} -{{#-first}} - lazy_import() -{{/-first}} -{{/imports}} -{{/-first}} -{{/mappedModels}} -{{/useCustomTemplateCode}} -{{#useCustomTemplateCode}} - lazy_import() -{{/useCustomTemplateCode}} - val = { -{{#mappedModels}} - '{{mappingName}}': {{{modelName}}}, -{{/mappedModels}} - } - if not val: - return None - return {'{{{discriminatorName}}}': val}{{/discriminator}} -{{#useCustomTemplateCode}} -{{^discriminator}} - @staticmethod - def init(data: any) -> {{classname}}: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - try: - obj_data = json.dumps(data) - except TypeError: - obj_data = data - - return ApiClient().deserialize( - response=type('obj_dict', (object,), {'data': obj_data}), - response_type=[{{classname}}], - _check_type=True, - ) -{{/discriminator}} -{{/useCustomTemplateCode}} \ No newline at end of file diff --git a/sdks/python/templates/model_templates/docstring_allowed.mustache b/sdks/python/templates/model_templates/docstring_allowed.mustache deleted file mode 100644 index ab20932b2..000000000 --- a/sdks/python/templates/model_templates/docstring_allowed.mustache +++ /dev/null @@ -1,4 +0,0 @@ - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. \ No newline at end of file diff --git a/sdks/python/templates/model_templates/docstring_init_required_kwargs.mustache b/sdks/python/templates/model_templates/docstring_init_required_kwargs.mustache deleted file mode 100644 index 70d2f95dc..000000000 --- a/sdks/python/templates/model_templates/docstring_init_required_kwargs.mustache +++ /dev/null @@ -1,35 +0,0 @@ - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog -{{^useCustomTemplateCode}} - allOf includes Animal, we move through Animal -{{/useCustomTemplateCode}} -{{#useCustomTemplateCode}} - includes Animal, we move through Animal -{{/useCustomTemplateCode}} - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) \ No newline at end of file diff --git a/sdks/python/templates/model_templates/docstring_openapi_validations.mustache b/sdks/python/templates/model_templates/docstring_openapi_validations.mustache deleted file mode 100644 index f933b86c5..000000000 --- a/sdks/python/templates/model_templates/docstring_openapi_validations.mustache +++ /dev/null @@ -1,7 +0,0 @@ - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. \ No newline at end of file diff --git a/sdks/python/templates/model_templates/invalid_pos_args.mustache b/sdks/python/templates/model_templates/invalid_pos_args.mustache deleted file mode 100644 index 143d50c82..000000000 --- a/sdks/python/templates/model_templates/invalid_pos_args.mustache +++ /dev/null @@ -1,9 +0,0 @@ - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) \ No newline at end of file diff --git a/sdks/python/templates/model_templates/method_from_openapi_data_composed.mustache b/sdks/python/templates/model_templates/method_from_openapi_data_composed.mustache deleted file mode 100644 index 7f7bb55aa..000000000 --- a/sdks/python/templates/model_templates/method_from_openapi_data_composed.mustache +++ /dev/null @@ -1,81 +0,0 @@ - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """{{classname}} - a model defined in OpenAPI - - Keyword Args: -{{#requiredVars}} -{{#defaultValue}} -{{^useCustomTemplateCode}} - {{name}} ({{{dataType}}}):{{#description}} {{{.}}}.{{/description}} defaults to {{{defaultValue}}}{{#allowableValues}}, must be one of [{{#enumVars}}{{{value}}}, {{/enumVars}}]{{/allowableValues}} # noqa: E501 -{{/useCustomTemplateCode}} -{{#useCustomTemplateCode}} - {{name}} ({{#vendorExtensions.x-int-or-string}}str|int{{/vendorExtensions.x-int-or-string}}{{^vendorExtensions.x-int-or-string}}{{{dataType}}}{{/vendorExtensions.x-int-or-string}}):{{#description}} {{{.}}}.{{/description}} defaults to {{{defaultValue}}}{{#allowableValues}}, must be one of [{{#enumVars}}{{{value}}}, {{/enumVars}}]{{/allowableValues}} # noqa: E501 -{{/useCustomTemplateCode}} -{{/defaultValue}} -{{^defaultValue}} -{{^useCustomTemplateCode}} - {{name}} ({{{dataType}}}):{{#description}} {{{.}}}{{/description}} -{{/useCustomTemplateCode}} -{{#useCustomTemplateCode}} - {{name}} ({{#vendorExtensions.x-int-or-string}}str|int{{/vendorExtensions.x-int-or-string}}{{^vendorExtensions.x-int-or-string}}{{{dataType}}}{{/vendorExtensions.x-int-or-string}}):{{#description}} {{{.}}}{{/description}} -{{/useCustomTemplateCode}} -{{/defaultValue}} -{{/requiredVars}} -{{> model_templates/docstring_init_required_kwargs }} -{{#optionalVars}} -{{^useCustomTemplateCode}} - {{name}} ({{{dataType}}}):{{#description}} {{{.}}}.{{/description}} [optional]{{#defaultValue}} if omitted the server will use the default value of {{{.}}}{{/defaultValue}} # noqa: E501 -{{/useCustomTemplateCode}} -{{#useCustomTemplateCode}} - {{name}} ({{#vendorExtensions.x-int-or-string}}str|int{{/vendorExtensions.x-int-or-string}}{{^vendorExtensions.x-int-or-string}}{{{dataType}}}{{/vendorExtensions.x-int-or-string}}):{{#description}} {{{.}}}.{{/description}} [optional]{{#defaultValue}} if omitted the server will use the default value of {{{.}}}{{/defaultValue}} # noqa: E501 -{{/useCustomTemplateCode}} -{{/optionalVars}} - """ - -{{#requiredVars}} -{{#defaultValue}} - {{name}} = kwargs.get('{{name}}', {{{defaultValue}}}) -{{/defaultValue}} -{{/requiredVars}} - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - -{{> model_templates/invalid_pos_args }} - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - - return self \ No newline at end of file diff --git a/sdks/python/templates/model_templates/method_from_openapi_data_normal.mustache b/sdks/python/templates/model_templates/method_from_openapi_data_normal.mustache deleted file mode 100644 index 3b82ba7fc..000000000 --- a/sdks/python/templates/model_templates/method_from_openapi_data_normal.mustache +++ /dev/null @@ -1,17 +0,0 @@ -{{> model_templates/method_from_openapi_data_shared }} - -{{#isEnum}} - self.value = value -{{/isEnum}} -{{#requiredVars}} - self.{{name}} = {{name}} -{{/requiredVars}} - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self \ No newline at end of file diff --git a/sdks/python/templates/model_templates/method_from_openapi_data_shared.mustache b/sdks/python/templates/model_templates/method_from_openapi_data_shared.mustache deleted file mode 100644 index 87ee989b6..000000000 --- a/sdks/python/templates/model_templates/method_from_openapi_data_shared.mustache +++ /dev/null @@ -1,54 +0,0 @@ - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls{{#requiredVars}}{{^defaultValue}}, {{name}}{{/defaultValue}}{{/requiredVars}}, *args, **kwargs): # noqa: E501 - """{{classname}} - a model defined in OpenAPI - -{{#requiredVars}} -{{#-first}} - Args: -{{/-first}} -{{^defaultValue}} -{{^useCustomTemplateCode}} - {{name}} ({{{dataType}}}):{{#description}} {{{.}}}{{/description}} -{{/useCustomTemplateCode}} -{{#useCustomTemplateCode}} - {{name}} ({{#vendorExtensions.x-int-or-string}}str|int{{/vendorExtensions.x-int-or-string}}{{^vendorExtensions.x-int-or-string}}{{{dataType}}}{{/vendorExtensions.x-int-or-string}}):{{#description}} {{{.}}}{{/description}} -{{/useCustomTemplateCode}} -{{/defaultValue}} -{{#-last}} - -{{/-last}} -{{/requiredVars}} - Keyword Args: -{{#requiredVars}} -{{#defaultValue}} - {{name}} ({{{dataType}}}):{{#description}} {{{.}}}.{{/description}} defaults to {{{defaultValue}}}{{#allowableValues}}, must be one of [{{#enumVars}}{{{value}}}, {{/enumVars}}]{{/allowableValues}} # noqa: E501 -{{/defaultValue}} -{{/requiredVars}} -{{> model_templates/docstring_init_required_kwargs }} -{{#optionalVars}} - {{name}} ({{{dataType}}}):{{#description}} {{{.}}}.{{/description}} [optional]{{#defaultValue}} if omitted the server will use the default value of {{{.}}}{{/defaultValue}} # noqa: E501 -{{/optionalVars}} - """ - -{{#requiredVars}} -{{#defaultValue}} - {{name}} = kwargs.get('{{name}}', {{{defaultValue}}}) -{{/defaultValue}} -{{/requiredVars}} - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - -{{> model_templates/invalid_pos_args }} - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) \ No newline at end of file diff --git a/sdks/python/templates/model_templates/method_from_openapi_data_simple.mustache b/sdks/python/templates/model_templates/method_from_openapi_data_simple.mustache deleted file mode 100644 index 11f237c07..000000000 --- a/sdks/python/templates/model_templates/method_from_openapi_data_simple.mustache +++ /dev/null @@ -1,62 +0,0 @@ - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """{{classname}} - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] ({{{dataType}}}):{{#description}} {{{.}}}.{{/description}}{{#defaultValue}} if omitted defaults to {{{.}}}{{/defaultValue}}{{#allowableValues}}, must be one of [{{#enumVars}}{{{value}}}, {{/enumVars}}]{{/allowableValues}} # noqa: E501 - - Keyword Args: - value ({{{dataType}}}):{{#description}} {{{.}}}.{{/description}}{{#defaultValue}} if omitted defaults to {{{.}}}{{/defaultValue}}{{#allowableValues}}, must be one of [{{#enumVars}}{{{value}}}, {{/enumVars}}]{{/allowableValues}} # noqa: E501 -{{> model_templates/docstring_init_required_kwargs }} - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) -{{#defaultValue}} - else: - value = {{{.}}} -{{/defaultValue}} -{{^defaultValue}} - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) -{{/defaultValue}} - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - -{{> model_templates/invalid_pos_args }} - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - return self \ No newline at end of file diff --git a/sdks/python/templates/model_templates/method_init_composed.mustache b/sdks/python/templates/model_templates/method_init_composed.mustache deleted file mode 100644 index a0203e9c2..000000000 --- a/sdks/python/templates/model_templates/method_init_composed.mustache +++ /dev/null @@ -1,95 +0,0 @@ - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """{{classname}} - a model defined in OpenAPI - - Keyword Args: -{{#requiredVars}} -{{^isReadOnly}} -{{#defaultValue}} -{{^useCustomTemplateCode}} - {{name}} ({{{dataType}}}):{{#description}} {{{.}}}.{{/description}} defaults to {{{defaultValue}}}{{#allowableValues}}, must be one of [{{#enumVars}}{{{value}}}, {{/enumVars}}]{{/allowableValues}} # noqa: E501 -{{/useCustomTemplateCode}} -{{#useCustomTemplateCode}} - {{name}} ({{#vendorExtensions.x-int-or-string}}str|int{{/vendorExtensions.x-int-or-string}}{{^vendorExtensions.x-int-or-string}}{{{dataType}}}{{/vendorExtensions.x-int-or-string}}):{{#description}} {{{.}}}.{{/description}} defaults to {{{defaultValue}}}{{#allowableValues}}, must be one of [{{#enumVars}}{{{value}}}, {{/enumVars}}]{{/allowableValues}} # noqa: E501 -{{/useCustomTemplateCode}} -{{/defaultValue}} -{{^defaultValue}} -{{^useCustomTemplateCode}} - {{name}} ({{{dataType}}}):{{#description}} {{{.}}}{{/description}} -{{/useCustomTemplateCode}} -{{#useCustomTemplateCode}} - {{name}} ({{#vendorExtensions.x-int-or-string}}str|int{{/vendorExtensions.x-int-or-string}}{{^vendorExtensions.x-int-or-string}}{{{dataType}}}{{/vendorExtensions.x-int-or-string}}):{{#description}} {{{.}}}{{/description}} -{{/useCustomTemplateCode}} -{{/defaultValue}} -{{/isReadOnly}} -{{/requiredVars}} -{{> model_templates/docstring_init_required_kwargs }} -{{#optionalVars}} -{{^useCustomTemplateCode}} - {{name}} ({{{dataType}}}):{{#description}} {{{.}}}.{{/description}} [optional]{{#defaultValue}} if omitted the server will use the default value of {{{.}}}{{/defaultValue}} # noqa: E501 -{{/useCustomTemplateCode}} -{{#useCustomTemplateCode}} - {{name}} ({{#vendorExtensions.x-int-or-string}}str|int{{/vendorExtensions.x-int-or-string}}{{^vendorExtensions.x-int-or-string}}{{{dataType}}}{{/vendorExtensions.x-int-or-string}}):{{#description}} {{{.}}}.{{/description}} [optional]{{#defaultValue}} if omitted the server will use the default value of {{{.}}}{{/defaultValue}} # noqa: E501 -{{/useCustomTemplateCode}} -{{/optionalVars}} - """ - -{{#requiredVars}} -{{^isReadOnly}} -{{#defaultValue}} - {{name}} = kwargs.get('{{name}}', {{{defaultValue}}}) -{{/defaultValue}} -{{/isReadOnly}} -{{/requiredVars}} - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - -{{> model_templates/invalid_pos_args }} - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") \ No newline at end of file diff --git a/sdks/python/templates/model_templates/method_init_normal.mustache b/sdks/python/templates/model_templates/method_init_normal.mustache deleted file mode 100644 index bc5e7686f..000000000 --- a/sdks/python/templates/model_templates/method_init_normal.mustache +++ /dev/null @@ -1,30 +0,0 @@ - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - -{{> model_templates/method_init_shared }} - -{{#isEnum}} - self.value = value -{{/isEnum}} -{{#requiredVars}} -{{^isReadOnly}} - self.{{name}} = {{name}} -{{/isReadOnly}} -{{/requiredVars}} - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") \ No newline at end of file diff --git a/sdks/python/templates/model_templates/method_init_shared.mustache b/sdks/python/templates/model_templates/method_init_shared.mustache deleted file mode 100644 index 2ec2805a2..000000000 --- a/sdks/python/templates/model_templates/method_init_shared.mustache +++ /dev/null @@ -1,57 +0,0 @@ - @convert_js_args_to_python_args - def __init__(self{{#requiredVars}}{{^isReadOnly}}{{^defaultValue}}, {{name}}{{/defaultValue}}{{/isReadOnly}}{{/requiredVars}}, *args, **kwargs): # noqa: E501 - """{{classname}} - a model defined in OpenAPI - -{{#requiredVars}} -{{^isReadOnly}} -{{#-first}} - Args: -{{/-first}} -{{^defaultValue}} -{{^useCustomTemplateCode}} - {{name}} ({{{dataType}}}):{{#description}} {{{.}}}{{/description}} -{{/useCustomTemplateCode}} -{{#useCustomTemplateCode}} - {{name}} ({{#vendorExtensions.x-int-or-string}}str|int{{/vendorExtensions.x-int-or-string}}{{^vendorExtensions.x-int-or-string}}{{{dataType}}}{{/vendorExtensions.x-int-or-string}}):{{#description}} {{{.}}}{{/description}} -{{/useCustomTemplateCode}} -{{/defaultValue}} -{{#-last}} - -{{/-last}} -{{/isReadOnly}} -{{/requiredVars}} - Keyword Args: -{{#requiredVars}} -{{^isReadOnly}} -{{#defaultValue}} - {{name}} ({{{dataType}}}):{{#description}} {{{.}}}.{{/description}} defaults to {{{defaultValue}}}{{#allowableValues}}, must be one of [{{#enumVars}}{{{value}}}, {{/enumVars}}]{{/allowableValues}} # noqa: E501 -{{/defaultValue}} -{{/isReadOnly}} -{{/requiredVars}} -{{> model_templates/docstring_init_required_kwargs }} -{{#optionalVars}} - {{name}} ({{{dataType}}}):{{#description}} {{{.}}}.{{/description}} [optional]{{#defaultValue}} if omitted the server will use the default value of {{{.}}}{{/defaultValue}} # noqa: E501 -{{/optionalVars}} - """ - -{{#requiredVars}} -{{^isReadOnly}} -{{#defaultValue}} - {{name}} = kwargs.get('{{name}}', {{{defaultValue}}}) -{{/defaultValue}} -{{/isReadOnly}} -{{/requiredVars}} - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - -{{> model_templates/invalid_pos_args }} - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) \ No newline at end of file diff --git a/sdks/python/templates/model_templates/method_init_simple.mustache b/sdks/python/templates/model_templates/method_init_simple.mustache deleted file mode 100644 index ec111f6e7..000000000 --- a/sdks/python/templates/model_templates/method_init_simple.mustache +++ /dev/null @@ -1,66 +0,0 @@ - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): - """{{classname}} - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] ({{{dataType}}}):{{#description}} {{{.}}}.{{/description}}{{#defaultValue}} if omitted defaults to {{{.}}}{{/defaultValue}}{{#allowableValues}}, must be one of [{{#enumVars}}{{{value}}}, {{/enumVars}}]{{/allowableValues}} # noqa: E501 - - Keyword Args: - value ({{{dataType}}}):{{#description}} {{{.}}}.{{/description}}{{#defaultValue}} if omitted defaults to {{{.}}}{{/defaultValue}}{{#allowableValues}}, must be one of [{{#enumVars}}{{{value}}}, {{/enumVars}}]{{/allowableValues}} # noqa: E501 -{{> model_templates/docstring_init_required_kwargs }} - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) -{{#defaultValue}} - else: - value = {{{.}}} -{{/defaultValue}} -{{^defaultValue}} - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) -{{/defaultValue}} - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - -{{> model_templates/invalid_pos_args }} - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) \ No newline at end of file diff --git a/sdks/python/templates/model_templates/method_set_attribute.mustache b/sdks/python/templates/model_templates/method_set_attribute.mustache deleted file mode 100644 index 8ba0529cd..000000000 --- a/sdks/python/templates/model_templates/method_set_attribute.mustache +++ /dev/null @@ -1,51 +0,0 @@ - def set_attribute(self, name, value): - # this is only used to set properties on self - - path_to_item = [] - if self._path_to_item: - path_to_item.extend(self._path_to_item) - path_to_item.append(name) - - if name in self.openapi_types: - required_types_mixed = self.openapi_types[name] - elif self.additional_properties_type is None: - raise ApiAttributeError( - "{0} has no attribute '{1}'".format( - type(self).__name__, name), - path_to_item - ) - elif self.additional_properties_type is not None: - required_types_mixed = self.additional_properties_type - - if get_simple_class(name) != str: - error_msg = type_error_message( - var_name=name, - var_value=name, - valid_classes=(str,), - key_type=True - ) - raise ApiTypeError( - error_msg, - path_to_item=path_to_item, - valid_classes=(str,), - key_type=True - ) - - if self._check_type: - value = validate_and_convert_types( - value, required_types_mixed, path_to_item, self._spec_property_naming, - self._check_type, configuration=self._configuration) - if (name,) in self.allowed_values: - check_allowed_values( - self.allowed_values, - (name,), - value - ) - if (name,) in self.validations: - check_validations( - self.validations, - (name,), - value, - self._configuration - ) - self.__dict__['_data_store'][name] = value \ No newline at end of file diff --git a/sdks/python/templates/model_templates/methods_setattr_getattr_composed.mustache b/sdks/python/templates/model_templates/methods_setattr_getattr_composed.mustache deleted file mode 100644 index ada739e75..000000000 --- a/sdks/python/templates/model_templates/methods_setattr_getattr_composed.mustache +++ /dev/null @@ -1,103 +0,0 @@ - def __setitem__(self, name, value): - """set the value of an attribute using square-bracket notation: `instance[attr] = val`""" - if name in self.required_properties: - self.__dict__[name] = value - return - - """ - Use cases: - 1. additional_properties_type is None (additionalProperties == False in spec) - Check for property presence in self.openapi_types - if not present then throw an error - if present set in self, set attribute - always set on composed schemas - 2. additional_properties_type exists - set attribute on self - always set on composed schemas - """ - if self.additional_properties_type is None: - """ - For an attribute to exist on a composed schema it must: - - fulfill schema_requirements in the self composed schema not considering oneOf/anyOf/allOf schemas AND - - fulfill schema_requirements in each oneOf/anyOf/allOf schemas - - schema_requirements: - For an attribute to exist on a schema it must: - - be present in properties at the schema OR - - have additionalProperties unset (defaults additionalProperties = any type) OR - - have additionalProperties set - """ - if name not in self.openapi_types: - raise ApiAttributeError( - "{0} has no attribute '{1}'".format( - type(self).__name__, name), - [e for e in [self._path_to_item, name] if e] - ) - # attribute must be set on self and composed instances - self.set_attribute(name, value) - for model_instance in self._composed_instances: - setattr(model_instance, name, value) - if name not in self._var_name_to_model_instances: - # we assigned an additional property - self.__dict__['_var_name_to_model_instances'][name] = self._composed_instances + [self] - return None - - __unset_attribute_value__ = object() - - def get(self, name, default=None): - """returns the value of an attribute or some default value if the attribute was not set""" - if name in self.required_properties: - return self.__dict__[name] - - # get the attribute from the correct instance - model_instances = self._var_name_to_model_instances.get(name) - values = [] - # A composed model stores self and child (oneof/anyOf/allOf) models under - # self._var_name_to_model_instances. - # Any property must exist in self and all model instances - # The value stored in all model instances must be the same - if model_instances: - for model_instance in model_instances: - if name in model_instance._data_store: - v = model_instance._data_store[name] - if v not in values: - values.append(v) - len_values = len(values) - if len_values == 0: - return default - elif len_values == 1: - return values[0] - elif len_values > 1: - raise ApiValueError( - "Values stored for property {0} in {1} differ when looking " - "at self and self's composed instances. All values must be " - "the same".format(name, type(self).__name__), - [e for e in [self._path_to_item, name] if e] - ) - - def __getitem__(self, name): - """get the value of an attribute using square-bracket notation: `instance[attr]`""" - value = self.get(name, self.__unset_attribute_value__) - if value is self.__unset_attribute_value__: - raise ApiAttributeError( - "{0} has no attribute '{1}'".format( - type(self).__name__, name), - [e for e in [self._path_to_item, name] if e] - ) - return value - - def __contains__(self, name): - """used by `in` operator to check if an attribute value was set in an instance: `'attr' in instance`""" - - if name in self.required_properties: - return name in self.__dict__ - - model_instances = self._var_name_to_model_instances.get( - name, self._additional_properties_model_instances) - - if model_instances: - for model_instance in model_instances: - if name in model_instance._data_store: - return True - - return False \ No newline at end of file diff --git a/sdks/python/templates/model_templates/methods_setattr_getattr_normal.mustache b/sdks/python/templates/model_templates/methods_setattr_getattr_normal.mustache deleted file mode 100644 index d260d7371..000000000 --- a/sdks/python/templates/model_templates/methods_setattr_getattr_normal.mustache +++ /dev/null @@ -1,37 +0,0 @@ - def __setitem__(self, name, value): - """set the value of an attribute using square-bracket notation: `instance[attr] = val`""" - if name in self.required_properties: - self.__dict__[name] = value - return - - self.set_attribute(name, value) - - def get(self, name, default=None): - """returns the value of an attribute or some default value if the attribute was not set""" - if name in self.required_properties: - return self.__dict__[name] - - return self.__dict__['_data_store'].get(name, default) - - def __getitem__(self, name): - """get the value of an attribute using square-bracket notation: `instance[attr]`""" - if name in self: - return self.get(name) - -{{^useCustomTemplateCode}} - raise ApiAttributeError( - "{0} has no attribute '{1}'".format( - type(self).__name__, name), - [e for e in [self._path_to_item, name] if e] - ) -{{/useCustomTemplateCode}} -{{#useCustomTemplateCode}} - return None -{{/useCustomTemplateCode}} - - def __contains__(self, name): - """used by `in` operator to check if an attribute value was set in an instance: `'attr' in instance`""" - if name in self.required_properties: - return name in self.__dict__ - - return name in self.__dict__['_data_store'] \ No newline at end of file diff --git a/sdks/python/templates/model_templates/methods_shared.mustache b/sdks/python/templates/model_templates/methods_shared.mustache deleted file mode 100644 index eddad2533..000000000 --- a/sdks/python/templates/model_templates/methods_shared.mustache +++ /dev/null @@ -1,34 +0,0 @@ - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other - - def __setattr__(self, attr, value): - """set the value of an attribute using dot notation: `instance.attr = val`""" - self[attr] = value - - def __getattr__(self, attr): - """get the value of an attribute using dot notation: `instance.attr`""" - return self.{{#attrNoneIfUnset}}get{{/attrNoneIfUnset}}{{^attrNoneIfUnset}}__getitem__{{/attrNoneIfUnset}}(attr) - - def __copy__(self): - cls = self.__class__ - if self.get("_spec_property_naming", False): - return cls._new_from_openapi_data(**self.__dict__) - else: - return new_cls.__new__(cls, **self.__dict__) - - def __deepcopy__(self, memo): - cls = self.__class__ - - if self.get("_spec_property_naming", False): - new_inst = cls._new_from_openapi_data() - else: - new_inst = cls.__new__(cls) - - for k, v in self.__dict__.items(): - setattr(new_inst, k, deepcopy(v, memo)) - return new_inst diff --git a/sdks/python/templates/model_templates/methods_todict_tostr_eq_shared.mustache b/sdks/python/templates/model_templates/methods_todict_tostr_eq_shared.mustache deleted file mode 100644 index 17c441196..000000000 --- a/sdks/python/templates/model_templates/methods_todict_tostr_eq_shared.mustache +++ /dev/null @@ -1,24 +0,0 @@ - def to_dict(self): - """Returns the model properties as a dict""" - return model_to_dict(self, serialize=False) - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, self.__class__): - return False - - if not set(self._data_store.keys()) == set(other._data_store.keys()): - return False - for _var_name, this_val in self._data_store.items(): - that_val = other._data_store[_var_name] - types = set() - types.add(this_val.__class__) - types.add(that_val.__class__) - vals_equal = this_val == that_val - if not vals_equal: - return False - return True \ No newline at end of file diff --git a/sdks/python/templates/model_templates/methods_tostr_eq_simple.mustache b/sdks/python/templates/model_templates/methods_tostr_eq_simple.mustache deleted file mode 100644 index 4a7ef6ae5..000000000 --- a/sdks/python/templates/model_templates/methods_tostr_eq_simple.mustache +++ /dev/null @@ -1,16 +0,0 @@ - def to_str(self): - """Returns the string representation of the model""" - return str(self.value) - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, self.__class__): - return False - - this_val = self._data_store['value'] - that_val = other._data_store['value'] - types = set() - types.add(this_val.__class__) - types.add(that_val.__class__) - vals_equal = this_val == that_val - return vals_equal \ No newline at end of file diff --git a/sdks/python/templates/model_templates/model_composed.mustache b/sdks/python/templates/model_templates/model_composed.mustache deleted file mode 100644 index 9f8d0ee63..000000000 --- a/sdks/python/templates/model_templates/model_composed.mustache +++ /dev/null @@ -1,100 +0,0 @@ -class {{classname}}(ModelComposed): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: -{{> model_templates/docstring_allowed }} - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. -{{> model_templates/docstring_openapi_validations }} - """ - -{{> model_templates/classvars }} - - attribute_map = { -{{#requiredVars}} - '{{name}}': '{{baseName}}', # noqa: E501 -{{/requiredVars}} -{{#optionalVars}} - '{{name}}': '{{baseName}}', # noqa: E501 -{{/optionalVars}} - } - - read_only_vars = { -{{#requiredVars}} -{{#isReadOnly}} - '{{name}}', # noqa: E501 -{{/isReadOnly}} -{{/requiredVars}} -{{#optionalVars}} -{{#isReadOnly}} - '{{name}}', # noqa: E501 -{{/isReadOnly}} -{{/optionalVars}} - } -{{#useCustomTemplateCode}} - {{#requiredVars}} - - @property - def {{name}}(self) -> {{#vendorExtensions.x-int-or-string}}Union[int, str]{{/vendorExtensions.x-int-or-string}}{{^vendorExtensions.x-int-or-string}}{{{dataType}}}{{/vendorExtensions.x-int-or-string}}: - return self.get("{{name}}") - {{^isReadOnly}} - - @{{name}}.setter - def {{name}}(self, value: {{#vendorExtensions.x-int-or-string}}Union[int, str]{{/vendorExtensions.x-int-or-string}}{{^vendorExtensions.x-int-or-string}}{{{dataType}}}{{/vendorExtensions.x-int-or-string}}): - setattr(self, "{{name}}", value) - {{/isReadOnly}} - {{/requiredVars}} - {{#optionalVars}} - - @property - def {{name}}(self) -> {{{dataType}}}: - return self.get("{{name}}") - - @{{name}}.setter - def {{name}}(self, value: {{{dataType}}}): - setattr(self, "{{name}}", value) - {{/optionalVars}} -{{/useCustomTemplateCode}} - -{{> model_templates/method_from_openapi_data_composed }} - -{{> model_templates/method_init_composed }} - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading -{{#imports}} -{{#-first}} - lazy_import() -{{/-first}} -{{/imports}} - return { - 'anyOf': [ -{{#anyOf}} - {{{.}}}, -{{/anyOf}} - ], -{{^useCustomTemplateCode}} - 'allOf': [ -{{#allOf}} - {{{.}}}, -{{/allOf}} - ], -{{/useCustomTemplateCode}} - 'oneOf': [ -{{#oneOf}} - {{{.}}}, -{{/oneOf}} - ], - } \ No newline at end of file diff --git a/sdks/python/templates/model_templates/model_normal.mustache b/sdks/python/templates/model_templates/model_normal.mustache deleted file mode 100644 index d62e48ca1..000000000 --- a/sdks/python/templates/model_templates/model_normal.mustache +++ /dev/null @@ -1,68 +0,0 @@ -class {{classname}}(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: -{{> model_templates/docstring_allowed }} - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. -{{> model_templates/docstring_openapi_validations }} - """ - -{{> model_templates/classvars }} - - attribute_map = { -{{#requiredVars}} - '{{name}}': '{{baseName}}', # noqa: E501 -{{/requiredVars}} -{{#optionalVars}} - '{{name}}': '{{baseName}}', # noqa: E501 -{{/optionalVars}} - } - - read_only_vars = { -{{#requiredVars}} -{{#isReadOnly}} - '{{name}}', # noqa: E501 -{{/isReadOnly}} -{{/requiredVars}} -{{#optionalVars}} -{{#isReadOnly}} - '{{name}}', # noqa: E501 -{{/isReadOnly}} -{{/optionalVars}} - } - - _composed_schemas = {} -{{#useCustomTemplateCode}} - {{#requiredVars}} - - @property - def {{name}}(self) -> {{#vendorExtensions.x-int-or-string}}Union[int, str]{{/vendorExtensions.x-int-or-string}}{{^vendorExtensions.x-int-or-string}}{{{dataType}}}{{/vendorExtensions.x-int-or-string}}: - return self.get("{{name}}") - {{^isReadOnly}} - - @{{name}}.setter - def {{name}}(self, value: {{#vendorExtensions.x-int-or-string}}Union[int, str]{{/vendorExtensions.x-int-or-string}}{{^vendorExtensions.x-int-or-string}}{{{dataType}}}{{/vendorExtensions.x-int-or-string}}): - setattr(self, "{{name}}", value) - {{/isReadOnly}} - {{/requiredVars}} - {{#optionalVars}} - - @property - def {{name}}(self) -> {{{dataType}}}: - return self.get("{{name}}") - - @{{name}}.setter - def {{name}}(self, value: {{{dataType}}}): - setattr(self, "{{name}}", value) - {{/optionalVars}} -{{/useCustomTemplateCode}} - -{{> model_templates/method_from_openapi_data_normal}} - -{{> model_templates/method_init_normal}} \ No newline at end of file diff --git a/sdks/python/templates/model_templates/model_simple.mustache b/sdks/python/templates/model_templates/model_simple.mustache deleted file mode 100644 index 1a41a9cf7..000000000 --- a/sdks/python/templates/model_templates/model_simple.mustache +++ /dev/null @@ -1,22 +0,0 @@ -class {{classname}}(ModelSimple): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: -{{> model_templates/docstring_allowed }} -{{> model_templates/docstring_openapi_validations }} - """ - -{{> model_templates/classvars }} - - attribute_map = {} - - read_only_vars = set() - - _composed_schemas = None - -{{> model_templates/method_init_simple}} - -{{> model_templates/method_from_openapi_data_simple}} \ No newline at end of file diff --git a/sdks/python/templates/model_templates/validations.mustache b/sdks/python/templates/model_templates/validations.mustache deleted file mode 100644 index 758dc41d9..000000000 --- a/sdks/python/templates/model_templates/validations.mustache +++ /dev/null @@ -1,34 +0,0 @@ -{{#maxLength}} - 'max_length': {{.}}, -{{/maxLength}} -{{#minLength}} - 'min_length': {{.}}, -{{/minLength}} -{{#maxItems}} - 'max_items': {{.}}, -{{/maxItems}} -{{#minProperties}} - 'min_properties': {{.}}, -{{/minProperties}} -{{#maxProperties}} - 'max_properties': {{.}}, -{{/maxProperties}} -{{#minItems}} - 'min_items': {{.}}, -{{/minItems}} -{{#maximum}} - {{#exclusiveMaximum}}'exclusive_maximum'{{/exclusiveMaximum}}'inclusive_maximum': {{maximum}}, -{{/maximum}} -{{#minimum}} - {{#exclusiveMinimum}}'exclusive_minimum'{{/exclusiveMinimum}}'inclusive_minimum': {{minimum}}, -{{/minimum}} -{{#pattern}} - 'regex': { - 'pattern': r'{{{vendorExtensions.x-regex}}}', # noqa: E501{{#vendorExtensions.x-modifiers}} - {{#-first}}'flags': (re.{{.}}{{/-first}}{{^-first}} re.{{.}}{{/-first}}{{^-last}} | {{/-last}}{{#-last}}){{/-last}}{{/vendorExtensions.x-modifiers}} - }, -{{/pattern}} -{{#multipleOf}} - 'multiple_of': {{.}}, -{{/multipleOf}} - }, \ No newline at end of file diff --git a/sdks/python/templates/model_test.mustache b/sdks/python/templates/model_test.mustache index aa95f6494..08088557c 100644 --- a/sdks/python/templates/model_test.mustache +++ b/sdks/python/templates/model_test.mustache @@ -1,17 +1,13 @@ +# coding: utf-8 + {{>partial_header}} -import sys import unittest -import {{packageName}} {{#models}} {{#model}} -{{#imports}} -{{{.}}} -{{/imports}} from {{modelPackage}}.{{classFilename}} import {{classname}} - class Test{{classname}}(unittest.TestCase): """{{classname}} unit test stubs""" @@ -20,13 +16,42 @@ class Test{{classname}}(unittest.TestCase): def tearDown(self): pass +{{^isEnum}} + + def make_instance(self, include_optional) -> {{classname}}: + """Test {{classname}} + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `{{{classname}}}` + """ + model = {{classname}}() + if include_optional: + return {{classname}}( + {{#vars}} + {{name}} = {{{example}}}{{^example}}None{{/example}}{{^-last}},{{/-last}} + {{/vars}} + ) + else: + return {{classname}}( + {{#vars}} + {{#required}} + {{name}} = {{{example}}}{{^example}}None{{/example}}, + {{/required}} + {{/vars}} + ) + """ +{{/isEnum}} def test{{classname}}(self): """Test {{classname}}""" - # FIXME: construct object with mandatory attributes with example values - # model = {{classname}}() # noqa: E501 - pass - +{{^isEnum}} + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) +{{/isEnum}} +{{#isEnum}} + # inst = {{{classname}}}() +{{/isEnum}} {{/model}} {{/models}} diff --git a/sdks/python/templates/model_utils.mustache b/sdks/python/templates/model_utils.mustache deleted file mode 100644 index a785cc468..000000000 --- a/sdks/python/templates/model_utils.mustache +++ /dev/null @@ -1,1805 +0,0 @@ -{{>partial_header}} - -from datetime import date, datetime # noqa: F401 -from copy import deepcopy -import inspect -import io -import os -import pprint -import re -import tempfile - -from dateutil.parser import parse - -from {{packageName}}.exceptions import ( - ApiKeyError, - ApiAttributeError, - ApiTypeError, - ApiValueError, -) - -none_type = type(None) -file_type = io.IOBase - - -def convert_js_args_to_python_args(fn): - from functools import wraps - @wraps(fn) - def wrapped_init(_self, *args, **kwargs): - """ - An attribute named `self` received from the api will conflicts with the reserved `self` - parameter of a class method. During generation, `self` attributes are mapped - to `_self` in models. Here, we name `_self` instead of `self` to avoid conflicts. - """ - spec_property_naming = kwargs.get('_spec_property_naming', False) - if spec_property_naming: - kwargs = change_keys_js_to_python(kwargs, _self if isinstance(_self, type) else _self.__class__) - return fn(_self, *args, **kwargs) - return wrapped_init - - -class cached_property(object): - # this caches the result of the function call for fn with no inputs - # use this as a decorator on function methods that you want converted - # into cached properties - result_key = '_results' - - def __init__(self, fn): - self._fn = fn - - def __get__(self, instance, cls=None): - if self.result_key in vars(self): - return vars(self)[self.result_key] - else: - result = self._fn() - setattr(self, self.result_key, result) - return result - - -PRIMITIVE_TYPES = (list, float, int, bool, datetime, date, str, file_type) - -def allows_single_value_input(cls): - """ - This function returns True if the input composed schema model or any - descendant model allows a value only input - This is true for cases where oneOf contains items like: - oneOf: - - float - - NumberWithValidation - - StringEnum - - ArrayModel - - null - TODO: lru_cache this - """ - if ( - issubclass(cls, ModelSimple) or - cls in PRIMITIVE_TYPES - ): - return True - elif issubclass(cls, ModelComposed): - if not cls._composed_schemas['oneOf']: - return False - return any(allows_single_value_input(c) for c in cls._composed_schemas['oneOf']) - return False - -def composed_model_input_classes(cls): - """ - This function returns a list of the possible models that can be accepted as - inputs. - TODO: lru_cache this - """ - if issubclass(cls, ModelSimple) or cls in PRIMITIVE_TYPES: - return [cls] - elif issubclass(cls, ModelNormal): - if cls.discriminator is None: - return [cls] - else: - return get_discriminated_classes(cls) - elif issubclass(cls, ModelComposed): - if not cls._composed_schemas['oneOf']: - return [] - if cls.discriminator is None: - input_classes = [] - for c in cls._composed_schemas['oneOf']: - input_classes.extend(composed_model_input_classes(c)) - return input_classes - else: - return get_discriminated_classes(cls) - return [] - - -class OpenApiModel(object): - """The base class for all OpenAPIModels""" - -{{> model_templates/method_set_attribute }} - -{{> model_templates/methods_shared }} - - def __new__(cls, *args, **kwargs): - # this function uses the discriminator to - # pick a new schema/class to instantiate because a discriminator - # propertyName value was passed in - - if len(args) == 1: - arg = args[0] - if arg is None and is_type_nullable(cls): - # The input data is the 'null' value and the type is nullable. - return None - - if issubclass(cls, ModelComposed) and allows_single_value_input(cls): - model_kwargs = {} - oneof_instance = get_oneof_instance(cls, model_kwargs, kwargs, model_arg=arg) - return oneof_instance - - - visited_composed_classes = kwargs.get('_visited_composed_classes', ()) - if ( - cls.discriminator is None or - cls in visited_composed_classes - ): - # Use case 1: this openapi schema (cls) does not have a discriminator - # Use case 2: we have already visited this class before and are sure that we - # want to instantiate it this time. We have visited this class deserializing - # a payload with a discriminator. During that process we traveled through - # this class but did not make an instance of it. Now we are making an - # instance of a composed class which contains cls in it, so this time make an instance of cls. - # - # Here's an example of use case 2: If Animal has a discriminator - # petType and we pass in "Dog", and the class Dog -{{^useCustomTemplateCode}} - # allOf includes Animal, we move through Animal -{{/useCustomTemplateCode}} -{{#useCustomTemplateCode}} - # includes Animal, we move through Animal -{{/useCustomTemplateCode}} - # once using the discriminator, and pick Dog. - # Then in the composed schema dog Dog, we will make an instance of the - # Animal class (because Dal has allOf: Animal) but this time we won't travel - # through Animal's discriminator because we passed in - # _visited_composed_classes = (Animal,) - - return super(OpenApiModel, cls).__new__(cls) - - # Get the name and value of the discriminator property. - # The discriminator name is obtained from the discriminator meta-data - # and the discriminator value is obtained from the input data. - discr_propertyname_py = list(cls.discriminator.keys())[0] - discr_propertyname_js = cls.attribute_map[discr_propertyname_py] - if discr_propertyname_js in kwargs: - discr_value = kwargs[discr_propertyname_js] - elif discr_propertyname_py in kwargs: - discr_value = kwargs[discr_propertyname_py] - else: - # The input data does not contain the discriminator property. - path_to_item = kwargs.get('_path_to_item', ()) - raise ApiValueError( - "Cannot deserialize input data due to missing discriminator. " - "The discriminator property '%s' is missing at path: %s" % - (discr_propertyname_js, path_to_item) - ) - - # Implementation note: the last argument to get_discriminator_class - # is a list of visited classes. get_discriminator_class may recursively - # call itself and update the list of visited classes, and the initial - # value must be an empty list. Hence not using 'visited_composed_classes' - new_cls = get_discriminator_class( - cls, discr_propertyname_py, discr_value, []) - if new_cls is None: - path_to_item = kwargs.get('_path_to_item', ()) - disc_prop_value = kwargs.get( - discr_propertyname_js, kwargs.get(discr_propertyname_py)) - raise ApiValueError( - "Cannot deserialize input data due to invalid discriminator " - "value. The OpenAPI document has no mapping for discriminator " - "property '%s'='%s' at path: %s" % - (discr_propertyname_js, disc_prop_value, path_to_item) - ) - - if new_cls in visited_composed_classes: - # if we are making an instance of a composed schema Descendent - # which allOf includes Ancestor, then Ancestor contains - # a discriminator that includes Descendent. - # So if we make an instance of Descendent, we have to make an - # instance of Ancestor to hold the allOf properties. - # This code detects that use case and makes the instance of Ancestor - # For example: - # When making an instance of Dog, _visited_composed_classes = (Dog,) - # then we make an instance of Animal to include in dog._composed_instances - # so when we are here, cls is Animal - # cls.discriminator != None - # cls not in _visited_composed_classes - # new_cls = Dog - # but we know we know that we already have Dog - # because it is in visited_composed_classes - # so make Animal here - return super(OpenApiModel, cls).__new__(cls) - - # Build a list containing all oneOf and anyOf descendants. - oneof_anyof_classes = None - if cls._composed_schemas is not None: - oneof_anyof_classes = ( - cls._composed_schemas.get('oneOf', ()) + - cls._composed_schemas.get('anyOf', ())) - oneof_anyof_child = new_cls in oneof_anyof_classes - kwargs['_visited_composed_classes'] = visited_composed_classes + (cls,) - - if cls._composed_schemas.get('allOf') and oneof_anyof_child: - # Validate that we can make self because when we make the - # new_cls it will not include the allOf validations in self - self_inst = super(OpenApiModel, cls).__new__(cls) - self_inst.__init__(*args, **kwargs) - - if kwargs.get("_spec_property_naming", False): - # when true, implies new is from deserialization - new_inst = new_cls._new_from_openapi_data(*args, **kwargs) - else: - new_inst = new_cls.__new__(new_cls, *args, **kwargs) - new_inst.__init__(*args, **kwargs) - - return new_inst - - - @classmethod - @convert_js_args_to_python_args - def _new_from_openapi_data(cls, *args, **kwargs): - # this function uses the discriminator to - # pick a new schema/class to instantiate because a discriminator - # propertyName value was passed in - - if len(args) == 1: - arg = args[0] - if arg is None and is_type_nullable(cls): - # The input data is the 'null' value and the type is nullable. - return None - - if issubclass(cls, ModelComposed) and allows_single_value_input(cls): - model_kwargs = {} - oneof_instance = get_oneof_instance(cls, model_kwargs, kwargs, model_arg=arg) - return oneof_instance - - - visited_composed_classes = kwargs.get('_visited_composed_classes', ()) - if ( - cls.discriminator is None or - cls in visited_composed_classes - ): - # Use case 1: this openapi schema (cls) does not have a discriminator - # Use case 2: we have already visited this class before and are sure that we - # want to instantiate it this time. We have visited this class deserializing - # a payload with a discriminator. During that process we traveled through - # this class but did not make an instance of it. Now we are making an - # instance of a composed class which contains cls in it, so this time make an instance of cls. - # - # Here's an example of use case 2: If Animal has a discriminator - # petType and we pass in "Dog", and the class Dog -{{^useCustomTemplateCode}} - # allOf includes Animal, we move through Animal -{{/useCustomTemplateCode}} -{{#useCustomTemplateCode}} - # includes Animal, we move through Animal -{{/useCustomTemplateCode}} - # once using the discriminator, and pick Dog. - # Then in the composed schema dog Dog, we will make an instance of the - # Animal class (because Dal has allOf: Animal) but this time we won't travel - # through Animal's discriminator because we passed in - # _visited_composed_classes = (Animal,) - - return cls._from_openapi_data(*args, **kwargs) - - # Get the name and value of the discriminator property. - # The discriminator name is obtained from the discriminator meta-data - # and the discriminator value is obtained from the input data. - discr_propertyname_py = list(cls.discriminator.keys())[0] - discr_propertyname_js = cls.attribute_map[discr_propertyname_py] - if discr_propertyname_js in kwargs: - discr_value = kwargs[discr_propertyname_js] - elif discr_propertyname_py in kwargs: - discr_value = kwargs[discr_propertyname_py] - else: - # The input data does not contain the discriminator property. - path_to_item = kwargs.get('_path_to_item', ()) - raise ApiValueError( - "Cannot deserialize input data due to missing discriminator. " - "The discriminator property '%s' is missing at path: %s" % - (discr_propertyname_js, path_to_item) - ) - - # Implementation note: the last argument to get_discriminator_class - # is a list of visited classes. get_discriminator_class may recursively - # call itself and update the list of visited classes, and the initial - # value must be an empty list. Hence not using 'visited_composed_classes' - new_cls = get_discriminator_class( - cls, discr_propertyname_py, discr_value, []) - if new_cls is None: - path_to_item = kwargs.get('_path_to_item', ()) - disc_prop_value = kwargs.get( - discr_propertyname_js, kwargs.get(discr_propertyname_py)) - raise ApiValueError( - "Cannot deserialize input data due to invalid discriminator " - "value. The OpenAPI document has no mapping for discriminator " - "property '%s'='%s' at path: %s" % - (discr_propertyname_js, disc_prop_value, path_to_item) - ) - - if new_cls in visited_composed_classes: - # if we are making an instance of a composed schema Descendent - # which allOf includes Ancestor, then Ancestor contains - # a discriminator that includes Descendent. - # So if we make an instance of Descendent, we have to make an - # instance of Ancestor to hold the allOf properties. - # This code detects that use case and makes the instance of Ancestor - # For example: - # When making an instance of Dog, _visited_composed_classes = (Dog,) - # then we make an instance of Animal to include in dog._composed_instances - # so when we are here, cls is Animal - # cls.discriminator != None - # cls not in _visited_composed_classes - # new_cls = Dog - # but we know we know that we already have Dog - # because it is in visited_composed_classes - # so make Animal here - return cls._from_openapi_data(*args, **kwargs) - - # Build a list containing all oneOf and anyOf descendants. - oneof_anyof_classes = None - if cls._composed_schemas is not None: - oneof_anyof_classes = ( - cls._composed_schemas.get('oneOf', ()) + - cls._composed_schemas.get('anyOf', ())) - oneof_anyof_child = new_cls in oneof_anyof_classes - kwargs['_visited_composed_classes'] = visited_composed_classes + (cls,) - - if cls._composed_schemas.get('allOf') and oneof_anyof_child: - # Validate that we can make self because when we make the - # new_cls it will not include the allOf validations in self - self_inst = cls._from_openapi_data(*args, **kwargs) - - - new_inst = new_cls._new_from_openapi_data(*args, **kwargs) - return new_inst - - -class ModelSimple(OpenApiModel): - """the parent class of models whose type != object in their - swagger/openapi""" - -{{> model_templates/methods_setattr_getattr_normal }} - -{{> model_templates/methods_tostr_eq_simple }} - - -class ModelNormal(OpenApiModel): - """the parent class of models whose type == object in their - swagger/openapi""" - -{{> model_templates/methods_setattr_getattr_normal }} - -{{> model_templates/methods_todict_tostr_eq_shared}} - - -class ModelComposed(OpenApiModel): - """the parent class of models whose type == object in their - swagger/openapi and have oneOf/allOf/anyOf - - When one sets a property we use var_name_to_model_instances to store the value in - the correct class instances + run any type checking + validation code. - When one gets a property we use var_name_to_model_instances to get the value - from the correct class instances. - This allows multiple composed schemas to contain the same property with additive - constraints on the value. - - _composed_schemas (dict) stores the anyOf/allOf/oneOf classes - key (str): allOf/oneOf/anyOf - value (list): the classes in the XOf definition. - Note: none_type can be included when the openapi document version >= 3.1.0 - _composed_instances (list): stores a list of instances of the composed schemas - defined in _composed_schemas. When properties are accessed in the self instance, - they are returned from the self._data_store or the data stores in the instances - in self._composed_schemas - _var_name_to_model_instances (dict): maps between a variable name on self and - the composed instances (self included) which contain that data - key (str): property name - value (list): list of class instances, self or instances in _composed_instances - which contain the value that the key is referring to. - """ - -{{> model_templates/methods_setattr_getattr_composed }} - -{{> model_templates/methods_todict_tostr_eq_shared}} - - -COERCION_INDEX_BY_TYPE = { - ModelComposed: 0, - ModelNormal: 1, - ModelSimple: 2, - none_type: 3, # The type of 'None'. - list: 4, - dict: 5, - float: 6, - int: 7, - bool: 8, - datetime: 9, - date: 10, - str: 11, - file_type: 12, # 'file_type' is an alias for the built-in 'file' or 'io.IOBase' type. -} - -# these are used to limit what type conversions we try to do -# when we have a valid type already and we want to try converting -# to another type -UPCONVERSION_TYPE_PAIRS = ( - (str, datetime), - (str, date), - (int, float), # A float may be serialized as an integer, e.g. '3' is a valid serialized float. - (list, ModelComposed), - (dict, ModelComposed), - (str, ModelComposed), - (int, ModelComposed), - (float, ModelComposed), - (list, ModelComposed), - (list, ModelNormal), - (dict, ModelNormal), - (str, ModelSimple), - (int, ModelSimple), - (float, ModelSimple), - (list, ModelSimple), -) - -COERCIBLE_TYPE_PAIRS = { - False: ( # client instantiation of a model with client data - # (dict, ModelComposed), - # (list, ModelComposed), - # (dict, ModelNormal), - # (list, ModelNormal), - # (str, ModelSimple), - # (int, ModelSimple), - # (float, ModelSimple), - # (list, ModelSimple), - # (str, int), - # (str, float), - # (str, datetime), - # (str, date), - # (int, str), - # (float, str), - ), - True: ( # server -> client data - (dict, ModelComposed), - (list, ModelComposed), - (dict, ModelNormal), - (list, ModelNormal), - (str, ModelSimple), - (int, ModelSimple), - (float, ModelSimple), - (list, ModelSimple), - # (str, int), - # (str, float), - (str, datetime), - (str, date), - # (int, str), - # (float, str), - (str, file_type) - ), -} - - -def get_simple_class(input_value): - """Returns an input_value's simple class that we will use for type checking - Python2: - float and int will return int, where int is the python3 int backport - str and unicode will return str, where str is the python3 str backport - Note: float and int ARE both instances of int backport - Note: str_py2 and unicode_py2 are NOT both instances of str backport - - Args: - input_value (class/class_instance): the item for which we will return - the simple class - """ - if isinstance(input_value, type): - # input_value is a class - return input_value - elif isinstance(input_value, tuple): - return tuple - elif isinstance(input_value, list): - return list - elif isinstance(input_value, dict): - return dict - elif isinstance(input_value, none_type): - return none_type - elif isinstance(input_value, file_type): - return file_type - elif isinstance(input_value, bool): - # this must be higher than the int check because - # isinstance(True, int) == True - return bool - elif isinstance(input_value, int): - return int - elif isinstance(input_value, datetime): - # this must be higher than the date check because - # isinstance(datetime_instance, date) == True - return datetime - elif isinstance(input_value, date): - return date - elif isinstance(input_value, str): - return str - return type(input_value) - - -def check_allowed_values(allowed_values, input_variable_path, input_values): - """Raises an exception if the input_values are not allowed - - Args: - allowed_values (dict): the allowed_values dict - input_variable_path (tuple): the path to the input variable - input_values (list/str/int/float/date/datetime): the values that we - are checking to see if they are in allowed_values - """ - these_allowed_values = list(allowed_values[input_variable_path].values()) - if (isinstance(input_values, list) - and not set(input_values).issubset( - set(these_allowed_values))): - invalid_values = ", ".join( - map(str, set(input_values) - set(these_allowed_values))), - raise ApiValueError( - "Invalid values for `%s` [%s], must be a subset of [%s]" % - ( - input_variable_path[0], - invalid_values, - ", ".join(map(str, these_allowed_values)) - ) - ) - elif (isinstance(input_values, dict) - and not set( - input_values.keys()).issubset(set(these_allowed_values))): - invalid_values = ", ".join( - map(str, set(input_values.keys()) - set(these_allowed_values))) - raise ApiValueError( - "Invalid keys in `%s` [%s], must be a subset of [%s]" % - ( - input_variable_path[0], - invalid_values, - ", ".join(map(str, these_allowed_values)) - ) - ) - elif (not isinstance(input_values, (list, dict)) - and input_values not in these_allowed_values): - raise ApiValueError( - "Invalid value for `%s` (%s), must be one of %s" % - ( - input_variable_path[0], - input_values, - these_allowed_values - ) - ) - - -def is_json_validation_enabled(schema_keyword, configuration=None): - """Returns true if JSON schema validation is enabled for the specified - validation keyword. This can be used to skip JSON schema structural validation - as requested in the configuration. - - Args: - schema_keyword (string): the name of a JSON schema validation keyword. - configuration (Configuration): the configuration class. - """ - - return (configuration is None or - not hasattr(configuration, '_disabled_client_side_validations') or - schema_keyword not in configuration._disabled_client_side_validations) - - -def check_validations( - validations, input_variable_path, input_values, - configuration=None): - """Raises an exception if the input_values are invalid - - Args: - validations (dict): the validation dictionary. - input_variable_path (tuple): the path to the input variable. - input_values (list/str/int/float/date/datetime): the values that we - are checking. - configuration (Configuration): the configuration class. - """ - - if input_values is None: - return - - current_validations = validations[input_variable_path] - if (is_json_validation_enabled('multipleOf', configuration) and - 'multiple_of' in current_validations and - isinstance(input_values, (int, float)) and - not (float(input_values) / current_validations['multiple_of']).is_integer()): - # Note 'multipleOf' will be as good as the floating point arithmetic. - raise ApiValueError( - "Invalid value for `%s`, value must be a multiple of " - "`%s`" % ( - input_variable_path[0], - current_validations['multiple_of'] - ) - ) - - if (is_json_validation_enabled('maxLength', configuration) and - 'max_length' in current_validations and - len(input_values) > current_validations['max_length']): - raise ApiValueError( - "Invalid value for `%s`, length must be less than or equal to " - "`%s`" % ( - input_variable_path[0], - current_validations['max_length'] - ) - ) - - if (is_json_validation_enabled('minLength', configuration) and - 'min_length' in current_validations and - len(input_values) < current_validations['min_length']): - raise ApiValueError( - "Invalid value for `%s`, length must be greater than or equal to " - "`%s`" % ( - input_variable_path[0], - current_validations['min_length'] - ) - ) - - if (is_json_validation_enabled('maxItems', configuration) and - 'max_items' in current_validations and - len(input_values) > current_validations['max_items']): - raise ApiValueError( - "Invalid value for `%s`, number of items must be less than or " - "equal to `%s`" % ( - input_variable_path[0], - current_validations['max_items'] - ) - ) - - if (is_json_validation_enabled('minItems', configuration) and - 'min_items' in current_validations and - len(input_values) < current_validations['min_items']): - raise ValueError( - "Invalid value for `%s`, number of items must be greater than or " - "equal to `%s`" % ( - input_variable_path[0], - current_validations['min_items'] - ) - ) - - items = ('exclusive_maximum', 'inclusive_maximum', 'exclusive_minimum', - 'inclusive_minimum') - if (any(item in current_validations for item in items)): - if isinstance(input_values, list): - max_val = max(input_values) - min_val = min(input_values) - elif isinstance(input_values, dict): - max_val = max(input_values.values()) - min_val = min(input_values.values()) - else: - max_val = input_values - min_val = input_values - - if (is_json_validation_enabled('exclusiveMaximum', configuration) and - 'exclusive_maximum' in current_validations and - max_val >= current_validations['exclusive_maximum']): - raise ApiValueError( - "Invalid value for `%s`, must be a value less than `%s`" % ( - input_variable_path[0], - current_validations['exclusive_maximum'] - ) - ) - - if (is_json_validation_enabled('maximum', configuration) and - 'inclusive_maximum' in current_validations and - max_val > current_validations['inclusive_maximum']): - raise ApiValueError( - "Invalid value for `%s`, must be a value less than or equal to " - "`%s`" % ( - input_variable_path[0], - current_validations['inclusive_maximum'] - ) - ) - - if (is_json_validation_enabled('exclusiveMinimum', configuration) and - 'exclusive_minimum' in current_validations and - min_val <= current_validations['exclusive_minimum']): - raise ApiValueError( - "Invalid value for `%s`, must be a value greater than `%s`" % - ( - input_variable_path[0], - current_validations['exclusive_maximum'] - ) - ) - - if (is_json_validation_enabled('minimum', configuration) and - 'inclusive_minimum' in current_validations and - min_val < current_validations['inclusive_minimum']): - raise ApiValueError( - "Invalid value for `%s`, must be a value greater than or equal " - "to `%s`" % ( - input_variable_path[0], - current_validations['inclusive_minimum'] - ) - ) - flags = current_validations.get('regex', {}).get('flags', 0) - if (is_json_validation_enabled('pattern', configuration) and - 'regex' in current_validations and - not re.search(current_validations['regex']['pattern'], - input_values, flags=flags)): - err_msg = r"Invalid value for `%s`, must match regular expression `%s`" % ( - input_variable_path[0], - current_validations['regex']['pattern'] - ) - if flags != 0: - # Don't print the regex flags if the flags are not - # specified in the OAS document. - err_msg = r"%s with flags=`%s`" % (err_msg, flags) - raise ApiValueError(err_msg) - - -def order_response_types(required_types): - """Returns the required types sorted in coercion order - - Args: - required_types (list/tuple): collection of classes or instance of - list or dict with class information inside it. - - Returns: - (list): coercion order sorted collection of classes or instance - of list or dict with class information inside it. - """ - - def index_getter(class_or_instance): - if isinstance(class_or_instance, list): - return COERCION_INDEX_BY_TYPE[list] - elif isinstance(class_or_instance, dict): - return COERCION_INDEX_BY_TYPE[dict] - elif (inspect.isclass(class_or_instance) - and issubclass(class_or_instance, ModelComposed)): - return COERCION_INDEX_BY_TYPE[ModelComposed] - elif (inspect.isclass(class_or_instance) - and issubclass(class_or_instance, ModelNormal)): - return COERCION_INDEX_BY_TYPE[ModelNormal] - elif (inspect.isclass(class_or_instance) - and issubclass(class_or_instance, ModelSimple)): - return COERCION_INDEX_BY_TYPE[ModelSimple] - elif class_or_instance in COERCION_INDEX_BY_TYPE: - return COERCION_INDEX_BY_TYPE[class_or_instance] - raise ApiValueError("Unsupported type: %s" % class_or_instance) - - sorted_types = sorted( - required_types, - key=lambda class_or_instance: index_getter(class_or_instance) - ) - return sorted_types - - -def remove_uncoercible(required_types_classes, current_item, spec_property_naming, - must_convert=True): - """Only keeps the type conversions that are possible - - Args: - required_types_classes (tuple): tuple of classes that are required - these should be ordered by COERCION_INDEX_BY_TYPE - spec_property_naming (bool): True if the variable names in the input - data are serialized names as specified in the OpenAPI document. - False if the variables names in the input data are python - variable names in PEP-8 snake case. - current_item (any): the current item (input data) to be converted - - Keyword Args: - must_convert (bool): if True the item to convert is of the wrong - type and we want a big list of coercibles - if False, we want a limited list of coercibles - - Returns: - (list): the remaining coercible required types, classes only - """ - current_type_simple = get_simple_class(current_item) - - results_classes = [] - for required_type_class in required_types_classes: - # convert our models to OpenApiModel - required_type_class_simplified = required_type_class - if isinstance(required_type_class_simplified, type): - if issubclass(required_type_class_simplified, ModelComposed): - required_type_class_simplified = ModelComposed - elif issubclass(required_type_class_simplified, ModelNormal): - required_type_class_simplified = ModelNormal - elif issubclass(required_type_class_simplified, ModelSimple): - required_type_class_simplified = ModelSimple - -{{#useCustomTemplateCode}} - # leave ints as-is - if type(current_item) is int and required_type_class_simplified == current_type_simple: - results_classes.append(int) -{{/useCustomTemplateCode}} - if required_type_class_simplified == current_type_simple: - # don't consider converting to one's own class - continue - - class_pair = (current_type_simple, required_type_class_simplified) - if must_convert and class_pair in COERCIBLE_TYPE_PAIRS[spec_property_naming]: - results_classes.append(required_type_class) - elif class_pair in UPCONVERSION_TYPE_PAIRS: - results_classes.append(required_type_class) -{{#useCustomTemplateCode}} - # allow casting int to string - if type(current_item) is int: - results_classes.append(str) - - if type(current_item) is none_type: - results_classes.append(none_type) -{{/useCustomTemplateCode}} - return results_classes - -def get_discriminated_classes(cls): - """ - Returns all the classes that a discriminator converts to - TODO: lru_cache this - """ - possible_classes = [] - key = list(cls.discriminator.keys())[0] - if is_type_nullable(cls): - possible_classes.append(cls) - for discr_cls in cls.discriminator[key].values(): - if hasattr(discr_cls, 'discriminator') and discr_cls.discriminator is not None: - possible_classes.extend(get_discriminated_classes(discr_cls)) - else: - possible_classes.append(discr_cls) - return possible_classes - - -def get_possible_classes(cls, from_server_context): - # TODO: lru_cache this - possible_classes = [cls] - if from_server_context: - return possible_classes - if hasattr(cls, 'discriminator') and cls.discriminator is not None: - possible_classes = [] - possible_classes.extend(get_discriminated_classes(cls)) - elif issubclass(cls, ModelComposed): - possible_classes.extend(composed_model_input_classes(cls)) - return possible_classes - - -def get_required_type_classes(required_types_mixed, spec_property_naming): - """Converts the tuple required_types into a tuple and a dict described - below - - Args: - required_types_mixed (tuple/list): will contain either classes or - instance of list or dict - spec_property_naming (bool): if True these values came from the - server, and we use the data types in our endpoints. - If False, we are client side and we need to include - oneOf and discriminator classes inside the data types in our endpoints - - Returns: - (valid_classes, dict_valid_class_to_child_types_mixed): - valid_classes (tuple): the valid classes that the current item - should be - dict_valid_class_to_child_types_mixed (dict): - valid_class (class): this is the key - child_types_mixed (list/dict/tuple): describes the valid child - types - """ - valid_classes = [] - child_req_types_by_current_type = {} - for required_type in required_types_mixed: - if isinstance(required_type, list): - valid_classes.append(list) - child_req_types_by_current_type[list] = required_type - elif isinstance(required_type, tuple): - valid_classes.append(tuple) - child_req_types_by_current_type[tuple] = required_type - elif isinstance(required_type, dict): - valid_classes.append(dict) - child_req_types_by_current_type[dict] = required_type[str] - else: - valid_classes.extend(get_possible_classes(required_type, spec_property_naming)) - return tuple(valid_classes), child_req_types_by_current_type - - -def change_keys_js_to_python(input_dict, model_class): - """ - Converts from javascript_key keys in the input_dict to python_keys in - the output dict using the mapping in model_class. - If the input_dict contains a key which does not declared in the model_class, - the key is added to the output dict as is. The assumption is the model_class - may have undeclared properties (additionalProperties attribute in the OAS - document). - """ - - if getattr(model_class, 'attribute_map', None) is None: - return input_dict - output_dict = {} - reversed_attr_map = {value: key for key, value in - model_class.attribute_map.items()} - for javascript_key, value in input_dict.items(): - python_key = reversed_attr_map.get(javascript_key) - if python_key is None: - # if the key is unknown, it is in error or it is an - # additionalProperties variable - python_key = javascript_key - output_dict[python_key] = value - return output_dict - - -def get_type_error(var_value, path_to_item, valid_classes, key_type=False): - error_msg = type_error_message( - var_name=path_to_item[-1], - var_value=var_value, - valid_classes=valid_classes, - key_type=key_type - ) - return ApiTypeError( - error_msg, - path_to_item=path_to_item, - valid_classes=valid_classes, - key_type=key_type - ) - - -def deserialize_primitive(data, klass, path_to_item): - """Deserializes string to primitive type. - - :param data: str/int/float - :param klass: str/class the class to convert to - - :return: int, float, str, bool, date, datetime - """ - additional_message = "" - try: - if klass in {datetime, date}: - additional_message = ( - "If you need your parameter to have a fallback " - "string value, please set its type as `type: {}` in your " - "spec. That allows the value to be any type. " - ) - if klass == datetime: - if len(data) < 8: - raise ValueError("This is not a datetime") - # The string should be in iso8601 datetime format. - parsed_datetime = parse(data) - date_only = ( - parsed_datetime.hour == 0 and - parsed_datetime.minute == 0 and - parsed_datetime.second == 0 and - parsed_datetime.tzinfo is None and - 8 <= len(data) <= 10 - ) - if date_only: - raise ValueError("This is a date, not a datetime") - return parsed_datetime - elif klass == date: - if len(data) < 8: - raise ValueError("This is not a date") - return parse(data).date() -{{#useCustomTemplateCode}} - elif data is None: - # This SDK does not support nullable params unless they are explicitly marked as nullable - return data -{{/useCustomTemplateCode}} - else: - converted_value = klass(data) - if isinstance(data, str) and klass == float: - if str(converted_value) != data: - # '7' -> 7.0 -> '7.0' != '7' - raise ValueError('This is not a float') - return converted_value - except (OverflowError, ValueError) as ex: - # parse can raise OverflowError - raise ApiValueError( - "{0}Failed to parse {1} as {2}".format( - additional_message, repr(data), klass.__name__ - ), - path_to_item=path_to_item - ) from ex - - -def get_discriminator_class(model_class, - discr_name, - discr_value, cls_visited): - """Returns the child class specified by the discriminator. - - Args: - model_class (OpenApiModel): the model class. - discr_name (string): the name of the discriminator property. - discr_value (any): the discriminator value. - cls_visited (list): list of model classes that have been visited. - Used to determine the discriminator class without - visiting circular references indefinitely. - - Returns: - used_model_class (class/None): the chosen child class that will be used - to deserialize the data, for example dog.Dog. - If a class is not found, None is returned. - """ - - if model_class in cls_visited: - # The class has already been visited and no suitable class was found. - return None - cls_visited.append(model_class) - used_model_class = None - if discr_name in model_class.discriminator: - class_name_to_discr_class = model_class.discriminator[discr_name] - used_model_class = class_name_to_discr_class.get(discr_value) - if used_model_class is None: - # We didn't find a discriminated class in class_name_to_discr_class. - # So look in the ancestor or descendant discriminators - # The discriminator mapping may exist in a descendant (anyOf, oneOf) - # or ancestor (allOf). - # Ancestor example: in the GrandparentAnimal -> ParentPet -> ChildCat - # hierarchy, the discriminator mappings may be defined at any level - # in the hierarchy. - # Descendant example: mammal -> whale/zebra/Pig -> BasquePig/DanishPig - # if we try to make BasquePig from mammal, we need to travel through - # the oneOf descendant discriminators to find BasquePig - descendant_classes = model_class._composed_schemas.get('oneOf', ()) + \ - model_class._composed_schemas.get('anyOf', ()) - ancestor_classes = model_class._composed_schemas.get('allOf', ()) - possible_classes = descendant_classes + ancestor_classes - for cls in possible_classes: - # Check if the schema has inherited discriminators. - if hasattr(cls, 'discriminator') and cls.discriminator is not None: - used_model_class = get_discriminator_class( - cls, discr_name, discr_value, cls_visited) - if used_model_class is not None: - return used_model_class - return used_model_class - - -def deserialize_model(model_data, model_class, path_to_item, check_type, - configuration, spec_property_naming): - """Deserializes model_data to model instance. - - Args: - model_data (int/str/float/bool/none_type/list/dict): data to instantiate the model - model_class (OpenApiModel): the model class - path_to_item (list): path to the model in the received data - check_type (bool): whether to check the data tupe for the values in - the model - configuration (Configuration): the instance to use to convert files - spec_property_naming (bool): True if the variable names in the input - data are serialized names as specified in the OpenAPI document. - False if the variables names in the input data are python - variable names in PEP-8 snake case. - - Returns: - model instance - - Raise: - ApiTypeError - ApiValueError - ApiKeyError - """ - - kw_args = dict(_check_type=check_type, - _path_to_item=path_to_item, - _configuration=configuration, - _spec_property_naming=spec_property_naming) - - if issubclass(model_class, ModelSimple): - return model_class._new_from_openapi_data(model_data, **kw_args) - elif isinstance(model_data, list): - return model_class._new_from_openapi_data(*model_data, **kw_args) - if isinstance(model_data, dict): - kw_args.update(model_data) - return model_class._new_from_openapi_data(**kw_args) - elif isinstance(model_data, PRIMITIVE_TYPES): - return model_class._new_from_openapi_data(model_data, **kw_args) - - -def deserialize_file(response_data, configuration, content_disposition=None): - """Deserializes body to file - - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - - Args: - param response_data (str): the file data to write - configuration (Configuration): the instance to use to convert files - - Keyword Args: - content_disposition (str): the value of the Content-Disposition - header - - Returns: - (file_type): the deserialized file which is open - The user is responsible for closing and reading the file - """ - fd, path = tempfile.mkstemp(dir=configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - if content_disposition: - filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition).group(1) - path = os.path.join(os.path.dirname(path), filename) - - with open(path, "wb") as f: - if isinstance(response_data, str): - # change str to bytes so we can write it - response_data = response_data.encode('utf-8') - f.write(response_data) - - f = open(path, "rb") - return f - - -def attempt_convert_item(input_value, valid_classes, path_to_item, - configuration, spec_property_naming, key_type=False, - must_convert=False, check_type=True): - """ - Args: - input_value (any): the data to convert - valid_classes (any): the classes that are valid - path_to_item (list): the path to the item to convert - configuration (Configuration): the instance to use to convert files - spec_property_naming (bool): True if the variable names in the input - data are serialized names as specified in the OpenAPI document. - False if the variables names in the input data are python - variable names in PEP-8 snake case. - key_type (bool): if True we need to convert a key type (not supported) - must_convert (bool): if True we must convert - check_type (bool): if True we check the type or the returned data in - ModelComposed/ModelNormal/ModelSimple instances - - Returns: - instance (any) the fixed item - - Raises: - ApiTypeError - ApiValueError - ApiKeyError - """ - valid_classes_ordered = order_response_types(valid_classes) - valid_classes_coercible = remove_uncoercible( - valid_classes_ordered, input_value, spec_property_naming) - if not valid_classes_coercible or key_type: -{{#useCustomTemplateCode}} - if input_value is None: - return input_value -{{/useCustomTemplateCode}} - # we do not handle keytype errors, json will take care - # of this for us - if configuration is None or not configuration.discard_unknown_keys: - raise get_type_error(input_value, path_to_item, valid_classes, - key_type=key_type) - for valid_class in valid_classes_coercible: - try: - if issubclass(valid_class, OpenApiModel): - return deserialize_model(input_value, valid_class, - path_to_item, check_type, - configuration, spec_property_naming) - elif valid_class == file_type: - return deserialize_file(input_value, configuration) - return deserialize_primitive(input_value, valid_class, - path_to_item) - except (ApiTypeError, ApiValueError, ApiKeyError) as conversion_exc: - if must_convert: - raise conversion_exc - # if we have conversion errors when must_convert == False - # we ignore the exception and move on to the next class - continue - # we were unable to convert, must_convert == False - return input_value - - -def is_type_nullable(input_type): - """ - Returns true if None is an allowed value for the specified input_type. - - A type is nullable if at least one of the following conditions is true: - 1. The OAS 'nullable' attribute has been specified, - 1. The type is the 'null' type, - 1. The type is a anyOf/oneOf composed schema, and a child schema is - the 'null' type. - Args: - input_type (type): the class of the input_value that we are - checking - Returns: - bool - """ - if input_type is none_type: - return True - if issubclass(input_type, OpenApiModel) and input_type._nullable: - return True - if issubclass(input_type, ModelComposed): - # If oneOf/anyOf, check if the 'null' type is one of the allowed types. - for t in input_type._composed_schemas.get('oneOf', ()): - if is_type_nullable(t): return True - for t in input_type._composed_schemas.get('anyOf', ()): - if is_type_nullable(t): return True - return False - - -def is_valid_type(input_class_simple, valid_classes): - """ - Args: - input_class_simple (class): the class of the input_value that we are - checking - valid_classes (tuple): the valid classes that the current item - should be - Returns: - bool - """ - if issubclass(input_class_simple, OpenApiModel) and \ - valid_classes == (bool, date, datetime, dict, float, int, list, str, none_type,): - return True - valid_type = input_class_simple in valid_classes - if not valid_type and ( - issubclass(input_class_simple, OpenApiModel) or - input_class_simple is none_type): - for valid_class in valid_classes: - if input_class_simple is none_type and is_type_nullable(valid_class): - # Schema is oneOf/anyOf and the 'null' type is one of the allowed types. - return True - if not (issubclass(valid_class, OpenApiModel) and valid_class.discriminator): - continue - discr_propertyname_py = list(valid_class.discriminator.keys())[0] - discriminator_classes = ( - valid_class.discriminator[discr_propertyname_py].values() - ) - valid_type = is_valid_type(input_class_simple, discriminator_classes) - if valid_type: - return True - return valid_type - - -def validate_and_convert_types(input_value, required_types_mixed, path_to_item, - spec_property_naming, _check_type, configuration=None): - """Raises a TypeError is there is a problem, otherwise returns value - - Args: - input_value (any): the data to validate/convert - required_types_mixed (list/dict/tuple): A list of - valid classes, or a list tuples of valid classes, or a dict where - the value is a tuple of value classes - path_to_item: (list) the path to the data being validated - this stores a list of keys or indices to get to the data being - validated - spec_property_naming (bool): True if the variable names in the input - data are serialized names as specified in the OpenAPI document. - False if the variables names in the input data are python - variable names in PEP-8 snake case. - _check_type: (boolean) if true, type will be checked and conversion - will be attempted. - configuration: (Configuration): the configuration class to use - when converting file_type items. - If passed, conversion will be attempted when possible - If not passed, no conversions will be attempted and - exceptions will be raised - - Returns: - the correctly typed value - - Raises: - ApiTypeError - """ - results = get_required_type_classes(required_types_mixed, spec_property_naming) - valid_classes, child_req_types_by_current_type = results - - input_class_simple = get_simple_class(input_value) - valid_type = is_valid_type(input_class_simple, valid_classes) - if not valid_type: - if configuration: - # if input_value is not valid_type try to convert it - converted_instance = attempt_convert_item( - input_value, - valid_classes, - path_to_item, - configuration, - spec_property_naming, - key_type=False, - must_convert=True, - check_type=_check_type - ) - return converted_instance - else: - raise get_type_error(input_value, path_to_item, valid_classes, - key_type=False) - - # input_value's type is in valid_classes - if len(valid_classes) > 1 and configuration: - # there are valid classes which are not the current class - valid_classes_coercible = remove_uncoercible( - valid_classes, input_value, spec_property_naming, must_convert=False) - if valid_classes_coercible: - converted_instance = attempt_convert_item( - input_value, - valid_classes_coercible, - path_to_item, - configuration, - spec_property_naming, - key_type=False, - must_convert=False, - check_type=_check_type - ) - return converted_instance - - if child_req_types_by_current_type == {}: - # all types are of the required types and there are no more inner - # variables left to look at - return input_value - inner_required_types = child_req_types_by_current_type.get( - type(input_value) - ) - if inner_required_types is None: - # for this type, there are not more inner variables left to look at - return input_value - if isinstance(input_value, list): - if input_value == []: - # allow an empty list - return input_value - for index, inner_value in enumerate(input_value): - inner_path = list(path_to_item) - inner_path.append(index) - input_value[index] = validate_and_convert_types( - inner_value, - inner_required_types, - inner_path, - spec_property_naming, - _check_type, - configuration=configuration - ) - elif isinstance(input_value, dict): - if input_value == {}: - # allow an empty dict - return input_value - for inner_key, inner_val in input_value.items(): - inner_path = list(path_to_item) - inner_path.append(inner_key) - if get_simple_class(inner_key) != str: - raise get_type_error(inner_key, inner_path, valid_classes, - key_type=True) - input_value[inner_key] = validate_and_convert_types( - inner_val, - inner_required_types, - inner_path, - spec_property_naming, - _check_type, - configuration=configuration - ) - return input_value - - -def model_to_dict(model_instance, serialize=True): - """Returns the model properties as a dict - - Args: - model_instance (one of your model instances): the model instance that - will be converted to a dict. - - Keyword Args: - serialize (bool): if True, the keys in the dict will be values from - attribute_map - """ - result = {} - extract_item = lambda item: (item[0], model_to_dict(item[1], serialize=serialize)) if hasattr(item[1], '_data_store') else item - - model_instances = [model_instance] - if model_instance._composed_schemas: - model_instances.extend(model_instance._composed_instances) - seen_json_attribute_names = set() - used_fallback_python_attribute_names = set() - py_to_json_map = {} - for model_instance in model_instances: - for attr, value in model_instance._data_store.items(): - if serialize: - # we use get here because additional property key names do not - # exist in attribute_map - try: - attr = model_instance.attribute_map[attr] - py_to_json_map.update(model_instance.attribute_map) - seen_json_attribute_names.add(attr) - except KeyError: - used_fallback_python_attribute_names.add(attr) -{{^useCustomTemplateCode}} - if isinstance(value, list): - if not value: - # empty list or None - result[attr] = value - else: - res = [] - for v in value: - if isinstance(v, PRIMITIVE_TYPES) or v is None: - res.append(v) - elif isinstance(v, ModelSimple): - res.append(v.value) - elif isinstance(v, dict): - res.append(dict(map( - extract_item, - v.items() - ))) - else: - res.append(model_to_dict(v, serialize=serialize)) - result[attr] = res - elif isinstance(value, dict): - result[attr] = dict(map( - extract_item, - value.items() - )) - elif isinstance(value, ModelSimple): - result[attr] = value.value - elif hasattr(value, '_data_store'): - result[attr] = model_to_dict(value, serialize=serialize) - else: - result[attr] = value -{{/useCustomTemplateCode}} -{{#useCustomTemplateCode}} - result[attr] = model_to_dict_recursive(value, serialize, extract_item) -{{/useCustomTemplateCode}} - if serialize: - for python_key in used_fallback_python_attribute_names: - json_key = py_to_json_map.get(python_key) - if json_key is None: - continue - if python_key == json_key: - continue - json_key_assigned_no_need_for_python_key = json_key in seen_json_attribute_names - if json_key_assigned_no_need_for_python_key: - del result[python_key] - - return result - -{{#useCustomTemplateCode}} -def model_to_dict_recursive(value, serialize, extract_item): - if isinstance(value, list): - res = [] - - for v in value: - res.append(model_to_dict_recursive(v, serialize, extract_item)) - - return res - elif isinstance(value, dict): - return dict(map( - extract_item, - value.items() - )) - elif isinstance(value, ModelSimple): - return value.value - elif hasattr(value, '_data_store'): - return model_to_dict(value, serialize=serialize) - elif isinstance(value, io.BufferedReader): - return value.name - else: - return value - -{{/useCustomTemplateCode}} - -def type_error_message(var_value=None, var_name=None, valid_classes=None, - key_type=None): - """ - Keyword Args: - var_value (any): the variable which has the type_error - var_name (str): the name of the variable which has the typ error - valid_classes (tuple): the accepted classes for current_item's - value - key_type (bool): False if our value is a value in a dict - True if it is a key in a dict - False if our item is an item in a list - """ - key_or_value = 'value' - if key_type: - key_or_value = 'key' - valid_classes_phrase = get_valid_classes_phrase(valid_classes) - msg = ( - "Invalid type for variable '{0}'. Required {1} type {2} and " - "passed type was {3}".format( - var_name, - key_or_value, - valid_classes_phrase, - type(var_value).__name__, - ) - ) - return msg - - -def get_valid_classes_phrase(input_classes): - """Returns a string phrase describing what types are allowed - """ - all_classes = list(input_classes) - all_classes = sorted(all_classes, key=lambda cls: cls.__name__) - all_class_names = [cls.__name__ for cls in all_classes] - if len(all_class_names) == 1: - return 'is {0}'.format(all_class_names[0]) - return "is one of [{0}]".format(", ".join(all_class_names)) - - -def get_allof_instances(self, model_args, constant_args): - """ - Args: - self: the class we are handling - model_args (dict): var_name to var_value - used to make instances - constant_args (dict): - metadata arguments: - _check_type - _path_to_item - _spec_property_naming - _configuration - _visited_composed_classes - - Returns - composed_instances (list) - """ - composed_instances = [] -{{^useCustomTemplateCode}} - for allof_class in self._composed_schemas['allOf']: - - try: - if constant_args.get('_spec_property_naming'): - allof_instance = allof_class._from_openapi_data(**model_args, **constant_args) - else: - allof_instance = allof_class(**model_args, **constant_args) - composed_instances.append(allof_instance) - except Exception as ex: - raise ApiValueError( - "Invalid inputs given to generate an instance of '%s'. The " - "input data was invalid for the allOf schema '%s' in the composed " - "schema '%s'. Error=%s" % ( - allof_class.__name__, - allof_class.__name__, - self.__class__.__name__, - str(ex) - ) - ) from ex -{{/useCustomTemplateCode}} -{{#useCustomTemplateCode}} - if 'allOf' in self._composed_schemas.keys(): - for allof_class in self._composed_schemas['allOf']: - - try: - if constant_args.get('_spec_property_naming'): - allof_instance = allof_class._from_openapi_data(**model_args, **constant_args) - else: - allof_instance = allof_class(**model_args, **constant_args) - composed_instances.append(allof_instance) - except Exception as ex: - raise ApiValueError( - "Invalid inputs given to generate an instance of '%s'. The " - "input data was invalid for the allOf schema '%s' in the composed " - "schema '%s'. Error=%s" % ( - allof_class.__name__, - allof_class.__name__, - self.__class__.__name__, - str(ex) - ) - ) from ex -{{/useCustomTemplateCode}} - return composed_instances - - -def get_oneof_instance(cls, model_kwargs, constant_kwargs, model_arg=None): - """ - Find the oneOf schema that matches the input data (e.g. payload). - If exactly one schema matches the input data, an instance of that schema - is returned. - If zero or more than one schema match the input data, an exception is raised. - In OAS 3.x, the payload MUST, by validation, match exactly one of the - schemas described by oneOf. - - Args: - cls: the class we are handling - model_kwargs (dict): var_name to var_value - The input data, e.g. the payload that must match a oneOf schema - in the OpenAPI document. - constant_kwargs (dict): var_name to var_value - args that every model requires, including configuration, server - and path to item. - - Kwargs: - model_arg: (int, float, bool, str, date, datetime, ModelSimple, None): - the value to assign to a primitive class or ModelSimple class - Notes: - - this is only passed in when oneOf includes types which are not object - - None is used to suppress handling of model_arg, nullable models are handled in __new__ - - Returns - oneof_instance (instance) - """ - if len(cls._composed_schemas['oneOf']) == 0: - return None - - oneof_instances = [] - # Iterate over each oneOf schema and determine if the input data - # matches the oneOf schemas. - for oneof_class in cls._composed_schemas['oneOf']: - # The composed oneOf schema allows the 'null' type and the input data - # is the null value. This is a OAS >= 3.1 feature. - if oneof_class is none_type: - # skip none_types because we are deserializing dict data. - # none_type deserialization is handled in the __new__ method - continue - - single_value_input = allows_single_value_input(oneof_class) - - try: - if not single_value_input: - if constant_kwargs.get('_spec_property_naming'): - oneof_instance = oneof_class._from_openapi_data(**model_kwargs, **constant_kwargs) - else: - oneof_instance = oneof_class(**model_kwargs, **constant_kwargs) - else: - if issubclass(oneof_class, ModelSimple): - if constant_kwargs.get('_spec_property_naming'): - oneof_instance = oneof_class._from_openapi_data(model_arg, **constant_kwargs) - else: - oneof_instance = oneof_class(model_arg, **constant_kwargs) - elif oneof_class in PRIMITIVE_TYPES: - oneof_instance = validate_and_convert_types( - model_arg, - (oneof_class,), - constant_kwargs['_path_to_item'], - constant_kwargs['_spec_property_naming'], - constant_kwargs['_check_type'], - configuration=constant_kwargs['_configuration'] - ) - oneof_instances.append(oneof_instance) - except Exception: - pass - if len(oneof_instances) == 0: - raise ApiValueError( - "Invalid inputs given to generate an instance of %s. None " - "of the oneOf schemas matched the input data." % - cls.__name__ - ) - elif len(oneof_instances) > 1: - raise ApiValueError( - "Invalid inputs given to generate an instance of %s. Multiple " - "oneOf schemas matched the inputs, but a max of one is allowed." % - cls.__name__ - ) - return oneof_instances[0] - - -def get_anyof_instances(self, model_args, constant_args): - """ - Args: - self: the class we are handling - model_args (dict): var_name to var_value - The input data, e.g. the payload that must match at least one - anyOf child schema in the OpenAPI document. - constant_args (dict): var_name to var_value - args that every model requires, including configuration, server - and path to item. - - Returns - anyof_instances (list) - """ - anyof_instances = [] - if len(self._composed_schemas['anyOf']) == 0: - return anyof_instances - - for anyof_class in self._composed_schemas['anyOf']: - # The composed oneOf schema allows the 'null' type and the input data - # is the null value. This is a OAS >= 3.1 feature. - if anyof_class is none_type: - # skip none_types because we are deserializing dict data. - # none_type deserialization is handled in the __new__ method - continue - - try: - if constant_args.get('_spec_property_naming'): - anyof_instance = anyof_class._from_openapi_data(**model_args, **constant_args) - else: - anyof_instance = anyof_class(**model_args, **constant_args) - anyof_instances.append(anyof_instance) - except Exception: - pass - if len(anyof_instances) == 0: - raise ApiValueError( - "Invalid inputs given to generate an instance of %s. None of the " - "anyOf schemas matched the inputs." % - self.__class__.__name__ - ) - return anyof_instances - - -def get_discarded_args(self, composed_instances, model_args): - """ - Gathers the args that were discarded by configuration.discard_unknown_keys - """ - model_arg_keys = model_args.keys() - discarded_args = set() - # arguments passed to self were already converted to python names - # before __init__ was called - for instance in composed_instances: - if instance.__class__ in self._composed_schemas['allOf']: - try: - keys = instance.to_dict().keys() - discarded_keys = model_args - keys - discarded_args.update(discarded_keys) - except Exception: - # allOf integer schema will throw exception - pass - else: - try: - all_keys = set(model_to_dict(instance, serialize=False).keys()) - js_keys = model_to_dict(instance, serialize=True).keys() - all_keys.update(js_keys) - discarded_keys = model_arg_keys - all_keys - discarded_args.update(discarded_keys) - except Exception: - # allOf integer schema will throw exception - pass - return discarded_args - - -def validate_get_composed_info(constant_args, model_args, self): - """ - For composed schemas, generate schema instances for - all schemas in the oneOf/anyOf/allOf definition. If additional - properties are allowed, also assign those properties on - all matched schemas that contain additionalProperties. - Openapi schemas are python classes. - - Exceptions are raised if: - - 0 or > 1 oneOf schema matches the model_args input data - - no anyOf schema matches the model_args input data - - any of the allOf schemas do not match the model_args input data - - Args: - constant_args (dict): these are the args that every model requires - model_args (dict): these are the required and optional spec args that - were passed in to make this model - self (class): the class that we are instantiating - This class contains self._composed_schemas - - Returns: - composed_info (list): length three - composed_instances (list): the composed instances which are not - self - var_name_to_model_instances (dict): a dict going from var_name - to the model_instance which holds that var_name - the model_instance may be self or an instance of one of the - classes in self.composed_instances() - additional_properties_model_instances (list): a list of the - model instances which have the property - additional_properties_type. This list can include self - """ - # create composed_instances - composed_instances = [] - allof_instances = get_allof_instances(self, model_args, constant_args) - composed_instances.extend(allof_instances) - oneof_instance = get_oneof_instance(self.__class__, model_args, constant_args) - if oneof_instance is not None: - composed_instances.append(oneof_instance) - anyof_instances = get_anyof_instances(self, model_args, constant_args) - composed_instances.extend(anyof_instances) - """ - set additional_properties_model_instances - additional properties must be evaluated at the schema level - so self's additional properties are most important - If self is a composed schema with: - - no properties defined in self - - additionalProperties: False - Then for object payloads every property is an additional property - and they are not allowed, so only empty dict is allowed - - Properties must be set on all matching schemas - so when a property is assigned toa composed instance, it must be set on all - composed instances regardless of additionalProperties presence - keeping it to prevent breaking changes in v5.0.1 - TODO remove cls._additional_properties_model_instances in 6.0.0 - """ - additional_properties_model_instances = [] - if self.additional_properties_type is not None: - additional_properties_model_instances = [self] - - """ - no need to set properties on self in here, they will be set in __init__ - By here all composed schema oneOf/anyOf/allOf instances have their properties set using - model_args - """ - discarded_args = get_discarded_args(self, composed_instances, model_args) - - # map variable names to composed_instances - var_name_to_model_instances = {} - for prop_name in model_args: - if prop_name not in discarded_args: - var_name_to_model_instances[prop_name] = [self] + composed_instances - - return [ - composed_instances, - var_name_to_model_instances, - additional_properties_model_instances, - discarded_args - ] diff --git a/sdks/python/templates/partial_api.mustache b/sdks/python/templates/partial_api.mustache new file mode 100644 index 000000000..dd3a9a1fa --- /dev/null +++ b/sdks/python/templates/partial_api.mustache @@ -0,0 +1,52 @@ + """{{#isDeprecated}}(Deprecated) {{/isDeprecated}}{{{summary}}}{{^summary}}{{operationId}}{{/summary}} + + {{#notes}} + {{{.}}} + {{/notes}} + + {{#allParams}} + :param {{paramName}}:{{#description}} {{{.}}}{{/description}}{{#required}} (required){{/required}}{{#optional}}(optional){{/optional}} + :type {{paramName}}: {{dataType}}{{#optional}}, optional{{/optional}} + {{/allParams}} + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + {{#isDeprecated}} + warnings.warn("{{{httpMethod}}} {{{path}}} is deprecated.", DeprecationWarning) + {{/isDeprecated}} + + _param = self._{{operationId}}_serialize( + {{#allParams}} + {{paramName}}={{paramName}}, + {{/allParams}} + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + {{#responses}} + {{^isWildcard}} + '{{code}}': {{#dataType}}"{{.}}"{{/dataType}}{{^dataType}}None{{/dataType}}, + {{/isWildcard}} + {{/responses}} + } \ No newline at end of file diff --git a/sdks/python/templates/partial_api_args.mustache b/sdks/python/templates/partial_api_args.mustache new file mode 100644 index 000000000..379b67de9 --- /dev/null +++ b/sdks/python/templates/partial_api_args.mustache @@ -0,0 +1,18 @@ +( + self, + {{#allParams}} + {{paramName}}: {{{vendorExtensions.x-py-typing}}}{{^required}} = None{{/required}}, + {{/allParams}} + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le={{#servers.size}}{{servers.size}}{{/servers.size}}{{^servers.size}}1{{/servers.size}})] = 0, + ) \ No newline at end of file diff --git a/sdks/python/templates/partial_header.mustache b/sdks/python/templates/partial_header.mustache index dc3c8f3d8..50aa81171 100644 --- a/sdks/python/templates/partial_header.mustache +++ b/sdks/python/templates/partial_header.mustache @@ -1,17 +1,19 @@ """ {{#appName}} {{{.}}} -{{/appName}} +{{/appName}} {{#appDescription}} - {{{.}}} # noqa: E501 -{{/appDescription}} + {{{.}}} +{{/appDescription}} {{#version}} The version of the OpenAPI document: {{{.}}} {{/version}} {{#infoEmail}} Contact: {{{.}}} {{/infoEmail}} - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 diff --git a/sdks/python/templates/py.typed.mustache b/sdks/python/templates/py.typed.mustache new file mode 100644 index 000000000..e69de29bb diff --git a/sdks/python/templates/pyproject.mustache b/sdks/python/templates/pyproject.mustache new file mode 100644 index 000000000..24030f9e9 --- /dev/null +++ b/sdks/python/templates/pyproject.mustache @@ -0,0 +1,82 @@ +[tool.poetry] +name = "{{{packageName}}}" +version = "{{{packageVersion}}}" +description = "{{{appName}}}" +authors = ["{{infoName}}{{^infoName}}OpenAPI Generator Community{{/infoName}} <{{infoEmail}}{{^infoEmail}}team@openapitools.org{{/infoEmail}}>"] +license = "{{{licenseInfo}}}{{^licenseInfo}}NoLicense{{/licenseInfo}}" +readme = "README.md" +repository = "https://github.com/{{{gitUserId}}}/{{{gitRepoId}}}" +keywords = ["OpenAPI", "OpenAPI-Generator", "{{{appName}}}"] +include = ["{{packageName}}/py.typed"] + +[tool.poetry.dependencies] +python = "^3.7" + +urllib3 = ">= 1.25.3" +python-dateutil = ">=2.8.2" +{{#asyncio}} +aiohttp = ">= 3.8.4" +aiohttp-retry = ">= 2.8.3" +{{/asyncio}} +{{#tornado}} +tornado = ">=4.2,<5" +{{/tornado}} +{{#hasHttpSignatureMethods}} +pem = ">= 19.3.0" +pycryptodome = ">= 3.9.0" +{{/hasHttpSignatureMethods}} +pydantic = ">=2" +typing-extensions = ">=4.7.1" + +[tool.poetry.dev-dependencies] +pytest = ">=7.2.1" +tox = ">=3.9.0" +flake8 = ">=4.0.0" +types-python-dateutil = ">=2.8.19.14" +mypy = "1.4.1" + + +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[tool.pylint.'MESSAGES CONTROL'] +extension-pkg-whitelist = "pydantic" + +[tool.mypy] +files = [ + "{{{packageName}}}", + #"test", # auto-generated tests + "tests", # hand-written tests +] +# TODO: enable "strict" once all these individual checks are passing +# strict = true + +# List from: https://mypy.readthedocs.io/en/stable/existing_code.html#introduce-stricter-options +warn_unused_configs = true +warn_redundant_casts = true +warn_unused_ignores = true + +## Getting these passing should be easy +strict_equality = true +strict_concatenate = true + +## Strongly recommend enabling this one as soon as you can +check_untyped_defs = true + +## These shouldn't be too much additional work, but may be tricky to +## get passing if you use a lot of untyped libraries +disallow_subclassing_any = true +disallow_untyped_decorators = true +disallow_any_generics = true + +### These next few are various gradations of forcing use of type annotations +#disallow_untyped_calls = true +#disallow_incomplete_defs = true +#disallow_untyped_defs = true +# +### This one isn't too hard to get passing, but return on investment is lower +#no_implicit_reexport = true +# +### This one can be tricky to get passing if you use a lot of untyped libraries +#warn_return_any = true diff --git a/sdks/python/templates/python_doc_auth_partial.mustache b/sdks/python/templates/python_doc_auth_partial.mustache index 5106632d2..f478fe0f1 100644 --- a/sdks/python/templates/python_doc_auth_partial.mustache +++ b/sdks/python/templates/python_doc_auth_partial.mustache @@ -15,15 +15,15 @@ configuration = {{{packageName}}}.Configuration( # Configure HTTP basic authorization: {{{name}}} configuration = {{{packageName}}}.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' + username = os.environ["USERNAME"], + password = os.environ["PASSWORD"] ) {{/isBasicBasic}} {{#isBasicBearer}} # Configure Bearer authorization{{#bearerFormat}} ({{{.}}}){{/bearerFormat}}: {{{name}}} configuration = {{{packageName}}}.Configuration( - access_token = 'YOUR_BEARER_TOKEN' + access_token = os.environ["BEARER_TOKEN"] ) {{/isBasicBearer}} {{#isHttpSignature}} @@ -64,9 +64,12 @@ configuration = {{{packageName}}}.Configuration( # the API server. # # See {{{packageName}}}.signing for a list of all supported parameters. +from {{{packageName}}} import signing +import datetime + configuration = {{{packageName}}}.Configuration( host = "{{{basePath}}}", - signing_info = {{{packageName}}}.signing.HttpSigningConfiguration( + signing_info = {{{packageName}}}.HttpSigningConfiguration( key_id = 'my-key-id', private_key_path = 'private_key.pem', private_key_passphrase = 'YOUR_PASSPHRASE', @@ -92,18 +95,14 @@ configuration = {{{packageName}}}.Configuration( {{#isApiKey}} # Configure API key authorization: {{{name}}} -configuration.api_key['{{{name}}}'] = 'YOUR_API_KEY' +configuration.api_key['{{{name}}}'] = os.environ["API_KEY"] # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['{{name}}'] = 'Bearer' {{/isApiKey}} {{#isOAuth}} -# Configure OAuth2 access token for authorization: {{{name}}} -configuration = {{{packageName}}}.Configuration( - host = "{{{basePath}}}" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] {{/isOAuth}} {{/authMethods}} {{/hasAuthMethods}} diff --git a/sdks/python/templates/requirements.mustache b/sdks/python/templates/requirements.mustache index 96947f604..5412515b5 100644 --- a/sdks/python/templates/requirements.mustache +++ b/sdks/python/templates/requirements.mustache @@ -1,3 +1,12 @@ python_dateutil >= 2.5.3 setuptools >= 21.0.0 -urllib3 >= 1.25.3 +urllib3 >= 1.25.3, < 2.1.0 +pydantic >= 2 +typing-extensions >= 4.7.1 +{{#asyncio}} +aiohttp >= 3.0.0 +aiohttp-retry >= 2.8.3 +{{/asyncio}} +{{#hasHttpSignatureMethods}} +pycryptodome >= 3.9.0 +{{/hasHttpSignatureMethods}} diff --git a/sdks/python/templates/rest.mustache b/sdks/python/templates/rest.mustache index d4293e70d..07aa7ee3f 100644 --- a/sdks/python/templates/rest.mustache +++ b/sdks/python/templates/rest.mustache @@ -1,46 +1,58 @@ +# coding: utf-8 + {{>partial_header}} import io import json -import logging import re import ssl -from urllib.parse import urlencode -from urllib.parse import urlparse -from urllib.request import proxy_bypass_environment + import urllib3 -import ipaddress -from {{packageName}}.exceptions import ApiException, UnauthorizedException, ForbiddenException, NotFoundException, ServiceException, ApiValueError +from {{packageName}}.exceptions import ApiException, ApiValueError +SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"} +RESTResponseType = urllib3.HTTPResponse -logger = logging.getLogger(__name__) + +def is_socks_proxy_url(url): + if url is None: + return False + split_section = url.split("://") + if len(split_section) < 2: + return False + else: + return split_section[0].lower() in SUPPORTED_SOCKS_PROXIES class RESTResponse(io.IOBase): - def __init__(self, resp): - self.urllib3_response = resp + def __init__(self, resp) -> None: + self.response = resp self.status = resp.status self.reason = resp.reason - self.data = resp.data + self.data = None + + def read(self): + if self.data is None: + self.data = self.response.data + return self.data def getheaders(self): """Returns a dictionary of the response headers.""" - return self.urllib3_response.getheaders() + return self.response.headers def getheader(self, name, default=None): """Returns a given response header.""" - return self.urllib3_response.getheader(name, default) + return self.response.headers.get(name, default) -class RESTClientObject(object): +class RESTClientObject: - def __init__(self, configuration, pools_size=4, maxsize=None): + def __init__(self, configuration) -> None: # urllib3.PoolManager will pass all kw parameters to connectionpool # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 - # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 # cert_reqs @@ -49,70 +61,79 @@ class RESTClientObject(object): else: cert_reqs = ssl.CERT_NONE - addition_pool_args = {} + pool_args = { + "cert_reqs": cert_reqs, + "ca_certs": configuration.ssl_ca_cert, + "cert_file": configuration.cert_file, + "key_file": configuration.key_file, + } if configuration.assert_hostname is not None: - addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 + pool_args['assert_hostname'] = ( + configuration.assert_hostname + ) if configuration.retries is not None: - addition_pool_args['retries'] = configuration.retries + pool_args['retries'] = configuration.retries + + if configuration.tls_server_name: + pool_args['server_hostname'] = configuration.tls_server_name + if configuration.socket_options is not None: - addition_pool_args['socket_options'] = configuration.socket_options + pool_args['socket_options'] = configuration.socket_options - if maxsize is None: - if configuration.connection_pool_maxsize is not None: - maxsize = configuration.connection_pool_maxsize - else: - maxsize = 4 + if configuration.connection_pool_maxsize is not None: + pool_args['maxsize'] = configuration.connection_pool_maxsize # https pool manager - if configuration.proxy and not should_bypass_proxies(configuration.host, no_proxy=configuration.no_proxy or ''): - self.pool_manager = urllib3.ProxyManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - proxy_url=configuration.proxy, - proxy_headers=configuration.proxy_headers, - **addition_pool_args - ) + self.pool_manager: urllib3.PoolManager + + 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) + else: + pool_args["proxy_url"] = configuration.proxy + pool_args["proxy_headers"] = configuration.proxy_headers + self.pool_manager = urllib3.ProxyManager(**pool_args) else: - self.pool_manager = urllib3.PoolManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - **addition_pool_args - ) - - def request(self, method, url, query_params=None, headers=None, - body=None, post_params=None, _preload_content=True, - _request_timeout=None): + self.pool_manager = urllib3.PoolManager(**pool_args) + + def request( + self, + method, + url, + headers=None, + body=None, + post_params=None, + _request_timeout=None + ): """Perform requests. :param method: http request method :param url: http request url - :param query_params: query parameters in the url :param headers: http request headers :param body: request json body, for `application/json` :param post_params: request post parameters, `application/x-www-form-urlencoded` and `multipart/form-data` - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. """ 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( @@ -124,60 +145,83 @@ class RESTClientObject(object): timeout = None if _request_timeout: - if isinstance(_request_timeout, (int, float)): # noqa: E501,F821 + 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']: - # Only set a default Content-Type for POST, PUT, PATCH and OPTIONS requests - if (method != 'DELETE') and ('Content-Type' not in headers): - headers['Content-Type'] = 'application/json' - if query_params: - url += '?' + urlencode(query_params) - if ('Content-Type' not in headers) or (re.search('json', headers['Content-Type'], re.IGNORECASE)): + + # 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) + ): request_body = None if body is not None: - request_body = json.dumps(body) + request_body = json.dumps(body{{#setEnsureAsciiToFalse}}, ensure_ascii=False{{/setEnsureAsciiToFalse}}) r = self.pool_manager.request( - method, url, + method, + url, body=request_body, - preload_content=_preload_content, timeout=timeout, - headers=headers) - elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 + headers=headers, + preload_content=False + ) + elif content_type == 'application/x-www-form-urlencoded': r = self.pool_manager.request( - method, url, + method, + url, fields=post_params, encode_multipart=False, - preload_content=_preload_content, timeout=timeout, - headers=headers) - elif headers['Content-Type'] == 'multipart/form-data': + headers=headers, + preload_content=False + ) + 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'] + # 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] r = self.pool_manager.request( - method, url, + method, + url, fields=post_params, encode_multipart=True, - preload_content=_preload_content, timeout=timeout, - headers=headers) + headers=headers, + preload_content=False + ) # Pass a `string` parameter directly in the body to support - # other content types than Json when `body` argument is - # provided in serialized form + # other content types than JSON when `body` argument is + # provided in serialized form. elif isinstance(body, str) or isinstance(body, bytes): - request_body = body r = self.pool_manager.request( - method, url, + method, + url, + body=body, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif headers['Content-Type'] == 'text/plain' and isinstance(body, bool): + request_body = "true" if body else "false" + r = self.pool_manager.request( + method, + url, body=request_body, - preload_content=_preload_content, + preload_content=False, timeout=timeout, headers=headers) else: @@ -188,151 +232,16 @@ class RESTClientObject(object): raise ApiException(status=0, reason=msg) # For `GET`, `HEAD` else: - r = self.pool_manager.request(method, url, - fields=query_params, - preload_content=_preload_content, - timeout=timeout, - headers=headers) + r = self.pool_manager.request( + method, + url, + fields={}, + timeout=timeout, + headers=headers, + preload_content=False + ) except urllib3.exceptions.SSLError as e: - msg = "{0}\n{1}".format(type(e).__name__, str(e)) + msg = "\n".join([type(e).__name__, str(e)]) raise ApiException(status=0, reason=msg) - if _preload_content: - r = RESTResponse(r) - - # log response body - logger.debug("response body: %s", r.data) - - if not 200 <= r.status <= 299: - if r.status == 401: - raise UnauthorizedException(http_resp=r) - - if r.status == 403: - raise ForbiddenException(http_resp=r) - - if r.status == 404: - raise NotFoundException(http_resp=r) - - if 500 <= r.status <= 599: - raise ServiceException(http_resp=r) - - raise ApiException(http_resp=r) - - return r - - def GET(self, url, headers=None, query_params=None, _preload_content=True, - _request_timeout=None): - return self.request("GET", url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params) - - def HEAD(self, url, headers=None, query_params=None, _preload_content=True, - _request_timeout=None): - return self.request("HEAD", url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params) - - def OPTIONS(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("OPTIONS", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def DELETE(self, url, headers=None, query_params=None, body=None, - _preload_content=True, _request_timeout=None): - return self.request("DELETE", url, - headers=headers, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def POST(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("POST", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def PUT(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("PUT", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def PATCH(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("PATCH", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - -# end of class RESTClientObject -def is_ipv4(target): - """ Test if IPv4 address or not - """ - try: - chk = ipaddress.IPv4Address(target) - return True - except ipaddress.AddressValueError: - return False - -def in_ipv4net(target, net): - """ Test if target belongs to given IPv4 network - """ - try: - nw = ipaddress.IPv4Network(net) - ip = ipaddress.IPv4Address(target) - if ip in nw: - return True - return False - except ipaddress.AddressValueError: - return False - except ipaddress.NetmaskValueError: - return False - -def should_bypass_proxies(url, no_proxy=None): - """ Yet another requests.should_bypass_proxies - Test if proxies should not be used for a particular url. - """ - - parsed = urlparse(url) - - # special cases - if parsed.hostname in [None, '']: - return True - - # special cases - if no_proxy in [None , '']: - return False - if no_proxy == '*': - return True - - no_proxy = no_proxy.lower().replace(' ',''); - entries = ( - host for host in no_proxy.split(',') if host - ) - - if is_ipv4(parsed.hostname): - for item in entries: - if in_ipv4net(parsed.hostname, item): - return True - return proxy_bypass_environment(parsed.hostname, {'no': no_proxy} ) + return RESTResponse(r) diff --git a/sdks/python/templates/setup.mustache b/sdks/python/templates/setup.mustache index 627920071..ec5a2efff 100644 --- a/sdks/python/templates/setup.mustache +++ b/sdks/python/templates/setup.mustache @@ -1,3 +1,5 @@ +# coding: utf-8 + {{>partial_header}} from setuptools import setup, find_packages # noqa: H301 @@ -5,31 +7,34 @@ from setuptools import setup, find_packages # noqa: H301 from pathlib import Path {{/useCustomTemplateCode}} -NAME = "{{{projectName}}}" -VERSION = "{{packageVersion}}" -{{#apiInfo}} -{{#apis}} -{{#-last}} # To install the library, run the following # # python setup.py install # # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools - +NAME = "{{{projectName}}}" +VERSION = "{{packageVersion}}" +PYTHON_REQUIRES = ">=3.7" +{{#apiInfo}} +{{#apis}} +{{#-last}} REQUIRES = [ - "urllib3 >= 1.25.3", - "python-dateutil", + "urllib3 >= 1.25.3, < 2.1.0", + "python-dateutil", {{#asyncio}} - "aiohttp >= 3.0.0", + "aiohttp >= 3.0.0", + "aiohttp-retry >= 2.8.3", {{/asyncio}} {{#tornado}} - "tornado>=4.2,<5", + "tornado>=4.2,<5", {{/tornado}} {{#hasHttpSignatureMethods}} - "pem>=19.3.0", - "pycryptodome>=3.9.0", + "pem>=19.3.0", + "pycryptodome>=3.9.0", {{/hasHttpSignatureMethods}} + "pydantic >= 2", + "typing-extensions >= 4.7.1", ] {{#useCustomTemplateCode}} @@ -50,7 +55,6 @@ setup( author_email="{{infoEmail}}{{^infoEmail}}team@openapitools.org{{/infoEmail}}", url="{{packageUrl}}", keywords=["OpenAPI", "OpenAPI-Generator", "{{{appName}}}"], - python_requires="{{{generatorLanguageVersion}}}", install_requires=REQUIRES, packages=find_packages(exclude=["test", "tests"]), include_package_data=True, @@ -63,8 +67,9 @@ setup( {{#useCustomTemplateCode}} {{#licenseInfo}}license="{{.}}", {{/licenseInfo}}long_description=long_description, - long_description_content_type='text/markdown' + long_description_content_type='text/markdown', {{/useCustomTemplateCode}} + package_data={"{{{packageName}}}": ["py.typed"]}, ) {{/-last}} {{/apis}} diff --git a/sdks/python/templates/setup_cfg.mustache b/sdks/python/templates/setup_cfg.mustache index 931f02c5d..11433ee87 100644 --- a/sdks/python/templates/setup_cfg.mustache +++ b/sdks/python/templates/setup_cfg.mustache @@ -1,13 +1,2 @@ -{{#useNose}} -[nosetests] -logging-clear-handlers=true -verbosity=2 -randomize=true -exe=true -with-coverage=true -cover-package={{{packageName}}} -cover-erase=true - -{{/useNose}} [flake8] max-line-length=99 diff --git a/sdks/python/templates/signing.mustache b/sdks/python/templates/signing.mustache index e39866a53..4d00424ea 100644 --- a/sdks/python/templates/signing.mustache +++ b/sdks/python/templates/signing.mustache @@ -3,13 +3,16 @@ from base64 import b64encode from Crypto.IO import PEM, PKCS8 from Crypto.Hash import SHA256, SHA512 +from Crypto.Hash.SHA512 import SHA512Hash +from Crypto.Hash.SHA256 import SHA256Hash from Crypto.PublicKey import RSA, ECC from Crypto.Signature import PKCS1_v1_5, pss, DSS +from datetime import timedelta from email.utils import formatdate -import json import os import re from time import time +from typing import List, Optional, Union from urllib.parse import urlencode, urlparse # The constants below define a subset of HTTP headers that can be included in the @@ -56,25 +59,22 @@ HASH_SHA256 = 'sha256' HASH_SHA512 = 'sha512' -class HttpSigningConfiguration(object): +class HttpSigningConfiguration: """The configuration parameters for the HTTP signature security scheme. + The HTTP signature security scheme is used to sign HTTP requests with a private key which is in possession of the API client. - An 'Authorization' header is calculated by creating a hash of select headers, - and optionally the body of the HTTP request, then signing the hash value using - a private key. The 'Authorization' header is added to outbound HTTP requests. - NOTE: This class is auto generated by OpenAPI Generator - - Ref: https://openapi-generator.tech - Do not edit the class manually. + An ``Authorization`` header is calculated by creating a hash of select headers, + and optionally the body of the HTTP request, then signing the hash value using + a private key. The ``Authorization`` header is added to outbound HTTP requests. :param key_id: A string value specifying the identifier of the cryptographic key, when signing HTTP requests. :param signing_scheme: A string value specifying the signature scheme, when signing HTTP requests. - Supported value are hs2019, rsa-sha256, rsa-sha512. - Avoid using rsa-sha256, rsa-sha512 as they are deprecated. These values are + Supported value are: ``hs2019``, ``rsa-sha256``, ``rsa-sha512``. + Avoid using ``rsa-sha256``, ``rsa-sha512`` as they are deprecated. These values are available for server-side applications that only support the older HTTP signature algorithms. :param private_key_path: A string value specifying the path of the file containing @@ -83,18 +83,19 @@ class HttpSigningConfiguration(object): the private key. :param signed_headers: A list of strings. Each value is the name of a HTTP header that must be included in the HTTP signature calculation. - The two special signature headers '(request-target)' and '(created)' SHOULD be + The two special signature headers ``(request-target)`` and ``(created)`` SHOULD be included in SignedHeaders. - The '(created)' header expresses when the signature was created. - The '(request-target)' header is a concatenation of the lowercased :method, an + The ``(created)`` header expresses when the signature was created. + The ``(request-target)`` header is a concatenation of the lowercased :method, an ASCII space, and the :path pseudo-headers. When signed_headers is not specified, the client defaults to a single value, - '(created)', in the list of HTTP headers. + ``(created)``, in the list of HTTP headers. When SignedHeaders contains the 'Digest' value, the client performs the following operations: - 1. Calculate a digest of request body, as specified in RFC3230, section 4.3.2. - 2. Set the 'Digest' header in the request body. - 3. Include the 'Digest' header and value in the HTTP signature. + 1. Calculate a digest of request body, as specified in `RFC3230, + section 4.3.2`_. + 2. Set the ``Digest`` header in the request body. + 3. Include the ``Digest`` header and value in the HTTP signature. :param signing_algorithm: A string value specifying the signature algorithm, when signing HTTP requests. Supported values are: @@ -112,12 +113,16 @@ class HttpSigningConfiguration(object): :param signature_max_validity: The signature max validity, expressed as a datetime.timedelta value. It must be a positive value. """ - def __init__(self, key_id, signing_scheme, private_key_path, - private_key_passphrase=None, - signed_headers=None, - signing_algorithm=None, - hash_algorithm=None, - signature_max_validity=None): + def __init__(self, + key_id: str, + signing_scheme: str, + private_key_path: str, + private_key_passphrase: Union[None, str]=None, + signed_headers: Optional[List[str]]=None, + signing_algorithm: Optional[str]=None, + hash_algorithm: Optional[str]=None, + signature_max_validity: Optional[timedelta]=None, + ) -> None: self.key_id = key_id if signing_scheme not in {SCHEME_HS2019, SCHEME_RSA_SHA256, SCHEME_RSA_SHA512}: raise Exception("Unsupported security scheme: {0}".format(signing_scheme)) @@ -161,11 +166,11 @@ class HttpSigningConfiguration(object): if HEADER_AUTHORIZATION in signed_headers: raise Exception("'Authorization' header cannot be included in signed headers") self.signed_headers = signed_headers - self.private_key = None + self.private_key: Optional[Union[ECC.EccKey, RSA.RsaKey]] = None """The private key used to sign HTTP requests. Initialized when the PEM-encoded private key is loaded from a file. """ - self.host = None + self.host: Optional[str] = None """The host name, optionally followed by a colon and TCP port number. """ self._load_private_key() @@ -203,7 +208,7 @@ class HttpSigningConfiguration(object): def get_public_key(self): """Returns the public key object associated with the private key. """ - pubkey = None + pubkey: Optional[Union[ECC.EccKey, RSA.RsaKey]] = None if isinstance(self.private_key, RSA.RsaKey): pubkey = self.private_key.publickey() elif isinstance(self.private_key, ECC.EccKey): @@ -232,8 +237,11 @@ class HttpSigningConfiguration(object): elif pem_header in {'PRIVATE KEY', 'ENCRYPTED PRIVATE KEY'}: # Key is in PKCS8 format, which is capable of holding many different # types of private keys, not just EC keys. - (key_binary, pem_header, is_encrypted) = \ - PEM.decode(pem_data, self.private_key_passphrase) + if self.private_key_passphrase is not None: + passphrase = self.private_key_passphrase.encode("utf-8") + else: + passphrase = None + (key_binary, pem_header, is_encrypted) = PEM.decode(pem_data, passphrase) (oid, privkey, params) = \ PKCS8.unwrap(key_binary, passphrase=self.private_key_passphrase) if oid == '1.2.840.10045.2.1': @@ -273,7 +281,7 @@ class HttpSigningConfiguration(object): if body is None: body = '' else: - body = json.dumps(body) + body = body.to_json() # Build the '(request-target)' HTTP signature parameter. target_host = urlparse(self.host).netloc @@ -314,8 +322,11 @@ class HttpSigningConfiguration(object): request_headers_dict[HEADER_DIGEST] = '{0}{1}'.format( digest_prefix, b64_body_digest.decode('ascii')) elif hdr_key == HEADER_HOST.lower(): - value = target_host - request_headers_dict[HEADER_HOST] = '{0}'.format(target_host) + if isinstance(target_host, bytes): + value = target_host.decode('ascii') + else: + value = target_host + request_headers_dict[HEADER_HOST] = value else: value = next((v for k, v in headers.items() if k.lower() == hdr_key), None) if value is None: @@ -336,6 +347,9 @@ class HttpSigningConfiguration(object): The prefix is a string that identifies the cryptographic hash. It is used to generate the 'Digest' header as specified in RFC 3230. """ + + digest: Union[SHA256Hash, SHA512Hash] + if self.hash_algorithm == HASH_SHA512: digest = SHA512.new() prefix = 'SHA-512=' diff --git a/sdks/python/templates/test-requirements.mustache b/sdks/python/templates/test-requirements.mustache index 635b816e7..8e6d8cb13 100644 --- a/sdks/python/templates/test-requirements.mustache +++ b/sdks/python/templates/test-requirements.mustache @@ -1,13 +1,5 @@ -{{#useNose}} -coverage>=4.0.3 -nose>=1.3.7 -pluggy>=0.3.1 -py>=1.4.31 -randomize>=0.13 -{{/useNose}} -{{^useNose}} +pytest~=7.1.3 pytest-cov>=2.8.1 -{{/useNose}} -{{#hasHttpSignatureMethods}} -pycryptodome>=3.9.0 -{{/hasHttpSignatureMethods}} +pytest-randomly>=3.12.0 +mypy>=1.4.1 +types-python-dateutil>=2.8.19 diff --git a/sdks/python/templates/tornado/rest.mustache b/sdks/python/templates/tornado/rest.mustache index 9e5cc1209..f4bfbfb23 100644 --- a/sdks/python/templates/tornado/rest.mustache +++ b/sdks/python/templates/tornado/rest.mustache @@ -1,12 +1,12 @@ +# coding: utf-8 + {{>partial_header}} import io import json -import logging import re -# python 2 and python 3 compatibility library -from six.moves.urllib.parse import urlencode +from urllib.parse import urlencode import tornado import tornado.gen from tornado import httpclient @@ -14,34 +14,33 @@ from urllib3.filepost import encode_multipart_formdata from {{packageName}}.exceptions import ApiException, ApiValueError -logger = logging.getLogger(__name__) - +RESTResponseType = httpclient.HTTPResponse class RESTResponse(io.IOBase): - def __init__(self, resp): - self.tornado_response = resp + def __init__(self, resp) -> None: + self.response = resp self.status = resp.code self.reason = resp.reason + self.data = None - if resp.body: - self.data = resp.body - else: - self.data = None + def read(self): + if self.data is None: + self.data = self.response.body + return self.data def getheaders(self): """Returns a CIMultiDictProxy of the response headers.""" - return self.tornado_response.headers + return self.response.headers def getheader(self, name, default=None): """Returns a given response header.""" - return self.tornado_response.headers.get(name, default) + return self.response.headers.get(name, default) -class RESTClientObject(object): +class RESTClientObject: - def __init__(self, configuration, pools_size=4, maxsize=4): - # maxsize is number of requests to host that are allowed in parallel + def __init__(self, configuration) -> None: self.ca_certs = configuration.ssl_ca_cert self.client_key = configuration.key_file @@ -57,29 +56,39 @@ class RESTClientObject(object): self.pool_manager = httpclient.AsyncHTTPClient() @tornado.gen.coroutine - def request(self, method, url, query_params=None, headers=None, body=None, - post_params=None, _preload_content=True, - _request_timeout=None): + def request( + self, + method, + url, + headers=None, + body=None, + post_params=None, + _request_timeout=None + ): """Execute Request :param method: http request method :param url: http request url - :param query_params: query parameters in the url :param headers: http request headers :param body: request json body, for `application/json` :param post_params: request post parameters, `application/x-www-form-urlencoded` and `multipart/form-data` - :param _preload_content: this is a non-applicable field for - the AiohttpClient. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. """ method = method.upper() - assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', - 'PATCH', 'OPTIONS'] + assert method in [ + 'GET', + 'HEAD', + 'DELETE', + 'POST', + 'PUT', + 'PATCH', + 'OPTIONS' + ] if post_params and body: raise ApiValueError( @@ -102,16 +111,13 @@ class RESTClientObject(object): post_params = post_params or {} - if query_params: - request.url += '?' + urlencode(query_params) - # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: if re.search('json', headers['Content-Type'], re.IGNORECASE): if body: body = json.dumps(body) request.body = body - elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 + elif headers['Content-Type'] == 'application/x-www-form-urlencoded': request.body = urlencode(post_params) elif headers['Content-Type'] == 'multipart/form-data': multipart = encode_multipart_formdata(post_params) @@ -130,93 +136,7 @@ class RESTClientObject(object): r = yield self.pool_manager.fetch(request, raise_error=False) - if _preload_content: - - r = RESTResponse(r) - - # log response body - logger.debug("response body: %s", r.data) - if not 200 <= r.status <= 299: - raise ApiException(http_resp=r) + r = RESTResponse(r) raise tornado.gen.Return(r) - - @tornado.gen.coroutine - def GET(self, url, headers=None, query_params=None, _preload_content=True, - _request_timeout=None): - result = yield self.request("GET", url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params) - raise tornado.gen.Return(result) - - @tornado.gen.coroutine - def HEAD(self, url, headers=None, query_params=None, _preload_content=True, - _request_timeout=None): - result = yield self.request("HEAD", url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params) - raise tornado.gen.Return(result) - - @tornado.gen.coroutine - def OPTIONS(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - result = yield self.request("OPTIONS", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - raise tornado.gen.Return(result) - - @tornado.gen.coroutine - def DELETE(self, url, headers=None, query_params=None, body=None, - _preload_content=True, _request_timeout=None): - result = yield self.request("DELETE", url, - headers=headers, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - raise tornado.gen.Return(result) - - @tornado.gen.coroutine - def POST(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - result = yield self.request("POST", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - raise tornado.gen.Return(result) - - @tornado.gen.coroutine - def PUT(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - result = yield self.request("PUT", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - raise tornado.gen.Return(result) - - @tornado.gen.coroutine - def PATCH(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - result = yield self.request("PATCH", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - raise tornado.gen.Return(result) diff --git a/sdks/python/templates/tox.mustache b/sdks/python/templates/tox.mustache index 4c771c472..9d717c3dd 100644 --- a/sdks/python/templates/tox.mustache +++ b/sdks/python/templates/tox.mustache @@ -6,4 +6,4 @@ deps=-r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt commands= - {{^useNose}}pytest --cov={{{packageName}}}{{/useNose}}{{#useNose}}nosetests{{/useNose}} + pytest --cov={{{packageName}}} diff --git a/sdks/python/templates/travis.mustache b/sdks/python/templates/travis.mustache index a26c984f3..53cb57e84 100644 --- a/sdks/python/templates/travis.mustache +++ b/sdks/python/templates/travis.mustache @@ -1,18 +1,17 @@ # ref: https://docs.travis-ci.com/user/languages/python language: python python: - - "3.6" - "3.7" - "3.8" - "3.9" + - "3.10" + - "3.11" + # uncomment the following if needed + #- "3.11-dev" # 3.11 development branch + #- "nightly" # nightly build # command to install dependencies install: - "pip install -r requirements.txt" - "pip install -r test-requirements.txt" # command to run tests -{{#useNose}} -script: nosetests -{{/useNose}} -{{^useNose}} script: pytest --cov={{{packageName}}} -{{/useNose}} diff --git a/sdks/python/test-requirements.txt b/sdks/python/test-requirements.txt index bb4f22bb7..8e6d8cb13 100644 --- a/sdks/python/test-requirements.txt +++ b/sdks/python/test-requirements.txt @@ -1 +1,5 @@ +pytest~=7.1.3 pytest-cov>=2.8.1 +pytest-randomly>=3.12.0 +mypy>=1.4.1 +types-python-dateutil>=2.8.19 From 3f26b94b9c5111532cdd8e13368257947a0cdeb6 Mon Sep 17 00:00:00 2001 From: Juan Treminio Date: Thu, 29 Aug 2024 17:50:50 -0500 Subject: [PATCH 02/10] Remove diff --- sdks/python/.github/workflows/python.yml | 38 ++ sdks/python/README.md | 1 + sdks/python/docs/SignatureRequestApi.md | 31 +- .../docs/SignatureRequestSendRequest.md | 2 +- sdks/python/dropbox_sign/__init__.py | 1 + .../dropbox_sign/api/signature_request_api.py | 451 ++---------------- sdks/python/dropbox_sign/models/__init__.py | 1 + .../models/signature_request_send_request.py | 65 ++- 8 files changed, 143 insertions(+), 447 deletions(-) create mode 100644 sdks/python/.github/workflows/python.yml diff --git a/sdks/python/.github/workflows/python.yml b/sdks/python/.github/workflows/python.yml new file mode 100644 index 000000000..d7d9ec328 --- /dev/null +++ b/sdks/python/.github/workflows/python.yml @@ -0,0 +1,38 @@ +# NOTE: This file is auto generated by OpenAPI Generator. +# URL: https://openapi-generator.tech +# +# ref: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python + +name: dropbox_sign Python package + +on: [push, pull_request] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] + + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install flake8 pytest + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + if [ -f test-requirements.txt ]; then pip install -r test-requirements.txt; fi + - name: Lint with flake8 + run: | + # stop the build if there are Python syntax errors or undefined names + flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide + flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + - name: Test with pytest + run: | + pytest diff --git a/sdks/python/README.md b/sdks/python/README.md index 791d4e7a2..eb6a51939 100644 --- a/sdks/python/README.md +++ b/sdks/python/README.md @@ -247,6 +247,7 @@ Class | Method | HTTP request | Description - [SignatureRequestResponseDataValueText](docs/SignatureRequestResponseDataValueText.md) - [SignatureRequestResponseDataValueTextMerge](docs/SignatureRequestResponseDataValueTextMerge.md) - [SignatureRequestResponseSignatures](docs/SignatureRequestResponseSignatures.md) + - [SignatureRequestSendRequest](docs/SignatureRequestSendRequest.md) - [SignatureRequestSendWithTemplateRequest](docs/SignatureRequestSendWithTemplateRequest.md) - [SignatureRequestUpdateRequest](docs/SignatureRequestUpdateRequest.md) - [SubAttachment](docs/SubAttachment.md) diff --git a/sdks/python/docs/SignatureRequestApi.md b/sdks/python/docs/SignatureRequestApi.md index db98ff7f9..b776de36d 100644 --- a/sdks/python/docs/SignatureRequestApi.md +++ b/sdks/python/docs/SignatureRequestApi.md @@ -599,7 +599,7 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # ```signature_request_send``` -> ```SignatureRequestGetResponse signature_request_send()``` +> ```SignatureRequestGetResponse signature_request_send(signature_request_send_request)``` Send Signature Request @@ -618,32 +618,7 @@ REPLACE_ME_WITH_EXAMPLE_FOR__signature_request_send_Python_CODE ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| `files` | **List[io.IOBase]** | Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. | [optional] | -| `file_urls` | [**List[str]**](str.md) | 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. | [optional] | -| `signers` | [**List[SubSignatureRequestSigner]**](SubSignatureRequestSigner.md) | Add Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. | [optional] | -| `grouped_signers` | [**List[SubSignatureRequestGroupedSigners]**](SubSignatureRequestGroupedSigners.md) | Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. | [optional] | -| `allow_decline` | **bool** | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [optional][default to False] | -| `allow_reassign` | **bool** | 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. | [optional][default to False] | -| `attachments` | [**List[SubAttachment]**](SubAttachment.md) | A list describing the attachments | [optional] | -| `cc_email_addresses` | [**List[str]**](str.md) | The email addresses that should be CCed. | [optional] | -| `client_id` | **str** | 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. | [optional] | -| `custom_fields` | [**List[SubCustomField]**](SubCustomField.md) | 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. | [optional] | -| `field_options` | [**SubFieldOptions**](SubFieldOptions.md) | | [optional] | -| `form_field_groups` | [**List[SubFormFieldGroup]**](SubFormFieldGroup.md) | 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`. | [optional] | -| `form_field_rules` | [**List[SubFormFieldRule]**](SubFormFieldRule.md) | Conditional Logic rules for fields defined in `form_fields_per_document`. | [optional] | -| `form_fields_per_document` | [**List[SubFormFieldsPerDocumentBase]**](SubFormFieldsPerDocumentBase.md) | 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` | [optional] | -| `hide_text_tags` | **bool** | 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. | [optional][default to False] | -| `is_qualified_signature` | **bool** | 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.<br> **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. | [optional][default to False] | -| `is_eid` | **bool** | 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.<br> **NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. | [optional][default to False] | -| `message` | **str** | The custom message in the email that will be sent to the signers. | [optional] | -| `metadata` | [**Dict[str, object]**](Dict.md) | 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. | [optional] | -| `signing_options` | [**SubSigningOptions**](SubSigningOptions.md) | | [optional] | -| `signing_redirect_url` | **str** | The URL you want signers redirected to after they successfully sign. | [optional] | -| `subject` | **str** | The subject in the email that will be sent to the signers. | [optional] | -| `test_mode` | **bool** | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [optional][default to False] | -| `title` | **str** | The title you want to assign to the SignatureRequest. | [optional] | -| `use_text_tags` | **bool** | 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`. | [optional][default to False] | -| `expires_at` | **int** | 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. | [optional] | +| `signature_request_send_request` | [**SignatureRequestSendRequest**](SignatureRequestSendRequest.md) | | | ### Return type @@ -655,7 +630,7 @@ REPLACE_ME_WITH_EXAMPLE_FOR__signature_request_send_Python_CODE ### HTTP request headers - - **Content-Type**: multipart/form-data + - **Content-Type**: application/json, multipart/form-data - **Accept**: application/json ### HTTP response details diff --git a/sdks/python/docs/SignatureRequestSendRequest.md b/sdks/python/docs/SignatureRequestSendRequest.md index 84cd5daa5..ca38d3170 100644 --- a/sdks/python/docs/SignatureRequestSendRequest.md +++ b/sdks/python/docs/SignatureRequestSendRequest.md @@ -5,7 +5,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `files` | ```List[bytearray]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Use `files[]` to indicate the uploaded file(s) to send for signature. +| `files` | ```List[io.IOBase]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. REPLACE_ME_WITH_DESCRIPTION_END | | | `file_urls` | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. diff --git a/sdks/python/dropbox_sign/__init__.py b/sdks/python/dropbox_sign/__init__.py index 9790f7eeb..bbbfc127c 100644 --- a/sdks/python/dropbox_sign/__init__.py +++ b/sdks/python/dropbox_sign/__init__.py @@ -111,6 +111,7 @@ 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 diff --git a/sdks/python/dropbox_sign/api/signature_request_api.py b/sdks/python/dropbox_sign/api/signature_request_api.py index ad053259d..ccb5f4eaa 100644 --- a/sdks/python/dropbox_sign/api/signature_request_api.py +++ b/sdks/python/dropbox_sign/api/signature_request_api.py @@ -17,8 +17,8 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import Field, StrictBool, StrictBytes, StrictInt, StrictStr, field_validator -from typing import Any, Dict, List, Optional, Union +from pydantic import Field, StrictBytes, StrictInt, StrictStr, field_validator +from typing import Optional, Union from typing_extensions import Annotated from dropbox_sign.models.bulk_send_job_send_response import BulkSendJobSendResponse from dropbox_sign.models.file_response import FileResponse @@ -30,17 +30,9 @@ 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.sub_attachment import SubAttachment -from dropbox_sign.models.sub_custom_field import SubCustomField -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_signature_request_signer import SubSignatureRequestSigner -from dropbox_sign.models.sub_signing_options import SubSigningOptions from dropbox_sign.api_client import ApiClient, RequestSerialized from dropbox_sign.api_response import ApiResponse @@ -3759,32 +3751,7 @@ def _signature_request_remove_serialize( @validate_call def signature_request_send( self, - files: Annotated[Optional[List[Union[StrictBytes, StrictStr]]], Field(description="Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.")] = None, - file_urls: Annotated[Optional[List[StrictStr]], Field(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.")] = None, - signers: Annotated[Optional[List[SubSignatureRequestSigner]], Field(description="Add Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both.")] = None, - grouped_signers: Annotated[Optional[List[SubSignatureRequestGroupedSigners]], Field(description="Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both.")] = None, - allow_decline: Annotated[Optional[StrictBool], Field(description="Allows signers to decline to sign a document if `true`. Defaults to `false`.")] = None, - allow_reassign: Annotated[Optional[StrictBool], Field(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.")] = None, - attachments: Annotated[Optional[List[SubAttachment]], Field(description="A list describing the attachments")] = None, - cc_email_addresses: Annotated[Optional[List[StrictStr]], Field(description="The email addresses that should be CCed.")] = None, - client_id: Annotated[Optional[StrictStr], Field(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.")] = None, - custom_fields: Annotated[Optional[List[SubCustomField]], Field(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.")] = None, - field_options: Optional[SubFieldOptions] = None, - form_field_groups: Annotated[Optional[List[SubFormFieldGroup]], Field(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`.")] = None, - form_field_rules: Annotated[Optional[List[SubFormFieldRule]], Field(description="Conditional Logic rules for fields defined in `form_fields_per_document`.")] = None, - form_fields_per_document: Annotated[Optional[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`")] = None, - hide_text_tags: Annotated[Optional[StrictBool], Field(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.")] = None, - is_qualified_signature: Annotated[Optional[StrictBool], Field(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.")] = None, - is_eid: Annotated[Optional[StrictBool], Field(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.")] = None, - message: Annotated[Optional[Annotated[str, Field(strict=True, max_length=5000)]], Field(description="The custom message in the email that will be sent to the signers.")] = None, - metadata: Annotated[Optional[Dict[str, Any]], Field(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.")] = None, - signing_options: Optional[SubSigningOptions] = None, - signing_redirect_url: Annotated[Optional[StrictStr], Field(description="The URL you want signers redirected to after they successfully sign.")] = None, - subject: Annotated[Optional[Annotated[str, Field(strict=True, max_length=255)]], Field(description="The subject in the email that will be sent to the signers.")] = None, - test_mode: Annotated[Optional[StrictBool], Field(description="Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.")] = None, - title: Annotated[Optional[Annotated[str, Field(strict=True, max_length=255)]], Field(description="The title you want to assign to the SignatureRequest.")] = None, - use_text_tags: Annotated[Optional[StrictBool], Field(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`.")] = None, - expires_at: Annotated[Optional[StrictInt], Field(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.")] = None, + signature_request_send_request: SignatureRequestSendRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3802,58 +3769,8 @@ def signature_request_send( Creates and sends a new SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. - :param files: Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. - :type files: List[io.IOBase] - :param file_urls: 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. - :type file_urls: List[str] - :param signers: Add Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. - :type signers: List[SubSignatureRequestSigner] - :param grouped_signers: Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. - :type grouped_signers: List[SubSignatureRequestGroupedSigners] - :param allow_decline: Allows signers to decline to sign a document if `true`. Defaults to `false`. - :type allow_decline: bool - :param allow_reassign: 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. - :type allow_reassign: bool - :param attachments: A list describing the attachments - :type attachments: List[SubAttachment] - :param cc_email_addresses: The email addresses that should be CCed. - :type cc_email_addresses: List[str] - :param client_id: 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. - :type client_id: str - :param custom_fields: 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. - :type custom_fields: List[SubCustomField] - :param field_options: - :type field_options: SubFieldOptions - :param form_field_groups: 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`. - :type form_field_groups: List[SubFormFieldGroup] - :param form_field_rules: Conditional Logic rules for fields defined in `form_fields_per_document`. - :type form_field_rules: List[SubFormFieldRule] - :param form_fields_per_document: 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` - :type form_fields_per_document: List[SubFormFieldsPerDocumentBase] - :param hide_text_tags: 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. - :type hide_text_tags: bool - :param is_qualified_signature: 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. - :type is_qualified_signature: bool - :param is_eid: 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. - :type is_eid: bool - :param message: The custom message in the email that will be sent to the signers. - :type message: str - :param metadata: 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. - :type metadata: Dict[str, object] - :param signing_options: - :type signing_options: SubSigningOptions - :param signing_redirect_url: The URL you want signers redirected to after they successfully sign. - :type signing_redirect_url: str - :param subject: The subject in the email that will be sent to the signers. - :type subject: str - :param test_mode: Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. - :type test_mode: bool - :param title: The title you want to assign to the SignatureRequest. - :type title: str - :param use_text_tags: 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`. - :type use_text_tags: bool - :param expires_at: 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. - :type expires_at: int + :param signature_request_send_request: (required) + :type signature_request_send_request: SignatureRequestSendRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3877,32 +3794,7 @@ def signature_request_send( """ # noqa: E501 _param = self._signature_request_send_serialize( - files=files, - file_urls=file_urls, - signers=signers, - grouped_signers=grouped_signers, - allow_decline=allow_decline, - allow_reassign=allow_reassign, - attachments=attachments, - cc_email_addresses=cc_email_addresses, - client_id=client_id, - custom_fields=custom_fields, - field_options=field_options, - form_field_groups=form_field_groups, - form_field_rules=form_field_rules, - form_fields_per_document=form_fields_per_document, - hide_text_tags=hide_text_tags, - is_qualified_signature=is_qualified_signature, - is_eid=is_eid, - message=message, - metadata=metadata, - signing_options=signing_options, - signing_redirect_url=signing_redirect_url, - subject=subject, - test_mode=test_mode, - title=title, - use_text_tags=use_text_tags, - expires_at=expires_at, + signature_request_send_request=signature_request_send_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3927,32 +3819,7 @@ def signature_request_send( @validate_call def signature_request_send_with_http_info( self, - files: Annotated[Optional[List[Union[StrictBytes, StrictStr]]], Field(description="Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.")] = None, - file_urls: Annotated[Optional[List[StrictStr]], Field(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.")] = None, - signers: Annotated[Optional[List[SubSignatureRequestSigner]], Field(description="Add Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both.")] = None, - grouped_signers: Annotated[Optional[List[SubSignatureRequestGroupedSigners]], Field(description="Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both.")] = None, - allow_decline: Annotated[Optional[StrictBool], Field(description="Allows signers to decline to sign a document if `true`. Defaults to `false`.")] = None, - allow_reassign: Annotated[Optional[StrictBool], Field(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.")] = None, - attachments: Annotated[Optional[List[SubAttachment]], Field(description="A list describing the attachments")] = None, - cc_email_addresses: Annotated[Optional[List[StrictStr]], Field(description="The email addresses that should be CCed.")] = None, - client_id: Annotated[Optional[StrictStr], Field(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.")] = None, - custom_fields: Annotated[Optional[List[SubCustomField]], Field(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.")] = None, - field_options: Optional[SubFieldOptions] = None, - form_field_groups: Annotated[Optional[List[SubFormFieldGroup]], Field(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`.")] = None, - form_field_rules: Annotated[Optional[List[SubFormFieldRule]], Field(description="Conditional Logic rules for fields defined in `form_fields_per_document`.")] = None, - form_fields_per_document: Annotated[Optional[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`")] = None, - hide_text_tags: Annotated[Optional[StrictBool], Field(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.")] = None, - is_qualified_signature: Annotated[Optional[StrictBool], Field(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.")] = None, - is_eid: Annotated[Optional[StrictBool], Field(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.")] = None, - message: Annotated[Optional[Annotated[str, Field(strict=True, max_length=5000)]], Field(description="The custom message in the email that will be sent to the signers.")] = None, - metadata: Annotated[Optional[Dict[str, Any]], Field(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.")] = None, - signing_options: Optional[SubSigningOptions] = None, - signing_redirect_url: Annotated[Optional[StrictStr], Field(description="The URL you want signers redirected to after they successfully sign.")] = None, - subject: Annotated[Optional[Annotated[str, Field(strict=True, max_length=255)]], Field(description="The subject in the email that will be sent to the signers.")] = None, - test_mode: Annotated[Optional[StrictBool], Field(description="Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.")] = None, - title: Annotated[Optional[Annotated[str, Field(strict=True, max_length=255)]], Field(description="The title you want to assign to the SignatureRequest.")] = None, - use_text_tags: Annotated[Optional[StrictBool], Field(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`.")] = None, - expires_at: Annotated[Optional[StrictInt], Field(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.")] = None, + signature_request_send_request: SignatureRequestSendRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3970,58 +3837,8 @@ def signature_request_send_with_http_info( Creates and sends a new SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. - :param files: Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. - :type files: List[io.IOBase] - :param file_urls: 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. - :type file_urls: List[str] - :param signers: Add Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. - :type signers: List[SubSignatureRequestSigner] - :param grouped_signers: Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. - :type grouped_signers: List[SubSignatureRequestGroupedSigners] - :param allow_decline: Allows signers to decline to sign a document if `true`. Defaults to `false`. - :type allow_decline: bool - :param allow_reassign: 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. - :type allow_reassign: bool - :param attachments: A list describing the attachments - :type attachments: List[SubAttachment] - :param cc_email_addresses: The email addresses that should be CCed. - :type cc_email_addresses: List[str] - :param client_id: 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. - :type client_id: str - :param custom_fields: 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. - :type custom_fields: List[SubCustomField] - :param field_options: - :type field_options: SubFieldOptions - :param form_field_groups: 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`. - :type form_field_groups: List[SubFormFieldGroup] - :param form_field_rules: Conditional Logic rules for fields defined in `form_fields_per_document`. - :type form_field_rules: List[SubFormFieldRule] - :param form_fields_per_document: 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` - :type form_fields_per_document: List[SubFormFieldsPerDocumentBase] - :param hide_text_tags: 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. - :type hide_text_tags: bool - :param is_qualified_signature: 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. - :type is_qualified_signature: bool - :param is_eid: 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. - :type is_eid: bool - :param message: The custom message in the email that will be sent to the signers. - :type message: str - :param metadata: 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. - :type metadata: Dict[str, object] - :param signing_options: - :type signing_options: SubSigningOptions - :param signing_redirect_url: The URL you want signers redirected to after they successfully sign. - :type signing_redirect_url: str - :param subject: The subject in the email that will be sent to the signers. - :type subject: str - :param test_mode: Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. - :type test_mode: bool - :param title: The title you want to assign to the SignatureRequest. - :type title: str - :param use_text_tags: 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`. - :type use_text_tags: bool - :param expires_at: 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. - :type expires_at: int + :param signature_request_send_request: (required) + :type signature_request_send_request: SignatureRequestSendRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4045,32 +3862,7 @@ def signature_request_send_with_http_info( """ # noqa: E501 _param = self._signature_request_send_serialize( - files=files, - file_urls=file_urls, - signers=signers, - grouped_signers=grouped_signers, - allow_decline=allow_decline, - allow_reassign=allow_reassign, - attachments=attachments, - cc_email_addresses=cc_email_addresses, - client_id=client_id, - custom_fields=custom_fields, - field_options=field_options, - form_field_groups=form_field_groups, - form_field_rules=form_field_rules, - form_fields_per_document=form_fields_per_document, - hide_text_tags=hide_text_tags, - is_qualified_signature=is_qualified_signature, - is_eid=is_eid, - message=message, - metadata=metadata, - signing_options=signing_options, - signing_redirect_url=signing_redirect_url, - subject=subject, - test_mode=test_mode, - title=title, - use_text_tags=use_text_tags, - expires_at=expires_at, + signature_request_send_request=signature_request_send_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4095,32 +3887,7 @@ def signature_request_send_with_http_info( @validate_call def signature_request_send_without_preload_content( self, - files: Annotated[Optional[List[Union[StrictBytes, StrictStr]]], Field(description="Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.")] = None, - file_urls: Annotated[Optional[List[StrictStr]], Field(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.")] = None, - signers: Annotated[Optional[List[SubSignatureRequestSigner]], Field(description="Add Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both.")] = None, - grouped_signers: Annotated[Optional[List[SubSignatureRequestGroupedSigners]], Field(description="Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both.")] = None, - allow_decline: Annotated[Optional[StrictBool], Field(description="Allows signers to decline to sign a document if `true`. Defaults to `false`.")] = None, - allow_reassign: Annotated[Optional[StrictBool], Field(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.")] = None, - attachments: Annotated[Optional[List[SubAttachment]], Field(description="A list describing the attachments")] = None, - cc_email_addresses: Annotated[Optional[List[StrictStr]], Field(description="The email addresses that should be CCed.")] = None, - client_id: Annotated[Optional[StrictStr], Field(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.")] = None, - custom_fields: Annotated[Optional[List[SubCustomField]], Field(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.")] = None, - field_options: Optional[SubFieldOptions] = None, - form_field_groups: Annotated[Optional[List[SubFormFieldGroup]], Field(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`.")] = None, - form_field_rules: Annotated[Optional[List[SubFormFieldRule]], Field(description="Conditional Logic rules for fields defined in `form_fields_per_document`.")] = None, - form_fields_per_document: Annotated[Optional[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`")] = None, - hide_text_tags: Annotated[Optional[StrictBool], Field(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.")] = None, - is_qualified_signature: Annotated[Optional[StrictBool], Field(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.")] = None, - is_eid: Annotated[Optional[StrictBool], Field(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.")] = None, - message: Annotated[Optional[Annotated[str, Field(strict=True, max_length=5000)]], Field(description="The custom message in the email that will be sent to the signers.")] = None, - metadata: Annotated[Optional[Dict[str, Any]], Field(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.")] = None, - signing_options: Optional[SubSigningOptions] = None, - signing_redirect_url: Annotated[Optional[StrictStr], Field(description="The URL you want signers redirected to after they successfully sign.")] = None, - subject: Annotated[Optional[Annotated[str, Field(strict=True, max_length=255)]], Field(description="The subject in the email that will be sent to the signers.")] = None, - test_mode: Annotated[Optional[StrictBool], Field(description="Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.")] = None, - title: Annotated[Optional[Annotated[str, Field(strict=True, max_length=255)]], Field(description="The title you want to assign to the SignatureRequest.")] = None, - use_text_tags: Annotated[Optional[StrictBool], Field(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`.")] = None, - expires_at: Annotated[Optional[StrictInt], Field(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.")] = None, + signature_request_send_request: SignatureRequestSendRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4138,58 +3905,8 @@ def signature_request_send_without_preload_content( Creates and sends a new SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. - :param files: Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. - :type files: List[io.IOBase] - :param file_urls: 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. - :type file_urls: List[str] - :param signers: Add Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. - :type signers: List[SubSignatureRequestSigner] - :param grouped_signers: Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. - :type grouped_signers: List[SubSignatureRequestGroupedSigners] - :param allow_decline: Allows signers to decline to sign a document if `true`. Defaults to `false`. - :type allow_decline: bool - :param allow_reassign: 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. - :type allow_reassign: bool - :param attachments: A list describing the attachments - :type attachments: List[SubAttachment] - :param cc_email_addresses: The email addresses that should be CCed. - :type cc_email_addresses: List[str] - :param client_id: 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. - :type client_id: str - :param custom_fields: 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. - :type custom_fields: List[SubCustomField] - :param field_options: - :type field_options: SubFieldOptions - :param form_field_groups: 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`. - :type form_field_groups: List[SubFormFieldGroup] - :param form_field_rules: Conditional Logic rules for fields defined in `form_fields_per_document`. - :type form_field_rules: List[SubFormFieldRule] - :param form_fields_per_document: 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` - :type form_fields_per_document: List[SubFormFieldsPerDocumentBase] - :param hide_text_tags: 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. - :type hide_text_tags: bool - :param is_qualified_signature: 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. - :type is_qualified_signature: bool - :param is_eid: 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. - :type is_eid: bool - :param message: The custom message in the email that will be sent to the signers. - :type message: str - :param metadata: 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. - :type metadata: Dict[str, object] - :param signing_options: - :type signing_options: SubSigningOptions - :param signing_redirect_url: The URL you want signers redirected to after they successfully sign. - :type signing_redirect_url: str - :param subject: The subject in the email that will be sent to the signers. - :type subject: str - :param test_mode: Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. - :type test_mode: bool - :param title: The title you want to assign to the SignatureRequest. - :type title: str - :param use_text_tags: 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`. - :type use_text_tags: bool - :param expires_at: 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. - :type expires_at: int + :param signature_request_send_request: (required) + :type signature_request_send_request: SignatureRequestSendRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4213,32 +3930,7 @@ def signature_request_send_without_preload_content( """ # noqa: E501 _param = self._signature_request_send_serialize( - files=files, - file_urls=file_urls, - signers=signers, - grouped_signers=grouped_signers, - allow_decline=allow_decline, - allow_reassign=allow_reassign, - attachments=attachments, - cc_email_addresses=cc_email_addresses, - client_id=client_id, - custom_fields=custom_fields, - field_options=field_options, - form_field_groups=form_field_groups, - form_field_rules=form_field_rules, - form_fields_per_document=form_fields_per_document, - hide_text_tags=hide_text_tags, - is_qualified_signature=is_qualified_signature, - is_eid=is_eid, - message=message, - metadata=metadata, - signing_options=signing_options, - signing_redirect_url=signing_redirect_url, - subject=subject, - test_mode=test_mode, - title=title, - use_text_tags=use_text_tags, - expires_at=expires_at, + signature_request_send_request=signature_request_send_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4258,32 +3950,7 @@ def signature_request_send_without_preload_content( def _signature_request_send_serialize( self, - 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, + signature_request_send_request, _request_auth, _content_type, _headers, @@ -4293,16 +3960,6 @@ def _signature_request_send_serialize( _host = None _collection_formats: Dict[str, str] = { - 'files': 'csv', - 'file_urls': 'csv', - 'signers': 'csv', - 'grouped_signers': 'csv', - 'attachments': 'csv', - 'cc_email_addresses': 'csv', - 'custom_fields': 'csv', - 'form_field_groups': 'csv', - 'form_field_rules': 'csv', - 'form_fields_per_document': 'csv', } _path_params: Dict[str, str] = {} @@ -4312,63 +3969,34 @@ def _signature_request_send_serialize( _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None + has_files = False + body_param = signature_request_send_request + excluded_json_fields = set([]) + for param_name, param_type in body_param.openapi_types().items(): + param_value = getattr(body_param, param_name) + if param_value is None: + continue + + if "io.IOBase" in param_type: + has_files = True + _content_type = "multipart/form-data" + excluded_json_fields.add(param_name) + + if isinstance(param_value, list): + for index, item in enumerate(param_value): + _files[f'{param_name}[{index}]'] = item + else: + _files[param_name] = param_value + + _form_params = body_param.to_json_form_params(excluded_json_fields) + # process the path parameters # process the query parameters # process the header parameters # process the form parameters - if files is not None: - _files['files'] = files - if file_urls is not None: - _form_params.append(('file_urls', file_urls)) - if signers is not None: - _form_params.append(('signers', signers)) - if grouped_signers is not None: - _form_params.append(('grouped_signers', grouped_signers)) - if allow_decline is not None: - _form_params.append(('allow_decline', allow_decline)) - if allow_reassign is not None: - _form_params.append(('allow_reassign', allow_reassign)) - if attachments is not None: - _form_params.append(('attachments', attachments)) - if cc_email_addresses is not None: - _form_params.append(('cc_email_addresses', cc_email_addresses)) - if client_id is not None: - _form_params.append(('client_id', client_id)) - if custom_fields is not None: - _form_params.append(('custom_fields', custom_fields)) - if field_options is not None: - _form_params.append(('field_options', field_options)) - if form_field_groups is not None: - _form_params.append(('form_field_groups', form_field_groups)) - if form_field_rules is not None: - _form_params.append(('form_field_rules', form_field_rules)) - if form_fields_per_document is not None: - _form_params.append(('form_fields_per_document', form_fields_per_document)) - if hide_text_tags is not None: - _form_params.append(('hide_text_tags', hide_text_tags)) - if is_qualified_signature is not None: - _form_params.append(('is_qualified_signature', is_qualified_signature)) - if is_eid is not None: - _form_params.append(('is_eid', is_eid)) - if message is not None: - _form_params.append(('message', message)) - if metadata is not None: - _form_params.append(('metadata', metadata)) - if signing_options is not None: - _form_params.append(('signing_options', signing_options)) - if signing_redirect_url is not None: - _form_params.append(('signing_redirect_url', signing_redirect_url)) - if subject is not None: - _form_params.append(('subject', subject)) - if test_mode is not None: - _form_params.append(('test_mode', test_mode)) - if title is not None: - _form_params.append(('title', title)) - if use_text_tags is not None: - _form_params.append(('use_text_tags', use_text_tags)) - if expires_at is not None: - _form_params.append(('expires_at', expires_at)) # process the body parameter + if signature_request_send_request is not None and has_files is False: + _body_params = signature_request_send_request # set the HTTP header `Accept` @@ -4386,6 +4014,7 @@ def _signature_request_send_serialize( _default_content_type = ( self.api_client.select_header_content_type( [ + 'application/json', 'multipart/form-data' ] ) diff --git a/sdks/python/dropbox_sign/models/__init__.py b/sdks/python/dropbox_sign/models/__init__.py index b28d4cd01..ed9579770 100644 --- a/sdks/python/dropbox_sign/models/__init__.py +++ b/sdks/python/dropbox_sign/models/__init__.py @@ -94,6 +94,7 @@ 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 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 e520ac9d6..ddde85979 100644 --- a/sdks/python/dropbox_sign/models/signature_request_send_request.py +++ b/sdks/python/dropbox_sign/models/signature_request_send_request.py @@ -30,7 +30,7 @@ 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 +from typing import Optional, Set, Tuple from typing_extensions import Self import io @@ -77,17 +77,24 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self) -> str: + def to_json(self, excluded_fields: Set[str] = None) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(self.to_dict(excluded_fields)) + + 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(): + data.append((key, json.dumps(value))) + + return data @classmethod def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of SignatureRequestSendRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -97,8 +104,6 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) _dict = self.model_dump( by_alias=True, @@ -213,6 +218,52 @@ def init(cls, data: Optional[Dict[str, Any]]) -> Self: """ return cls.from_dict(data) + @classmethod + def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + return { + "files": "(List[io.IOBase],)", + "file_urls": "(List[str],)", + "signers": "(List[SubSignatureRequestSigner],)", + "grouped_signers": "(List[SubSignatureRequestGroupedSigners],)", + "allow_decline": "(bool,)", + "allow_reassign": "(bool,)", + "attachments": "(List[SubAttachment],)", + "cc_email_addresses": "(List[str],)", + "client_id": "(str,)", + "custom_fields": "(List[SubCustomField],)", + "field_options": "(SubFieldOptions,)", + "form_field_groups": "(List[SubFormFieldGroup],)", + "form_field_rules": "(List[SubFormFieldRule],)", + "form_fields_per_document": "(List[SubFormFieldsPerDocumentBase],)", + "hide_text_tags": "(bool,)", + "is_qualified_signature": "(bool,)", + "is_eid": "(bool,)", + "message": "(str,)", + "metadata": "(Dict[str, object],)", + "signing_options": "(SubSigningOptions,)", + "signing_redirect_url": "(str,)", + "subject": "(str,)", + "test_mode": "(bool,)", + "title": "(str,)", + "use_text_tags": "(bool,)", + "expires_at": "(int,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + return property_name in [ + "files", + "file_urls", + "signers", + "grouped_signers", + "attachments", + "cc_email_addresses", + "custom_fields", + "form_field_groups", + "form_field_rules", + "form_fields_per_document", + ] + model_config = { "arbitrary_types_allowed": True } From fbc707cb1b991405650951ee963f80a6f556c08d Mon Sep 17 00:00:00 2001 From: Juan Treminio Date: Thu, 29 Aug 2024 18:03:19 -0500 Subject: [PATCH 03/10] Adds examples to docs --- sdks/python/README.md | 254 +++---- sdks/python/bin/replace | 1 + sdks/python/bin/scan_for | 1 - sdks/python/docs/AccountApi.md | 108 ++- sdks/python/docs/AccountCreateRequest.md | 12 +- sdks/python/docs/AccountCreateResponse.md | 6 +- sdks/python/docs/AccountGetResponse.md | 4 +- sdks/python/docs/AccountResponse.md | 22 +- sdks/python/docs/AccountResponseQuotas.md | 12 +- sdks/python/docs/AccountResponseUsage.md | 2 +- sdks/python/docs/AccountUpdateRequest.md | 6 +- sdks/python/docs/AccountVerifyRequest.md | 2 +- sdks/python/docs/AccountVerifyResponse.md | 4 +- .../docs/AccountVerifyResponseAccount.md | 2 +- sdks/python/docs/ApiAppApi.md | 162 ++++- sdks/python/docs/ApiAppCreateRequest.md | 14 +- sdks/python/docs/ApiAppGetResponse.md | 4 +- sdks/python/docs/ApiAppListResponse.md | 6 +- sdks/python/docs/ApiAppResponse.md | 20 +- sdks/python/docs/ApiAppResponseOAuth.md | 8 +- sdks/python/docs/ApiAppResponseOptions.md | 2 +- .../python/docs/ApiAppResponseOwnerAccount.md | 4 +- .../ApiAppResponseWhiteLabelingOptions.md | 28 +- sdks/python/docs/ApiAppUpdateRequest.md | 14 +- sdks/python/docs/BulkSendJobApi.md | 62 +- sdks/python/docs/BulkSendJobGetResponse.md | 8 +- ...BulkSendJobGetResponseSignatureRequests.md | 53 +- sdks/python/docs/BulkSendJobListResponse.md | 6 +- sdks/python/docs/BulkSendJobResponse.md | 8 +- sdks/python/docs/BulkSendJobSendResponse.md | 4 +- sdks/python/docs/EmbeddedApi.md | 55 +- sdks/python/docs/EmbeddedEditUrlRequest.md | 24 +- sdks/python/docs/EmbeddedEditUrlResponse.md | 4 +- .../docs/EmbeddedEditUrlResponseEmbedded.md | 4 +- sdks/python/docs/EmbeddedSignUrlResponse.md | 4 +- .../docs/EmbeddedSignUrlResponseEmbedded.md | 4 +- sdks/python/docs/ErrorResponse.md | 2 +- sdks/python/docs/ErrorResponseError.md | 6 +- sdks/python/docs/EventCallbackRequest.md | 8 +- sdks/python/docs/EventCallbackRequestEvent.md | 8 +- .../docs/EventCallbackRequestEventMetadata.md | 8 +- sdks/python/docs/FaxLineAddUserRequest.md | 6 +- sdks/python/docs/FaxLineApi.md | 158 ++++- .../python/docs/FaxLineAreaCodeGetResponse.md | 2 +- sdks/python/docs/FaxLineCreateRequest.md | 8 +- sdks/python/docs/FaxLineDeleteRequest.md | 2 +- sdks/python/docs/FaxLineListResponse.md | 6 +- sdks/python/docs/FaxLineRemoveUserRequest.md | 6 +- sdks/python/docs/FaxLineResponse.md | 4 +- sdks/python/docs/FaxLineResponseFaxLine.md | 8 +- sdks/python/docs/FileResponse.md | 4 +- sdks/python/docs/FileResponseDataUri.md | 2 +- sdks/python/docs/ListInfoResponse.md | 8 +- sdks/python/docs/OAuthApi.md | 45 +- sdks/python/docs/OAuthTokenGenerateRequest.md | 10 +- sdks/python/docs/OAuthTokenRefreshRequest.md | 4 +- sdks/python/docs/OAuthTokenResponse.md | 10 +- sdks/python/docs/ReportApi.md | 29 +- sdks/python/docs/ReportCreateRequest.md | 6 +- sdks/python/docs/ReportCreateResponse.md | 4 +- sdks/python/docs/ReportResponse.md | 8 +- sdks/python/docs/SignatureRequestApi.md | 638 +++++++++++++++++- ...stBulkCreateEmbeddedWithTemplateRequest.md | 52 +- ...atureRequestBulkSendWithTemplateRequest.md | 52 +- .../SignatureRequestCreateEmbeddedRequest.md | 81 +-- ...equestCreateEmbeddedWithTemplateRequest.md | 38 +- .../docs/SignatureRequestGetResponse.md | 4 +- .../docs/SignatureRequestListResponse.md | 6 +- .../docs/SignatureRequestRemindRequest.md | 4 +- sdks/python/docs/SignatureRequestResponse.md | 53 +- .../SignatureRequestResponseAttachment.md | 12 +- ...SignatureRequestResponseCustomFieldBase.md | 14 +- ...atureRequestResponseCustomFieldCheckbox.md | 6 +- ...SignatureRequestResponseCustomFieldText.md | 6 +- .../docs/SignatureRequestResponseDataBase.md | 10 +- ...gnatureRequestResponseDataValueCheckbox.md | 4 +- ...reRequestResponseDataValueCheckboxMerge.md | 4 +- ...atureRequestResponseDataValueDateSigned.md | 4 +- ...gnatureRequestResponseDataValueDropdown.md | 4 +- ...gnatureRequestResponseDataValueInitials.md | 4 +- .../SignatureRequestResponseDataValueRadio.md | 4 +- ...natureRequestResponseDataValueSignature.md | 4 +- .../SignatureRequestResponseDataValueText.md | 4 +- ...natureRequestResponseDataValueTextMerge.md | 4 +- .../SignatureRequestResponseSignatures.md | 38 +- .../docs/SignatureRequestSendRequest.md | 90 +-- ...SignatureRequestSendWithTemplateRequest.md | 47 +- .../docs/SignatureRequestUpdateRequest.md | 14 +- sdks/python/docs/SubAttachment.md | 10 +- sdks/python/docs/SubBulkSignerList.md | 6 +- .../docs/SubBulkSignerListCustomField.md | 4 +- sdks/python/docs/SubCC.md | 4 +- sdks/python/docs/SubCustomField.md | 16 +- sdks/python/docs/SubEditorOptions.md | 4 +- sdks/python/docs/SubFieldOptions.md | 4 +- sdks/python/docs/SubFormFieldGroup.md | 10 +- sdks/python/docs/SubFormFieldRule.md | 8 +- sdks/python/docs/SubFormFieldRuleAction.md | 16 +- sdks/python/docs/SubFormFieldRuleTrigger.md | 41 +- .../docs/SubFormFieldsPerDocumentBase.md | 49 +- .../docs/SubFormFieldsPerDocumentCheckbox.md | 8 +- .../SubFormFieldsPerDocumentCheckboxMerge.md | 4 +- .../SubFormFieldsPerDocumentDateSigned.md | 10 +- .../docs/SubFormFieldsPerDocumentDropdown.md | 14 +- .../docs/SubFormFieldsPerDocumentHyperlink.md | 14 +- .../docs/SubFormFieldsPerDocumentInitials.md | 4 +- .../docs/SubFormFieldsPerDocumentRadio.md | 8 +- .../docs/SubFormFieldsPerDocumentSignature.md | 4 +- .../docs/SubFormFieldsPerDocumentText.md | 28 +- .../docs/SubFormFieldsPerDocumentTextMerge.md | 10 +- sdks/python/docs/SubMergeField.md | 4 +- sdks/python/docs/SubOAuth.md | 4 +- sdks/python/docs/SubOptions.md | 2 +- .../docs/SubSignatureRequestGroupedSigners.md | 8 +- sdks/python/docs/SubSignatureRequestSigner.md | 20 +- .../docs/SubSignatureRequestTemplateSigner.md | 20 +- sdks/python/docs/SubSigningOptions.md | 12 +- sdks/python/docs/SubTeamResponse.md | 4 +- sdks/python/docs/SubTemplateRole.md | 4 +- sdks/python/docs/SubUnclaimedDraftSigner.md | 6 +- .../docs/SubUnclaimedDraftTemplateSigner.md | 6 +- sdks/python/docs/SubWhiteLabelingOptions.md | 30 +- sdks/python/docs/TeamAddMemberRequest.md | 12 +- sdks/python/docs/TeamApi.md | 258 ++++++- sdks/python/docs/TeamCreateRequest.md | 2 +- sdks/python/docs/TeamGetInfoResponse.md | 4 +- sdks/python/docs/TeamGetResponse.md | 4 +- sdks/python/docs/TeamInfoResponse.md | 10 +- sdks/python/docs/TeamInviteResponse.md | 12 +- sdks/python/docs/TeamInvitesResponse.md | 4 +- sdks/python/docs/TeamMemberResponse.md | 6 +- sdks/python/docs/TeamMembersResponse.md | 6 +- sdks/python/docs/TeamParentResponse.md | 6 +- sdks/python/docs/TeamRemoveMemberRequest.md | 18 +- sdks/python/docs/TeamResponse.md | 8 +- sdks/python/docs/TeamSubTeamsResponse.md | 6 +- sdks/python/docs/TeamUpdateRequest.md | 2 +- sdks/python/docs/TemplateAddUserRequest.md | 8 +- sdks/python/docs/TemplateApi.md | 366 +++++++++- .../TemplateCreateEmbeddedDraftRequest.md | 75 +- .../TemplateCreateEmbeddedDraftResponse.md | 4 +- ...lateCreateEmbeddedDraftResponseTemplate.md | 10 +- sdks/python/docs/TemplateCreateRequest.md | 58 +- sdks/python/docs/TemplateCreateResponse.md | 4 +- .../docs/TemplateCreateResponseTemplate.md | 4 +- sdks/python/docs/TemplateEditResponse.md | 2 +- sdks/python/docs/TemplateGetResponse.md | 4 +- sdks/python/docs/TemplateListResponse.md | 6 +- sdks/python/docs/TemplateRemoveUserRequest.md | 4 +- sdks/python/docs/TemplateResponse.md | 32 +- sdks/python/docs/TemplateResponseAccount.md | 12 +- .../docs/TemplateResponseAccountQuota.md | 8 +- sdks/python/docs/TemplateResponseCCRole.md | 2 +- sdks/python/docs/TemplateResponseDocument.md | 12 +- ...TemplateResponseDocumentCustomFieldBase.md | 20 +- ...lateResponseDocumentCustomFieldCheckbox.md | 7 +- ...TemplateResponseDocumentCustomFieldText.md | 15 +- .../TemplateResponseDocumentFieldGroup.md | 4 +- .../TemplateResponseDocumentFieldGroupRule.md | 8 +- .../TemplateResponseDocumentFormFieldBase.md | 20 +- ...mplateResponseDocumentFormFieldCheckbox.md | 13 +- ...lateResponseDocumentFormFieldDateSigned.md | 13 +- ...mplateResponseDocumentFormFieldDropdown.md | 13 +- ...plateResponseDocumentFormFieldHyperlink.md | 21 +- ...mplateResponseDocumentFormFieldInitials.md | 13 +- .../TemplateResponseDocumentFormFieldRadio.md | 13 +- ...plateResponseDocumentFormFieldSignature.md | 13 +- .../TemplateResponseDocumentFormFieldText.md | 23 +- ...TemplateResponseDocumentStaticFieldBase.md | 20 +- ...lateResponseDocumentStaticFieldCheckbox.md | 13 +- ...teResponseDocumentStaticFieldDateSigned.md | 13 +- ...lateResponseDocumentStaticFieldDropdown.md | 13 +- ...ateResponseDocumentStaticFieldHyperlink.md | 13 +- ...lateResponseDocumentStaticFieldInitials.md | 13 +- ...emplateResponseDocumentStaticFieldRadio.md | 13 +- ...ateResponseDocumentStaticFieldSignature.md | 13 +- ...TemplateResponseDocumentStaticFieldText.md | 13 +- .../TemplateResponseFieldAvgTextLength.md | 4 +- .../python/docs/TemplateResponseSignerRole.md | 4 +- .../python/docs/TemplateUpdateFilesRequest.md | 16 +- .../docs/TemplateUpdateFilesResponse.md | 2 +- .../TemplateUpdateFilesResponseTemplate.md | 4 +- sdks/python/docs/UnclaimedDraftApi.md | 169 ++++- .../UnclaimedDraftCreateEmbeddedRequest.md | 104 +-- ...dDraftCreateEmbeddedWithTemplateRequest.md | 78 +-- .../docs/UnclaimedDraftCreateRequest.md | 73 +- .../docs/UnclaimedDraftCreateResponse.md | 4 +- .../UnclaimedDraftEditAndResendRequest.md | 16 +- sdks/python/docs/UnclaimedDraftResponse.md | 12 +- sdks/python/docs/WarningResponse.md | 4 +- sdks/python/run-build | 31 + sdks/python/templates/README.mustache | 63 +- sdks/python/templates/common_README.mustache | 31 + 193 files changed, 3129 insertions(+), 1668 deletions(-) diff --git a/sdks/python/README.md b/sdks/python/README.md index eb6a51939..4bf0ec6fa 100644 --- a/sdks/python/README.md +++ b/sdks/python/README.md @@ -1,169 +1,173 @@ # dropbox-sign Dropbox Sign v3 API -This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: +## Migrating from legacy SDK -- API version: 3.0.0 -- Package version: 2.0-dev -- Generator version: 7.8.0 -- Build package: org.openapitools.codegen.languages.PythonClientCodegen +This SDK is generated from our officially maintained [OpenAPI spec](https://github.com/hellosign/hellosign-openapi/blob/main/openapi.yaml). +We've made important updates that introduce new functionality and create feature parity between the Dropbox Sign API and the SDK. +However, some of these changes are considered "breaking" in the sense that they'll require you to update your existing code in order to continue using the SDK. +Please refer to this [migration guide](https://developers.hellosign.com/docs/sdks/python/migration-guide/) for more information. -## Requirements. +## Contributing -Python 3.7+ +This repo is no longer accepting new issues or Pull Requests. All issues or +Pull Requests *must* be opened against the +[hellosign/hellosign-openapi](https://github.com/hellosign/hellosign-openapi) repo! -## Installation & Usage -### pip install +### Changes to the SDK code -If the python package is hosted on a repository, you can install directly using: +You must make SDK code changes in the mustache file within the `templates` +directory that corresponds to the file you want updated. -```sh -pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git -``` -(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) +We use [OpenAPI Generator](https://openapi-generator.tech/) to automatically +generate this SDK from the OAS, using the template files. -Then import the package: -```python -import dropbox_sign +### Building + +You must have `docker` (or `podman` linked to `docker`) installed. Highly +recommended to use +[rootless docker](https://docs.docker.com/engine/security/rootless/). + +Run the following and everything is done for you: + +```shell +./run-build ``` -### Setuptools +*Attention*: Any changes you have made to the SDK code that you have not made +to the OAS file and/or the mustache template files _will be lost_ when you run +this command. + +## Installation & Usage + +### Requirements. + +Python 3.7+ + +### pip -Install via [Setuptools](http://pypi.python.org/pypi/setuptools). +Install using `pip`: -```sh -python setup.py install --user +```shell +python3 -m pip install dropbox-sign==2.0-dev +``` + +Alternatively: + +```shell +pip install git+https://github.com/hellosign/dropbox-sign-python.git ``` -(or `sudo python setup.py install` to install the package for all users) Then import the package: ```python import dropbox_sign ``` -### Tests - -Execute `pytest` to run the tests. - ## Getting Started Please follow the [installation procedure](#installation--usage) and then run the following: -```python -import dropbox_sign -from dropbox_sign.rest import ApiException +```python from pprint import pprint -# Defining the host is optional and defaults to https://api.hellosign.com/v3 -# See configuration.py for a list of all supported configuration parameters. -configuration = dropbox_sign.Configuration( - host = "https://api.hellosign.com/v3" -) +from dropbox_sign import \ + ApiClient, ApiException, Configuration, apis, models -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. +configuration = Configuration( + # Configure HTTP basic authorization: api_key + username="YOUR_API_KEY", -# Configure HTTP basic authorization: api_key -configuration = dropbox_sign.Configuration( - username = os.environ["USERNAME"], - password = os.environ["PASSWORD"] + # or, configure Bearer (JWT) authorization: oauth2 + # access_token="YOUR_ACCESS_TOKEN", ) -# Configure Bearer authorization (JWT): oauth2 -configuration = dropbox_sign.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) +with ApiClient(configuration) as api_client: + account_api = apis.AccountApi(api_client) - -# Enter a context with an instance of the API client -with dropbox_sign.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = dropbox_sign.AccountApi(api_client) - account_create_request = dropbox_sign.AccountCreateRequest() # AccountCreateRequest | + data = models.AccountCreateRequest( + email_address="newuser@dropboxsign.com", + ) try: - # Create Account - api_response = api_instance.account_create(account_create_request) - print("The response of AccountApi->account_create:\n") - pprint(api_response) + response = account_api.account_create(data) + pprint(response) except ApiException as e: - print("Exception when calling AccountApi->account_create: %s\n" % e) + print("Exception when calling Dropbox Sign API: %s\n" % e) ``` + ## Documentation for API Endpoints All URIs are relative to *https://api.hellosign.com/v3* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*AccountApi* | [**account_create**](docs/AccountApi.md#account_create) | **POST** /account/create | Create Account -*AccountApi* | [**account_get**](docs/AccountApi.md#account_get) | **GET** /account | Get Account -*AccountApi* | [**account_update**](docs/AccountApi.md#account_update) | **PUT** /account | Update Account -*AccountApi* | [**account_verify**](docs/AccountApi.md#account_verify) | **POST** /account/verify | Verify Account -*ApiAppApi* | [**api_app_create**](docs/ApiAppApi.md#api_app_create) | **POST** /api_app | Create API App -*ApiAppApi* | [**api_app_delete**](docs/ApiAppApi.md#api_app_delete) | **DELETE** /api_app/{client_id} | Delete API App -*ApiAppApi* | [**api_app_get**](docs/ApiAppApi.md#api_app_get) | **GET** /api_app/{client_id} | Get API App -*ApiAppApi* | [**api_app_list**](docs/ApiAppApi.md#api_app_list) | **GET** /api_app/list | List API Apps -*ApiAppApi* | [**api_app_update**](docs/ApiAppApi.md#api_app_update) | **PUT** /api_app/{client_id} | Update API App -*BulkSendJobApi* | [**bulk_send_job_get**](docs/BulkSendJobApi.md#bulk_send_job_get) | **GET** /bulk_send_job/{bulk_send_job_id} | Get Bulk Send Job -*BulkSendJobApi* | [**bulk_send_job_list**](docs/BulkSendJobApi.md#bulk_send_job_list) | **GET** /bulk_send_job/list | List Bulk Send Jobs -*EmbeddedApi* | [**embedded_edit_url**](docs/EmbeddedApi.md#embedded_edit_url) | **POST** /embedded/edit_url/{template_id} | Get Embedded Template Edit URL -*EmbeddedApi* | [**embedded_sign_url**](docs/EmbeddedApi.md#embedded_sign_url) | **GET** /embedded/sign_url/{signature_id} | Get Embedded Sign URL -*FaxLineApi* | [**fax_line_add_user**](docs/FaxLineApi.md#fax_line_add_user) | **PUT** /fax_line/add_user | Add Fax Line User -*FaxLineApi* | [**fax_line_area_code_get**](docs/FaxLineApi.md#fax_line_area_code_get) | **GET** /fax_line/area_codes | Get Available Fax Line Area Codes -*FaxLineApi* | [**fax_line_create**](docs/FaxLineApi.md#fax_line_create) | **POST** /fax_line/create | Purchase Fax Line -*FaxLineApi* | [**fax_line_delete**](docs/FaxLineApi.md#fax_line_delete) | **DELETE** /fax_line | Delete Fax Line -*FaxLineApi* | [**fax_line_get**](docs/FaxLineApi.md#fax_line_get) | **GET** /fax_line | Get Fax Line -*FaxLineApi* | [**fax_line_list**](docs/FaxLineApi.md#fax_line_list) | **GET** /fax_line/list | List Fax Lines -*FaxLineApi* | [**fax_line_remove_user**](docs/FaxLineApi.md#fax_line_remove_user) | **PUT** /fax_line/remove_user | Remove Fax Line Access -*OAuthApi* | [**oauth_token_generate**](docs/OAuthApi.md#oauth_token_generate) | **POST** /oauth/token | OAuth Token Generate -*OAuthApi* | [**oauth_token_refresh**](docs/OAuthApi.md#oauth_token_refresh) | **POST** /oauth/token?refresh | OAuth Token Refresh -*ReportApi* | [**report_create**](docs/ReportApi.md#report_create) | **POST** /report/create | Create Report -*SignatureRequestApi* | [**signature_request_bulk_create_embedded_with_template**](docs/SignatureRequestApi.md#signature_request_bulk_create_embedded_with_template) | **POST** /signature_request/bulk_create_embedded_with_template | Embedded Bulk Send with Template -*SignatureRequestApi* | [**signature_request_bulk_send_with_template**](docs/SignatureRequestApi.md#signature_request_bulk_send_with_template) | **POST** /signature_request/bulk_send_with_template | Bulk Send with Template -*SignatureRequestApi* | [**signature_request_cancel**](docs/SignatureRequestApi.md#signature_request_cancel) | **POST** /signature_request/cancel/{signature_request_id} | Cancel Incomplete Signature Request -*SignatureRequestApi* | [**signature_request_create_embedded**](docs/SignatureRequestApi.md#signature_request_create_embedded) | **POST** /signature_request/create_embedded | Create Embedded Signature Request -*SignatureRequestApi* | [**signature_request_create_embedded_with_template**](docs/SignatureRequestApi.md#signature_request_create_embedded_with_template) | **POST** /signature_request/create_embedded_with_template | Create Embedded Signature Request with Template -*SignatureRequestApi* | [**signature_request_files**](docs/SignatureRequestApi.md#signature_request_files) | **GET** /signature_request/files/{signature_request_id} | Download Files -*SignatureRequestApi* | [**signature_request_files_as_data_uri**](docs/SignatureRequestApi.md#signature_request_files_as_data_uri) | **GET** /signature_request/files_as_data_uri/{signature_request_id} | Download Files as Data Uri -*SignatureRequestApi* | [**signature_request_files_as_file_url**](docs/SignatureRequestApi.md#signature_request_files_as_file_url) | **GET** /signature_request/files_as_file_url/{signature_request_id} | Download Files as File Url -*SignatureRequestApi* | [**signature_request_get**](docs/SignatureRequestApi.md#signature_request_get) | **GET** /signature_request/{signature_request_id} | Get Signature Request -*SignatureRequestApi* | [**signature_request_list**](docs/SignatureRequestApi.md#signature_request_list) | **GET** /signature_request/list | List Signature Requests -*SignatureRequestApi* | [**signature_request_release_hold**](docs/SignatureRequestApi.md#signature_request_release_hold) | **POST** /signature_request/release_hold/{signature_request_id} | Release On-Hold Signature Request -*SignatureRequestApi* | [**signature_request_remind**](docs/SignatureRequestApi.md#signature_request_remind) | **POST** /signature_request/remind/{signature_request_id} | Send Request Reminder -*SignatureRequestApi* | [**signature_request_remove**](docs/SignatureRequestApi.md#signature_request_remove) | **POST** /signature_request/remove/{signature_request_id} | Remove Signature Request Access -*SignatureRequestApi* | [**signature_request_send**](docs/SignatureRequestApi.md#signature_request_send) | **POST** /signature_request/send | Send Signature Request -*SignatureRequestApi* | [**signature_request_send_with_template**](docs/SignatureRequestApi.md#signature_request_send_with_template) | **POST** /signature_request/send_with_template | Send with Template -*SignatureRequestApi* | [**signature_request_update**](docs/SignatureRequestApi.md#signature_request_update) | **POST** /signature_request/update/{signature_request_id} | Update Signature Request -*TeamApi* | [**team_add_member**](docs/TeamApi.md#team_add_member) | **PUT** /team/add_member | Add User to Team -*TeamApi* | [**team_create**](docs/TeamApi.md#team_create) | **POST** /team/create | Create Team -*TeamApi* | [**team_delete**](docs/TeamApi.md#team_delete) | **DELETE** /team/destroy | Delete Team -*TeamApi* | [**team_get**](docs/TeamApi.md#team_get) | **GET** /team | Get Team -*TeamApi* | [**team_info**](docs/TeamApi.md#team_info) | **GET** /team/info | Get Team Info -*TeamApi* | [**team_invites**](docs/TeamApi.md#team_invites) | **GET** /team/invites | List Team Invites -*TeamApi* | [**team_members**](docs/TeamApi.md#team_members) | **GET** /team/members/{team_id} | List Team Members -*TeamApi* | [**team_remove_member**](docs/TeamApi.md#team_remove_member) | **POST** /team/remove_member | Remove User from Team -*TeamApi* | [**team_sub_teams**](docs/TeamApi.md#team_sub_teams) | **GET** /team/sub_teams/{team_id} | List Sub Teams -*TeamApi* | [**team_update**](docs/TeamApi.md#team_update) | **PUT** /team | Update Team -*TemplateApi* | [**template_add_user**](docs/TemplateApi.md#template_add_user) | **POST** /template/add_user/{template_id} | Add User to Template -*TemplateApi* | [**template_create**](docs/TemplateApi.md#template_create) | **POST** /template/create | Create Template -*TemplateApi* | [**template_create_embedded_draft**](docs/TemplateApi.md#template_create_embedded_draft) | **POST** /template/create_embedded_draft | Create Embedded Template Draft -*TemplateApi* | [**template_delete**](docs/TemplateApi.md#template_delete) | **POST** /template/delete/{template_id} | Delete Template -*TemplateApi* | [**template_files**](docs/TemplateApi.md#template_files) | **GET** /template/files/{template_id} | Get Template Files -*TemplateApi* | [**template_files_as_data_uri**](docs/TemplateApi.md#template_files_as_data_uri) | **GET** /template/files_as_data_uri/{template_id} | Get Template Files as Data Uri -*TemplateApi* | [**template_files_as_file_url**](docs/TemplateApi.md#template_files_as_file_url) | **GET** /template/files_as_file_url/{template_id} | Get Template Files as File Url -*TemplateApi* | [**template_get**](docs/TemplateApi.md#template_get) | **GET** /template/{template_id} | Get Template -*TemplateApi* | [**template_list**](docs/TemplateApi.md#template_list) | **GET** /template/list | List Templates -*TemplateApi* | [**template_remove_user**](docs/TemplateApi.md#template_remove_user) | **POST** /template/remove_user/{template_id} | Remove User from Template -*TemplateApi* | [**template_update_files**](docs/TemplateApi.md#template_update_files) | **POST** /template/update_files/{template_id} | Update Template Files -*UnclaimedDraftApi* | [**unclaimed_draft_create**](docs/UnclaimedDraftApi.md#unclaimed_draft_create) | **POST** /unclaimed_draft/create | Create Unclaimed Draft -*UnclaimedDraftApi* | [**unclaimed_draft_create_embedded**](docs/UnclaimedDraftApi.md#unclaimed_draft_create_embedded) | **POST** /unclaimed_draft/create_embedded | Create Embedded Unclaimed Draft -*UnclaimedDraftApi* | [**unclaimed_draft_create_embedded_with_template**](docs/UnclaimedDraftApi.md#unclaimed_draft_create_embedded_with_template) | **POST** /unclaimed_draft/create_embedded_with_template | Create Embedded Unclaimed Draft with Template -*UnclaimedDraftApi* | [**unclaimed_draft_edit_and_resend**](docs/UnclaimedDraftApi.md#unclaimed_draft_edit_and_resend) | **POST** /unclaimed_draft/edit_and_resend/{signature_request_id} | Edit and Resend Unclaimed Draft +|```AccountApi``` | [```account_create```](docs/AccountApi.md#account_create) | ```POST /account/create``` | Create Account| +```AccountApi``` | [```account_get```](docs/AccountApi.md#account_get) | ```GET /account``` | Get Account| +```AccountApi``` | [```account_update```](docs/AccountApi.md#account_update) | ```PUT /account``` | Update Account| +```AccountApi``` | [```account_verify```](docs/AccountApi.md#account_verify) | ```POST /account/verify``` | Verify Account| +|```ApiAppApi``` | [```api_app_create```](docs/ApiAppApi.md#api_app_create) | ```POST /api_app``` | Create API App| +```ApiAppApi``` | [```api_app_delete```](docs/ApiAppApi.md#api_app_delete) | ```DELETE /api_app/{client_id}``` | Delete API App| +```ApiAppApi``` | [```api_app_get```](docs/ApiAppApi.md#api_app_get) | ```GET /api_app/{client_id}``` | Get API App| +```ApiAppApi``` | [```api_app_list```](docs/ApiAppApi.md#api_app_list) | ```GET /api_app/list``` | List API Apps| +```ApiAppApi``` | [```api_app_update```](docs/ApiAppApi.md#api_app_update) | ```PUT /api_app/{client_id}``` | Update API App| +|```BulkSendJobApi``` | [```bulk_send_job_get```](docs/BulkSendJobApi.md#bulk_send_job_get) | ```GET /bulk_send_job/{bulk_send_job_id}``` | Get Bulk Send Job| +```BulkSendJobApi``` | [```bulk_send_job_list```](docs/BulkSendJobApi.md#bulk_send_job_list) | ```GET /bulk_send_job/list``` | List Bulk Send Jobs| +|```EmbeddedApi``` | [```embedded_edit_url```](docs/EmbeddedApi.md#embedded_edit_url) | ```POST /embedded/edit_url/{template_id}``` | Get Embedded Template Edit URL| +```EmbeddedApi``` | [```embedded_sign_url```](docs/EmbeddedApi.md#embedded_sign_url) | ```GET /embedded/sign_url/{signature_id}``` | Get Embedded Sign URL| +|```FaxLineApi``` | [```fax_line_add_user```](docs/FaxLineApi.md#fax_line_add_user) | ```PUT /fax_line/add_user``` | Add Fax Line User| +```FaxLineApi``` | [```fax_line_area_code_get```](docs/FaxLineApi.md#fax_line_area_code_get) | ```GET /fax_line/area_codes``` | Get Available Fax Line Area Codes| +```FaxLineApi``` | [```fax_line_create```](docs/FaxLineApi.md#fax_line_create) | ```POST /fax_line/create``` | Purchase Fax Line| +```FaxLineApi``` | [```fax_line_delete```](docs/FaxLineApi.md#fax_line_delete) | ```DELETE /fax_line``` | Delete Fax Line| +```FaxLineApi``` | [```fax_line_get```](docs/FaxLineApi.md#fax_line_get) | ```GET /fax_line``` | Get Fax Line| +```FaxLineApi``` | [```fax_line_list```](docs/FaxLineApi.md#fax_line_list) | ```GET /fax_line/list``` | List Fax Lines| +```FaxLineApi``` | [```fax_line_remove_user```](docs/FaxLineApi.md#fax_line_remove_user) | ```PUT /fax_line/remove_user``` | Remove Fax Line Access| +|```OAuthApi``` | [```oauth_token_generate```](docs/OAuthApi.md#oauth_token_generate) | ```POST /oauth/token``` | OAuth Token Generate| +```OAuthApi``` | [```oauth_token_refresh```](docs/OAuthApi.md#oauth_token_refresh) | ```POST /oauth/token?refresh``` | OAuth Token Refresh| +|```ReportApi``` | [```report_create```](docs/ReportApi.md#report_create) | ```POST /report/create``` | Create Report| +|```SignatureRequestApi``` | [```signature_request_bulk_create_embedded_with_template```](docs/SignatureRequestApi.md#signature_request_bulk_create_embedded_with_template) | ```POST /signature_request/bulk_create_embedded_with_template``` | Embedded Bulk Send with Template| +```SignatureRequestApi``` | [```signature_request_bulk_send_with_template```](docs/SignatureRequestApi.md#signature_request_bulk_send_with_template) | ```POST /signature_request/bulk_send_with_template``` | Bulk Send with Template| +```SignatureRequestApi``` | [```signature_request_cancel```](docs/SignatureRequestApi.md#signature_request_cancel) | ```POST /signature_request/cancel/{signature_request_id}``` | Cancel Incomplete Signature Request| +```SignatureRequestApi``` | [```signature_request_create_embedded```](docs/SignatureRequestApi.md#signature_request_create_embedded) | ```POST /signature_request/create_embedded``` | Create Embedded Signature Request| +```SignatureRequestApi``` | [```signature_request_create_embedded_with_template```](docs/SignatureRequestApi.md#signature_request_create_embedded_with_template) | ```POST /signature_request/create_embedded_with_template``` | Create Embedded Signature Request with Template| +```SignatureRequestApi``` | [```signature_request_files```](docs/SignatureRequestApi.md#signature_request_files) | ```GET /signature_request/files/{signature_request_id}``` | Download Files| +```SignatureRequestApi``` | [```signature_request_files_as_data_uri```](docs/SignatureRequestApi.md#signature_request_files_as_data_uri) | ```GET /signature_request/files_as_data_uri/{signature_request_id}``` | Download Files as Data Uri| +```SignatureRequestApi``` | [```signature_request_files_as_file_url```](docs/SignatureRequestApi.md#signature_request_files_as_file_url) | ```GET /signature_request/files_as_file_url/{signature_request_id}``` | Download Files as File Url| +```SignatureRequestApi``` | [```signature_request_get```](docs/SignatureRequestApi.md#signature_request_get) | ```GET /signature_request/{signature_request_id}``` | Get Signature Request| +```SignatureRequestApi``` | [```signature_request_list```](docs/SignatureRequestApi.md#signature_request_list) | ```GET /signature_request/list``` | List Signature Requests| +```SignatureRequestApi``` | [```signature_request_release_hold```](docs/SignatureRequestApi.md#signature_request_release_hold) | ```POST /signature_request/release_hold/{signature_request_id}``` | Release On-Hold Signature Request| +```SignatureRequestApi``` | [```signature_request_remind```](docs/SignatureRequestApi.md#signature_request_remind) | ```POST /signature_request/remind/{signature_request_id}``` | Send Request Reminder| +```SignatureRequestApi``` | [```signature_request_remove```](docs/SignatureRequestApi.md#signature_request_remove) | ```POST /signature_request/remove/{signature_request_id}``` | Remove Signature Request Access| +```SignatureRequestApi``` | [```signature_request_send```](docs/SignatureRequestApi.md#signature_request_send) | ```POST /signature_request/send``` | Send Signature Request| +```SignatureRequestApi``` | [```signature_request_send_with_template```](docs/SignatureRequestApi.md#signature_request_send_with_template) | ```POST /signature_request/send_with_template``` | Send with Template| +```SignatureRequestApi``` | [```signature_request_update```](docs/SignatureRequestApi.md#signature_request_update) | ```POST /signature_request/update/{signature_request_id}``` | Update Signature Request| +|```TeamApi``` | [```team_add_member```](docs/TeamApi.md#team_add_member) | ```PUT /team/add_member``` | Add User to Team| +```TeamApi``` | [```team_create```](docs/TeamApi.md#team_create) | ```POST /team/create``` | Create Team| +```TeamApi``` | [```team_delete```](docs/TeamApi.md#team_delete) | ```DELETE /team/destroy``` | Delete Team| +```TeamApi``` | [```team_get```](docs/TeamApi.md#team_get) | ```GET /team``` | Get Team| +```TeamApi``` | [```team_info```](docs/TeamApi.md#team_info) | ```GET /team/info``` | Get Team Info| +```TeamApi``` | [```team_invites```](docs/TeamApi.md#team_invites) | ```GET /team/invites``` | List Team Invites| +```TeamApi``` | [```team_members```](docs/TeamApi.md#team_members) | ```GET /team/members/{team_id}``` | List Team Members| +```TeamApi``` | [```team_remove_member```](docs/TeamApi.md#team_remove_member) | ```POST /team/remove_member``` | Remove User from Team| +```TeamApi``` | [```team_sub_teams```](docs/TeamApi.md#team_sub_teams) | ```GET /team/sub_teams/{team_id}``` | List Sub Teams| +```TeamApi``` | [```team_update```](docs/TeamApi.md#team_update) | ```PUT /team``` | Update Team| +|```TemplateApi``` | [```template_add_user```](docs/TemplateApi.md#template_add_user) | ```POST /template/add_user/{template_id}``` | Add User to Template| +```TemplateApi``` | [```template_create```](docs/TemplateApi.md#template_create) | ```POST /template/create``` | Create Template| +```TemplateApi``` | [```template_create_embedded_draft```](docs/TemplateApi.md#template_create_embedded_draft) | ```POST /template/create_embedded_draft``` | Create Embedded Template Draft| +```TemplateApi``` | [```template_delete```](docs/TemplateApi.md#template_delete) | ```POST /template/delete/{template_id}``` | Delete Template| +```TemplateApi``` | [```template_files```](docs/TemplateApi.md#template_files) | ```GET /template/files/{template_id}``` | Get Template Files| +```TemplateApi``` | [```template_files_as_data_uri```](docs/TemplateApi.md#template_files_as_data_uri) | ```GET /template/files_as_data_uri/{template_id}``` | Get Template Files as Data Uri| +```TemplateApi``` | [```template_files_as_file_url```](docs/TemplateApi.md#template_files_as_file_url) | ```GET /template/files_as_file_url/{template_id}``` | Get Template Files as File Url| +```TemplateApi``` | [```template_get```](docs/TemplateApi.md#template_get) | ```GET /template/{template_id}``` | Get Template| +```TemplateApi``` | [```template_list```](docs/TemplateApi.md#template_list) | ```GET /template/list``` | List Templates| +```TemplateApi``` | [```template_remove_user```](docs/TemplateApi.md#template_remove_user) | ```POST /template/remove_user/{template_id}``` | Remove User from Template| +```TemplateApi``` | [```template_update_files```](docs/TemplateApi.md#template_update_files) | ```POST /template/update_files/{template_id}``` | Update Template Files| +|```UnclaimedDraftApi``` | [```unclaimed_draft_create```](docs/UnclaimedDraftApi.md#unclaimed_draft_create) | ```POST /unclaimed_draft/create``` | Create Unclaimed Draft| +```UnclaimedDraftApi``` | [```unclaimed_draft_create_embedded```](docs/UnclaimedDraftApi.md#unclaimed_draft_create_embedded) | ```POST /unclaimed_draft/create_embedded``` | Create Embedded Unclaimed Draft| +```UnclaimedDraftApi``` | [```unclaimed_draft_create_embedded_with_template```](docs/UnclaimedDraftApi.md#unclaimed_draft_create_embedded_with_template) | ```POST /unclaimed_draft/create_embedded_with_template``` | Create Embedded Unclaimed Draft with Template| +```UnclaimedDraftApi``` | [```unclaimed_draft_edit_and_resend```](docs/UnclaimedDraftApi.md#unclaimed_draft_edit_and_resend) | ```POST /unclaimed_draft/edit_and_resend/{signature_request_id}``` | Edit and Resend Unclaimed Draft| ## Documentation For Models @@ -374,3 +378,11 @@ Authentication schemes defined for the API: apisupport@hellosign.com +## About this package + +This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: + +- API version: 3.0.0 +- Package version: 2.0-dev +- Build package: org.openapitools.codegen.languages.PythonClientCodegen + diff --git a/sdks/python/bin/replace b/sdks/python/bin/replace index 592c6028c..a9ebab9a7 100755 --- a/sdks/python/bin/replace +++ b/sdks/python/bin/replace @@ -9,6 +9,7 @@ rep () { SEARCH_STRING=$1 REPLACE_STRING=$2 SCAN_DIRS=( \ + "docs" \ "dropbox_sign/models" \ ) diff --git a/sdks/python/bin/scan_for b/sdks/python/bin/scan_for index d98afe8af..cb16e0a01 100755 --- a/sdks/python/bin/scan_for +++ b/sdks/python/bin/scan_for @@ -9,7 +9,6 @@ scan_for () { SEARCH_STRING=$1 SCAN_TARGETS=( \ "docs" \ - "dropbox_sign/model" \ "dropbox_sign/models" \ "README.md" ) diff --git a/sdks/python/docs/AccountApi.md b/sdks/python/docs/AccountApi.md index 28e096f05..77358441b 100644 --- a/sdks/python/docs/AccountApi.md +++ b/sdks/python/docs/AccountApi.md @@ -23,7 +23,32 @@ Creates a new Dropbox Sign Account that is associated with the specified `email_ * Bearer (JWT) Authentication (oauth2): ```python -REPLACE_ME_WITH_EXAMPLE_FOR__account_create_Python_CODE +from pprint import pprint + +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", +) + +with ApiClient(configuration) as api_client: + account_api = apis.AccountApi(api_client) + + data = models.AccountCreateRequest( + email_address="newuser@dropboxsign.com", + ) + + try: + response = account_api.account_create(data) + pprint(response) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + ``` ``` @@ -67,15 +92,36 @@ Returns the properties and settings of your Account. * Bearer (JWT) Authentication (oauth2): ```python -REPLACE_ME_WITH_EXAMPLE_FOR__account_get_Python_CODE +from pprint import pprint + +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", +) + +with ApiClient(configuration) as api_client: + account_api = apis.AccountApi(api_client) + + try: + response = account_api.account_get(email_address="jack@example.com") + pprint(response) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + ``` ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| `account_id` | **str** | `account_id` or `email_address` is required. If both are provided, the account id prevails. The ID of the Account. | [optional] | -| `email_address` | **str** | `account_id` or `email_address` is required, If both are provided, the account id prevails. The email address of the Account. | [optional] | +| `account_id` | **str** | `account_id` or `email_address` is required. If both are provided, the account id prevails. The ID of the Account. | [optional] | +| `email_address` | **str** | `account_id` or `email_address` is required, If both are provided, the account id prevails. The email address of the Account. | [optional] | ### Return type @@ -112,7 +158,32 @@ Updates the properties and settings of your Account. Currently only allows for u * Bearer (JWT) Authentication (oauth2): ```python -REPLACE_ME_WITH_EXAMPLE_FOR__account_update_Python_CODE +from pprint import pprint + +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", +) + +with ApiClient(configuration) as api_client: + account_api = apis.AccountApi(api_client) + + data = models.AccountUpdateRequest( + callback_url="https://www.example.com/callback", + ) + + try: + response = account_api.account_update(data) + pprint(response) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + ``` ``` @@ -156,7 +227,32 @@ Verifies whether an Dropbox Sign Account exists for the given email address. * Bearer (JWT) Authentication (oauth2): ```python -REPLACE_ME_WITH_EXAMPLE_FOR__account_verify_Python_CODE +from pprint import pprint + +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", +) + +with ApiClient(configuration) as api_client: + account_api = apis.AccountApi(api_client) + + data = models.AccountVerifyRequest( + email_address="some_user@dropboxsign.com", + ) + + try: + response = account_api.account_verify(data) + pprint(response) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + ``` ``` diff --git a/sdks/python/docs/AccountCreateRequest.md b/sdks/python/docs/AccountCreateRequest.md index 5d5631c45..a804661a3 100644 --- a/sdks/python/docs/AccountCreateRequest.md +++ b/sdks/python/docs/AccountCreateRequest.md @@ -5,14 +5,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `email_address`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The email address which will be associated with the new Account. REPLACE_ME_WITH_DESCRIPTION_END | | -| `client_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Used when creating a new account with OAuth authorization. - -See [OAuth 2.0 Authorization](https://app.hellosign.com/api/oauthWalkthrough#OAuthAuthorization) REPLACE_ME_WITH_DESCRIPTION_END | | -| `client_secret` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Used when creating a new account with OAuth authorization. - -See [OAuth 2.0 Authorization](https://app.hellosign.com/api/oauthWalkthrough#OAuthAuthorization) REPLACE_ME_WITH_DESCRIPTION_END | | -| `locale` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `email_address`*_required_ | ```str``` | The email address which will be associated with the new Account. | | +| `client_id` | ```str``` | Used when creating a new account with OAuth authorization.

See [OAuth 2.0 Authorization](https://app.hellosign.com/api/oauthWalkthrough#OAuthAuthorization) | | +| `client_secret` | ```str``` | Used when creating a new account with OAuth authorization.

See [OAuth 2.0 Authorization](https://app.hellosign.com/api/oauthWalkthrough#OAuthAuthorization) | | +| `locale` | ```str``` | 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. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/AccountCreateResponse.md b/sdks/python/docs/AccountCreateResponse.md index 3bd969b08..78ce1c511 100644 --- a/sdks/python/docs/AccountCreateResponse.md +++ b/sdks/python/docs/AccountCreateResponse.md @@ -5,9 +5,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `account` | [```AccountResponse```](AccountResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `oauth_data` | [```OAuthTokenResponse```](OAuthTokenResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN A list of warnings. REPLACE_ME_WITH_DESCRIPTION_END | | +| `account` | [```AccountResponse```](AccountResponse.md) | | | +| `oauth_data` | [```OAuthTokenResponse```](OAuthTokenResponse.md) | | | +| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | A list of warnings. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/AccountGetResponse.md b/sdks/python/docs/AccountGetResponse.md index c4dfdfa26..84fe11199 100644 --- a/sdks/python/docs/AccountGetResponse.md +++ b/sdks/python/docs/AccountGetResponse.md @@ -5,8 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `account` | [```AccountResponse```](AccountResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN A list of warnings. REPLACE_ME_WITH_DESCRIPTION_END | | +| `account` | [```AccountResponse```](AccountResponse.md) | | | +| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | A list of warnings. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/AccountResponse.md b/sdks/python/docs/AccountResponse.md index 327736f59..26ce76bd1 100644 --- a/sdks/python/docs/AccountResponse.md +++ b/sdks/python/docs/AccountResponse.md @@ -5,17 +5,17 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `account_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The ID of the Account REPLACE_ME_WITH_DESCRIPTION_END | | -| `email_address` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The email address associated with the Account. REPLACE_ME_WITH_DESCRIPTION_END | | -| `is_locked` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Returns `true` if the user has been locked out of their account by a team admin. REPLACE_ME_WITH_DESCRIPTION_END | | -| `is_paid_hs` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Returns `true` if the user has a paid Dropbox Sign account. REPLACE_ME_WITH_DESCRIPTION_END | | -| `is_paid_hf` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Returns `true` if the user has a paid HelloFax account. REPLACE_ME_WITH_DESCRIPTION_END | | -| `quotas` | [```AccountResponseQuotas```](AccountResponseQuotas.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `callback_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The URL that Dropbox Sign events will `POST` to. REPLACE_ME_WITH_DESCRIPTION_END | | -| `role_code` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The membership role for the team. REPLACE_ME_WITH_DESCRIPTION_END | | -| `team_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The id of the team account belongs to. REPLACE_ME_WITH_DESCRIPTION_END | | -| `locale` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | -| `usage` | [```AccountResponseUsage```](AccountResponseUsage.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `account_id` | ```str``` | The ID of the Account | | +| `email_address` | ```str``` | The email address associated with the Account. | | +| `is_locked` | ```bool``` | Returns `true` if the user has been locked out of their account by a team admin. | | +| `is_paid_hs` | ```bool``` | Returns `true` if the user has a paid Dropbox Sign account. | | +| `is_paid_hf` | ```bool``` | Returns `true` if the user has a paid HelloFax account. | | +| `quotas` | [```AccountResponseQuotas```](AccountResponseQuotas.md) | | | +| `callback_url` | ```str``` | The URL that Dropbox Sign events will `POST` to. | | +| `role_code` | ```str``` | The membership role for the team. | | +| `team_id` | ```str``` | The id of the team account belongs to. | | +| `locale` | ```str``` | 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` | [```AccountResponseUsage```](AccountResponseUsage.md) | | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/AccountResponseQuotas.md b/sdks/python/docs/AccountResponseQuotas.md index 8df9d628f..740ad2357 100644 --- a/sdks/python/docs/AccountResponseQuotas.md +++ b/sdks/python/docs/AccountResponseQuotas.md @@ -5,12 +5,12 @@ Details concerning remaining monthly quotas. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `api_signature_requests_left` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN API signature requests remaining. REPLACE_ME_WITH_DESCRIPTION_END | | -| `documents_left` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Signature requests remaining. REPLACE_ME_WITH_DESCRIPTION_END | | -| `templates_total` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Total API templates allowed. REPLACE_ME_WITH_DESCRIPTION_END | | -| `templates_left` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN API templates remaining. REPLACE_ME_WITH_DESCRIPTION_END | | -| `sms_verifications_left` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN SMS verifications remaining. REPLACE_ME_WITH_DESCRIPTION_END | | -| `num_fax_pages_left` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Number of fax pages left REPLACE_ME_WITH_DESCRIPTION_END | | +| `api_signature_requests_left` | ```int``` | API signature requests remaining. | | +| `documents_left` | ```int``` | Signature requests remaining. | | +| `templates_total` | ```int``` | Total API templates allowed. | | +| `templates_left` | ```int``` | API templates remaining. | | +| `sms_verifications_left` | ```int``` | SMS verifications remaining. | | +| `num_fax_pages_left` | ```int``` | Number of fax pages left | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/AccountResponseUsage.md b/sdks/python/docs/AccountResponseUsage.md index ee678547c..dd99429af 100644 --- a/sdks/python/docs/AccountResponseUsage.md +++ b/sdks/python/docs/AccountResponseUsage.md @@ -5,7 +5,7 @@ Details concerning monthly usage ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `fax_pages_sent` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Number of fax pages sent REPLACE_ME_WITH_DESCRIPTION_END | | +| `fax_pages_sent` | ```int``` | Number of fax pages sent | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/AccountUpdateRequest.md b/sdks/python/docs/AccountUpdateRequest.md index 87f98cb40..5ef47ebd9 100644 --- a/sdks/python/docs/AccountUpdateRequest.md +++ b/sdks/python/docs/AccountUpdateRequest.md @@ -5,9 +5,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `account_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The ID of the Account REPLACE_ME_WITH_DESCRIPTION_END | | -| `callback_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The URL that Dropbox Sign should POST events to. REPLACE_ME_WITH_DESCRIPTION_END | | -| `locale` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `account_id` | ```str``` | The ID of the Account | | +| `callback_url` | ```str``` | The URL that Dropbox Sign should POST events to. | | +| `locale` | ```str``` | 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. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/AccountVerifyRequest.md b/sdks/python/docs/AccountVerifyRequest.md index 4e10f4627..9dc6f46d5 100644 --- a/sdks/python/docs/AccountVerifyRequest.md +++ b/sdks/python/docs/AccountVerifyRequest.md @@ -5,7 +5,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `email_address`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Email address to run the verification for. REPLACE_ME_WITH_DESCRIPTION_END | | +| `email_address`*_required_ | ```str``` | Email address to run the verification for. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/AccountVerifyResponse.md b/sdks/python/docs/AccountVerifyResponse.md index 2fa0d81d6..2f0c5416b 100644 --- a/sdks/python/docs/AccountVerifyResponse.md +++ b/sdks/python/docs/AccountVerifyResponse.md @@ -5,8 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `account` | [```AccountVerifyResponseAccount```](AccountVerifyResponseAccount.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN A list of warnings. REPLACE_ME_WITH_DESCRIPTION_END | | +| `account` | [```AccountVerifyResponseAccount```](AccountVerifyResponseAccount.md) | | | +| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | A list of warnings. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/AccountVerifyResponseAccount.md b/sdks/python/docs/AccountVerifyResponseAccount.md index bc636007d..9c4abee31 100644 --- a/sdks/python/docs/AccountVerifyResponseAccount.md +++ b/sdks/python/docs/AccountVerifyResponseAccount.md @@ -5,7 +5,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `email_address` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The email address associated with the Account. REPLACE_ME_WITH_DESCRIPTION_END | | +| `email_address` | ```str``` | The email address associated with the Account. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/ApiAppApi.md b/sdks/python/docs/ApiAppApi.md index 208038d8f..024551288 100644 --- a/sdks/python/docs/ApiAppApi.md +++ b/sdks/python/docs/ApiAppApi.md @@ -24,7 +24,48 @@ Creates a new API App. * Bearer (JWT) Authentication (oauth2): ```python -REPLACE_ME_WITH_EXAMPLE_FOR__api_app_create_Python_CODE +from pprint import pprint + +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", +) + +with ApiClient(configuration) as api_client: + api_app_api = apis.ApiAppApi(api_client) + + oauth = models.SubOAuth( + callback_url="https://example.com/oauth", + scopes=["basic_account_info" "request_signature"], + ) + + white_labeling_options = models.SubWhiteLabelingOptions( + primary_button_color="#00b3e6", + primary_button_text_color="#ffffff", + ) + + custom_logo_file = open('./CustomLogoFile.png', 'rb') + + data = models.ApiAppCreateRequest( + name="My Production App", + domains=["example.com"], + oauth=oauth, + white_labeling_options=white_labeling_options, + custom_logo_file=custom_logo_file, + ) + + try: + response = api_app_api.api_app_create(data) + pprint(response) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + ``` ``` @@ -68,7 +109,27 @@ Deletes an API App. Can only be invoked for apps you own. * Bearer (JWT) Authentication (oauth2): ```python -REPLACE_ME_WITH_EXAMPLE_FOR__api_app_delete_Python_CODE +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", +) + +with ApiClient(configuration) as api_client: + api_app_api = apis.ApiAppApi(api_client) + + client_id = "0dd3b823a682527788c4e40cb7b6f7e9" + + try: + api_app_api.api_app_delete(client_id) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + ``` ``` @@ -112,7 +173,30 @@ Returns an object with information about an API App. * Bearer (JWT) Authentication (oauth2): ```python -REPLACE_ME_WITH_EXAMPLE_FOR__api_app_get_Python_CODE +from pprint import pprint + +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", +) + +with ApiClient(configuration) as api_client: + api_app_api = apis.ApiAppApi(api_client) + + client_id = "0dd3b823a682527788c4e40cb7b6f7e9" + + try: + response = api_app_api.api_app_get(client_id) + pprint(response) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + ``` ``` @@ -156,15 +240,42 @@ Returns a list of API Apps that are accessible by you. If you are on a team with * Bearer (JWT) Authentication (oauth2): ```python -REPLACE_ME_WITH_EXAMPLE_FOR__api_app_list_Python_CODE +from pprint import pprint + +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", +) + +with ApiClient(configuration) as api_client: + api_app_api = apis.ApiAppApi(api_client) + + page = 1 + page_size = 2 + + try: + response = api_app_api.api_app_list( + page=page, + page_size=page_size, + ) + pprint(response) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + ``` ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| `page` | **int** | Which page number of the API App List to return. Defaults to `1`. | [optional][default to 1] | -| `page_size` | **int** | Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. | [optional][default to 20] | +| `page` | **int** | Which page number of the API App List to return. Defaults to `1`. | [optional][default to 1] | +| `page_size` | **int** | Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. | [optional][default to 20] | ### Return type @@ -201,7 +312,44 @@ Updates an existing API App. Can only be invoked for apps you own. Only the fiel * Bearer (JWT) Authentication (oauth2): ```python -REPLACE_ME_WITH_EXAMPLE_FOR__api_app_update_Python_CODE +from pprint import pprint + +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", +) + +with ApiClient(configuration) as api_client: + api_app_api = apis.ApiAppApi(api_client) + + white_labeling_options = models.SubWhiteLabelingOptions( + primary_button_color="#00b3e6", + primary_button_text_color="#ffffff", + ) + + custom_logo_file = open('./CustomLogoFile.png', 'rb') + + data = models.ApiAppUpdateRequest( + name="New Name", + callback_url="http://example.com/dropboxsign", + white_labeling_options=white_labeling_options, + custom_logo_file=custom_logo_file, + ) + + client_id = "0dd3b823a682527788c4e40cb7b6f7e9" + + try: + response = api_app_api.api_app_update(client_id, data) + pprint(response) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + ``` ``` diff --git a/sdks/python/docs/ApiAppCreateRequest.md b/sdks/python/docs/ApiAppCreateRequest.md index e1fde1ee1..9cac62afc 100644 --- a/sdks/python/docs/ApiAppCreateRequest.md +++ b/sdks/python/docs/ApiAppCreateRequest.md @@ -5,13 +5,13 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `domains`*_required_ | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The domain names the ApiApp will be associated with. REPLACE_ME_WITH_DESCRIPTION_END | | -| `name`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The name you want to assign to the ApiApp. REPLACE_ME_WITH_DESCRIPTION_END | | -| `callback_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The URL at which the ApiApp should receive event callbacks. REPLACE_ME_WITH_DESCRIPTION_END | | -| `custom_logo_file` | ```io.IOBase``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN An image file to use as a custom logo in embedded contexts. (Only applies to some API plans) REPLACE_ME_WITH_DESCRIPTION_END | | -| `oauth` | [```SubOAuth```](SubOAuth.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `options` | [```SubOptions```](SubOptions.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `white_labeling_options` | [```SubWhiteLabelingOptions```](SubWhiteLabelingOptions.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `domains`*_required_ | ```List[str]``` | The domain names the ApiApp will be associated with. | | +| `name`*_required_ | ```str``` | The name you want to assign to the ApiApp. | | +| `callback_url` | ```str``` | The URL at which the ApiApp should receive event callbacks. | | +| `custom_logo_file` | ```io.IOBase``` | An image file to use as a custom logo in embedded contexts. (Only applies to some API plans) | | +| `oauth` | [```SubOAuth```](SubOAuth.md) | | | +| `options` | [```SubOptions```](SubOptions.md) | | | +| `white_labeling_options` | [```SubWhiteLabelingOptions```](SubWhiteLabelingOptions.md) | | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/ApiAppGetResponse.md b/sdks/python/docs/ApiAppGetResponse.md index c4f5f820b..bec26734f 100644 --- a/sdks/python/docs/ApiAppGetResponse.md +++ b/sdks/python/docs/ApiAppGetResponse.md @@ -5,8 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `api_app` | [```ApiAppResponse```](ApiAppResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN A list of warnings. REPLACE_ME_WITH_DESCRIPTION_END | | +| `api_app` | [```ApiAppResponse```](ApiAppResponse.md) | | | +| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | A list of warnings. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/ApiAppListResponse.md b/sdks/python/docs/ApiAppListResponse.md index 303af5dd1..cf1f9e090 100644 --- a/sdks/python/docs/ApiAppListResponse.md +++ b/sdks/python/docs/ApiAppListResponse.md @@ -5,9 +5,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `api_apps` | [```List[ApiAppResponse]```](ApiAppResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN Contains information about API Apps. REPLACE_ME_WITH_DESCRIPTION_END | | -| `list_info` | [```ListInfoResponse```](ListInfoResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN A list of warnings. REPLACE_ME_WITH_DESCRIPTION_END | | +| `api_apps` | [```List[ApiAppResponse]```](ApiAppResponse.md) | Contains information about API Apps. | | +| `list_info` | [```ListInfoResponse```](ListInfoResponse.md) | | | +| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | A list of warnings. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/ApiAppResponse.md b/sdks/python/docs/ApiAppResponse.md index f743acea6..ae25a38c4 100644 --- a/sdks/python/docs/ApiAppResponse.md +++ b/sdks/python/docs/ApiAppResponse.md @@ -5,16 +5,16 @@ Contains information about an API App. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `callback_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The app's callback URL (for events) REPLACE_ME_WITH_DESCRIPTION_END | | -| `client_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The app's client id REPLACE_ME_WITH_DESCRIPTION_END | | -| `created_at` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The time that the app was created REPLACE_ME_WITH_DESCRIPTION_END | | -| `domains` | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The domain name(s) associated with the app REPLACE_ME_WITH_DESCRIPTION_END | | -| `name` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The name of the app REPLACE_ME_WITH_DESCRIPTION_END | | -| `is_approved` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Boolean to indicate if the app has been approved REPLACE_ME_WITH_DESCRIPTION_END | | -| `oauth` | [```ApiAppResponseOAuth```](ApiAppResponseOAuth.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `options` | [```ApiAppResponseOptions```](ApiAppResponseOptions.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `owner_account` | [```ApiAppResponseOwnerAccount```](ApiAppResponseOwnerAccount.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `white_labeling_options` | [```ApiAppResponseWhiteLabelingOptions```](ApiAppResponseWhiteLabelingOptions.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `callback_url` | ```str``` | The app's callback URL (for events) | | +| `client_id` | ```str``` | The app's client id | | +| `created_at` | ```int``` | The time that the app was created | | +| `domains` | ```List[str]``` | The domain name(s) associated with the app | | +| `name` | ```str``` | The name of the app | | +| `is_approved` | ```bool``` | Boolean to indicate if the app has been approved | | +| `oauth` | [```ApiAppResponseOAuth```](ApiAppResponseOAuth.md) | | | +| `options` | [```ApiAppResponseOptions```](ApiAppResponseOptions.md) | | | +| `owner_account` | [```ApiAppResponseOwnerAccount```](ApiAppResponseOwnerAccount.md) | | | +| `white_labeling_options` | [```ApiAppResponseWhiteLabelingOptions```](ApiAppResponseWhiteLabelingOptions.md) | | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/ApiAppResponseOAuth.md b/sdks/python/docs/ApiAppResponseOAuth.md index a2d7eb5c0..0c18e5f1e 100644 --- a/sdks/python/docs/ApiAppResponseOAuth.md +++ b/sdks/python/docs/ApiAppResponseOAuth.md @@ -5,10 +5,10 @@ An object describing the app's OAuth properties, or null if OAuth is not con ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `callback_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The app's OAuth callback URL. REPLACE_ME_WITH_DESCRIPTION_END | | -| `secret` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The app's OAuth secret, or null if the app does not belong to user. REPLACE_ME_WITH_DESCRIPTION_END | | -| `scopes` | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Array of OAuth scopes used by the app. REPLACE_ME_WITH_DESCRIPTION_END | | -| `charges_users` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Boolean indicating whether the app owner or the account granting permission is billed for OAuth requests. REPLACE_ME_WITH_DESCRIPTION_END | | +| `callback_url` | ```str``` | The app's OAuth callback URL. | | +| `secret` | ```str``` | The app's OAuth secret, or null if the app does not belong to user. | | +| `scopes` | ```List[str]``` | Array of OAuth scopes used by the app. | | +| `charges_users` | ```bool``` | Boolean indicating whether the app owner or the account granting permission is billed for OAuth requests. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/ApiAppResponseOptions.md b/sdks/python/docs/ApiAppResponseOptions.md index 310b0b043..42f8144e5 100644 --- a/sdks/python/docs/ApiAppResponseOptions.md +++ b/sdks/python/docs/ApiAppResponseOptions.md @@ -5,7 +5,7 @@ An object with options that override account settings. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `can_insert_everywhere` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Boolean denoting if signers can "Insert Everywhere" in one click while signing a document REPLACE_ME_WITH_DESCRIPTION_END | | +| `can_insert_everywhere` | ```bool``` | Boolean denoting if signers can "Insert Everywhere" in one click while signing a document | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/ApiAppResponseOwnerAccount.md b/sdks/python/docs/ApiAppResponseOwnerAccount.md index d1489fb24..9b8e22f08 100644 --- a/sdks/python/docs/ApiAppResponseOwnerAccount.md +++ b/sdks/python/docs/ApiAppResponseOwnerAccount.md @@ -5,8 +5,8 @@ An object describing the app's owner ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `account_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The owner account's ID REPLACE_ME_WITH_DESCRIPTION_END | | -| `email_address` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The owner account's email address REPLACE_ME_WITH_DESCRIPTION_END | | +| `account_id` | ```str``` | The owner account's ID | | +| `email_address` | ```str``` | The owner account's email address | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/ApiAppResponseWhiteLabelingOptions.md b/sdks/python/docs/ApiAppResponseWhiteLabelingOptions.md index aedcbe8d5..375c8f2cf 100644 --- a/sdks/python/docs/ApiAppResponseWhiteLabelingOptions.md +++ b/sdks/python/docs/ApiAppResponseWhiteLabelingOptions.md @@ -5,20 +5,20 @@ An object with options to customize the app's signer page ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `header_background_color` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `legal_version` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `link_color` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `page_background_color` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `primary_button_color` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `primary_button_color_hover` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `primary_button_text_color` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `primary_button_text_color_hover` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `secondary_button_color` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `secondary_button_color_hover` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `secondary_button_text_color` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `secondary_button_text_color_hover` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `text_color1` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `text_color2` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `header_background_color` | ```str``` | | | +| `legal_version` | ```str``` | | | +| `link_color` | ```str``` | | | +| `page_background_color` | ```str``` | | | +| `primary_button_color` | ```str``` | | | +| `primary_button_color_hover` | ```str``` | | | +| `primary_button_text_color` | ```str``` | | | +| `primary_button_text_color_hover` | ```str``` | | | +| `secondary_button_color` | ```str``` | | | +| `secondary_button_color_hover` | ```str``` | | | +| `secondary_button_text_color` | ```str``` | | | +| `secondary_button_text_color_hover` | ```str``` | | | +| `text_color1` | ```str``` | | | +| `text_color2` | ```str``` | | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/ApiAppUpdateRequest.md b/sdks/python/docs/ApiAppUpdateRequest.md index 6da6c39fd..6e3238a61 100644 --- a/sdks/python/docs/ApiAppUpdateRequest.md +++ b/sdks/python/docs/ApiAppUpdateRequest.md @@ -5,13 +5,13 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `callback_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The URL at which the API App should receive event callbacks. REPLACE_ME_WITH_DESCRIPTION_END | | -| `custom_logo_file` | ```io.IOBase``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN An image file to use as a custom logo in embedded contexts. (Only applies to some API plans) REPLACE_ME_WITH_DESCRIPTION_END | | -| `domains` | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The domain names the ApiApp will be associated with. REPLACE_ME_WITH_DESCRIPTION_END | | -| `name` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The name you want to assign to the ApiApp. REPLACE_ME_WITH_DESCRIPTION_END | | -| `oauth` | [```SubOAuth```](SubOAuth.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `options` | [```SubOptions```](SubOptions.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `white_labeling_options` | [```SubWhiteLabelingOptions```](SubWhiteLabelingOptions.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `callback_url` | ```str``` | The URL at which the API App should receive event callbacks. | | +| `custom_logo_file` | ```io.IOBase``` | An image file to use as a custom logo in embedded contexts. (Only applies to some API plans) | | +| `domains` | ```List[str]``` | The domain names the ApiApp will be associated with. | | +| `name` | ```str``` | The name you want to assign to the ApiApp. | | +| `oauth` | [```SubOAuth```](SubOAuth.md) | | | +| `options` | [```SubOptions```](SubOptions.md) | | | +| `white_labeling_options` | [```SubWhiteLabelingOptions```](SubWhiteLabelingOptions.md) | | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/BulkSendJobApi.md b/sdks/python/docs/BulkSendJobApi.md index b7bb9ce17..fce689b6a 100644 --- a/sdks/python/docs/BulkSendJobApi.md +++ b/sdks/python/docs/BulkSendJobApi.md @@ -21,7 +21,30 @@ Returns the status of the BulkSendJob and its SignatureRequests specified by the * Bearer (JWT) Authentication (oauth2): ```python -REPLACE_ME_WITH_EXAMPLE_FOR__bulk_send_job_get_Python_CODE +from pprint import pprint + +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", +) + +with ApiClient(configuration) as api_client: + bulk_send_job_api = apis.BulkSendJobApi(api_client) + + bulk_send_job_id = "6e683bc0369ba3d5b6f43c2c22a8031dbf6bd174" + + try: + response = bulk_send_job_api.bulk_send_job_get(bulk_send_job_id) + pprint(response) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + ``` ``` @@ -29,8 +52,8 @@ REPLACE_ME_WITH_EXAMPLE_FOR__bulk_send_job_get_Python_CODE | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | `bulk_send_job_id` | **str** | The id of the BulkSendJob to retrieve. | | -| `page` | **int** | Which page number of the BulkSendJob list to return. Defaults to `1`. | [optional][default to 1] | -| `page_size` | **int** | Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. | [optional][default to 20] | +| `page` | **int** | Which page number of the BulkSendJob list to return. Defaults to `1`. | [optional][default to 1] | +| `page_size` | **int** | Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. | [optional][default to 20] | ### Return type @@ -67,15 +90,42 @@ Returns a list of BulkSendJob that you can access. * Bearer (JWT) Authentication (oauth2): ```python -REPLACE_ME_WITH_EXAMPLE_FOR__bulk_send_job_list_Python_CODE +from pprint import pprint + +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", +) + +with ApiClient(configuration) as api_client: + bulk_send_job_api = apis.BulkSendJobApi(api_client) + + page = 1 + page_size = 20 + + try: + response = bulk_send_job_api.bulk_send_job_list( + page=page, + page_size=page_size, + ) + pprint(response) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + ``` ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| `page` | **int** | Which page number of the BulkSendJob List to return. Defaults to `1`. | [optional][default to 1] | -| `page_size` | **int** | Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. | [optional][default to 20] | +| `page` | **int** | Which page number of the BulkSendJob List to return. Defaults to `1`. | [optional][default to 1] | +| `page_size` | **int** | Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. | [optional][default to 20] | ### Return type diff --git a/sdks/python/docs/BulkSendJobGetResponse.md b/sdks/python/docs/BulkSendJobGetResponse.md index adf3db231..3bcc2cdbc 100644 --- a/sdks/python/docs/BulkSendJobGetResponse.md +++ b/sdks/python/docs/BulkSendJobGetResponse.md @@ -5,10 +5,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `bulk_send_job` | [```BulkSendJobResponse```](BulkSendJobResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `list_info` | [```ListInfoResponse```](ListInfoResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `signature_requests` | [```List[BulkSendJobGetResponseSignatureRequests]```](BulkSendJobGetResponseSignatureRequests.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN Contains information about the Signature Requests sent in bulk. REPLACE_ME_WITH_DESCRIPTION_END | | -| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN A list of warnings. REPLACE_ME_WITH_DESCRIPTION_END | | +| `bulk_send_job` | [```BulkSendJobResponse```](BulkSendJobResponse.md) | | | +| `list_info` | [```ListInfoResponse```](ListInfoResponse.md) | | | +| `signature_requests` | [```List[BulkSendJobGetResponseSignatureRequests]```](BulkSendJobGetResponseSignatureRequests.md) | Contains information about the Signature Requests sent in bulk. | | +| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | A list of warnings. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/BulkSendJobGetResponseSignatureRequests.md b/sdks/python/docs/BulkSendJobGetResponseSignatureRequests.md index 1385b1a88..d213ed914 100644 --- a/sdks/python/docs/BulkSendJobGetResponseSignatureRequests.md +++ b/sdks/python/docs/BulkSendJobGetResponseSignatureRequests.md @@ -5,34 +5,31 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `test_mode` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Whether this is a test signature request. Test requests have no legal value. Defaults to `false`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `signature_request_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The id of the SignatureRequest. REPLACE_ME_WITH_DESCRIPTION_END | | -| `requester_email_address` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The email address of the initiator of the SignatureRequest. REPLACE_ME_WITH_DESCRIPTION_END | | -| `title` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The title the specified Account uses for the SignatureRequest. REPLACE_ME_WITH_DESCRIPTION_END | | -| `original_title` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Default Label for account. REPLACE_ME_WITH_DESCRIPTION_END | | -| `subject` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The subject in the email that was initially sent to the signers. REPLACE_ME_WITH_DESCRIPTION_END | | -| `message` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The custom message in the email that was initially sent to the signers. REPLACE_ME_WITH_DESCRIPTION_END | | -| `metadata` | ```object``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The metadata attached to the signature request. REPLACE_ME_WITH_DESCRIPTION_END | | -| `created_at` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Time the signature request was created. REPLACE_ME_WITH_DESCRIPTION_END | | -| `expires_at` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | -| `is_complete` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Whether or not the SignatureRequest has been fully executed by all signers. REPLACE_ME_WITH_DESCRIPTION_END | | -| `is_declined` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Whether or not the SignatureRequest has been declined by a signer. REPLACE_ME_WITH_DESCRIPTION_END | | -| `has_error` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Whether or not an error occurred (either during the creation of the SignatureRequest or during one of the signings). REPLACE_ME_WITH_DESCRIPTION_END | | -| `files_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The URL where a copy of the request's documents can be downloaded. REPLACE_ME_WITH_DESCRIPTION_END | | -| `signing_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | -| `details_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The URL where the requester and the signers can view the current status of the SignatureRequest. REPLACE_ME_WITH_DESCRIPTION_END | | -| `cc_email_addresses` | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | -| `signing_redirect_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The URL you want the signer redirected to after they successfully sign. REPLACE_ME_WITH_DESCRIPTION_END | | -| `final_copy_uri` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The path where the completed document can be downloaded REPLACE_ME_WITH_DESCRIPTION_END | | -| `template_ids` | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Templates IDs used in this SignatureRequest (if any). REPLACE_ME_WITH_DESCRIPTION_END | | -| `custom_fields` | [```List[SignatureRequestResponseCustomFieldBase]```](SignatureRequestResponseCustomFieldBase.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN An array of Custom Field objects containing the name and type of each custom field. - -* Text Field uses `SignatureRequestResponseCustomFieldText` -* Checkbox Field uses `SignatureRequestResponseCustomFieldCheckbox` REPLACE_ME_WITH_DESCRIPTION_END | | -| `attachments` | [```List[SignatureRequestResponseAttachment]```](SignatureRequestResponseAttachment.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN Signer attachments. REPLACE_ME_WITH_DESCRIPTION_END | | -| `response_data` | [```List[SignatureRequestResponseDataBase]```](SignatureRequestResponseDataBase.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN An array of form field objects containing the name, value, and type of each textbox or checkmark field filled in by the signers. REPLACE_ME_WITH_DESCRIPTION_END | | -| `signatures` | [```List[SignatureRequestResponseSignatures]```](SignatureRequestResponseSignatures.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN An array of signature objects, 1 for each signer. REPLACE_ME_WITH_DESCRIPTION_END | | -| `bulk_send_job_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The id of the BulkSendJob. REPLACE_ME_WITH_DESCRIPTION_END | | +| `test_mode` | ```bool``` | Whether this is a test signature request. Test requests have no legal value. Defaults to `false`. | [default to False] | +| `signature_request_id` | ```str``` | The id of the SignatureRequest. | | +| `requester_email_address` | ```str``` | The email address of the initiator of the SignatureRequest. | | +| `title` | ```str``` | The title the specified Account uses for the SignatureRequest. | | +| `original_title` | ```str``` | Default Label for account. | | +| `subject` | ```str``` | The subject in the email that was initially sent to the signers. | | +| `message` | ```str``` | The custom message in the email that was initially sent to the signers. | | +| `metadata` | ```object``` | The metadata attached to the signature request. | | +| `created_at` | ```int``` | Time the signature request was created. | | +| `expires_at` | ```int``` | 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` | ```bool``` | Whether or not the SignatureRequest has been fully executed by all signers. | | +| `is_declined` | ```bool``` | Whether or not the SignatureRequest has been declined by a signer. | | +| `has_error` | ```bool``` | Whether or not an error occurred (either during the creation of the SignatureRequest or during one of the signings). | | +| `files_url` | ```str``` | The URL where a copy of the request's documents can be downloaded. | | +| `signing_url` | ```str``` | 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` | ```str``` | The URL where the requester and the signers can view the current status of the SignatureRequest. | | +| `cc_email_addresses` | ```List[str]``` | 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` | ```str``` | The URL you want the signer redirected to after they successfully sign. | | +| `final_copy_uri` | ```str``` | The path where the completed document can be downloaded | | +| `template_ids` | ```List[str]``` | Templates IDs used in this SignatureRequest (if any). | | +| `custom_fields` | [```List[SignatureRequestResponseCustomFieldBase]```](SignatureRequestResponseCustomFieldBase.md) | An array of Custom Field objects containing the name and type of each custom field.

* Text Field uses `SignatureRequestResponseCustomFieldText`
* Checkbox Field uses `SignatureRequestResponseCustomFieldCheckbox` | | +| `attachments` | [```List[SignatureRequestResponseAttachment]```](SignatureRequestResponseAttachment.md) | Signer attachments. | | +| `response_data` | [```List[SignatureRequestResponseDataBase]```](SignatureRequestResponseDataBase.md) | An array of form field objects containing the name, value, and type of each textbox or checkmark field filled in by the signers. | | +| `signatures` | [```List[SignatureRequestResponseSignatures]```](SignatureRequestResponseSignatures.md) | An array of signature objects, 1 for each signer. | | +| `bulk_send_job_id` | ```str``` | The id of the BulkSendJob. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/BulkSendJobListResponse.md b/sdks/python/docs/BulkSendJobListResponse.md index edf262218..666f8a933 100644 --- a/sdks/python/docs/BulkSendJobListResponse.md +++ b/sdks/python/docs/BulkSendJobListResponse.md @@ -5,9 +5,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `bulk_send_jobs` | [```List[BulkSendJobResponse]```](BulkSendJobResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN Contains a list of BulkSendJobs that the API caller has access to. REPLACE_ME_WITH_DESCRIPTION_END | | -| `list_info` | [```ListInfoResponse```](ListInfoResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN A list of warnings. REPLACE_ME_WITH_DESCRIPTION_END | | +| `bulk_send_jobs` | [```List[BulkSendJobResponse]```](BulkSendJobResponse.md) | Contains a list of BulkSendJobs that the API caller has access to. | | +| `list_info` | [```ListInfoResponse```](ListInfoResponse.md) | | | +| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | A list of warnings. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/BulkSendJobResponse.md b/sdks/python/docs/BulkSendJobResponse.md index d922a8bf4..19e770fee 100644 --- a/sdks/python/docs/BulkSendJobResponse.md +++ b/sdks/python/docs/BulkSendJobResponse.md @@ -5,10 +5,10 @@ Contains information about the BulkSendJob such as when it was created and how m ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `bulk_send_job_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The id of the BulkSendJob. REPLACE_ME_WITH_DESCRIPTION_END | | -| `total` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The total amount of Signature Requests queued for sending. REPLACE_ME_WITH_DESCRIPTION_END | | -| `is_creator` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN True if you are the owner of this BulkSendJob, false if it's been shared with you by a team member. REPLACE_ME_WITH_DESCRIPTION_END | | -| `created_at` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Time that the BulkSendJob was created. REPLACE_ME_WITH_DESCRIPTION_END | | +| `bulk_send_job_id` | ```str``` | The id of the BulkSendJob. | | +| `total` | ```int``` | The total amount of Signature Requests queued for sending. | | +| `is_creator` | ```bool``` | True if you are the owner of this BulkSendJob, false if it's been shared with you by a team member. | | +| `created_at` | ```int``` | Time that the BulkSendJob was created. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/BulkSendJobSendResponse.md b/sdks/python/docs/BulkSendJobSendResponse.md index a2f3f8a63..6c84131a0 100644 --- a/sdks/python/docs/BulkSendJobSendResponse.md +++ b/sdks/python/docs/BulkSendJobSendResponse.md @@ -5,8 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `bulk_send_job` | [```BulkSendJobResponse```](BulkSendJobResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN A list of warnings. REPLACE_ME_WITH_DESCRIPTION_END | | +| `bulk_send_job` | [```BulkSendJobResponse```](BulkSendJobResponse.md) | | | +| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | A list of warnings. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/EmbeddedApi.md b/sdks/python/docs/EmbeddedApi.md index 337b5fb9f..c581d1470 100644 --- a/sdks/python/docs/EmbeddedApi.md +++ b/sdks/python/docs/EmbeddedApi.md @@ -21,7 +21,35 @@ Retrieves an embedded object containing a template url that can be opened in an * Bearer (JWT) Authentication (oauth2): ```python -REPLACE_ME_WITH_EXAMPLE_FOR__embedded_edit_url_Python_CODE +from pprint import pprint + +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", +) + +with ApiClient(configuration) as api_client: + embedded_api = apis.EmbeddedApi(api_client) + + data = models.EmbeddedEditUrlRequest( + cc_roles=[""], + merge_fields=[], + ) + + template_id = "5de8179668f2033afac48da1868d0093bf133266" + + try: + response = embedded_api.embedded_edit_url(template_id, data) + pprint(response) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + ``` ``` @@ -66,7 +94,30 @@ Retrieves an embedded object containing a signature url that can be opened in an * Bearer (JWT) Authentication (oauth2): ```python -REPLACE_ME_WITH_EXAMPLE_FOR__embedded_sign_url_Python_CODE +from pprint import pprint + +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", +) + +with ApiClient(configuration) as api_client: + embedded_api = apis.EmbeddedApi(api_client) + + signature_id = "50e3542f738adfa7ddd4cbd4c00d2a8ab6e4194b" + + try: + response = embedded_api.embedded_sign_url(signature_id) + pprint(response) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + ``` ``` diff --git a/sdks/python/docs/EmbeddedEditUrlRequest.md b/sdks/python/docs/EmbeddedEditUrlRequest.md index 9dd8bbf9d..6382a52ea 100644 --- a/sdks/python/docs/EmbeddedEditUrlRequest.md +++ b/sdks/python/docs/EmbeddedEditUrlRequest.md @@ -5,20 +5,16 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `allow_edit_ccs` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN This allows the requester to enable/disable to add or change CC roles when editing the template. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `cc_roles` | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | -| `editor_options` | [```SubEditorOptions```](SubEditorOptions.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `force_signer_roles` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Provide users the ability to review/edit the template signer roles. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `force_subject_message` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Provide users the ability to review/edit the template subject and message. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `merge_fields` | [```List[SubMergeField]```](SubMergeField.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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 `[]`. REPLACE_ME_WITH_DESCRIPTION_END | | -| `preview_only` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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). REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `show_preview` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN This allows the requester to enable the editor/preview experience. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `show_progress_stepper` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. REPLACE_ME_WITH_DESCRIPTION_END | [default to True] | -| `test_mode` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Whether this is a test, locked templates will only be available for editing if this is set to `true`. Defaults to `false`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `allow_edit_ccs` | ```bool``` | This allows the requester to enable/disable to add or change CC roles when editing the template. | [default to False] | +| `cc_roles` | ```List[str]``` | 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` | [```SubEditorOptions```](SubEditorOptions.md) | | | +| `force_signer_roles` | ```bool``` | Provide users the ability to review/edit the template signer roles. | [default to False] | +| `force_subject_message` | ```bool``` | Provide users the ability to review/edit the template subject and message. | [default to False] | +| `merge_fields` | [```List[SubMergeField]```](SubMergeField.md) | 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` | ```bool``` | 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). | [default to False] | +| `show_preview` | ```bool``` | This allows the requester to enable the editor/preview experience. | [default to False] | +| `show_progress_stepper` | ```bool``` | When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. | [default to True] | +| `test_mode` | ```bool``` | Whether this is a test, locked templates will only be available for editing if this is set to `true`. Defaults to `false`. | [default to False] | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/EmbeddedEditUrlResponse.md b/sdks/python/docs/EmbeddedEditUrlResponse.md index 13d551570..b9bf02a34 100644 --- a/sdks/python/docs/EmbeddedEditUrlResponse.md +++ b/sdks/python/docs/EmbeddedEditUrlResponse.md @@ -5,8 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `embedded` | [```EmbeddedEditUrlResponseEmbedded```](EmbeddedEditUrlResponseEmbedded.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN A list of warnings. REPLACE_ME_WITH_DESCRIPTION_END | | +| `embedded` | [```EmbeddedEditUrlResponseEmbedded```](EmbeddedEditUrlResponseEmbedded.md) | | | +| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | A list of warnings. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/EmbeddedEditUrlResponseEmbedded.md b/sdks/python/docs/EmbeddedEditUrlResponseEmbedded.md index be6313a2d..ae396873f 100644 --- a/sdks/python/docs/EmbeddedEditUrlResponseEmbedded.md +++ b/sdks/python/docs/EmbeddedEditUrlResponseEmbedded.md @@ -5,8 +5,8 @@ An embedded template object. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `edit_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN A template url that can be opened in an iFrame. REPLACE_ME_WITH_DESCRIPTION_END | | -| `expires_at` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The specific time that the the `edit_url` link expires, in epoch. REPLACE_ME_WITH_DESCRIPTION_END | | +| `edit_url` | ```str``` | A template url that can be opened in an iFrame. | | +| `expires_at` | ```int``` | The specific time that the the `edit_url` link expires, in epoch. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/EmbeddedSignUrlResponse.md b/sdks/python/docs/EmbeddedSignUrlResponse.md index 0d21e9ee1..7eab77910 100644 --- a/sdks/python/docs/EmbeddedSignUrlResponse.md +++ b/sdks/python/docs/EmbeddedSignUrlResponse.md @@ -5,8 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `embedded` | [```EmbeddedSignUrlResponseEmbedded```](EmbeddedSignUrlResponseEmbedded.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN A list of warnings. REPLACE_ME_WITH_DESCRIPTION_END | | +| `embedded` | [```EmbeddedSignUrlResponseEmbedded```](EmbeddedSignUrlResponseEmbedded.md) | | | +| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | A list of warnings. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/EmbeddedSignUrlResponseEmbedded.md b/sdks/python/docs/EmbeddedSignUrlResponseEmbedded.md index 134106f63..71373c8e0 100644 --- a/sdks/python/docs/EmbeddedSignUrlResponseEmbedded.md +++ b/sdks/python/docs/EmbeddedSignUrlResponseEmbedded.md @@ -5,8 +5,8 @@ An object that contains necessary information to set up embedded signing. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `sign_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN A signature url that can be opened in an iFrame. REPLACE_ME_WITH_DESCRIPTION_END | | -| `expires_at` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The specific time that the the `sign_url` link expires, in epoch. REPLACE_ME_WITH_DESCRIPTION_END | | +| `sign_url` | ```str``` | A signature url that can be opened in an iFrame. | | +| `expires_at` | ```int``` | The specific time that the the `sign_url` link expires, in epoch. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/ErrorResponse.md b/sdks/python/docs/ErrorResponse.md index 2d83e0395..dc83b8f7c 100644 --- a/sdks/python/docs/ErrorResponse.md +++ b/sdks/python/docs/ErrorResponse.md @@ -5,7 +5,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `error`*_required_ | [```ErrorResponseError```](ErrorResponseError.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `error`*_required_ | [```ErrorResponseError```](ErrorResponseError.md) | | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/ErrorResponseError.md b/sdks/python/docs/ErrorResponseError.md index 223b65a0a..9b0589046 100644 --- a/sdks/python/docs/ErrorResponseError.md +++ b/sdks/python/docs/ErrorResponseError.md @@ -5,9 +5,9 @@ Contains information about an error that occurred. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `error_msg`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Message describing an error. REPLACE_ME_WITH_DESCRIPTION_END | | -| `error_name`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Name of the error. REPLACE_ME_WITH_DESCRIPTION_END | | -| `error_path` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Path at which an error occurred. REPLACE_ME_WITH_DESCRIPTION_END | | +| `error_msg`*_required_ | ```str``` | Message describing an error. | | +| `error_name`*_required_ | ```str``` | Name of the error. | | +| `error_path` | ```str``` | Path at which an error occurred. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/EventCallbackRequest.md b/sdks/python/docs/EventCallbackRequest.md index 30a3bf363..857fac582 100644 --- a/sdks/python/docs/EventCallbackRequest.md +++ b/sdks/python/docs/EventCallbackRequest.md @@ -5,10 +5,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `event`*_required_ | [```EventCallbackRequestEvent```](EventCallbackRequestEvent.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `account` | [```AccountResponse```](AccountResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `signature_request` | [```SignatureRequestResponse```](SignatureRequestResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `template` | [```TemplateResponse```](TemplateResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `event`*_required_ | [```EventCallbackRequestEvent```](EventCallbackRequestEvent.md) | | | +| `account` | [```AccountResponse```](AccountResponse.md) | | | +| `signature_request` | [```SignatureRequestResponse```](SignatureRequestResponse.md) | | | +| `template` | [```TemplateResponse```](TemplateResponse.md) | | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/EventCallbackRequestEvent.md b/sdks/python/docs/EventCallbackRequestEvent.md index c66e35d29..6eadfcdeb 100644 --- a/sdks/python/docs/EventCallbackRequestEvent.md +++ b/sdks/python/docs/EventCallbackRequestEvent.md @@ -5,10 +5,10 @@ Basic information about the event that occurred. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `event_time`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Time the event was created (using Unix time). REPLACE_ME_WITH_DESCRIPTION_END | | -| `event_type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Type of callback event that was triggered. REPLACE_ME_WITH_DESCRIPTION_END | | -| `event_hash`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Generated hash used to verify source of event data. REPLACE_ME_WITH_DESCRIPTION_END | | -| `event_metadata` | [```EventCallbackRequestEventMetadata```](EventCallbackRequestEventMetadata.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `event_time`*_required_ | ```str``` | Time the event was created (using Unix time). | | +| `event_type`*_required_ | ```str``` | Type of callback event that was triggered. | | +| `event_hash`*_required_ | ```str``` | Generated hash used to verify source of event data. | | +| `event_metadata` | [```EventCallbackRequestEventMetadata```](EventCallbackRequestEventMetadata.md) | | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/EventCallbackRequestEventMetadata.md b/sdks/python/docs/EventCallbackRequestEventMetadata.md index 76eecb15c..d510eaeb4 100644 --- a/sdks/python/docs/EventCallbackRequestEventMetadata.md +++ b/sdks/python/docs/EventCallbackRequestEventMetadata.md @@ -5,10 +5,10 @@ Specific metadata about the event. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `related_signature_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Signature ID for a specific signer. Applicable to `signature_request_signed` and `signature_request_viewed` events. REPLACE_ME_WITH_DESCRIPTION_END | | -| `reported_for_account_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Account ID the event was reported for. REPLACE_ME_WITH_DESCRIPTION_END | | -| `reported_for_app_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN App ID the event was reported for. REPLACE_ME_WITH_DESCRIPTION_END | | -| `event_message` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Message about a declined or failed (due to error) signature flow. REPLACE_ME_WITH_DESCRIPTION_END | | +| `related_signature_id` | ```str``` | Signature ID for a specific signer. Applicable to `signature_request_signed` and `signature_request_viewed` events. | | +| `reported_for_account_id` | ```str``` | Account ID the event was reported for. | | +| `reported_for_app_id` | ```str``` | App ID the event was reported for. | | +| `event_message` | ```str``` | Message about a declined or failed (due to error) signature flow. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/FaxLineAddUserRequest.md b/sdks/python/docs/FaxLineAddUserRequest.md index e49c8a970..9d2c5e199 100644 --- a/sdks/python/docs/FaxLineAddUserRequest.md +++ b/sdks/python/docs/FaxLineAddUserRequest.md @@ -5,9 +5,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `number`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The Fax Line number. REPLACE_ME_WITH_DESCRIPTION_END | | -| `account_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Account ID REPLACE_ME_WITH_DESCRIPTION_END | | -| `email_address` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Email address REPLACE_ME_WITH_DESCRIPTION_END | | +| `number`*_required_ | ```str``` | The Fax Line number. | | +| `account_id` | ```str``` | Account ID | | +| `email_address` | ```str``` | Email address | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/FaxLineApi.md b/sdks/python/docs/FaxLineApi.md index a05c47a2d..e9260af67 100644 --- a/sdks/python/docs/FaxLineApi.md +++ b/sdks/python/docs/FaxLineApi.md @@ -25,7 +25,30 @@ Grants a user access to the specified Fax Line. * Basic Authentication (api_key): ```python -REPLACE_ME_WITH_EXAMPLE_FOR__fax_line_add_user_Python_CODE +from pprint import pprint + +from dropbox_sign import \ + ApiClient, ApiException, Configuration, apis, models + +configuration = Configuration( + # Configure HTTP basic authorization: api_key + username="YOUR_API_KEY", +) + +with ApiClient(configuration) as api_client: + fax_line_api = apis.FaxLineApi(api_client) + + data = models.FaxLineAddUserRequest( + number="[FAX_NUMBER]", + email_address="member@dropboxsign.com", + ) + + try: + response = fax_line_api.fax_line_add_user(data) + pprint(response) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + ``` ``` @@ -68,7 +91,25 @@ Returns a response with the area codes available for a given state/provice and c * Basic Authentication (api_key): ```python -REPLACE_ME_WITH_EXAMPLE_FOR__fax_line_area_code_get_Python_CODE +from pprint import pprint + +from dropbox_sign import \ + ApiClient, ApiException, Configuration, apis + +configuration = Configuration( + # Configure HTTP basic authorization: api_key + username="YOUR_API_KEY", +) + +with ApiClient(configuration) as api_client: + fax_line_api = apis.FaxLineApi(api_client) + + try: + response = fax_line_api.fax_line_area_code_get("US", "CA") + pprint(response) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + ``` ``` @@ -114,7 +155,30 @@ Purchases a new Fax Line. * Basic Authentication (api_key): ```python -REPLACE_ME_WITH_EXAMPLE_FOR__fax_line_create_Python_CODE +from pprint import pprint + +from dropbox_sign import \ + ApiClient, ApiException, Configuration, apis, models + +configuration = Configuration( + # Configure HTTP basic authorization: api_key + username="YOUR_API_KEY", +) + +with ApiClient(configuration) as api_client: + fax_line_api = apis.FaxLineApi(api_client) + + data = models.FaxLineCreateRequest( + area_code=209, + country="US", + ) + + try: + response = fax_line_api.fax_line_create(data) + pprint(response) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + ``` ``` @@ -157,7 +221,28 @@ Deletes the specified Fax Line from the subscription. * Basic Authentication (api_key): ```python -REPLACE_ME_WITH_EXAMPLE_FOR__fax_line_delete_Python_CODE +from pprint import pprint + +from dropbox_sign import \ + ApiClient, ApiException, Configuration, apis, models + +configuration = Configuration( + # Configure HTTP basic authorization: api_key + username="YOUR_API_KEY", +) + +with ApiClient(configuration) as api_client: + fax_line_api = apis.FaxLineApi(api_client) + + data = models.FaxLineDeleteRequest( + number="[FAX_NUMBER]", + ) + + try: + fax_line_api.fax_line_delete(data) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + ``` ``` @@ -200,7 +285,25 @@ Returns the properties and settings of a Fax Line. * Basic Authentication (api_key): ```python -REPLACE_ME_WITH_EXAMPLE_FOR__fax_line_get_Python_CODE +from pprint import pprint + +from dropbox_sign import \ + ApiClient, ApiException, Configuration, apis, models + +configuration = Configuration( + # Configure HTTP basic authorization: api_key + username="YOUR_API_KEY", +) + +with ApiClient(configuration) as api_client: + fax_line_api = apis.FaxLineApi(api_client) + + try: + response = fax_line_api.fax_line_get("[FAX_NUMBER]") + pprint(response) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + ``` ``` @@ -243,7 +346,25 @@ Returns the properties and settings of multiple Fax Lines. * Basic Authentication (api_key): ```python -REPLACE_ME_WITH_EXAMPLE_FOR__fax_line_list_Python_CODE +from pprint import pprint + +from dropbox_sign import \ + ApiClient, ApiException, Configuration, apis, models + +configuration = Configuration( + # Configure HTTP basic authorization: api_key + username="YOUR_API_KEY", +) + +with ApiClient(configuration) as api_client: + fax_line_api = apis.FaxLineApi(api_client) + + try: + response = fax_line_api.fax_line_list() + pprint(response) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + ``` ``` @@ -289,7 +410,30 @@ Removes a user's access to the specified Fax Line. * Basic Authentication (api_key): ```python -REPLACE_ME_WITH_EXAMPLE_FOR__fax_line_remove_user_Python_CODE +from pprint import pprint + +from dropbox_sign import \ + ApiClient, ApiException, Configuration, apis, models + +configuration = Configuration( + # Configure HTTP basic authorization: api_key + username="YOUR_API_KEY", +) + +with ApiClient(configuration) as api_client: + fax_line_api = apis.FaxLineApi(api_client) + + data = models.FaxLineRemoveUserRequest( + number="[FAX_NUMBER]", + email_address="member@dropboxsign.com", + ) + + try: + response = fax_line_api.fax_line_remove_user(data) + pprint(response) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + ``` ``` diff --git a/sdks/python/docs/FaxLineAreaCodeGetResponse.md b/sdks/python/docs/FaxLineAreaCodeGetResponse.md index f881053ae..db3d98bb2 100644 --- a/sdks/python/docs/FaxLineAreaCodeGetResponse.md +++ b/sdks/python/docs/FaxLineAreaCodeGetResponse.md @@ -5,7 +5,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `area_codes` | ```List[int]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `area_codes` | ```List[int]``` | | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/FaxLineCreateRequest.md b/sdks/python/docs/FaxLineCreateRequest.md index aab4ff06c..b6b33b3ac 100644 --- a/sdks/python/docs/FaxLineCreateRequest.md +++ b/sdks/python/docs/FaxLineCreateRequest.md @@ -5,10 +5,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `area_code`*_required_ | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Area code REPLACE_ME_WITH_DESCRIPTION_END | | -| `country`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Country REPLACE_ME_WITH_DESCRIPTION_END | | -| `city` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN City REPLACE_ME_WITH_DESCRIPTION_END | | -| `account_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Account ID REPLACE_ME_WITH_DESCRIPTION_END | | +| `area_code`*_required_ | ```int``` | Area code | | +| `country`*_required_ | ```str``` | Country | | +| `city` | ```str``` | City | | +| `account_id` | ```str``` | Account ID | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/FaxLineDeleteRequest.md b/sdks/python/docs/FaxLineDeleteRequest.md index bf5c5bf38..ad6985a8e 100644 --- a/sdks/python/docs/FaxLineDeleteRequest.md +++ b/sdks/python/docs/FaxLineDeleteRequest.md @@ -5,7 +5,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `number`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The Fax Line number. REPLACE_ME_WITH_DESCRIPTION_END | | +| `number`*_required_ | ```str``` | The Fax Line number. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/FaxLineListResponse.md b/sdks/python/docs/FaxLineListResponse.md index 78b1bfc60..542838425 100644 --- a/sdks/python/docs/FaxLineListResponse.md +++ b/sdks/python/docs/FaxLineListResponse.md @@ -5,9 +5,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `list_info` | [```ListInfoResponse```](ListInfoResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `fax_lines` | [```List[FaxLineResponseFaxLine]```](FaxLineResponseFaxLine.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `warnings` | [```WarningResponse```](WarningResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `list_info` | [```ListInfoResponse```](ListInfoResponse.md) | | | +| `fax_lines` | [```List[FaxLineResponseFaxLine]```](FaxLineResponseFaxLine.md) | | | +| `warnings` | [```WarningResponse```](WarningResponse.md) | | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/FaxLineRemoveUserRequest.md b/sdks/python/docs/FaxLineRemoveUserRequest.md index c69532c76..561ddea6d 100644 --- a/sdks/python/docs/FaxLineRemoveUserRequest.md +++ b/sdks/python/docs/FaxLineRemoveUserRequest.md @@ -5,9 +5,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `number`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The Fax Line number. REPLACE_ME_WITH_DESCRIPTION_END | | -| `account_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Account ID REPLACE_ME_WITH_DESCRIPTION_END | | -| `email_address` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Email address REPLACE_ME_WITH_DESCRIPTION_END | | +| `number`*_required_ | ```str``` | The Fax Line number. | | +| `account_id` | ```str``` | Account ID | | +| `email_address` | ```str``` | Email address | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/FaxLineResponse.md b/sdks/python/docs/FaxLineResponse.md index ef0874ca9..52aeb370c 100644 --- a/sdks/python/docs/FaxLineResponse.md +++ b/sdks/python/docs/FaxLineResponse.md @@ -5,8 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `fax_line` | [```FaxLineResponseFaxLine```](FaxLineResponseFaxLine.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `warnings` | [```WarningResponse```](WarningResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `fax_line` | [```FaxLineResponseFaxLine```](FaxLineResponseFaxLine.md) | | | +| `warnings` | [```WarningResponse```](WarningResponse.md) | | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/FaxLineResponseFaxLine.md b/sdks/python/docs/FaxLineResponseFaxLine.md index b3d76c7c0..f3e14c0f7 100644 --- a/sdks/python/docs/FaxLineResponseFaxLine.md +++ b/sdks/python/docs/FaxLineResponseFaxLine.md @@ -5,10 +5,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `number` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Number REPLACE_ME_WITH_DESCRIPTION_END | | -| `created_at` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Created at REPLACE_ME_WITH_DESCRIPTION_END | | -| `updated_at` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Updated at REPLACE_ME_WITH_DESCRIPTION_END | | -| `accounts` | [```List[AccountResponse]```](AccountResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `number` | ```str``` | Number | | +| `created_at` | ```int``` | Created at | | +| `updated_at` | ```int``` | Updated at | | +| `accounts` | [```List[AccountResponse]```](AccountResponse.md) | | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/FileResponse.md b/sdks/python/docs/FileResponse.md index 24158f94e..89bf61600 100644 --- a/sdks/python/docs/FileResponse.md +++ b/sdks/python/docs/FileResponse.md @@ -5,8 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `file_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN URL to the file. REPLACE_ME_WITH_DESCRIPTION_END | | -| `expires_at` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN When the link expires. REPLACE_ME_WITH_DESCRIPTION_END | | +| `file_url` | ```str``` | URL to the file. | | +| `expires_at` | ```int``` | When the link expires. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/FileResponseDataUri.md b/sdks/python/docs/FileResponseDataUri.md index 921e877b5..0c56d692e 100644 --- a/sdks/python/docs/FileResponseDataUri.md +++ b/sdks/python/docs/FileResponseDataUri.md @@ -5,7 +5,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `data_uri` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN File as base64 encoded string. REPLACE_ME_WITH_DESCRIPTION_END | | +| `data_uri` | ```str``` | File as base64 encoded string. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/ListInfoResponse.md b/sdks/python/docs/ListInfoResponse.md index 63b99b7ee..57a30754e 100644 --- a/sdks/python/docs/ListInfoResponse.md +++ b/sdks/python/docs/ListInfoResponse.md @@ -5,10 +5,10 @@ Contains pagination information about the data returned. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `num_pages` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Total number of pages available. REPLACE_ME_WITH_DESCRIPTION_END | | -| `num_results` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Total number of objects available. REPLACE_ME_WITH_DESCRIPTION_END | | -| `page` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Number of the page being returned. REPLACE_ME_WITH_DESCRIPTION_END | | -| `page_size` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Objects returned per page. REPLACE_ME_WITH_DESCRIPTION_END | | +| `num_pages` | ```int``` | Total number of pages available. | | +| `num_results` | ```int``` | Total number of objects available. | | +| `page` | ```int``` | Number of the page being returned. | | +| `page_size` | ```int``` | Objects returned per page. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/OAuthApi.md b/sdks/python/docs/OAuthApi.md index 994bb00af..9bb584d6c 100644 --- a/sdks/python/docs/OAuthApi.md +++ b/sdks/python/docs/OAuthApi.md @@ -19,7 +19,29 @@ Once you have retrieved the code from the user callback, you will need to exchan ```python -REPLACE_ME_WITH_EXAMPLE_FOR__oauth_token_generate_Python_CODE +from pprint import pprint + +from dropbox_sign import \ + ApiClient, ApiException, Configuration, apis, models + +configuration = Configuration() + +with ApiClient(configuration) as api_client: + api = apis.OAuthApi(api_client) + + data = models.OAuthTokenGenerateRequest( + state="900e06e2", + code="1b0d28d90c86c141", + client_id="cc91c61d00f8bb2ece1428035716b", + client_secret="1d14434088507ffa390e6f5528465", + ) + + try: + response = oauth_api.oauth_token_generate(data) + pprint(response) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + ``` ``` @@ -60,7 +82,26 @@ Access tokens are only valid for a given period of time (typically one hour) for ```python -REPLACE_ME_WITH_EXAMPLE_FOR__oauth_token_refresh_Python_CODE +from pprint import pprint + +from dropbox_sign import \ + ApiClient, ApiException, Configuration, apis, models + +configuration = Configuration() + +with ApiClient(configuration) as api_client: + api = apis.OAuthApi(api_client) + + data = models.OAuthTokenRefreshRequest( + refresh_token="hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3", + ) + + try: + response = oauth_api.oauth_token_refresh(data) + pprint(response) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + ``` ``` diff --git a/sdks/python/docs/OAuthTokenGenerateRequest.md b/sdks/python/docs/OAuthTokenGenerateRequest.md index 21a5cc4a0..9e53f7996 100644 --- a/sdks/python/docs/OAuthTokenGenerateRequest.md +++ b/sdks/python/docs/OAuthTokenGenerateRequest.md @@ -5,11 +5,11 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `client_id`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The client id of the app requesting authorization. REPLACE_ME_WITH_DESCRIPTION_END | | -| `client_secret`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The secret token of your app. REPLACE_ME_WITH_DESCRIPTION_END | | -| `code`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The code passed to your callback when the user granted access. REPLACE_ME_WITH_DESCRIPTION_END | | -| `grant_type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN When generating a new token use `authorization_code`. REPLACE_ME_WITH_DESCRIPTION_END | [default to 'authorization_code'] | -| `state`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Same as the state you specified earlier. REPLACE_ME_WITH_DESCRIPTION_END | | +| `client_id`*_required_ | ```str``` | The client id of the app requesting authorization. | | +| `client_secret`*_required_ | ```str``` | The secret token of your app. | | +| `code`*_required_ | ```str``` | The code passed to your callback when the user granted access. | | +| `grant_type`*_required_ | ```str``` | When generating a new token use `authorization_code`. | [default to 'authorization_code'] | +| `state`*_required_ | ```str``` | Same as the state you specified earlier. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/OAuthTokenRefreshRequest.md b/sdks/python/docs/OAuthTokenRefreshRequest.md index df66b0276..9322c48d6 100644 --- a/sdks/python/docs/OAuthTokenRefreshRequest.md +++ b/sdks/python/docs/OAuthTokenRefreshRequest.md @@ -5,8 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `grant_type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN When refreshing an existing token use `refresh_token`. REPLACE_ME_WITH_DESCRIPTION_END | [default to 'refresh_token'] | -| `refresh_token`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The token provided when you got the expired access token. REPLACE_ME_WITH_DESCRIPTION_END | | +| `grant_type`*_required_ | ```str``` | When refreshing an existing token use `refresh_token`. | [default to 'refresh_token'] | +| `refresh_token`*_required_ | ```str``` | The token provided when you got the expired access token. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/OAuthTokenResponse.md b/sdks/python/docs/OAuthTokenResponse.md index b80d15d1f..a05a77d8e 100644 --- a/sdks/python/docs/OAuthTokenResponse.md +++ b/sdks/python/docs/OAuthTokenResponse.md @@ -5,11 +5,11 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `access_token` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `token_type` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `refresh_token` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `expires_in` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Number of seconds until the `access_token` expires. Uses epoch time. REPLACE_ME_WITH_DESCRIPTION_END | | -| `state` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `access_token` | ```str``` | | | +| `token_type` | ```str``` | | | +| `refresh_token` | ```str``` | | | +| `expires_in` | ```int``` | Number of seconds until the `access_token` expires. Uses epoch time. | | +| `state` | ```str``` | | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/ReportApi.md b/sdks/python/docs/ReportApi.md index d2e7d3707..66643f8db 100644 --- a/sdks/python/docs/ReportApi.md +++ b/sdks/python/docs/ReportApi.md @@ -19,7 +19,34 @@ Request the creation of one or more report(s). When the report(s) have been gen * Basic Authentication (api_key): ```python -REPLACE_ME_WITH_EXAMPLE_FOR__report_create_Python_CODE +from pprint import pprint + +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", +) + +with ApiClient(configuration) as api_client: + report_api = apis.ReportApi(api_client) + + data = models.ReportCreateRequest( + start_date="09/01/2020", + end_date="09/01/2020", + report_type=["user_activity" "document_status"], + ) + + try: + response = report_api.report_create(data) + pprint(response) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + ``` ``` diff --git a/sdks/python/docs/ReportCreateRequest.md b/sdks/python/docs/ReportCreateRequest.md index 405668b23..c14641c66 100644 --- a/sdks/python/docs/ReportCreateRequest.md +++ b/sdks/python/docs/ReportCreateRequest.md @@ -5,9 +5,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `end_date`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The (inclusive) end date for the report data in `MM/DD/YYYY` format. REPLACE_ME_WITH_DESCRIPTION_END | | -| `report_type`*_required_ | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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). REPLACE_ME_WITH_DESCRIPTION_END | | -| `start_date`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The (inclusive) start date for the report data in `MM/DD/YYYY` format. REPLACE_ME_WITH_DESCRIPTION_END | | +| `end_date`*_required_ | ```str``` | The (inclusive) end date for the report data in `MM/DD/YYYY` format. | | +| `report_type`*_required_ | ```List[str]``` | 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`*_required_ | ```str``` | The (inclusive) start date for the report data in `MM/DD/YYYY` format. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/ReportCreateResponse.md b/sdks/python/docs/ReportCreateResponse.md index b3d92790c..2457138f6 100644 --- a/sdks/python/docs/ReportCreateResponse.md +++ b/sdks/python/docs/ReportCreateResponse.md @@ -5,8 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `report` | [```ReportResponse```](ReportResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN A list of warnings. REPLACE_ME_WITH_DESCRIPTION_END | | +| `report` | [```ReportResponse```](ReportResponse.md) | | | +| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | A list of warnings. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/ReportResponse.md b/sdks/python/docs/ReportResponse.md index 15a93931c..381f19abb 100644 --- a/sdks/python/docs/ReportResponse.md +++ b/sdks/python/docs/ReportResponse.md @@ -5,10 +5,10 @@ Contains information about the report request. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `success` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN A message indicating the requested operation's success REPLACE_ME_WITH_DESCRIPTION_END | | -| `start_date` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The (inclusive) start date for the report data in MM/DD/YYYY format. REPLACE_ME_WITH_DESCRIPTION_END | | -| `end_date` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The (inclusive) end date for the report data in MM/DD/YYYY format. REPLACE_ME_WITH_DESCRIPTION_END | | -| `report_type` | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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). REPLACE_ME_WITH_DESCRIPTION_END | | +| `success` | ```str``` | A message indicating the requested operation's success | | +| `start_date` | ```str``` | The (inclusive) start date for the report data in MM/DD/YYYY format. | | +| `end_date` | ```str``` | The (inclusive) end date for the report data in MM/DD/YYYY format. | | +| `report_type` | ```List[str]``` | 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). | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SignatureRequestApi.md b/sdks/python/docs/SignatureRequestApi.md index b776de36d..fc770bc72 100644 --- a/sdks/python/docs/SignatureRequestApi.md +++ b/sdks/python/docs/SignatureRequestApi.md @@ -34,7 +34,77 @@ Creates BulkSendJob which sends up to 250 SignatureRequests in bulk based off of * Basic Authentication (api_key): ```python -REPLACE_ME_WITH_EXAMPLE_FOR__signature_request_bulk_create_embedded_with_template_Python_CODE +from pprint import pprint + +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", +) + +with ApiClient(configuration) as api_client: + signature_request_api = apis.SignatureRequestApi(api_client) + + signer_list_1_signer = models.SubSignatureRequestTemplateSigner( + role="Client", + name="George", + email_address="george@example.com", + pin="d79a3td", + ) + + signer_list_1_custom_fields = models.SubBulkSignerListCustomField( + name="company", + value="ABC Corp", + ) + + signer_list_1 = models.SubBulkSignerList( + signers=[signer_list_1_signer], + custom_fields=[signer_list_1_custom_fields], + ) + + signer_list_2_signer = models.SubSignatureRequestTemplateSigner( + role="Client", + name="Mary", + email_address="mary@example.com", + pin="gd9as5b", + ) + + signer_list_2_custom_fields = models.SubBulkSignerListCustomField( + name="company", + value="123 LLC", + ) + + signer_list_2 = models.SubBulkSignerList( + signers=[signer_list_2_signer], + custom_fields=[signer_list_2_custom_fields], + ) + + cc_1 = models.SubCC( + role="Accounting", + email_address="accounting@example.com", + ) + + data = models.SignatureRequestBulkCreateEmbeddedWithTemplateRequest( + client_id="1a659d9ad95bccd307ecad78d72192f8", + template_ids=["c26b8a16784a872da37ea946b9ddec7c1e11dff6"], + subject="Purchase Order", + message="Glad we could come to an agreement.", + signer_list=[signer_list_1, signer_list_2], + ccs=[cc_1], + test_mode=True, + ) + + try: + 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) + ``` ``` @@ -78,7 +148,76 @@ Creates BulkSendJob which sends up to 250 SignatureRequests in bulk based off of * Bearer (JWT) Authentication (oauth2): ```python -REPLACE_ME_WITH_EXAMPLE_FOR__signature_request_bulk_send_with_template_Python_CODE +from pprint import pprint + +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", +) + +with ApiClient(configuration) as api_client: + signature_request_api = apis.SignatureRequestApi(api_client) + + signer_list_1_signer = models.SubSignatureRequestTemplateSigner( + role="Client", + name="George", + email_address="george@example.com", + pin="d79a3td", + ) + + signer_list_1_custom_fields = models.SubBulkSignerListCustomField( + name="company", + value="ABC Corp", + ) + + signer_list_1 = models.SubBulkSignerList( + signers=[signer_list_1_signer], + custom_fields=[signer_list_1_custom_fields], + ) + + signer_list_2_signer = models.SubSignatureRequestTemplateSigner( + role="Client", + name="Mary", + email_address="mary@example.com", + pin="gd9as5b", + ) + + signer_list_2_custom_fields = models.SubBulkSignerListCustomField( + name="company", + value="123 LLC", + ) + + signer_list_2 = models.SubBulkSignerList( + signers=[signer_list_2_signer], + custom_fields=[signer_list_2_custom_fields], + ) + + cc_1 = models.SubCC( + role="Accounting", + email_address="accounting@example.com", + ) + + data = models.SignatureRequestBulkSendWithTemplateRequest( + template_ids=["c26b8a16784a872da37ea946b9ddec7c1e11dff6"], + subject="Purchase Order", + message="Glad we could come to an agreement.", + signer_list=[signer_list_1, signer_list_2], + ccs=[cc_1], + test_mode=True, + ) + + try: + response = signature_request_api.signature_request_bulk_send_with_template(data) + pprint(response) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + ``` ``` @@ -122,7 +261,27 @@ Cancels an incomplete signature request. This action is **not reversible**. The * Bearer (JWT) Authentication (oauth2): ```python -REPLACE_ME_WITH_EXAMPLE_FOR__signature_request_cancel_Python_CODE +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", +) + +with ApiClient(configuration) as api_client: + signature_request_api = apis.SignatureRequestApi(api_client) + + signature_request_id = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f" + + try: + signature_request_api.signature_request_cancel(signature_request_id) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + ``` ``` @@ -166,7 +325,60 @@ Creates a new SignatureRequest with the submitted documents to be signed in an e * Bearer (JWT) Authentication (oauth2): ```python -REPLACE_ME_WITH_EXAMPLE_FOR__signature_request_create_embedded_Python_CODE +from pprint import pprint + +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", +) + +with ApiClient(configuration) as api_client: + signature_request_api = apis.SignatureRequestApi(api_client) + + signer_1 = models.SubSignatureRequestSigner( + email_address="jack@example.com", + name="Jack", + order=0, + ) + + signer_2 = models.SubSignatureRequestSigner( + email_address="jill@example.com", + name="Jill", + order=1, + ) + + signing_options = models.SubSigningOptions( + draw=True, + type=True, + upload=True, + phone=True, + default_type="draw", + ) + + data = models.SignatureRequestCreateEmbeddedRequest( + client_id="ec64a202072370a737edf4a0eb7f4437", + title="NDA with Acme Co.", + subject="The NDA we talked about", + message="Please sign this NDA and then we can discuss more. Let me know if you have any questions.", + signers=[signer_1, signer_2], + cc_email_addresses=["lawyer1@dropboxsign.com", "lawyer2@dropboxsign.com"], + files=[open("example_signature_request.pdf", "rb")], + signing_options=signing_options, + test_mode=True, + ) + + try: + response = signature_request_api.signature_request_create_embedded(data) + pprint(response) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + ``` ``` @@ -210,7 +422,52 @@ Creates a new SignatureRequest based on the given Template(s) to be signed in an * Bearer (JWT) Authentication (oauth2): ```python -REPLACE_ME_WITH_EXAMPLE_FOR__signature_request_create_embedded_with_template_Python_CODE +from pprint import pprint + +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", +) + +with ApiClient(configuration) as api_client: + signature_request_api = apis.SignatureRequestApi(api_client) + + signer_1 = models.SubSignatureRequestTemplateSigner( + role="Client", + email_address="jack@example.com", + name="Jack", + ) + + signing_options = models.SubSigningOptions( + draw=True, + type=True, + upload=True, + phone=True, + default_type="draw", + ) + + data = models.SignatureRequestCreateEmbeddedWithTemplateRequest( + client_id="ec64a202072370a737edf4a0eb7f4437", + template_ids=["c26b8a16784a872da37ea946b9ddec7c1e11dff6"], + subject="Purchase Order", + message="Glad we could come to an agreement.", + signers=[signer_1], + signing_options=signing_options, + test_mode=True, + ) + + try: + 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) + ``` ``` @@ -254,7 +511,30 @@ Obtain a copy of the current documents specified by the `signature_request_id` p * Bearer (JWT) Authentication (oauth2): ```python -REPLACE_ME_WITH_EXAMPLE_FOR__signature_request_files_Python_CODE +from pprint import pprint + +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", +) + +with ApiClient(configuration) as api_client: + signature_request_api = apis.SignatureRequestApi(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()) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + ``` ``` @@ -262,7 +542,7 @@ REPLACE_ME_WITH_EXAMPLE_FOR__signature_request_files_Python_CODE | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | `signature_request_id` | **str** | The id of the SignatureRequest to retrieve. | | -| `file_type` | **str** | Set to `pdf` for a single merged document or `zip` for a collection of individual documents. | [optional][default to pdf] | +| `file_type` | **str** | Set to `pdf` for a single merged document or `zip` for a collection of individual documents. | [optional][default to pdf] | ### Return type @@ -299,7 +579,30 @@ Obtain a copy of the current documents specified by the `signature_request_id` p * Bearer (JWT) Authentication (oauth2): ```python -REPLACE_ME_WITH_EXAMPLE_FOR__signature_request_files_as_data_uri_Python_CODE +from pprint import pprint + +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", +) + +with ApiClient(configuration) as api_client: + signature_request_api = apis.SignatureRequestApi(api_client) + + signature_request_id = "fa5c8a0b0f492d768749333ad6fcc214c111e967" + + try: + 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) + ``` ``` @@ -343,7 +646,30 @@ Obtain a copy of the current documents specified by the `signature_request_id` p * Bearer (JWT) Authentication (oauth2): ```python -REPLACE_ME_WITH_EXAMPLE_FOR__signature_request_files_as_file_url_Python_CODE +from pprint import pprint + +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", +) + +with ApiClient(configuration) as api_client: + signature_request_api = apis.SignatureRequestApi(api_client) + + signature_request_id = "fa5c8a0b0f492d768749333ad6fcc214c111e967" + + try: + 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) + ``` ``` @@ -351,7 +677,7 @@ REPLACE_ME_WITH_EXAMPLE_FOR__signature_request_files_as_file_url_Python_CODE | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | `signature_request_id` | **str** | The id of the SignatureRequest to retrieve. | | -| `force_download` | **int** | 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. | [optional][default to 1] | +| `force_download` | **int** | 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. | [optional][default to 1] | ### Return type @@ -388,7 +714,30 @@ Returns the status of the SignatureRequest specified by the `signature_request_i * Bearer (JWT) Authentication (oauth2): ```python -REPLACE_ME_WITH_EXAMPLE_FOR__signature_request_get_Python_CODE +from pprint import pprint + +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", +) + +with ApiClient(configuration) as api_client: + signature_request_api = apis.SignatureRequestApi(api_client) + + signature_request_id = "fa5c8a0b0f492d768749333ad6fcc214c111e967" + + try: + response = signature_request_api.signature_request_get(signature_request_id) + pprint(response) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + ``` ``` @@ -432,16 +781,43 @@ Returns a list of SignatureRequests that you can access. This includes Signature * Bearer (JWT) Authentication (oauth2): ```python -REPLACE_ME_WITH_EXAMPLE_FOR__signature_request_list_Python_CODE +from pprint import pprint + +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", +) + +with ApiClient(configuration) as api_client: + signature_request_api = apis.SignatureRequestApi(api_client) + + account_id = None + page = 1 + + try: + response = signature_request_api.signature_request_list( + account_id=account_id, + page=page, + ) + pprint(response) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + ``` ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| `account_id` | **str** | Which account to return SignatureRequests for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. | [optional] | -| `page` | **int** | Which page number of the SignatureRequest List to return. Defaults to `1`. | [optional][default to 1] | -| `page_size` | **int** | Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. | [optional][default to 20] | +| `account_id` | **str** | Which account to return SignatureRequests for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. | [optional] | +| `page` | **int** | Which page number of the SignatureRequest List to return. Defaults to `1`. | [optional][default to 1] | +| `page_size` | **int** | Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. | [optional][default to 20] | | `query` | **str** | String that includes search terms and/or fields to be used to filter the SignatureRequest objects. | [optional] | ### Return type @@ -479,7 +855,30 @@ Releases a held SignatureRequest that was claimed and prepared from an [Unclaime * Bearer (JWT) Authentication (oauth2): ```python -REPLACE_ME_WITH_EXAMPLE_FOR__signature_request_release_hold_Python_CODE +from pprint import pprint + +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", +) + +with ApiClient(configuration) as api_client: + signature_request_api = apis.SignatureRequestApi(api_client) + + signature_request_id = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f" + + try: + 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) + ``` ``` @@ -523,7 +922,34 @@ Sends an email to the signer reminding them to sign the signature request. You c * Bearer (JWT) Authentication (oauth2): ```python -REPLACE_ME_WITH_EXAMPLE_FOR__signature_request_remind_Python_CODE +from pprint import pprint + +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", +) + +with ApiClient(configuration) as api_client: + signature_request_api = apis.SignatureRequestApi(api_client) + + data = models.SignatureRequestRemindRequest( + email_address="john@example.com", + ) + + signature_request_id = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f" + + try: + 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) + ``` ``` @@ -567,7 +993,27 @@ Removes your access to a completed signature request. This action is **not rever * Basic Authentication (api_key): ```python -REPLACE_ME_WITH_EXAMPLE_FOR__signature_request_remove_Python_CODE +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", +) + +with ApiClient(configuration) as api_client: + signature_request_api = apis.SignatureRequestApi(api_client) + + signature_request_id = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f" + + try: + signature_request_api.signature_request_remove(signature_request_id) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + ``` ``` @@ -611,7 +1057,71 @@ Creates and sends a new SignatureRequest with the submitted documents. If `form_ * Bearer (JWT) Authentication (oauth2): ```python -REPLACE_ME_WITH_EXAMPLE_FOR__signature_request_send_Python_CODE +from pprint import pprint + +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", +) + +with ApiClient(configuration) as api_client: + signature_request_api = apis.SignatureRequestApi(api_client) + + signer_1 = models.SubSignatureRequestSigner( + email_address="jack@example.com", + name="Jack", + order=0, + ) + + signer_2 = models.SubSignatureRequestSigner( + email_address="jill@example.com", + name="Jill", + order=1, + ) + + signing_options = models.SubSigningOptions( + draw=True, + type=True, + upload=True, + phone=True, + default_type="draw", + ) + + field_options = models.SubFieldOptions( + date_format="DD - MM - YYYY", + ) + + data = models.SignatureRequestSendRequest( + title="NDA with Acme Co.", + subject="The NDA we talked about", + message="Please sign this NDA and then we can discuss more. Let me know if you have any questions.", + signers=[signer_1, signer_2], + cc_email_addresses=[ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + files=[open("example_signature_request.pdf", "rb")], + metadata={ + "custom_id": 1234, + "custom_text": "NDA #9", + }, + signing_options=signing_options, + field_options=field_options, + test_mode=True, + ) + + try: + response = signature_request_api.signature_request_send(data) + pprint(response) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + ``` ``` @@ -655,7 +1165,65 @@ Creates and sends a new SignatureRequest based off of the Template(s) specified * Bearer (JWT) Authentication (oauth2): ```python -REPLACE_ME_WITH_EXAMPLE_FOR__signature_request_send_with_template_Python_CODE +from pprint import pprint + +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", +) + +with ApiClient(configuration) as api_client: + signature_request_api = apis.SignatureRequestApi(api_client) + + signer_1 = models.SubSignatureRequestTemplateSigner( + role="Client", + email_address="george@example.com", + name="George", + ) + + cc_1 = models.SubCC( + role="Accounting", + email_address="accounting@example.com", + ) + + custom_field_1 = models.SubCustomField( + name="Cost", + value="$20,000", + editor="Client", + required=True, + ) + + signing_options = models.SubSigningOptions( + draw=True, + type=True, + upload=True, + phone=False, + default_type="draw", + ) + + data = models.SignatureRequestSendWithTemplateRequest( + template_ids=["c26b8a16784a872da37ea946b9ddec7c1e11dff6"], + subject="Purchase Order", + message="Glad we could come to an agreement.", + signers=[signer_1], + ccs=[cc_1], + custom_fields=[custom_field_1], + signing_options=signing_options, + test_mode=True, + ) + + try: + response = signature_request_api.signature_request_send_with_template(data) + pprint(response) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + ``` ``` @@ -699,7 +1267,35 @@ Updates the email address and/or the name for a given signer on a signature requ * Bearer (JWT) Authentication (oauth2): ```python -REPLACE_ME_WITH_EXAMPLE_FOR__signature_request_update_Python_CODE +from pprint import pprint + +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", +) + +with ApiClient(configuration) as api_client: + signature_request_api = apis.SignatureRequestApi(api_client) + + data = models.SignatureRequestUpdateRequest( + email_address = "john@example.com", + signature_id = "78caf2a1d01cd39cea2bc1cbb340dac3", + ) + + signature_request_id = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f" + + try: + 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/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md b/sdks/python/docs/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md index d0a3532d8..1448d24df 100644 --- a/sdks/python/docs/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md +++ b/sdks/python/docs/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md @@ -5,45 +5,19 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `template_ids`*_required_ | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. REPLACE_ME_WITH_DESCRIPTION_END | | -| `client_id`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Client id of the app you're using to create this embedded signature request. Used for security purposes. REPLACE_ME_WITH_DESCRIPTION_END | | -| `signer_file` | ```io.IOBase``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN `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 -``` REPLACE_ME_WITH_DESCRIPTION_END | | -| `signer_list` | [```List[SubBulkSignerList]```](SubBulkSignerList.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN `signer_list` is an array defining values and options for signer fields. Required unless a `signer_file` is used, you may not use both. REPLACE_ME_WITH_DESCRIPTION_END | | -| `allow_decline` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Allows signers to decline to sign a document if `true`. Defaults to `false`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `ccs` | [```List[SubCC]```](SubCC.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN Add CC email recipients. Required when a CC role exists for the Template. REPLACE_ME_WITH_DESCRIPTION_END | | -| `custom_fields` | [```List[SubCustomField]```](SubCustomField.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | -| `message` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The custom message in the email that will be sent to the signers. REPLACE_ME_WITH_DESCRIPTION_END | | -| `metadata` | ```Dict[str, object]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | -| `signing_redirect_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The URL you want signers redirected to after they successfully sign. REPLACE_ME_WITH_DESCRIPTION_END | | -| `subject` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The subject in the email that will be sent to the signers. REPLACE_ME_WITH_DESCRIPTION_END | | -| `test_mode` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `title` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The title you want to assign to the SignatureRequest. REPLACE_ME_WITH_DESCRIPTION_END | | +| `template_ids`*_required_ | ```List[str]``` | Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. | | +| `client_id`*_required_ | ```str``` | Client id of the app you're using to create this embedded signature request. Used for security purposes. | | +| `signer_file` | ```io.IOBase``` | `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` | [```List[SubBulkSignerList]```](SubBulkSignerList.md) | `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` | ```bool``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [default to False] | +| `ccs` | [```List[SubCC]```](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | | +| `custom_fields` | [```List[SubCustomField]```](SubCustomField.md) | 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` | ```str``` | The custom message in the email that will be sent to the signers. | | +| `metadata` | ```Dict[str, object]``` | 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` | ```str``` | The URL you want signers redirected to after they successfully sign. | | +| `subject` | ```str``` | The subject in the email that will be sent to the signers. | | +| `test_mode` | ```bool``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [default to False] | +| `title` | ```str``` | The title you want to assign to the SignatureRequest. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SignatureRequestBulkSendWithTemplateRequest.md b/sdks/python/docs/SignatureRequestBulkSendWithTemplateRequest.md index b30c0ddbc..6031e08ee 100644 --- a/sdks/python/docs/SignatureRequestBulkSendWithTemplateRequest.md +++ b/sdks/python/docs/SignatureRequestBulkSendWithTemplateRequest.md @@ -5,45 +5,19 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `template_ids`*_required_ | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. REPLACE_ME_WITH_DESCRIPTION_END | | -| `signer_file` | ```io.IOBase``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN `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 -``` REPLACE_ME_WITH_DESCRIPTION_END | | -| `signer_list` | [```List[SubBulkSignerList]```](SubBulkSignerList.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN `signer_list` is an array defining values and options for signer fields. Required unless a `signer_file` is used, you may not use both. REPLACE_ME_WITH_DESCRIPTION_END | | -| `allow_decline` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Allows signers to decline to sign a document if `true`. Defaults to `false`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `ccs` | [```List[SubCC]```](SubCC.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN Add CC email recipients. Required when a CC role exists for the Template. REPLACE_ME_WITH_DESCRIPTION_END | | -| `client_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | -| `custom_fields` | [```List[SubCustomField]```](SubCustomField.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | -| `message` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The custom message in the email that will be sent to the signers. REPLACE_ME_WITH_DESCRIPTION_END | | -| `metadata` | ```Dict[str, object]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | -| `signing_redirect_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The URL you want signers redirected to after they successfully sign. REPLACE_ME_WITH_DESCRIPTION_END | | -| `subject` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The subject in the email that will be sent to the signers. REPLACE_ME_WITH_DESCRIPTION_END | | -| `test_mode` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `title` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The title you want to assign to the SignatureRequest. REPLACE_ME_WITH_DESCRIPTION_END | | +| `template_ids`*_required_ | ```List[str]``` | Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. | | +| `signer_file` | ```io.IOBase``` | `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` | [```List[SubBulkSignerList]```](SubBulkSignerList.md) | `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` | ```bool``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [default to False] | +| `ccs` | [```List[SubCC]```](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | | +| `client_id` | ```str``` | 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` | [```List[SubCustomField]```](SubCustomField.md) | 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` | ```str``` | The custom message in the email that will be sent to the signers. | | +| `metadata` | ```Dict[str, object]``` | 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` | ```str``` | The URL you want signers redirected to after they successfully sign. | | +| `subject` | ```str``` | The subject in the email that will be sent to the signers. | | +| `test_mode` | ```bool``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [default to False] | +| `title` | ```str``` | The title you want to assign to the SignatureRequest. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SignatureRequestCreateEmbeddedRequest.md b/sdks/python/docs/SignatureRequestCreateEmbeddedRequest.md index e567f6787..98e708332 100644 --- a/sdks/python/docs/SignatureRequestCreateEmbeddedRequest.md +++ b/sdks/python/docs/SignatureRequestCreateEmbeddedRequest.md @@ -5,63 +5,30 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `client_id`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Client id of the app you're using to create this embedded signature request. Used for security purposes. REPLACE_ME_WITH_DESCRIPTION_END | | -| `files` | ```List[io.IOBase]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Use `files[]` to indicate the uploaded file(s) to send for signature. - -This endpoint requires either **files** or **file_urls[]**, but not both. REPLACE_ME_WITH_DESCRIPTION_END | | -| `file_urls` | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | -| `signers` | [```List[SubSignatureRequestSigner]```](SubSignatureRequestSigner.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN Add Signers to your Signature Request. - -This endpoint requires either **signers** or **grouped_signers**, but not both. REPLACE_ME_WITH_DESCRIPTION_END | | -| `grouped_signers` | [```List[SubSignatureRequestGroupedSigners]```](SubSignatureRequestGroupedSigners.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN Add Grouped Signers to your Signature Request. - -This endpoint requires either **signers** or **grouped_signers**, but not both. REPLACE_ME_WITH_DESCRIPTION_END | | -| `allow_decline` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Allows signers to decline to sign a document if `true`. Defaults to `false`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `allow_reassign` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. - -**NOTE:** Only available for Premium plan. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `attachments` | [```List[SubAttachment]```](SubAttachment.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN A list describing the attachments REPLACE_ME_WITH_DESCRIPTION_END | | -| `cc_email_addresses` | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The email addresses that should be CCed. REPLACE_ME_WITH_DESCRIPTION_END | | -| `custom_fields` | [```List[SubCustomField]```](SubCustomField.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | -| `field_options` | [```SubFieldOptions```](SubFieldOptions.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `form_field_groups` | [```List[SubFormFieldGroup]```](SubFormFieldGroup.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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`. REPLACE_ME_WITH_DESCRIPTION_END | | -| `form_field_rules` | [```List[SubFormFieldRule]```](SubFormFieldRule.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN Conditional Logic rules for fields defined in `form_fields_per_document`. REPLACE_ME_WITH_DESCRIPTION_END | | -| `form_fields_per_document` | [```List[SubFormFieldsPerDocumentBase]```](SubFormFieldsPerDocumentBase.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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` REPLACE_ME_WITH_DESCRIPTION_END | | -| `hide_text_tags` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `message` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The custom message in the email that will be sent to the signers. REPLACE_ME_WITH_DESCRIPTION_END | | -| `metadata` | ```Dict[str, object]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | -| `signing_options` | [```SubSigningOptions```](SubSigningOptions.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `subject` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The subject in the email that will be sent to the signers. REPLACE_ME_WITH_DESCRIPTION_END | | -| `test_mode` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `title` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The title you want to assign to the SignatureRequest. REPLACE_ME_WITH_DESCRIPTION_END | | -| `use_text_tags` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `populate_auto_fill_fields` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `expires_at` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `client_id`*_required_ | ```str``` | Client id of the app you're using to create this embedded signature request. Used for security purposes. | | +| `files` | ```List[io.IOBase]``` | 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` | ```List[str]``` | 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` | [```List[SubSignatureRequestSigner]```](SubSignatureRequestSigner.md) | Add Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | | +| `grouped_signers` | [```List[SubSignatureRequestGroupedSigners]```](SubSignatureRequestGroupedSigners.md) | Add Grouped Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | | +| `allow_decline` | ```bool``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [default to False] | +| `allow_reassign` | ```bool``` | Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`.

**NOTE:** Only available for Premium plan. | [default to False] | +| `attachments` | [```List[SubAttachment]```](SubAttachment.md) | A list describing the attachments | | +| `cc_email_addresses` | ```List[str]``` | The email addresses that should be CCed. | | +| `custom_fields` | [```List[SubCustomField]```](SubCustomField.md) | 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` | [```SubFieldOptions```](SubFieldOptions.md) | | | +| `form_field_groups` | [```List[SubFormFieldGroup]```](SubFormFieldGroup.md) | 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` | [```List[SubFormFieldRule]```](SubFormFieldRule.md) | Conditional Logic rules for fields defined in `form_fields_per_document`. | | +| `form_fields_per_document` | [```List[SubFormFieldsPerDocumentBase]```](SubFormFieldsPerDocumentBase.md) | 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` | ```bool``` | 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. | [default to False] | +| `message` | ```str``` | The custom message in the email that will be sent to the signers. | | +| `metadata` | ```Dict[str, object]``` | 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` | [```SubSigningOptions```](SubSigningOptions.md) | | | +| `subject` | ```str``` | The subject in the email that will be sent to the signers. | | +| `test_mode` | ```bool``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [default to False] | +| `title` | ```str``` | The title you want to assign to the SignatureRequest. | | +| `use_text_tags` | ```bool``` | 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`. | [default to False] | +| `populate_auto_fill_fields` | ```bool``` | 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. | [default to False] | +| `expires_at` | ```int``` | 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. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SignatureRequestCreateEmbeddedWithTemplateRequest.md b/sdks/python/docs/SignatureRequestCreateEmbeddedWithTemplateRequest.md index 713138540..f3e8acaa5 100644 --- a/sdks/python/docs/SignatureRequestCreateEmbeddedWithTemplateRequest.md +++ b/sdks/python/docs/SignatureRequestCreateEmbeddedWithTemplateRequest.md @@ -5,29 +5,21 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `template_ids`*_required_ | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. REPLACE_ME_WITH_DESCRIPTION_END | | -| `client_id`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Client id of the app you're using to create this embedded signature request. Used for security purposes. REPLACE_ME_WITH_DESCRIPTION_END | | -| `signers`*_required_ | [```List[SubSignatureRequestTemplateSigner]```](SubSignatureRequestTemplateSigner.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN Add Signers to your Templated-based Signature Request. REPLACE_ME_WITH_DESCRIPTION_END | | -| `allow_decline` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Allows signers to decline to sign a document if `true`. Defaults to `false`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `ccs` | [```List[SubCC]```](SubCC.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN Add CC email recipients. Required when a CC role exists for the Template. REPLACE_ME_WITH_DESCRIPTION_END | | -| `custom_fields` | [```List[SubCustomField]```](SubCustomField.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN An array defining values and options for custom fields. Required when a custom field exists in the Template. REPLACE_ME_WITH_DESCRIPTION_END | | -| `files` | ```List[io.IOBase]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Use `files[]` to indicate the uploaded file(s) to send for signature. - -This endpoint requires either **files** or **file_urls[]**, but not both. REPLACE_ME_WITH_DESCRIPTION_END | | -| `file_urls` | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | -| `message` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The custom message in the email that will be sent to the signers. REPLACE_ME_WITH_DESCRIPTION_END | | -| `metadata` | ```Dict[str, object]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | -| `signing_options` | [```SubSigningOptions```](SubSigningOptions.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `subject` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The subject in the email that will be sent to the signers. REPLACE_ME_WITH_DESCRIPTION_END | | -| `test_mode` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `title` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The title you want to assign to the SignatureRequest. REPLACE_ME_WITH_DESCRIPTION_END | | -| `populate_auto_fill_fields` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `template_ids`*_required_ | ```List[str]``` | Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. | | +| `client_id`*_required_ | ```str``` | Client id of the app you're using to create this embedded signature request. Used for security purposes. | | +| `signers`*_required_ | [```List[SubSignatureRequestTemplateSigner]```](SubSignatureRequestTemplateSigner.md) | Add Signers to your Templated-based Signature Request. | | +| `allow_decline` | ```bool``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [default to False] | +| `ccs` | [```List[SubCC]```](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | | +| `custom_fields` | [```List[SubCustomField]```](SubCustomField.md) | An array defining values and options for custom fields. Required when a custom field exists in the Template. | | +| `files` | ```List[io.IOBase]``` | 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` | ```List[str]``` | 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` | ```str``` | The custom message in the email that will be sent to the signers. | | +| `metadata` | ```Dict[str, object]``` | 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` | [```SubSigningOptions```](SubSigningOptions.md) | | | +| `subject` | ```str``` | The subject in the email that will be sent to the signers. | | +| `test_mode` | ```bool``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [default to False] | +| `title` | ```str``` | The title you want to assign to the SignatureRequest. | | +| `populate_auto_fill_fields` | ```bool``` | 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. | [default to False] | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SignatureRequestGetResponse.md b/sdks/python/docs/SignatureRequestGetResponse.md index e875b19ca..0e2a8e770 100644 --- a/sdks/python/docs/SignatureRequestGetResponse.md +++ b/sdks/python/docs/SignatureRequestGetResponse.md @@ -5,8 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `signature_request` | [```SignatureRequestResponse```](SignatureRequestResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN A list of warnings. REPLACE_ME_WITH_DESCRIPTION_END | | +| `signature_request` | [```SignatureRequestResponse```](SignatureRequestResponse.md) | | | +| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | A list of warnings. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SignatureRequestListResponse.md b/sdks/python/docs/SignatureRequestListResponse.md index d3c147281..61755faf7 100644 --- a/sdks/python/docs/SignatureRequestListResponse.md +++ b/sdks/python/docs/SignatureRequestListResponse.md @@ -5,9 +5,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `signature_requests` | [```List[SignatureRequestResponse]```](SignatureRequestResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN Contains information about signature requests. REPLACE_ME_WITH_DESCRIPTION_END | | -| `list_info` | [```ListInfoResponse```](ListInfoResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN A list of warnings. REPLACE_ME_WITH_DESCRIPTION_END | | +| `signature_requests` | [```List[SignatureRequestResponse]```](SignatureRequestResponse.md) | Contains information about signature requests. | | +| `list_info` | [```ListInfoResponse```](ListInfoResponse.md) | | | +| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | A list of warnings. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SignatureRequestRemindRequest.md b/sdks/python/docs/SignatureRequestRemindRequest.md index 0a9765769..c885130ef 100644 --- a/sdks/python/docs/SignatureRequestRemindRequest.md +++ b/sdks/python/docs/SignatureRequestRemindRequest.md @@ -5,8 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `email_address`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The email address of the signer to send a reminder to. REPLACE_ME_WITH_DESCRIPTION_END | | -| `name` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The name of the signer to send a reminder to. Include if two or more signers share an email address. REPLACE_ME_WITH_DESCRIPTION_END | | +| `email_address`*_required_ | ```str``` | The email address of the signer to send a reminder to. | | +| `name` | ```str``` | The name of the signer to send a reminder to. Include if two or more signers share an email address. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SignatureRequestResponse.md b/sdks/python/docs/SignatureRequestResponse.md index 63099c2c5..a8af74ce5 100644 --- a/sdks/python/docs/SignatureRequestResponse.md +++ b/sdks/python/docs/SignatureRequestResponse.md @@ -5,34 +5,31 @@ Contains information about a signature request. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `test_mode` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Whether this is a test signature request. Test requests have no legal value. Defaults to `false`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `signature_request_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The id of the SignatureRequest. REPLACE_ME_WITH_DESCRIPTION_END | | -| `requester_email_address` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The email address of the initiator of the SignatureRequest. REPLACE_ME_WITH_DESCRIPTION_END | | -| `title` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The title the specified Account uses for the SignatureRequest. REPLACE_ME_WITH_DESCRIPTION_END | | -| `original_title` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Default Label for account. REPLACE_ME_WITH_DESCRIPTION_END | | -| `subject` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The subject in the email that was initially sent to the signers. REPLACE_ME_WITH_DESCRIPTION_END | | -| `message` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The custom message in the email that was initially sent to the signers. REPLACE_ME_WITH_DESCRIPTION_END | | -| `metadata` | ```object``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The metadata attached to the signature request. REPLACE_ME_WITH_DESCRIPTION_END | | -| `created_at` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Time the signature request was created. REPLACE_ME_WITH_DESCRIPTION_END | | -| `expires_at` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | -| `is_complete` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Whether or not the SignatureRequest has been fully executed by all signers. REPLACE_ME_WITH_DESCRIPTION_END | | -| `is_declined` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Whether or not the SignatureRequest has been declined by a signer. REPLACE_ME_WITH_DESCRIPTION_END | | -| `has_error` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Whether or not an error occurred (either during the creation of the SignatureRequest or during one of the signings). REPLACE_ME_WITH_DESCRIPTION_END | | -| `files_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The URL where a copy of the request's documents can be downloaded. REPLACE_ME_WITH_DESCRIPTION_END | | -| `signing_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | -| `details_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The URL where the requester and the signers can view the current status of the SignatureRequest. REPLACE_ME_WITH_DESCRIPTION_END | | -| `cc_email_addresses` | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | -| `signing_redirect_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The URL you want the signer redirected to after they successfully sign. REPLACE_ME_WITH_DESCRIPTION_END | | -| `final_copy_uri` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The path where the completed document can be downloaded REPLACE_ME_WITH_DESCRIPTION_END | | -| `template_ids` | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Templates IDs used in this SignatureRequest (if any). REPLACE_ME_WITH_DESCRIPTION_END | | -| `custom_fields` | [```List[SignatureRequestResponseCustomFieldBase]```](SignatureRequestResponseCustomFieldBase.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN An array of Custom Field objects containing the name and type of each custom field. - -* Text Field uses `SignatureRequestResponseCustomFieldText` -* Checkbox Field uses `SignatureRequestResponseCustomFieldCheckbox` REPLACE_ME_WITH_DESCRIPTION_END | | -| `attachments` | [```List[SignatureRequestResponseAttachment]```](SignatureRequestResponseAttachment.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN Signer attachments. REPLACE_ME_WITH_DESCRIPTION_END | | -| `response_data` | [```List[SignatureRequestResponseDataBase]```](SignatureRequestResponseDataBase.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN An array of form field objects containing the name, value, and type of each textbox or checkmark field filled in by the signers. REPLACE_ME_WITH_DESCRIPTION_END | | -| `signatures` | [```List[SignatureRequestResponseSignatures]```](SignatureRequestResponseSignatures.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN An array of signature objects, 1 for each signer. REPLACE_ME_WITH_DESCRIPTION_END | | -| `bulk_send_job_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The ID of the Bulk Send job which sent the signature request, if applicable. REPLACE_ME_WITH_DESCRIPTION_END | | +| `test_mode` | ```bool``` | Whether this is a test signature request. Test requests have no legal value. Defaults to `false`. | [default to False] | +| `signature_request_id` | ```str``` | The id of the SignatureRequest. | | +| `requester_email_address` | ```str``` | The email address of the initiator of the SignatureRequest. | | +| `title` | ```str``` | The title the specified Account uses for the SignatureRequest. | | +| `original_title` | ```str``` | Default Label for account. | | +| `subject` | ```str``` | The subject in the email that was initially sent to the signers. | | +| `message` | ```str``` | The custom message in the email that was initially sent to the signers. | | +| `metadata` | ```object``` | The metadata attached to the signature request. | | +| `created_at` | ```int``` | Time the signature request was created. | | +| `expires_at` | ```int``` | 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` | ```bool``` | Whether or not the SignatureRequest has been fully executed by all signers. | | +| `is_declined` | ```bool``` | Whether or not the SignatureRequest has been declined by a signer. | | +| `has_error` | ```bool``` | Whether or not an error occurred (either during the creation of the SignatureRequest or during one of the signings). | | +| `files_url` | ```str``` | The URL where a copy of the request's documents can be downloaded. | | +| `signing_url` | ```str``` | 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` | ```str``` | The URL where the requester and the signers can view the current status of the SignatureRequest. | | +| `cc_email_addresses` | ```List[str]``` | 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` | ```str``` | The URL you want the signer redirected to after they successfully sign. | | +| `final_copy_uri` | ```str``` | The path where the completed document can be downloaded | | +| `template_ids` | ```List[str]``` | Templates IDs used in this SignatureRequest (if any). | | +| `custom_fields` | [```List[SignatureRequestResponseCustomFieldBase]```](SignatureRequestResponseCustomFieldBase.md) | An array of Custom Field objects containing the name and type of each custom field.

* Text Field uses `SignatureRequestResponseCustomFieldText`
* Checkbox Field uses `SignatureRequestResponseCustomFieldCheckbox` | | +| `attachments` | [```List[SignatureRequestResponseAttachment]```](SignatureRequestResponseAttachment.md) | Signer attachments. | | +| `response_data` | [```List[SignatureRequestResponseDataBase]```](SignatureRequestResponseDataBase.md) | An array of form field objects containing the name, value, and type of each textbox or checkmark field filled in by the signers. | | +| `signatures` | [```List[SignatureRequestResponseSignatures]```](SignatureRequestResponseSignatures.md) | An array of signature objects, 1 for each signer. | | +| `bulk_send_job_id` | ```str``` | The ID of the Bulk Send job which sent the signature request, if applicable. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SignatureRequestResponseAttachment.md b/sdks/python/docs/SignatureRequestResponseAttachment.md index 269135d89..a602ec03d 100644 --- a/sdks/python/docs/SignatureRequestResponseAttachment.md +++ b/sdks/python/docs/SignatureRequestResponseAttachment.md @@ -5,12 +5,12 @@ Signer attachments. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `id`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The unique ID for this attachment. REPLACE_ME_WITH_DESCRIPTION_END | | -| `signer`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The Signer this attachment is assigned to. REPLACE_ME_WITH_DESCRIPTION_END | | -| `name`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The name of this attachment. REPLACE_ME_WITH_DESCRIPTION_END | | -| `required`*_required_ | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN A boolean value denoting if this attachment is required. REPLACE_ME_WITH_DESCRIPTION_END | | -| `instructions` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Instructions for Signer. REPLACE_ME_WITH_DESCRIPTION_END | | -| `uploaded_at` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Timestamp when attachment was uploaded by Signer. REPLACE_ME_WITH_DESCRIPTION_END | | +| `id`*_required_ | ```str``` | The unique ID for this attachment. | | +| `signer`*_required_ | ```str``` | The Signer this attachment is assigned to. | | +| `name`*_required_ | ```str``` | The name of this attachment. | | +| `required`*_required_ | ```bool``` | A boolean value denoting if this attachment is required. | | +| `instructions` | ```str``` | Instructions for Signer. | | +| `uploaded_at` | ```int``` | Timestamp when attachment was uploaded by Signer. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SignatureRequestResponseCustomFieldBase.md b/sdks/python/docs/SignatureRequestResponseCustomFieldBase.md index e8a0d0d78..75339e02f 100644 --- a/sdks/python/docs/SignatureRequestResponseCustomFieldBase.md +++ b/sdks/python/docs/SignatureRequestResponseCustomFieldBase.md @@ -2,17 +2,17 @@ An array of Custom Field objects containing the name and type of each custom field. -* Text Field uses `SignatureRequestResponseCustomFieldText` -* Checkbox Field uses `SignatureRequestResponseCustomFieldCheckbox` +* Text Field uses `SignatureRequestResponseCustomFieldText` +* Checkbox Field uses `SignatureRequestResponseCustomFieldCheckbox` ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The type of this Custom Field. Only 'text' and 'checkbox' are currently supported. REPLACE_ME_WITH_DESCRIPTION_END | | -| `name`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The name of the Custom Field. REPLACE_ME_WITH_DESCRIPTION_END | | -| `required` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN A boolean value denoting if this field is required. REPLACE_ME_WITH_DESCRIPTION_END | | -| `api_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The unique ID for this field. REPLACE_ME_WITH_DESCRIPTION_END | | -| `editor` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The name of the Role that is able to edit this field. REPLACE_ME_WITH_DESCRIPTION_END | | +| `type`*_required_ | ```str``` | The type of this Custom Field. Only 'text' and 'checkbox' are currently supported. | | +| `name`*_required_ | ```str``` | The name of the Custom Field. | | +| `required` | ```bool``` | A boolean value denoting if this field is required. | | +| `api_id` | ```str``` | The unique ID for this field. | | +| `editor` | ```str``` | The name of the Role that is able to edit this field. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SignatureRequestResponseCustomFieldCheckbox.md b/sdks/python/docs/SignatureRequestResponseCustomFieldCheckbox.md index 049548127..d3f9dbc70 100644 --- a/sdks/python/docs/SignatureRequestResponseCustomFieldCheckbox.md +++ b/sdks/python/docs/SignatureRequestResponseCustomFieldCheckbox.md @@ -1,12 +1,12 @@ # SignatureRequestResponseCustomFieldCheckbox -This class extends `SignatureRequestResponseCustomFieldBase`. +This class extends `SignatureRequestResponseCustomFieldBase`. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The type of this Custom Field. Only 'text' and 'checkbox' are currently supported. REPLACE_ME_WITH_DESCRIPTION_END | [default to 'checkbox'] | -| `value` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN A true/false for checkbox fields REPLACE_ME_WITH_DESCRIPTION_END | | +| `type`*_required_ | ```str``` | The type of this Custom Field. Only 'text' and 'checkbox' are currently supported. | [default to 'checkbox'] | +| `value` | ```bool``` | A true/false for checkbox fields | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SignatureRequestResponseCustomFieldText.md b/sdks/python/docs/SignatureRequestResponseCustomFieldText.md index a7eb596a8..34222b32e 100644 --- a/sdks/python/docs/SignatureRequestResponseCustomFieldText.md +++ b/sdks/python/docs/SignatureRequestResponseCustomFieldText.md @@ -1,12 +1,12 @@ # SignatureRequestResponseCustomFieldText -This class extends `SignatureRequestResponseCustomFieldBase`. +This class extends `SignatureRequestResponseCustomFieldBase`. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The type of this Custom Field. Only 'text' and 'checkbox' are currently supported. REPLACE_ME_WITH_DESCRIPTION_END | [default to 'text'] | -| `value` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN A text string for text fields REPLACE_ME_WITH_DESCRIPTION_END | | +| `type`*_required_ | ```str``` | The type of this Custom Field. Only 'text' and 'checkbox' are currently supported. | [default to 'text'] | +| `value` | ```str``` | A text string for text fields | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SignatureRequestResponseDataBase.md b/sdks/python/docs/SignatureRequestResponseDataBase.md index 89ded3a50..a657e3c87 100644 --- a/sdks/python/docs/SignatureRequestResponseDataBase.md +++ b/sdks/python/docs/SignatureRequestResponseDataBase.md @@ -5,11 +5,11 @@ An array of form field objects containing the name, value, and type of each text ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `api_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The unique ID for this field. REPLACE_ME_WITH_DESCRIPTION_END | | -| `signature_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The ID of the signature to which this response is linked. REPLACE_ME_WITH_DESCRIPTION_END | | -| `name` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The name of the form field. REPLACE_ME_WITH_DESCRIPTION_END | | -| `required` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN A boolean value denoting if this field is required. REPLACE_ME_WITH_DESCRIPTION_END | | -| `type` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `api_id` | ```str``` | The unique ID for this field. | | +| `signature_id` | ```str``` | The ID of the signature to which this response is linked. | | +| `name` | ```str``` | The name of the form field. | | +| `required` | ```bool``` | A boolean value denoting if this field is required. | | +| `type` | ```str``` | | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SignatureRequestResponseDataValueCheckbox.md b/sdks/python/docs/SignatureRequestResponseDataValueCheckbox.md index 6868b875e..f52a4be3a 100644 --- a/sdks/python/docs/SignatureRequestResponseDataValueCheckbox.md +++ b/sdks/python/docs/SignatureRequestResponseDataValueCheckbox.md @@ -5,8 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN A yes/no checkbox REPLACE_ME_WITH_DESCRIPTION_END | [default to 'checkbox'] | -| `value` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The value of the form field. REPLACE_ME_WITH_DESCRIPTION_END | | +| `type` | ```str``` | A yes/no checkbox | [default to 'checkbox'] | +| `value` | ```bool``` | The value of the form field. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SignatureRequestResponseDataValueCheckboxMerge.md b/sdks/python/docs/SignatureRequestResponseDataValueCheckboxMerge.md index 21bde4ee1..c7ad20c87 100644 --- a/sdks/python/docs/SignatureRequestResponseDataValueCheckboxMerge.md +++ b/sdks/python/docs/SignatureRequestResponseDataValueCheckboxMerge.md @@ -5,8 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN A checkbox field that has default value set by the api REPLACE_ME_WITH_DESCRIPTION_END | [default to 'checkbox-merge'] | -| `value` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The value of the form field. REPLACE_ME_WITH_DESCRIPTION_END | | +| `type` | ```str``` | A checkbox field that has default value set by the api | [default to 'checkbox-merge'] | +| `value` | ```str``` | The value of the form field. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SignatureRequestResponseDataValueDateSigned.md b/sdks/python/docs/SignatureRequestResponseDataValueDateSigned.md index 32f2df435..d72ecc9b2 100644 --- a/sdks/python/docs/SignatureRequestResponseDataValueDateSigned.md +++ b/sdks/python/docs/SignatureRequestResponseDataValueDateSigned.md @@ -5,8 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN A date REPLACE_ME_WITH_DESCRIPTION_END | [default to 'date_signed'] | -| `value` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The value of the form field. REPLACE_ME_WITH_DESCRIPTION_END | | +| `type` | ```str``` | A date | [default to 'date_signed'] | +| `value` | ```str``` | The value of the form field. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SignatureRequestResponseDataValueDropdown.md b/sdks/python/docs/SignatureRequestResponseDataValueDropdown.md index fdf509586..9eef3d02e 100644 --- a/sdks/python/docs/SignatureRequestResponseDataValueDropdown.md +++ b/sdks/python/docs/SignatureRequestResponseDataValueDropdown.md @@ -5,8 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN An input field for dropdowns REPLACE_ME_WITH_DESCRIPTION_END | [default to 'dropdown'] | -| `value` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The value of the form field. REPLACE_ME_WITH_DESCRIPTION_END | | +| `type` | ```str``` | An input field for dropdowns | [default to 'dropdown'] | +| `value` | ```str``` | The value of the form field. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SignatureRequestResponseDataValueInitials.md b/sdks/python/docs/SignatureRequestResponseDataValueInitials.md index 01dd78c41..33a601325 100644 --- a/sdks/python/docs/SignatureRequestResponseDataValueInitials.md +++ b/sdks/python/docs/SignatureRequestResponseDataValueInitials.md @@ -5,8 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN An input field for initials REPLACE_ME_WITH_DESCRIPTION_END | [default to 'initials'] | -| `value` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The value of the form field. REPLACE_ME_WITH_DESCRIPTION_END | | +| `type` | ```str``` | An input field for initials | [default to 'initials'] | +| `value` | ```str``` | The value of the form field. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SignatureRequestResponseDataValueRadio.md b/sdks/python/docs/SignatureRequestResponseDataValueRadio.md index 0d292ba77..615a86d76 100644 --- a/sdks/python/docs/SignatureRequestResponseDataValueRadio.md +++ b/sdks/python/docs/SignatureRequestResponseDataValueRadio.md @@ -5,8 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN An input field for radios REPLACE_ME_WITH_DESCRIPTION_END | [default to 'radio'] | -| `value` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The value of the form field. REPLACE_ME_WITH_DESCRIPTION_END | | +| `type` | ```str``` | An input field for radios | [default to 'radio'] | +| `value` | ```bool``` | The value of the form field. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SignatureRequestResponseDataValueSignature.md b/sdks/python/docs/SignatureRequestResponseDataValueSignature.md index 454863dda..cd1512857 100644 --- a/sdks/python/docs/SignatureRequestResponseDataValueSignature.md +++ b/sdks/python/docs/SignatureRequestResponseDataValueSignature.md @@ -5,8 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN A signature input field REPLACE_ME_WITH_DESCRIPTION_END | [default to 'signature'] | -| `value` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The value of the form field. REPLACE_ME_WITH_DESCRIPTION_END | | +| `type` | ```str``` | A signature input field | [default to 'signature'] | +| `value` | ```str``` | The value of the form field. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SignatureRequestResponseDataValueText.md b/sdks/python/docs/SignatureRequestResponseDataValueText.md index 44853f16c..4b380507f 100644 --- a/sdks/python/docs/SignatureRequestResponseDataValueText.md +++ b/sdks/python/docs/SignatureRequestResponseDataValueText.md @@ -5,8 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN A text input field REPLACE_ME_WITH_DESCRIPTION_END | [default to 'text'] | -| `value` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The value of the form field. REPLACE_ME_WITH_DESCRIPTION_END | | +| `type` | ```str``` | A text input field | [default to 'text'] | +| `value` | ```str``` | The value of the form field. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SignatureRequestResponseDataValueTextMerge.md b/sdks/python/docs/SignatureRequestResponseDataValueTextMerge.md index ac277b55a..f3e90ba7d 100644 --- a/sdks/python/docs/SignatureRequestResponseDataValueTextMerge.md +++ b/sdks/python/docs/SignatureRequestResponseDataValueTextMerge.md @@ -5,8 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN A text field that has default text set by the api REPLACE_ME_WITH_DESCRIPTION_END | [default to 'text-merge'] | -| `value` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The value of the form field. REPLACE_ME_WITH_DESCRIPTION_END | | +| `type` | ```str``` | A text field that has default text set by the api | [default to 'text-merge'] | +| `value` | ```str``` | The value of the form field. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SignatureRequestResponseSignatures.md b/sdks/python/docs/SignatureRequestResponseSignatures.md index b3fbb7886..8125332ed 100644 --- a/sdks/python/docs/SignatureRequestResponseSignatures.md +++ b/sdks/python/docs/SignatureRequestResponseSignatures.md @@ -5,25 +5,25 @@ An array of signature objects, 1 for each signer. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `signature_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Signature identifier. REPLACE_ME_WITH_DESCRIPTION_END | | -| `signer_group_guid` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Signer Group GUID REPLACE_ME_WITH_DESCRIPTION_END | | -| `signer_email_address` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The email address of the signer. REPLACE_ME_WITH_DESCRIPTION_END | | -| `signer_name` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The name of the signer. REPLACE_ME_WITH_DESCRIPTION_END | | -| `signer_role` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The role of the signer. REPLACE_ME_WITH_DESCRIPTION_END | | -| `order` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN If signer order is assigned this is the 0-based index for this signer. REPLACE_ME_WITH_DESCRIPTION_END | | -| `status_code` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The current status of the signature. eg: awaiting_signature, signed, declined. REPLACE_ME_WITH_DESCRIPTION_END | | -| `decline_reason` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The reason provided by the signer for declining the request. REPLACE_ME_WITH_DESCRIPTION_END | | -| `signed_at` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Time that the document was signed or null. REPLACE_ME_WITH_DESCRIPTION_END | | -| `last_viewed_at` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The time that the document was last viewed by this signer or null. REPLACE_ME_WITH_DESCRIPTION_END | | -| `last_reminded_at` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The time the last reminder email was sent to the signer or null. REPLACE_ME_WITH_DESCRIPTION_END | | -| `has_pin` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Boolean to indicate whether this signature requires a PIN to access. REPLACE_ME_WITH_DESCRIPTION_END | | -| `has_sms_auth` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Boolean to indicate whether this signature has SMS authentication enabled. REPLACE_ME_WITH_DESCRIPTION_END | | -| `has_sms_delivery` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Boolean to indicate whether this signature has SMS delivery enabled. REPLACE_ME_WITH_DESCRIPTION_END | | -| `sms_phone_number` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The SMS phone number used for authentication or signature request delivery. REPLACE_ME_WITH_DESCRIPTION_END | | -| `reassigned_by` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Email address of original signer who reassigned to this signer. REPLACE_ME_WITH_DESCRIPTION_END | | -| `reassignment_reason` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Reason provided by original signer who reassigned to this signer. REPLACE_ME_WITH_DESCRIPTION_END | | -| `reassigned_from` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Previous signature identifier. REPLACE_ME_WITH_DESCRIPTION_END | | -| `error` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Error message pertaining to this signer, or null. REPLACE_ME_WITH_DESCRIPTION_END | | +| `signature_id` | ```str``` | Signature identifier. | | +| `signer_group_guid` | ```str``` | Signer Group GUID | | +| `signer_email_address` | ```str``` | The email address of the signer. | | +| `signer_name` | ```str``` | The name of the signer. | | +| `signer_role` | ```str``` | The role of the signer. | | +| `order` | ```int``` | If signer order is assigned this is the 0-based index for this signer. | | +| `status_code` | ```str``` | The current status of the signature. eg: awaiting_signature, signed, declined. | | +| `decline_reason` | ```str``` | The reason provided by the signer for declining the request. | | +| `signed_at` | ```int``` | Time that the document was signed or null. | | +| `last_viewed_at` | ```int``` | The time that the document was last viewed by this signer or null. | | +| `last_reminded_at` | ```int``` | The time the last reminder email was sent to the signer or null. | | +| `has_pin` | ```bool``` | Boolean to indicate whether this signature requires a PIN to access. | | +| `has_sms_auth` | ```bool``` | Boolean to indicate whether this signature has SMS authentication enabled. | | +| `has_sms_delivery` | ```bool``` | Boolean to indicate whether this signature has SMS delivery enabled. | | +| `sms_phone_number` | ```str``` | The SMS phone number used for authentication or signature request delivery. | | +| `reassigned_by` | ```str``` | Email address of original signer who reassigned to this signer. | | +| `reassignment_reason` | ```str``` | Reason provided by original signer who reassigned to this signer. | | +| `reassigned_from` | ```str``` | Previous signature identifier. | | +| `error` | ```str``` | Error message pertaining to this signer, or null. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SignatureRequestSendRequest.md b/sdks/python/docs/SignatureRequestSendRequest.md index ca38d3170..beb3ae0f4 100644 --- a/sdks/python/docs/SignatureRequestSendRequest.md +++ b/sdks/python/docs/SignatureRequestSendRequest.md @@ -5,70 +5,32 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `files` | ```List[io.IOBase]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Use `files[]` to indicate the uploaded file(s) to send for signature. - -This endpoint requires either **files** or **file_urls[]**, but not both. REPLACE_ME_WITH_DESCRIPTION_END | | -| `file_urls` | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | -| `signers` | [```List[SubSignatureRequestSigner]```](SubSignatureRequestSigner.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN Add Signers to your Signature Request. - -This endpoint requires either **signers** or **grouped_signers**, but not both. REPLACE_ME_WITH_DESCRIPTION_END | | -| `grouped_signers` | [```List[SubSignatureRequestGroupedSigners]```](SubSignatureRequestGroupedSigners.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN Add Grouped Signers to your Signature Request. - -This endpoint requires either **signers** or **grouped_signers**, but not both. REPLACE_ME_WITH_DESCRIPTION_END | | -| `allow_decline` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Allows signers to decline to sign a document if `true`. Defaults to `false`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `allow_reassign` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `attachments` | [```List[SubAttachment]```](SubAttachment.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN A list describing the attachments REPLACE_ME_WITH_DESCRIPTION_END | | -| `cc_email_addresses` | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The email addresses that should be CCed. REPLACE_ME_WITH_DESCRIPTION_END | | -| `client_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | -| `custom_fields` | [```List[SubCustomField]```](SubCustomField.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | -| `field_options` | [```SubFieldOptions```](SubFieldOptions.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `form_field_groups` | [```List[SubFormFieldGroup]```](SubFormFieldGroup.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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`. REPLACE_ME_WITH_DESCRIPTION_END | | -| `form_field_rules` | [```List[SubFormFieldRule]```](SubFormFieldRule.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN Conditional Logic rules for fields defined in `form_fields_per_document`. REPLACE_ME_WITH_DESCRIPTION_END | | -| `form_fields_per_document` | [```List[SubFormFieldsPerDocumentBase]```](SubFormFieldsPerDocumentBase.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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` REPLACE_ME_WITH_DESCRIPTION_END | | -| `hide_text_tags` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `is_qualified_signature` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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.<br> -**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. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `is_eid` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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.<br> -**NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `message` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The custom message in the email that will be sent to the signers. REPLACE_ME_WITH_DESCRIPTION_END | | -| `metadata` | ```Dict[str, object]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | -| `signing_options` | [```SubSigningOptions```](SubSigningOptions.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `signing_redirect_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The URL you want signers redirected to after they successfully sign. REPLACE_ME_WITH_DESCRIPTION_END | | -| `subject` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The subject in the email that will be sent to the signers. REPLACE_ME_WITH_DESCRIPTION_END | | -| `test_mode` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `title` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The title you want to assign to the SignatureRequest. REPLACE_ME_WITH_DESCRIPTION_END | | -| `use_text_tags` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `expires_at` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `files` | ```List[io.IOBase]``` | 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` | ```List[str]``` | 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` | [```List[SubSignatureRequestSigner]```](SubSignatureRequestSigner.md) | Add Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | | +| `grouped_signers` | [```List[SubSignatureRequestGroupedSigners]```](SubSignatureRequestGroupedSigners.md) | Add Grouped Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | | +| `allow_decline` | ```bool``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [default to False] | +| `allow_reassign` | ```bool``` | 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. | [default to False] | +| `attachments` | [```List[SubAttachment]```](SubAttachment.md) | A list describing the attachments | | +| `cc_email_addresses` | ```List[str]``` | The email addresses that should be CCed. | | +| `client_id` | ```str``` | 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` | [```List[SubCustomField]```](SubCustomField.md) | 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` | [```SubFieldOptions```](SubFieldOptions.md) | | | +| `form_field_groups` | [```List[SubFormFieldGroup]```](SubFormFieldGroup.md) | 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` | [```List[SubFormFieldRule]```](SubFormFieldRule.md) | Conditional Logic rules for fields defined in `form_fields_per_document`. | | +| `form_fields_per_document` | [```List[SubFormFieldsPerDocumentBase]```](SubFormFieldsPerDocumentBase.md) | 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` | ```bool``` | 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. | [default to False] | +| `is_qualified_signature` | ```bool``` | 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.<br>
**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. | [default to False] | +| `is_eid` | ```bool``` | 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.<br>
**NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. | [default to False] | +| `message` | ```str``` | The custom message in the email that will be sent to the signers. | | +| `metadata` | ```Dict[str, object]``` | 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` | [```SubSigningOptions```](SubSigningOptions.md) | | | +| `signing_redirect_url` | ```str``` | The URL you want signers redirected to after they successfully sign. | | +| `subject` | ```str``` | The subject in the email that will be sent to the signers. | | +| `test_mode` | ```bool``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [default to False] | +| `title` | ```str``` | The title you want to assign to the SignatureRequest. | | +| `use_text_tags` | ```bool``` | 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`. | [default to False] | +| `expires_at` | ```int``` | 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. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SignatureRequestSendWithTemplateRequest.md b/sdks/python/docs/SignatureRequestSendWithTemplateRequest.md index 186fc5171..d06589006 100644 --- a/sdks/python/docs/SignatureRequestSendWithTemplateRequest.md +++ b/sdks/python/docs/SignatureRequestSendWithTemplateRequest.md @@ -5,36 +5,23 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `template_ids`*_required_ | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. REPLACE_ME_WITH_DESCRIPTION_END | | -| `signers`*_required_ | [```List[SubSignatureRequestTemplateSigner]```](SubSignatureRequestTemplateSigner.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN Add Signers to your Templated-based Signature Request. REPLACE_ME_WITH_DESCRIPTION_END | | -| `allow_decline` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Allows signers to decline to sign a document if `true`. Defaults to `false`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `ccs` | [```List[SubCC]```](SubCC.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN Add CC email recipients. Required when a CC role exists for the Template. REPLACE_ME_WITH_DESCRIPTION_END | | -| `client_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Client id of the app to associate with the signature request. Used to apply the branding and callback url defined for the app. REPLACE_ME_WITH_DESCRIPTION_END | | -| `custom_fields` | [```List[SubCustomField]```](SubCustomField.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN An array defining values and options for custom fields. Required when a custom field exists in the Template. REPLACE_ME_WITH_DESCRIPTION_END | | -| `files` | ```List[io.IOBase]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Use `files[]` to indicate the uploaded file(s) to send for signature. - -This endpoint requires either **files** or **file_urls[]**, but not both. REPLACE_ME_WITH_DESCRIPTION_END | | -| `file_urls` | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | -| `is_qualified_signature` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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.<br> -**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. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `is_eid` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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.<br> -**NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `message` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The custom message in the email that will be sent to the signers. REPLACE_ME_WITH_DESCRIPTION_END | | -| `metadata` | ```Dict[str, object]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | -| `signing_options` | [```SubSigningOptions```](SubSigningOptions.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `signing_redirect_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The URL you want signers redirected to after they successfully sign. REPLACE_ME_WITH_DESCRIPTION_END | | -| `subject` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The subject in the email that will be sent to the signers. REPLACE_ME_WITH_DESCRIPTION_END | | -| `test_mode` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `title` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The title you want to assign to the SignatureRequest. REPLACE_ME_WITH_DESCRIPTION_END | | +| `template_ids`*_required_ | ```List[str]``` | Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. | | +| `signers`*_required_ | [```List[SubSignatureRequestTemplateSigner]```](SubSignatureRequestTemplateSigner.md) | Add Signers to your Templated-based Signature Request. | | +| `allow_decline` | ```bool``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [default to False] | +| `ccs` | [```List[SubCC]```](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | | +| `client_id` | ```str``` | 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` | [```List[SubCustomField]```](SubCustomField.md) | An array defining values and options for custom fields. Required when a custom field exists in the Template. | | +| `files` | ```List[io.IOBase]``` | 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` | ```List[str]``` | 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` | ```bool``` | 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.<br>
**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. | [default to False] | +| `is_eid` | ```bool``` | 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.<br>
**NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. | [default to False] | +| `message` | ```str``` | The custom message in the email that will be sent to the signers. | | +| `metadata` | ```Dict[str, object]``` | 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` | [```SubSigningOptions```](SubSigningOptions.md) | | | +| `signing_redirect_url` | ```str``` | The URL you want signers redirected to after they successfully sign. | | +| `subject` | ```str``` | The subject in the email that will be sent to the signers. | | +| `test_mode` | ```bool``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [default to False] | +| `title` | ```str``` | The title you want to assign to the SignatureRequest. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SignatureRequestUpdateRequest.md b/sdks/python/docs/SignatureRequestUpdateRequest.md index 8b78075ad..10ada0f0a 100644 --- a/sdks/python/docs/SignatureRequestUpdateRequest.md +++ b/sdks/python/docs/SignatureRequestUpdateRequest.md @@ -5,16 +5,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `signature_id`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The signature ID for the recipient. REPLACE_ME_WITH_DESCRIPTION_END | | -| `email_address` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The new email address for the recipient. - -This will generate a new `signature_id` value. - -**NOTE:** Optional if `name` is provided. REPLACE_ME_WITH_DESCRIPTION_END | | -| `name` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The new name for the recipient. - -**NOTE:** Optional if `email_address` is provided. REPLACE_ME_WITH_DESCRIPTION_END | | -| `expires_at` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `signature_id`*_required_ | ```str``` | The signature ID for the recipient. | | +| `email_address` | ```str``` | The new email address for the recipient.

This will generate a new `signature_id` value.

**NOTE:** Optional if `name` is provided. | | +| `name` | ```str``` | The new name for the recipient.

**NOTE:** Optional if `email_address` is provided. | | +| `expires_at` | ```int``` | 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. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SubAttachment.md b/sdks/python/docs/SubAttachment.md index 2b22c8220..273066666 100644 --- a/sdks/python/docs/SubAttachment.md +++ b/sdks/python/docs/SubAttachment.md @@ -5,12 +5,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `name`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The name of attachment. REPLACE_ME_WITH_DESCRIPTION_END | | -| `signer_index`*_required_ | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The signer's index in the `signers` parameter (0-based indexing). - -**NOTE:** Only one signer can be assigned per attachment. REPLACE_ME_WITH_DESCRIPTION_END | | -| `instructions` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The instructions for uploading the attachment. REPLACE_ME_WITH_DESCRIPTION_END | | -| `required` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Determines if the attachment must be uploaded. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `name`*_required_ | ```str``` | The name of attachment. | | +| `signer_index`*_required_ | ```int``` | The signer's index in the `signers` parameter (0-based indexing).

**NOTE:** Only one signer can be assigned per attachment. | | +| `instructions` | ```str``` | The instructions for uploading the attachment. | | +| `required` | ```bool``` | Determines if the attachment must be uploaded. | [default to False] | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SubBulkSignerList.md b/sdks/python/docs/SubBulkSignerList.md index 2a8ab14d7..4079ca132 100644 --- a/sdks/python/docs/SubBulkSignerList.md +++ b/sdks/python/docs/SubBulkSignerList.md @@ -5,10 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `custom_fields` | [```List[SubBulkSignerListCustomField]```](SubBulkSignerListCustomField.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN An array of custom field values. REPLACE_ME_WITH_DESCRIPTION_END | | -| `signers` | [```List[SubSignatureRequestTemplateSigner]```](SubSignatureRequestTemplateSigner.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `custom_fields` | [```List[SubBulkSignerListCustomField]```](SubBulkSignerListCustomField.md) | An array of custom field values. | | +| `signers` | [```List[SubSignatureRequestTemplateSigner]```](SubSignatureRequestTemplateSigner.md) | 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. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SubBulkSignerListCustomField.md b/sdks/python/docs/SubBulkSignerListCustomField.md index 172ad25f8..6ff5de065 100644 --- a/sdks/python/docs/SubBulkSignerListCustomField.md +++ b/sdks/python/docs/SubBulkSignerListCustomField.md @@ -5,8 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `name`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The name of the custom field. Must be the field's `name` or `api_id`. REPLACE_ME_WITH_DESCRIPTION_END | | -| `value`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The value of the custom field. REPLACE_ME_WITH_DESCRIPTION_END | | +| `name`*_required_ | ```str``` | The name of the custom field. Must be the field's `name` or `api_id`. | | +| `value`*_required_ | ```str``` | The value of the custom field. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SubCC.md b/sdks/python/docs/SubCC.md index 4438c62cd..0a9267dfb 100644 --- a/sdks/python/docs/SubCC.md +++ b/sdks/python/docs/SubCC.md @@ -5,8 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `role`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Must match an existing CC role in chosen Template(s). Multiple CC recipients cannot share the same CC role. REPLACE_ME_WITH_DESCRIPTION_END | | -| `email_address`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The email address of the CC recipient. REPLACE_ME_WITH_DESCRIPTION_END | | +| `role`*_required_ | ```str``` | Must match an existing CC role in chosen Template(s). Multiple CC recipients cannot share the same CC role. | | +| `email_address`*_required_ | ```str``` | The email address of the CC recipient. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SubCustomField.md b/sdks/python/docs/SubCustomField.md index fba208c82..7aff76896 100644 --- a/sdks/python/docs/SubCustomField.md +++ b/sdks/python/docs/SubCustomField.md @@ -1,20 +1,18 @@ # SubCustomField -When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. +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. +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. +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. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `name`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | -| `editor` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | -| `required` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `value` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The string that resolves (aka "pre-fills") to the merge field on the final document(s) used for signing. REPLACE_ME_WITH_DESCRIPTION_END | | +| `name`*_required_ | ```str``` | 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` | ```str``` | 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` | ```bool``` | 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`. | [default to False] | +| `value` | ```str``` | The string that resolves (aka "pre-fills") to the merge field on the final document(s) used for signing. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SubEditorOptions.md b/sdks/python/docs/SubEditorOptions.md index dfbe309e2..4ee12c25c 100644 --- a/sdks/python/docs/SubEditorOptions.md +++ b/sdks/python/docs/SubEditorOptions.md @@ -5,8 +5,8 @@ This allows the requester to specify editor options when a preparing a document ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `allow_edit_signers` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Allows requesters to edit the list of signers REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `allow_edit_documents` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Allows requesters to edit documents, including delete and add REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `allow_edit_signers` | ```bool``` | Allows requesters to edit the list of signers | [default to False] | +| `allow_edit_documents` | ```bool``` | Allows requesters to edit documents, including delete and add | [default to False] | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SubFieldOptions.md b/sdks/python/docs/SubFieldOptions.md index 1fcbf95c1..3d40efd8d 100644 --- a/sdks/python/docs/SubFieldOptions.md +++ b/sdks/python/docs/SubFieldOptions.md @@ -5,9 +5,7 @@ This allows the requester to specify field options for a signature request. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `date_format`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Allows requester to specify the date format (see list of allowed [formats](/api/reference/constants/#date-formats)) - -**NOTE:** Only available for Premium and higher. REPLACE_ME_WITH_DESCRIPTION_END | | +| `date_format`*_required_ | ```str``` | Allows requester to specify the date format (see list of allowed [formats](/api/reference/constants/#date-formats))

**NOTE:** Only available for Premium and higher. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SubFormFieldGroup.md b/sdks/python/docs/SubFormFieldGroup.md index 59871263f..af8de77e3 100644 --- a/sdks/python/docs/SubFormFieldGroup.md +++ b/sdks/python/docs/SubFormFieldGroup.md @@ -5,13 +5,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `group_id`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN ID of group. Use this to reference a specific group from the `group` value in `form_fields_per_document`. REPLACE_ME_WITH_DESCRIPTION_END | | -| `group_label`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Name of the group REPLACE_ME_WITH_DESCRIPTION_END | | -| `requirement`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `group_id`*_required_ | ```str``` | ID of group. Use this to reference a specific group from the `group` value in `form_fields_per_document`. | | +| `group_label`*_required_ | ```str``` | Name of the group | | +| `requirement`*_required_ | ```str``` | 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. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SubFormFieldRule.md b/sdks/python/docs/SubFormFieldRule.md index 0a355dd9a..1e4658e86 100644 --- a/sdks/python/docs/SubFormFieldRule.md +++ b/sdks/python/docs/SubFormFieldRule.md @@ -5,10 +5,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `id`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Must be unique across all defined rules. REPLACE_ME_WITH_DESCRIPTION_END | | -| `trigger_operator`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Currently only `AND` is supported. Support for `OR` is being worked on. REPLACE_ME_WITH_DESCRIPTION_END | [default to 'AND'] | -| `triggers`*_required_ | [```List[SubFormFieldRuleTrigger]```](SubFormFieldRuleTrigger.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN An array of trigger definitions, the "if this" part of "**if this**, then that". Currently only a single trigger per rule is allowed. REPLACE_ME_WITH_DESCRIPTION_END | | -| `actions`*_required_ | [```List[SubFormFieldRuleAction]```](SubFormFieldRuleAction.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `id`*_required_ | ```str``` | Must be unique across all defined rules. | | +| `trigger_operator`*_required_ | ```str``` | Currently only `AND` is supported. Support for `OR` is being worked on. | [default to 'AND'] | +| `triggers`*_required_ | [```List[SubFormFieldRuleTrigger]```](SubFormFieldRuleTrigger.md) | An array of trigger definitions, the "if this" part of "**if this**, then that". Currently only a single trigger per rule is allowed. | | +| `actions`*_required_ | [```List[SubFormFieldRuleAction]```](SubFormFieldRuleAction.md) | 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. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SubFormFieldRuleAction.md b/sdks/python/docs/SubFormFieldRuleAction.md index 65f6c2b96..6d38e07af 100644 --- a/sdks/python/docs/SubFormFieldRuleAction.md +++ b/sdks/python/docs/SubFormFieldRuleAction.md @@ -5,18 +5,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `hidden`*_required_ | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN `true` to hide the target field when rule is satisfied, otherwise `false`. REPLACE_ME_WITH_DESCRIPTION_END | | -| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `field_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN **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. REPLACE_ME_WITH_DESCRIPTION_END | | -| `group_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN **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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `hidden`*_required_ | ```bool``` | `true` to hide the target field when rule is satisfied, otherwise `false`. | | +| `type`*_required_ | ```str``` | | | +| `field_id` | ```str``` | **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` | ```str``` | **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. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SubFormFieldRuleTrigger.md b/sdks/python/docs/SubFormFieldRuleTrigger.md index 74dacdb8b..0ff0bbf26 100644 --- a/sdks/python/docs/SubFormFieldRuleTrigger.md +++ b/sdks/python/docs/SubFormFieldRuleTrigger.md @@ -5,43 +5,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `id`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | -| `operator`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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 REPLACE_ME_WITH_DESCRIPTION_END | | -| `value` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN **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` REPLACE_ME_WITH_DESCRIPTION_END | | -| `values` | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN **values** or **value** is required, but not both. - -The values to match against **operator** when it is one of the following: - -- `any` -- `none` REPLACE_ME_WITH_DESCRIPTION_END | | +| `id`*_required_ | ```str``` | 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`*_required_ | ```str``` | 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` | ```str``` | **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` | ```List[str]``` | **values** or **value** is required, but not both.

The values to match against **operator** when it is one of the following:

- `any` - `none` | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SubFormFieldsPerDocumentBase.md b/sdks/python/docs/SubFormFieldsPerDocumentBase.md index 06c8acb8e..12da98a0d 100644 --- a/sdks/python/docs/SubFormFieldsPerDocumentBase.md +++ b/sdks/python/docs/SubFormFieldsPerDocumentBase.md @@ -4,38 +4,31 @@ The fields that should appear on the document, expressed as an array of objects. **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` +* 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` ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `document_index`*_required_ | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Represents the integer index of the `file` or `file_url` document the field should be attached to. REPLACE_ME_WITH_DESCRIPTION_END | | -| `api_id`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN An identifier for the field that is unique across all documents in the request. REPLACE_ME_WITH_DESCRIPTION_END | | -| `height`*_required_ | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Size of the field in pixels. REPLACE_ME_WITH_DESCRIPTION_END | | -| `required`*_required_ | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Whether this field is required. REPLACE_ME_WITH_DESCRIPTION_END | | -| `signer`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | -| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `width`*_required_ | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Size of the field in pixels. REPLACE_ME_WITH_DESCRIPTION_END | | -| `x`*_required_ | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Location coordinates of the field in pixels. REPLACE_ME_WITH_DESCRIPTION_END | | -| `y`*_required_ | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Location coordinates of the field in pixels. REPLACE_ME_WITH_DESCRIPTION_END | | -| `name` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Display name for the field. REPLACE_ME_WITH_DESCRIPTION_END | | -| `page` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `document_index`*_required_ | ```int``` | Represents the integer index of the `file` or `file_url` document the field should be attached to. | | +| `api_id`*_required_ | ```str``` | An identifier for the field that is unique across all documents in the request. | | +| `height`*_required_ | ```int``` | Size of the field in pixels. | | +| `required`*_required_ | ```bool``` | Whether this field is required. | | +| `signer`*_required_ | ```str``` | 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`*_required_ | ```str``` | | | +| `width`*_required_ | ```int``` | Size of the field in pixels. | | +| `x`*_required_ | ```int``` | Location coordinates of the field in pixels. | | +| `y`*_required_ | ```int``` | Location coordinates of the field in pixels. | | +| `name` | ```str``` | Display name for the field. | | +| `page` | ```int``` | 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. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SubFormFieldsPerDocumentCheckbox.md b/sdks/python/docs/SubFormFieldsPerDocumentCheckbox.md index c308151ac..ac3ac20a5 100644 --- a/sdks/python/docs/SubFormFieldsPerDocumentCheckbox.md +++ b/sdks/python/docs/SubFormFieldsPerDocumentCheckbox.md @@ -1,13 +1,13 @@ # SubFormFieldsPerDocumentCheckbox -This class extends `SubFormFieldsPerDocumentBase`. +This class extends `SubFormFieldsPerDocumentBase`. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN A yes/no checkbox. Use the `SubFormFieldsPerDocumentCheckbox` class. REPLACE_ME_WITH_DESCRIPTION_END | [default to 'checkbox'] | -| `is_checked`*_required_ | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN `true` for checking the checkbox field by default, otherwise `false`. REPLACE_ME_WITH_DESCRIPTION_END | | -| `group` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN String referencing group defined in `form_field_groups` parameter. REPLACE_ME_WITH_DESCRIPTION_END | | +| `type`*_required_ | ```str``` | A yes/no checkbox. Use the `SubFormFieldsPerDocumentCheckbox` class. | [default to 'checkbox'] | +| `is_checked`*_required_ | ```bool``` | `true` for checking the checkbox field by default, otherwise `false`. | | +| `group` | ```str``` | String referencing group defined in `form_field_groups` parameter. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SubFormFieldsPerDocumentCheckboxMerge.md b/sdks/python/docs/SubFormFieldsPerDocumentCheckboxMerge.md index e80f4bc63..70ddec82f 100644 --- a/sdks/python/docs/SubFormFieldsPerDocumentCheckboxMerge.md +++ b/sdks/python/docs/SubFormFieldsPerDocumentCheckboxMerge.md @@ -1,11 +1,11 @@ # SubFormFieldsPerDocumentCheckboxMerge -This class extends `SubFormFieldsPerDocumentBase`. +This class extends `SubFormFieldsPerDocumentBase`. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN A checkbox field that has default value set using pre-filled data. Use the `SubFormFieldsPerDocumentCheckboxMerge` class. REPLACE_ME_WITH_DESCRIPTION_END | [default to 'checkbox-merge'] | +| `type`*_required_ | ```str``` | A checkbox field that has default value set using pre-filled data. Use the `SubFormFieldsPerDocumentCheckboxMerge` class. | [default to 'checkbox-merge'] | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SubFormFieldsPerDocumentDateSigned.md b/sdks/python/docs/SubFormFieldsPerDocumentDateSigned.md index 1bef7ed69..894e416a1 100644 --- a/sdks/python/docs/SubFormFieldsPerDocumentDateSigned.md +++ b/sdks/python/docs/SubFormFieldsPerDocumentDateSigned.md @@ -1,15 +1,13 @@ # SubFormFieldsPerDocumentDateSigned -This class extends `SubFormFieldsPerDocumentBase`. +This class extends `SubFormFieldsPerDocumentBase`. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN A date. Use the `SubFormFieldsPerDocumentDateSigned` class. REPLACE_ME_WITH_DESCRIPTION_END | [default to 'date_signed'] | -| `font_family` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Font family for the field. REPLACE_ME_WITH_DESCRIPTION_END | | -| `font_size` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | [default to 12] | +| `type`*_required_ | ```str``` | A date. Use the `SubFormFieldsPerDocumentDateSigned` class. | [default to 'date_signed'] | +| `font_family` | ```str``` | Font family for the field. | | +| `font_size` | ```int``` | 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. | [default to 12] | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SubFormFieldsPerDocumentDropdown.md b/sdks/python/docs/SubFormFieldsPerDocumentDropdown.md index 001cdb731..b2ad0d63d 100644 --- a/sdks/python/docs/SubFormFieldsPerDocumentDropdown.md +++ b/sdks/python/docs/SubFormFieldsPerDocumentDropdown.md @@ -1,17 +1,15 @@ # SubFormFieldsPerDocumentDropdown -This class extends `SubFormFieldsPerDocumentBase`. +This class extends `SubFormFieldsPerDocumentBase`. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN An input field for dropdowns. Use the `SubFormFieldsPerDocumentDropdown` class. REPLACE_ME_WITH_DESCRIPTION_END | [default to 'dropdown'] | -| `options`*_required_ | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Array of string values representing dropdown values. REPLACE_ME_WITH_DESCRIPTION_END | | -| `content` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Selected value in `options` array. Value must exist in array. REPLACE_ME_WITH_DESCRIPTION_END | | -| `font_family` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Font family for the field. REPLACE_ME_WITH_DESCRIPTION_END | | -| `font_size` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | [default to 12] | +| `type`*_required_ | ```str``` | An input field for dropdowns. Use the `SubFormFieldsPerDocumentDropdown` class. | [default to 'dropdown'] | +| `options`*_required_ | ```List[str]``` | Array of string values representing dropdown values. | | +| `content` | ```str``` | Selected value in `options` array. Value must exist in array. | | +| `font_family` | ```str``` | Font family for the field. | | +| `font_size` | ```int``` | 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. | [default to 12] | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SubFormFieldsPerDocumentHyperlink.md b/sdks/python/docs/SubFormFieldsPerDocumentHyperlink.md index 1ee39d389..821d474da 100644 --- a/sdks/python/docs/SubFormFieldsPerDocumentHyperlink.md +++ b/sdks/python/docs/SubFormFieldsPerDocumentHyperlink.md @@ -1,17 +1,15 @@ # SubFormFieldsPerDocumentHyperlink -This class extends `SubFormFieldsPerDocumentBase`. +This class extends `SubFormFieldsPerDocumentBase`. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN A hyperlink field. Use the `SubFormFieldsPerDocumentHyperlink` class. REPLACE_ME_WITH_DESCRIPTION_END | [default to 'hyperlink'] | -| `content`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Link Text. REPLACE_ME_WITH_DESCRIPTION_END | | -| `content_url`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Link URL. REPLACE_ME_WITH_DESCRIPTION_END | | -| `font_family` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Font family for the field. REPLACE_ME_WITH_DESCRIPTION_END | | -| `font_size` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | [default to 12] | +| `type`*_required_ | ```str``` | A hyperlink field. Use the `SubFormFieldsPerDocumentHyperlink` class. | [default to 'hyperlink'] | +| `content`*_required_ | ```str``` | Link Text. | | +| `content_url`*_required_ | ```str``` | Link URL. | | +| `font_family` | ```str``` | Font family for the field. | | +| `font_size` | ```int``` | 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. | [default to 12] | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SubFormFieldsPerDocumentInitials.md b/sdks/python/docs/SubFormFieldsPerDocumentInitials.md index a9edae28c..978db25a4 100644 --- a/sdks/python/docs/SubFormFieldsPerDocumentInitials.md +++ b/sdks/python/docs/SubFormFieldsPerDocumentInitials.md @@ -1,11 +1,11 @@ # SubFormFieldsPerDocumentInitials -This class extends `SubFormFieldsPerDocumentBase`. +This class extends `SubFormFieldsPerDocumentBase`. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN An input field for initials. Use the `SubFormFieldsPerDocumentInitials` class. REPLACE_ME_WITH_DESCRIPTION_END | [default to 'initials'] | +| `type`*_required_ | ```str``` | An input field for initials. Use the `SubFormFieldsPerDocumentInitials` class. | [default to 'initials'] | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SubFormFieldsPerDocumentRadio.md b/sdks/python/docs/SubFormFieldsPerDocumentRadio.md index 268b127dd..96789cb51 100644 --- a/sdks/python/docs/SubFormFieldsPerDocumentRadio.md +++ b/sdks/python/docs/SubFormFieldsPerDocumentRadio.md @@ -1,13 +1,13 @@ # SubFormFieldsPerDocumentRadio -This class extends `SubFormFieldsPerDocumentBase`. +This class extends `SubFormFieldsPerDocumentBase`. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN An input field for radios. Use the `SubFormFieldsPerDocumentRadio` class. REPLACE_ME_WITH_DESCRIPTION_END | [default to 'radio'] | -| `group`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN String referencing group defined in `form_field_groups` parameter. REPLACE_ME_WITH_DESCRIPTION_END | | -| `is_checked`*_required_ | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN `true` for checking the radio field by default, otherwise `false`. Only one radio field per group can be `true`. REPLACE_ME_WITH_DESCRIPTION_END | | +| `type`*_required_ | ```str``` | An input field for radios. Use the `SubFormFieldsPerDocumentRadio` class. | [default to 'radio'] | +| `group`*_required_ | ```str``` | String referencing group defined in `form_field_groups` parameter. | | +| `is_checked`*_required_ | ```bool``` | `true` for checking the radio field by default, otherwise `false`. Only one radio field per group can be `true`. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SubFormFieldsPerDocumentSignature.md b/sdks/python/docs/SubFormFieldsPerDocumentSignature.md index b6f57234d..b1fb9969e 100644 --- a/sdks/python/docs/SubFormFieldsPerDocumentSignature.md +++ b/sdks/python/docs/SubFormFieldsPerDocumentSignature.md @@ -1,11 +1,11 @@ # SubFormFieldsPerDocumentSignature -This class extends `SubFormFieldsPerDocumentBase`. +This class extends `SubFormFieldsPerDocumentBase`. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN A signature input field. Use the `SubFormFieldsPerDocumentSignature` class. REPLACE_ME_WITH_DESCRIPTION_END | [default to 'signature'] | +| `type`*_required_ | ```str``` | A signature input field. Use the `SubFormFieldsPerDocumentSignature` class. | [default to 'signature'] | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SubFormFieldsPerDocumentText.md b/sdks/python/docs/SubFormFieldsPerDocumentText.md index 9acf7cf9a..0456d7b99 100644 --- a/sdks/python/docs/SubFormFieldsPerDocumentText.md +++ b/sdks/python/docs/SubFormFieldsPerDocumentText.md @@ -1,25 +1,21 @@ # SubFormFieldsPerDocumentText -This class extends `SubFormFieldsPerDocumentBase`. +This class extends `SubFormFieldsPerDocumentBase`. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN A text input field. Use the `SubFormFieldsPerDocumentText` class. REPLACE_ME_WITH_DESCRIPTION_END | [default to 'text'] | -| `placeholder` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Placeholder value for text field. REPLACE_ME_WITH_DESCRIPTION_END | | -| `auto_fill_type` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | -| `link_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Link two or more text fields. Enter data into one linked text field, which automatically fill all other linked text fields. REPLACE_ME_WITH_DESCRIPTION_END | | -| `masked` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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`. REPLACE_ME_WITH_DESCRIPTION_END | | -| `validation_type` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | -| `validation_custom_regex` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `validation_custom_regex_format_label` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `content` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Content of a `me_now` text field REPLACE_ME_WITH_DESCRIPTION_END | | -| `font_family` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Font family for the field. REPLACE_ME_WITH_DESCRIPTION_END | | -| `font_size` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | [default to 12] | +| `type`*_required_ | ```str``` | A text input field. Use the `SubFormFieldsPerDocumentText` class. | [default to 'text'] | +| `placeholder` | ```str``` | Placeholder value for text field. | | +| `auto_fill_type` | ```str``` | 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` | ```str``` | Link two or more text fields. Enter data into one linked text field, which automatically fill all other linked text fields. | | +| `masked` | ```bool``` | 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` | ```str``` | 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` | ```str``` | | | +| `validation_custom_regex_format_label` | ```str``` | | | +| `content` | ```str``` | Content of a `me_now` text field | | +| `font_family` | ```str``` | Font family for the field. | | +| `font_size` | ```int``` | 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. | [default to 12] | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SubFormFieldsPerDocumentTextMerge.md b/sdks/python/docs/SubFormFieldsPerDocumentTextMerge.md index 91cc6202c..5670ce99e 100644 --- a/sdks/python/docs/SubFormFieldsPerDocumentTextMerge.md +++ b/sdks/python/docs/SubFormFieldsPerDocumentTextMerge.md @@ -1,15 +1,13 @@ # SubFormFieldsPerDocumentTextMerge -This class extends `SubFormFieldsPerDocumentBase`. +This class extends `SubFormFieldsPerDocumentBase`. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN A text field that has default text set using pre-filled data. Use the `SubFormFieldsPerDocumentTextMerge` class. REPLACE_ME_WITH_DESCRIPTION_END | [default to 'text-merge'] | -| `font_family` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Font family for the field. REPLACE_ME_WITH_DESCRIPTION_END | | -| `font_size` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | [default to 12] | +| `type`*_required_ | ```str``` | A text field that has default text set using pre-filled data. Use the `SubFormFieldsPerDocumentTextMerge` class. | [default to 'text-merge'] | +| `font_family` | ```str``` | Font family for the field. | | +| `font_size` | ```int``` | 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. | [default to 12] | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SubMergeField.md b/sdks/python/docs/SubMergeField.md index 00360ded4..9066c079d 100644 --- a/sdks/python/docs/SubMergeField.md +++ b/sdks/python/docs/SubMergeField.md @@ -5,8 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `name`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The name of the merge field. Must be unique. REPLACE_ME_WITH_DESCRIPTION_END | | -| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The type of merge field. REPLACE_ME_WITH_DESCRIPTION_END | | +| `name`*_required_ | ```str``` | The name of the merge field. Must be unique. | | +| `type`*_required_ | ```str``` | The type of merge field. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SubOAuth.md b/sdks/python/docs/SubOAuth.md index fdba6b98d..524b04f8b 100644 --- a/sdks/python/docs/SubOAuth.md +++ b/sdks/python/docs/SubOAuth.md @@ -5,8 +5,8 @@ OAuth related parameters. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `callback_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The callback URL to be used for OAuth flows. (Required if `oauth[scopes]` is provided) REPLACE_ME_WITH_DESCRIPTION_END | | -| `scopes` | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN A list of [OAuth scopes](/api/reference/tag/OAuth) to be granted to the app. (Required if `oauth[callback_url]` is provided). REPLACE_ME_WITH_DESCRIPTION_END | | +| `callback_url` | ```str``` | The callback URL to be used for OAuth flows. (Required if `oauth[scopes]` is provided) | | +| `scopes` | ```List[str]``` | A list of [OAuth scopes](/api/reference/tag/OAuth) to be granted to the app. (Required if `oauth[callback_url]` is provided). | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SubOptions.md b/sdks/python/docs/SubOptions.md index 1a898fbaf..62ff1a98b 100644 --- a/sdks/python/docs/SubOptions.md +++ b/sdks/python/docs/SubOptions.md @@ -5,7 +5,7 @@ Additional options supported by API App. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `can_insert_everywhere` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Determines if signers can use "Insert Everywhere" when signing a document. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `can_insert_everywhere` | ```bool``` | Determines if signers can use "Insert Everywhere" when signing a document. | [default to False] | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SubSignatureRequestGroupedSigners.md b/sdks/python/docs/SubSignatureRequestGroupedSigners.md index d407e2b87..179f27bc0 100644 --- a/sdks/python/docs/SubSignatureRequestGroupedSigners.md +++ b/sdks/python/docs/SubSignatureRequestGroupedSigners.md @@ -5,11 +5,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `group`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The name of the group. REPLACE_ME_WITH_DESCRIPTION_END | | -| `signers`*_required_ | [```List[SubSignatureRequestSigner]```](SubSignatureRequestSigner.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | -| `order` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The order the group is required to sign in. Use this instead of Signer-level `order`. REPLACE_ME_WITH_DESCRIPTION_END | | +| `group`*_required_ | ```str``` | The name of the group. | | +| `signers`*_required_ | [```List[SubSignatureRequestSigner]```](SubSignatureRequestSigner.md) | 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` | ```int``` | The order the group is required to sign in. Use this instead of Signer-level `order`. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SubSignatureRequestSigner.md b/sdks/python/docs/SubSignatureRequestSigner.md index 40d236d4e..0a122bcfb 100644 --- a/sdks/python/docs/SubSignatureRequestSigner.md +++ b/sdks/python/docs/SubSignatureRequestSigner.md @@ -5,20 +5,12 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `name`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The name of the signer. REPLACE_ME_WITH_DESCRIPTION_END | | -| `email_address`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The email address of the signer. REPLACE_ME_WITH_DESCRIPTION_END | | -| `order` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The order the signer is required to sign in. REPLACE_ME_WITH_DESCRIPTION_END | | -| `pin` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The 4- to 12-character access code that will secure this signer's signature page. REPLACE_ME_WITH_DESCRIPTION_END | | -| `sms_phone_number` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | -| `sms_phone_number_type` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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). REPLACE_ME_WITH_DESCRIPTION_END | | +| `name`*_required_ | ```str``` | The name of the signer. | | +| `email_address`*_required_ | ```str``` | The email address of the signer. | | +| `order` | ```int``` | The order the signer is required to sign in. | | +| `pin` | ```str``` | The 4- to 12-character access code that will secure this signer's signature page. | | +| `sms_phone_number` | ```str``` | 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` | ```str``` | 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). | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SubSignatureRequestTemplateSigner.md b/sdks/python/docs/SubSignatureRequestTemplateSigner.md index f9bf97d19..d1ca992d5 100644 --- a/sdks/python/docs/SubSignatureRequestTemplateSigner.md +++ b/sdks/python/docs/SubSignatureRequestTemplateSigner.md @@ -5,20 +5,12 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `role`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Must match an existing role in chosen Template(s). It's case-sensitive. REPLACE_ME_WITH_DESCRIPTION_END | | -| `name`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The name of the signer. REPLACE_ME_WITH_DESCRIPTION_END | | -| `email_address`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The email address of the signer. REPLACE_ME_WITH_DESCRIPTION_END | | -| `pin` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The 4- to 12-character access code that will secure this signer's signature page. REPLACE_ME_WITH_DESCRIPTION_END | | -| `sms_phone_number` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | -| `sms_phone_number_type` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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). REPLACE_ME_WITH_DESCRIPTION_END | | +| `role`*_required_ | ```str``` | Must match an existing role in chosen Template(s). It's case-sensitive. | | +| `name`*_required_ | ```str``` | The name of the signer. | | +| `email_address`*_required_ | ```str``` | The email address of the signer. | | +| `pin` | ```str``` | The 4- to 12-character access code that will secure this signer's signature page. | | +| `sms_phone_number` | ```str``` | 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` | ```str``` | 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). | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SubSigningOptions.md b/sdks/python/docs/SubSigningOptions.md index 3249ca650..a060bd1d6 100644 --- a/sdks/python/docs/SubSigningOptions.md +++ b/sdks/python/docs/SubSigningOptions.md @@ -2,16 +2,16 @@ 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. +**NOTE:** If `signing_options` are not defined in the request, the allowed types will default to those specified in the account settings. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `default_type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The default type shown (limited to the listed types) REPLACE_ME_WITH_DESCRIPTION_END | | -| `draw` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Allows drawing the signature REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `phone` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Allows using a smartphone to email the signature REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `type` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Allows typing the signature REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `upload` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Allows uploading the signature REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `default_type`*_required_ | ```str``` | The default type shown (limited to the listed types) | | +| `draw` | ```bool``` | Allows drawing the signature | [default to False] | +| `phone` | ```bool``` | Allows using a smartphone to email the signature | [default to False] | +| `type` | ```bool``` | Allows typing the signature | [default to False] | +| `upload` | ```bool``` | Allows uploading the signature | [default to False] | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SubTeamResponse.md b/sdks/python/docs/SubTeamResponse.md index fed8bcf6d..5c655b187 100644 --- a/sdks/python/docs/SubTeamResponse.md +++ b/sdks/python/docs/SubTeamResponse.md @@ -5,8 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `team_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The id of a team REPLACE_ME_WITH_DESCRIPTION_END | | -| `name` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The name of a team REPLACE_ME_WITH_DESCRIPTION_END | | +| `team_id` | ```str``` | The id of a team | | +| `name` | ```str``` | The name of a team | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SubTemplateRole.md b/sdks/python/docs/SubTemplateRole.md index 9581ea4b6..09d0d74ff 100644 --- a/sdks/python/docs/SubTemplateRole.md +++ b/sdks/python/docs/SubTemplateRole.md @@ -5,8 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `name` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The role name of the signer that will be displayed when the template is used to create a signature request. REPLACE_ME_WITH_DESCRIPTION_END | | -| `order` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The order in which this signer role is required to sign. REPLACE_ME_WITH_DESCRIPTION_END | | +| `name` | ```str``` | The role name of the signer that will be displayed when the template is used to create a signature request. | | +| `order` | ```int``` | The order in which this signer role is required to sign. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SubUnclaimedDraftSigner.md b/sdks/python/docs/SubUnclaimedDraftSigner.md index a9a297654..a542cecc7 100644 --- a/sdks/python/docs/SubUnclaimedDraftSigner.md +++ b/sdks/python/docs/SubUnclaimedDraftSigner.md @@ -5,9 +5,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `email_address`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The email address of the signer. REPLACE_ME_WITH_DESCRIPTION_END | | -| `name`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The name of the signer. REPLACE_ME_WITH_DESCRIPTION_END | | -| `order` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The order the signer is required to sign in. REPLACE_ME_WITH_DESCRIPTION_END | | +| `email_address`*_required_ | ```str``` | The email address of the signer. | | +| `name`*_required_ | ```str``` | The name of the signer. | | +| `order` | ```int``` | The order the signer is required to sign in. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SubUnclaimedDraftTemplateSigner.md b/sdks/python/docs/SubUnclaimedDraftTemplateSigner.md index b8d32f76f..481850b20 100644 --- a/sdks/python/docs/SubUnclaimedDraftTemplateSigner.md +++ b/sdks/python/docs/SubUnclaimedDraftTemplateSigner.md @@ -5,9 +5,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `role`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Must match an existing role in chosen Template(s). REPLACE_ME_WITH_DESCRIPTION_END | | -| `name`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The name of the signer filling the role of `role`. REPLACE_ME_WITH_DESCRIPTION_END | | -| `email_address`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The email address of the signer filling the role of `role`. REPLACE_ME_WITH_DESCRIPTION_END | | +| `role`*_required_ | ```str``` | Must match an existing role in chosen Template(s). | | +| `name`*_required_ | ```str``` | The name of the signer filling the role of `role`. | | +| `email_address`*_required_ | ```str``` | The email address of the signer filling the role of `role`. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/SubWhiteLabelingOptions.md b/sdks/python/docs/SubWhiteLabelingOptions.md index d10deba9c..ac301537d 100644 --- a/sdks/python/docs/SubWhiteLabelingOptions.md +++ b/sdks/python/docs/SubWhiteLabelingOptions.md @@ -7,21 +7,21 @@ Take a look at our [white labeling guide](https://developers.hellosign.com/api/r ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `header_background_color` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | [default to '#1A1A1A'] | -| `legal_version` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | [default to 'terms1'] | -| `link_color` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | [default to '#00B3E6'] | -| `page_background_color` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | [default to '#F7F8F9'] | -| `primary_button_color` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | [default to '#00B3E6'] | -| `primary_button_color_hover` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | [default to '#00B3E6'] | -| `primary_button_text_color` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | [default to '#FFFFFF'] | -| `primary_button_text_color_hover` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | [default to '#FFFFFF'] | -| `secondary_button_color` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | [default to '#FFFFFF'] | -| `secondary_button_color_hover` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | [default to '#FFFFFF'] | -| `secondary_button_text_color` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | [default to '#00B3E6'] | -| `secondary_button_text_color_hover` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | [default to '#00B3E6'] | -| `text_color1` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | [default to '#808080'] | -| `text_color2` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | [default to '#FFFFFF'] | -| `reset_to_default` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Resets white labeling options to defaults. Only useful when updating an API App. REPLACE_ME_WITH_DESCRIPTION_END | | +| `header_background_color` | ```str``` | | [default to '#1A1A1A'] | +| `legal_version` | ```str``` | | [default to 'terms1'] | +| `link_color` | ```str``` | | [default to '#00B3E6'] | +| `page_background_color` | ```str``` | | [default to '#F7F8F9'] | +| `primary_button_color` | ```str``` | | [default to '#00B3E6'] | +| `primary_button_color_hover` | ```str``` | | [default to '#00B3E6'] | +| `primary_button_text_color` | ```str``` | | [default to '#FFFFFF'] | +| `primary_button_text_color_hover` | ```str``` | | [default to '#FFFFFF'] | +| `secondary_button_color` | ```str``` | | [default to '#FFFFFF'] | +| `secondary_button_color_hover` | ```str``` | | [default to '#FFFFFF'] | +| `secondary_button_text_color` | ```str``` | | [default to '#00B3E6'] | +| `secondary_button_text_color_hover` | ```str``` | | [default to '#00B3E6'] | +| `text_color1` | ```str``` | | [default to '#808080'] | +| `text_color2` | ```str``` | | [default to '#FFFFFF'] | +| `reset_to_default` | ```bool``` | Resets white labeling options to defaults. Only useful when updating an API App. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TeamAddMemberRequest.md b/sdks/python/docs/TeamAddMemberRequest.md index af42ff6c6..8b3120ff9 100644 --- a/sdks/python/docs/TeamAddMemberRequest.md +++ b/sdks/python/docs/TeamAddMemberRequest.md @@ -5,15 +5,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `account_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN `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. REPLACE_ME_WITH_DESCRIPTION_END | | -| `email_address` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN `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. REPLACE_ME_WITH_DESCRIPTION_END | | -| `role` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN A role member will take in a new Team. - -**NOTE:** This parameter is used only if `team_id` is provided. REPLACE_ME_WITH_DESCRIPTION_END | | +| `account_id` | ```str``` | `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` | ```str``` | `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` | ```str``` | A role member will take in a new Team.

**NOTE:** This parameter is used only if `team_id` is provided. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TeamApi.md b/sdks/python/docs/TeamApi.md index 11e6a2d9c..d2cda32fa 100644 --- a/sdks/python/docs/TeamApi.md +++ b/sdks/python/docs/TeamApi.md @@ -29,7 +29,32 @@ Invites a user (specified using the `email_address` parameter) to your Team. If * Bearer (JWT) Authentication (oauth2): ```python -REPLACE_ME_WITH_EXAMPLE_FOR__team_add_member_Python_CODE +from pprint import pprint + +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", +) + +with ApiClient(configuration) as api_client: + team_api = apis.TeamApi(api_client) + + data = models.TeamAddMemberRequest( + email_address="george@example.com", + ) + + try: + response = team_api.team_add_member(data) + pprint(response) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + ``` ``` @@ -74,7 +99,32 @@ Creates a new Team and makes you a member. You must not currently belong to a Te * Bearer (JWT) Authentication (oauth2): ```python -REPLACE_ME_WITH_EXAMPLE_FOR__team_create_Python_CODE +from pprint import pprint + +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", +) + +with ApiClient(configuration) as api_client: + team_api = apis.TeamApi(api_client) + + data = models.TeamCreateRequest( + name="New Team Name", + ) + + try: + response = team_api.team_create(data) + pprint(response) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + ``` ``` @@ -118,7 +168,25 @@ Deletes your Team. Can only be invoked when you have a Team with only one member * Bearer (JWT) Authentication (oauth2): ```python -REPLACE_ME_WITH_EXAMPLE_FOR__team_delete_Python_CODE +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", +) + +with ApiClient(configuration) as api_client: + team_api = apis.TeamApi(api_client) + + try: + team_api.team_delete() + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + ``` ``` @@ -160,7 +228,28 @@ Returns information about your Team as well as a list of its members. If you do * Bearer (JWT) Authentication (oauth2): ```python -REPLACE_ME_WITH_EXAMPLE_FOR__team_get_Python_CODE +from pprint import pprint + +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", +) + +with ApiClient(configuration) as api_client: + team_api = apis.TeamApi(api_client) + + try: + response = team_api.team_get() + pprint(response) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + ``` ``` @@ -202,7 +291,28 @@ Provides information about a team. * Bearer (JWT) Authentication (oauth2): ```python -REPLACE_ME_WITH_EXAMPLE_FOR__team_info_Python_CODE +from pprint import pprint + +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", +) + +with ApiClient(configuration) as api_client: + team_api = apis.TeamApi(api_client) + + try: + response = team_api.team_info() + pprint(response) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + ``` ``` @@ -246,7 +356,30 @@ Provides a list of team invites (and their roles). * Bearer (JWT) Authentication (oauth2): ```python -REPLACE_ME_WITH_EXAMPLE_FOR__team_invites_Python_CODE +from pprint import pprint + +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", +) + +with ApiClient(configuration) as api_client: + team_api = apis.TeamApi(api_client) + + email_address = "user@dropboxsign.com" + + try: + response = team_api.team_invites(email_address=email_address) + pprint(response) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + ``` ``` @@ -290,7 +423,30 @@ Provides a paginated list of members (and their roles) that belong to a given te * Bearer (JWT) Authentication (oauth2): ```python -REPLACE_ME_WITH_EXAMPLE_FOR__team_members_Python_CODE +from pprint import pprint + +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", +) + +with ApiClient(configuration) as api_client: + team_api = apis.TeamApi(api_client) + + team_id = "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c" + + try: + response = team_api.team_members(team_id) + pprint(response) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + ``` ``` @@ -298,8 +454,8 @@ REPLACE_ME_WITH_EXAMPLE_FOR__team_members_Python_CODE | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | `team_id` | **str** | The id of the team that a member list is being requested from. | | -| `page` | **int** | Which page number of the team member list to return. Defaults to `1`. | [optional][default to 1] | -| `page_size` | **int** | Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. | [optional][default to 20] | +| `page` | **int** | Which page number of the team member list to return. Defaults to `1`. | [optional][default to 1] | +| `page_size` | **int** | Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. | [optional][default to 20] | ### Return type @@ -336,7 +492,33 @@ Removes the provided user Account from your Team. If the Account had an outstand * Bearer (JWT) Authentication (oauth2): ```python -REPLACE_ME_WITH_EXAMPLE_FOR__team_remove_member_Python_CODE +from pprint import pprint + +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", +) + +with ApiClient(configuration) as api_client: + team_api = apis.TeamApi(api_client) + + data = models.TeamRemoveMemberRequest( + email_address="teammate@dropboxsign.com", + new_owner_email_address="new_teammate@dropboxsign.com", + ) + + try: + response = team_api.team_remove_member(data) + pprint(response) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + ``` ``` @@ -380,7 +562,30 @@ Provides a paginated list of sub teams that belong to a given team. * Bearer (JWT) Authentication (oauth2): ```python -REPLACE_ME_WITH_EXAMPLE_FOR__team_sub_teams_Python_CODE +from pprint import pprint + +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", +) + +with ApiClient(configuration) as api_client: + team_api = apis.TeamApi(api_client) + + team_id = "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c" + + try: + response = team_api.team_sub_teams(team_id) + pprint(response) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + ``` ``` @@ -388,8 +593,8 @@ REPLACE_ME_WITH_EXAMPLE_FOR__team_sub_teams_Python_CODE | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | `team_id` | **str** | The id of the parent Team. | | -| `page` | **int** | Which page number of the SubTeam List to return. Defaults to `1`. | [optional][default to 1] | -| `page_size` | **int** | Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. | [optional][default to 20] | +| `page` | **int** | Which page number of the SubTeam List to return. Defaults to `1`. | [optional][default to 1] | +| `page_size` | **int** | Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. | [optional][default to 20] | ### Return type @@ -426,7 +631,32 @@ Updates the name of your Team. * Bearer (JWT) Authentication (oauth2): ```python -REPLACE_ME_WITH_EXAMPLE_FOR__team_update_Python_CODE +from pprint import pprint + +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", +) + +with ApiClient(configuration) as api_client: + team_api = apis.TeamApi(api_client) + + data = models.TeamUpdateRequest( + name="New Team Name", + ) + + try: + response = team_api.team_update(data) + pprint(response) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + ``` ``` diff --git a/sdks/python/docs/TeamCreateRequest.md b/sdks/python/docs/TeamCreateRequest.md index 1e87974a8..41d0b75f3 100644 --- a/sdks/python/docs/TeamCreateRequest.md +++ b/sdks/python/docs/TeamCreateRequest.md @@ -5,7 +5,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `name` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The name of your Team. REPLACE_ME_WITH_DESCRIPTION_END | [default to 'Untitled Team'] | +| `name` | ```str``` | The name of your Team. | [default to 'Untitled Team'] | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TeamGetInfoResponse.md b/sdks/python/docs/TeamGetInfoResponse.md index cc8679639..abdad3c8a 100644 --- a/sdks/python/docs/TeamGetInfoResponse.md +++ b/sdks/python/docs/TeamGetInfoResponse.md @@ -5,8 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `team` | [```TeamInfoResponse```](TeamInfoResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN A list of warnings. REPLACE_ME_WITH_DESCRIPTION_END | | +| `team` | [```TeamInfoResponse```](TeamInfoResponse.md) | | | +| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | A list of warnings. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TeamGetResponse.md b/sdks/python/docs/TeamGetResponse.md index 098434f90..d1984604d 100644 --- a/sdks/python/docs/TeamGetResponse.md +++ b/sdks/python/docs/TeamGetResponse.md @@ -5,8 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `team` | [```TeamResponse```](TeamResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN A list of warnings. REPLACE_ME_WITH_DESCRIPTION_END | | +| `team` | [```TeamResponse```](TeamResponse.md) | | | +| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | A list of warnings. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TeamInfoResponse.md b/sdks/python/docs/TeamInfoResponse.md index c14ad369e..832a13027 100644 --- a/sdks/python/docs/TeamInfoResponse.md +++ b/sdks/python/docs/TeamInfoResponse.md @@ -5,11 +5,11 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `team_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The id of a team REPLACE_ME_WITH_DESCRIPTION_END | | -| `team_parent` | [```TeamParentResponse```](TeamParentResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `name` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The name of a team REPLACE_ME_WITH_DESCRIPTION_END | | -| `num_members` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Number of members within a team REPLACE_ME_WITH_DESCRIPTION_END | | -| `num_sub_teams` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Number of sub teams within a team REPLACE_ME_WITH_DESCRIPTION_END | | +| `team_id` | ```str``` | The id of a team | | +| `team_parent` | [```TeamParentResponse```](TeamParentResponse.md) | | | +| `name` | ```str``` | The name of a team | | +| `num_members` | ```int``` | Number of members within a team | | +| `num_sub_teams` | ```int``` | Number of sub teams within a team | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TeamInviteResponse.md b/sdks/python/docs/TeamInviteResponse.md index 50d597072..8e6e284c2 100644 --- a/sdks/python/docs/TeamInviteResponse.md +++ b/sdks/python/docs/TeamInviteResponse.md @@ -5,12 +5,12 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `email_address` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Email address of the user invited to this team. REPLACE_ME_WITH_DESCRIPTION_END | | -| `team_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Id of the team. REPLACE_ME_WITH_DESCRIPTION_END | | -| `role` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Role of the user invited to this team. REPLACE_ME_WITH_DESCRIPTION_END | | -| `sent_at` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Timestamp when the invitation was sent. REPLACE_ME_WITH_DESCRIPTION_END | | -| `redeemed_at` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Timestamp when the invitation was redeemed. REPLACE_ME_WITH_DESCRIPTION_END | | -| `expires_at` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Timestamp when the invitation is expiring. REPLACE_ME_WITH_DESCRIPTION_END | | +| `email_address` | ```str``` | Email address of the user invited to this team. | | +| `team_id` | ```str``` | Id of the team. | | +| `role` | ```str``` | Role of the user invited to this team. | | +| `sent_at` | ```int``` | Timestamp when the invitation was sent. | | +| `redeemed_at` | ```int``` | Timestamp when the invitation was redeemed. | | +| `expires_at` | ```int``` | Timestamp when the invitation is expiring. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TeamInvitesResponse.md b/sdks/python/docs/TeamInvitesResponse.md index 32b3a76b6..70a37552c 100644 --- a/sdks/python/docs/TeamInvitesResponse.md +++ b/sdks/python/docs/TeamInvitesResponse.md @@ -5,8 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `team_invites` | [```List[TeamInviteResponse]```](TeamInviteResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN Contains a list of team invites and their roles. REPLACE_ME_WITH_DESCRIPTION_END | | -| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `team_invites` | [```List[TeamInviteResponse]```](TeamInviteResponse.md) | Contains a list of team invites and their roles. | | +| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TeamMemberResponse.md b/sdks/python/docs/TeamMemberResponse.md index f7fc45dc9..0bb958d08 100644 --- a/sdks/python/docs/TeamMemberResponse.md +++ b/sdks/python/docs/TeamMemberResponse.md @@ -5,9 +5,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `account_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Account id of the team member. REPLACE_ME_WITH_DESCRIPTION_END | | -| `email_address` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Email address of the team member. REPLACE_ME_WITH_DESCRIPTION_END | | -| `role` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The specific role a member has on the team. REPLACE_ME_WITH_DESCRIPTION_END | | +| `account_id` | ```str``` | Account id of the team member. | | +| `email_address` | ```str``` | Email address of the team member. | | +| `role` | ```str``` | The specific role a member has on the team. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TeamMembersResponse.md b/sdks/python/docs/TeamMembersResponse.md index 5719b0e49..b7f0ff21a 100644 --- a/sdks/python/docs/TeamMembersResponse.md +++ b/sdks/python/docs/TeamMembersResponse.md @@ -5,9 +5,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `team_members` | [```List[TeamMemberResponse]```](TeamMemberResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN Contains a list of team members and their roles for a specific team. REPLACE_ME_WITH_DESCRIPTION_END | | -| `list_info` | [```ListInfoResponse```](ListInfoResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `team_members` | [```List[TeamMemberResponse]```](TeamMemberResponse.md) | Contains a list of team members and their roles for a specific team. | | +| `list_info` | [```ListInfoResponse```](ListInfoResponse.md) | | | +| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TeamParentResponse.md b/sdks/python/docs/TeamParentResponse.md index 4be31a608..ef6e9fb95 100644 --- a/sdks/python/docs/TeamParentResponse.md +++ b/sdks/python/docs/TeamParentResponse.md @@ -1,12 +1,12 @@ # TeamParentResponse -Information about the parent team if a team has one, set to `null` otherwise. +Information about the parent team if a team has one, set to `null` otherwise. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `team_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The id of a team REPLACE_ME_WITH_DESCRIPTION_END | | -| `name` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The name of a team REPLACE_ME_WITH_DESCRIPTION_END | | +| `team_id` | ```str``` | The id of a team | | +| `name` | ```str``` | The name of a team | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TeamRemoveMemberRequest.md b/sdks/python/docs/TeamRemoveMemberRequest.md index 3e5bcb866..1f9445fcc 100644 --- a/sdks/python/docs/TeamRemoveMemberRequest.md +++ b/sdks/python/docs/TeamRemoveMemberRequest.md @@ -5,19 +5,11 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `account_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN **account_id** or **email_address** is required. If both are provided, the account id prevails. - -Account id to remove from your Team. REPLACE_ME_WITH_DESCRIPTION_END | | -| `email_address` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN **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. REPLACE_ME_WITH_DESCRIPTION_END | | -| `new_owner_email_address` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | -| `new_team_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Id of the new Team. REPLACE_ME_WITH_DESCRIPTION_END | | -| `new_role` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN A new role member will take in a new Team. - -**NOTE:** This parameter is used only if `new_team_id` is provided. REPLACE_ME_WITH_DESCRIPTION_END | | +| `account_id` | ```str``` | **account_id** or **email_address** is required. If both are provided, the account id prevails.

Account id to remove from your Team. | | +| `email_address` | ```str``` | **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` | ```str``` | 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` | ```str``` | Id of the new Team. | | +| `new_role` | ```str``` | A new role member will take in a new Team.

**NOTE:** This parameter is used only if `new_team_id` is provided. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TeamResponse.md b/sdks/python/docs/TeamResponse.md index b7c09dfac..150fd646e 100644 --- a/sdks/python/docs/TeamResponse.md +++ b/sdks/python/docs/TeamResponse.md @@ -5,10 +5,10 @@ Contains information about your team and its members ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `name` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The name of your Team REPLACE_ME_WITH_DESCRIPTION_END | | -| `accounts` | [```List[AccountResponse]```](AccountResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `invited_accounts` | [```List[AccountResponse]```](AccountResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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`. REPLACE_ME_WITH_DESCRIPTION_END | | -| `invited_emails` | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN A list of email addresses that have an outstanding invitation to join your Team and do not yet have a Dropbox Sign account. REPLACE_ME_WITH_DESCRIPTION_END | | +| `name` | ```str``` | The name of your Team | | +| `accounts` | [```List[AccountResponse]```](AccountResponse.md) | | | +| `invited_accounts` | [```List[AccountResponse]```](AccountResponse.md) | 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` | ```List[str]``` | A list of email addresses that have an outstanding invitation to join your Team and do not yet have a Dropbox Sign account. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TeamSubTeamsResponse.md b/sdks/python/docs/TeamSubTeamsResponse.md index c2193cca8..0b66d8439 100644 --- a/sdks/python/docs/TeamSubTeamsResponse.md +++ b/sdks/python/docs/TeamSubTeamsResponse.md @@ -5,9 +5,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `sub_teams` | [```List[SubTeamResponse]```](SubTeamResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN Contains a list with sub teams. REPLACE_ME_WITH_DESCRIPTION_END | | -| `list_info` | [```ListInfoResponse```](ListInfoResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `sub_teams` | [```List[SubTeamResponse]```](SubTeamResponse.md) | Contains a list with sub teams. | | +| `list_info` | [```ListInfoResponse```](ListInfoResponse.md) | | | +| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TeamUpdateRequest.md b/sdks/python/docs/TeamUpdateRequest.md index 441a2f110..086b33d87 100644 --- a/sdks/python/docs/TeamUpdateRequest.md +++ b/sdks/python/docs/TeamUpdateRequest.md @@ -5,7 +5,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `name` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The name of your Team. REPLACE_ME_WITH_DESCRIPTION_END | | +| `name` | ```str``` | The name of your Team. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateAddUserRequest.md b/sdks/python/docs/TemplateAddUserRequest.md index 99ec8dc37..a8ee5eb21 100644 --- a/sdks/python/docs/TemplateAddUserRequest.md +++ b/sdks/python/docs/TemplateAddUserRequest.md @@ -5,11 +5,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `account_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The id of the Account to give access to the Template. -**NOTE:** The account id prevails if email address is also provided. REPLACE_ME_WITH_DESCRIPTION_END | | -| `email_address` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The email address of the Account to give access to the Template. -**NOTE:** The account id prevails if it is also provided. REPLACE_ME_WITH_DESCRIPTION_END | | -| `skip_notification` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN If set to `true`, the user does not receive an email notification when a template has been shared with them. Defaults to `false`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `account_id` | ```str``` | The id of the Account to give access to the Template.
**NOTE:** The account id prevails if email address is also provided. | | +| `email_address` | ```str``` | The email address of the Account to give access to the Template.
**NOTE:** The account id prevails if it is also provided. | | +| `skip_notification` | ```bool``` | If set to `true`, the user does not receive an email notification when a template has been shared with them. Defaults to `false`. | [default to False] | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateApi.md b/sdks/python/docs/TemplateApi.md index 6e5250ac9..787b5ef55 100644 --- a/sdks/python/docs/TemplateApi.md +++ b/sdks/python/docs/TemplateApi.md @@ -30,7 +30,34 @@ Gives the specified Account access to the specified Template. The specified Acco * Bearer (JWT) Authentication (oauth2): ```python -REPLACE_ME_WITH_EXAMPLE_FOR__template_add_user_Python_CODE +from pprint import pprint + +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", +) + +with ApiClient(configuration) as api_client: + template_api = apis.TemplateApi(api_client) + + data = models.TemplateAddUserRequest( + email_address="george@dropboxsign.com", + ) + + template_id = "f57db65d3f933b5316d398057a36176831451a35" + + try: + response = template_api.template_add_user(template_id, data) + pprint(response) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + ``` ``` @@ -75,7 +102,65 @@ Creates a template that can then be used. * Bearer (JWT) Authentication (oauth2): ```python -REPLACE_ME_WITH_EXAMPLE_FOR__template_create_Python_CODE +from pprint import pprint + +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", +) + +with ApiClient(configuration) as api_client: + template_api = apis.TemplateApi(api_client) + + role_1 = models.SubTemplateRole( + name="Client", + order=0, + ) + + role_2 = models.SubTemplateRole( + name="Witness", + order=1, + ) + + merge_field_1 = models.SubMergeField( + name="Full Name", + type="text", + ) + + merge_field_2 = models.SubMergeField( + name="Is Registered?", + type="checkbox", + ) + + field_options = models.SubFieldOptions( + date_format="DD - MM - YYYY", + ) + + data = models.TemplateCreateRequest( + client_id="37dee8d8440c66d54cfa05d92c160882", + files=[open("example_signature_request.pdf", "rb")], + title="Test Template", + subject="Please sign this document", + message="For your approval", + signer_roles=[role_1, role_2], + cc_roles=["Manager"], + merge_fields=[merge_field_1, merge_field_2], + field_options=field_options, + test_mode=True, + ) + + try: + response = template_api.template_create(data) + pprint(response) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + ``` ``` @@ -119,7 +204,65 @@ The first step in an embedded template workflow. Creates a draft template that c * Bearer (JWT) Authentication (oauth2): ```python -REPLACE_ME_WITH_EXAMPLE_FOR__template_create_embedded_draft_Python_CODE +from pprint import pprint + +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", +) + +with ApiClient(configuration) as api_client: + template_api = apis.TemplateApi(api_client) + + role_1 = models.SubTemplateRole( + name="Client", + order=0, + ) + + role_2 = models.SubTemplateRole( + name="Witness", + order=1, + ) + + merge_field_1 = models.SubMergeField( + name="Full Name", + type="text", + ) + + merge_field_2 = models.SubMergeField( + name="Is Registered?", + type="checkbox", + ) + + field_options = models.SubFieldOptions( + date_format="DD - MM - YYYY", + ) + + data = models.TemplateCreateEmbeddedDraftRequest( + client_id="37dee8d8440c66d54cfa05d92c160882", + files=[open("example_signature_request.pdf", "rb")], + title="Test Template", + subject="Please sign this document", + message="For your approval", + signer_roles=[role_1, role_2], + cc_roles=["Manager"], + merge_fields=[merge_field_1, merge_field_2], + field_options=field_options, + test_mode=True, + ) + + try: + response = template_api.template_create_embedded_draft(data) + pprint(response) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + ``` ``` @@ -163,7 +306,27 @@ Completely deletes the template specified from the account. * Bearer (JWT) Authentication (oauth2): ```python -REPLACE_ME_WITH_EXAMPLE_FOR__template_delete_Python_CODE +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", +) + +with ApiClient(configuration) as api_client: + template_api = apis.TemplateApi(api_client) + + template_id = "5de8179668f2033afac48da1868d0093bf133266" + + try: + template_api.template_delete(template_id) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + ``` ``` @@ -207,7 +370,30 @@ Obtain a copy of the current documents specified by the `template_id` parameter. * Bearer (JWT) Authentication (oauth2): ```python -REPLACE_ME_WITH_EXAMPLE_FOR__template_files_Python_CODE +from pprint import pprint + +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", +) + +with ApiClient(configuration) as api_client: + template_api = apis.TemplateApi(api_client) + + template_id = "5de8179668f2033afac48da1868d0093bf133266" + + try: + response = template_api.template_files(template_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) + ``` ``` @@ -215,7 +401,7 @@ REPLACE_ME_WITH_EXAMPLE_FOR__template_files_Python_CODE | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | `template_id` | **str** | The id of the template files to retrieve. | | -| `file_type` | **str** | Set to `pdf` for a single merged document or `zip` for a collection of individual documents. | [optional] | +| `file_type` | **str** | Set to `pdf` for a single merged document or `zip` for a collection of individual documents. | [optional] | ### Return type @@ -252,7 +438,30 @@ Obtain a copy of the current documents specified by the `template_id` parameter. * Bearer (JWT) Authentication (oauth2): ```python -REPLACE_ME_WITH_EXAMPLE_FOR__template_files_as_data_uri_Python_CODE +from pprint import pprint + +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", +) + +with ApiClient(configuration) as api_client: + template_api = apis.TemplateApi(api_client) + + template_id = "5de8179668f2033afac48da1868d0093bf133266" + + try: + response = template_api.template_files_as_data_uri(template_id) + pprint(response) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + ``` ``` @@ -296,7 +505,30 @@ Obtain a copy of the current documents specified by the `template_id` parameter. * Bearer (JWT) Authentication (oauth2): ```python -REPLACE_ME_WITH_EXAMPLE_FOR__template_files_as_file_url_Python_CODE +from pprint import pprint + +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", +) + +with ApiClient(configuration) as api_client: + template_api = apis.TemplateApi(api_client) + + template_id = "5de8179668f2033afac48da1868d0093bf133266" + + try: + response = template_api.template_files_as_file_url(template_id) + pprint(response) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + ``` ``` @@ -304,7 +536,7 @@ REPLACE_ME_WITH_EXAMPLE_FOR__template_files_as_file_url_Python_CODE | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | `template_id` | **str** | The id of the template files to retrieve. | | -| `force_download` | **int** | 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. | [optional][default to 1] | +| `force_download` | **int** | 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. | [optional][default to 1] | ### Return type @@ -341,7 +573,30 @@ Returns the Template specified by the `template_id` parameter. * Bearer (JWT) Authentication (oauth2): ```python -REPLACE_ME_WITH_EXAMPLE_FOR__template_get_Python_CODE +from pprint import pprint + +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", +) + +with ApiClient(configuration) as api_client: + template_api = apis.TemplateApi(api_client) + + template_id = "f57db65d3f933b5316d398057a36176831451a35" + + try: + response = template_api.template_get(template_id) + pprint(response) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + ``` ``` @@ -385,16 +640,41 @@ Returns a list of the Templates that are accessible by you. Take a look at our * Bearer (JWT) Authentication (oauth2): ```python -REPLACE_ME_WITH_EXAMPLE_FOR__template_list_Python_CODE +from pprint import pprint + +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", +) + +with ApiClient(configuration) as api_client: + template_api = apis.TemplateApi(api_client) + + account_id = "f57db65d3f933b5316d398057a36176831451a35" + + try: + response = template_api.template_list( + account_id=account_id, + ) + pprint(response) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + ``` ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| `account_id` | **str** | Which account to return Templates for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. | [optional] | -| `page` | **int** | Which page number of the Template List to return. Defaults to `1`. | [optional][default to 1] | -| `page_size` | **int** | Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. | [optional][default to 20] | +| `account_id` | **str** | Which account to return Templates for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. | [optional] | +| `page` | **int** | Which page number of the Template List to return. Defaults to `1`. | [optional][default to 1] | +| `page_size` | **int** | Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. | [optional][default to 20] | | `query` | **str** | String that includes search terms and/or fields to be used to filter the Template objects. | [optional] | ### Return type @@ -432,7 +712,34 @@ Removes the specified Account's access to the specified Template. * Bearer (JWT) Authentication (oauth2): ```python -REPLACE_ME_WITH_EXAMPLE_FOR__template_remove_user_Python_CODE +from pprint import pprint + +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", +) + +with ApiClient(configuration) as api_client: + template_api = apis.TemplateApi(api_client) + + data = models.TemplateRemoveUserRequest( + email_address="george@dropboxsign.com", + ) + + template_id = "21f920ec2b7f4b6bb64d3ed79f26303843046536" + + try: + response = template_api.template_remove_user(template_id, data) + pprint(response) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + ``` ``` @@ -477,7 +784,34 @@ Overlays a new file with the overlay of an existing template. The new file(s) mu * Bearer (JWT) Authentication (oauth2): ```python -REPLACE_ME_WITH_EXAMPLE_FOR__template_update_files_Python_CODE +from pprint import pprint + +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", +) + +with ApiClient(configuration) as api_client: + template_api = apis.TemplateApi(api_client) + + data = models.TemplateUpdateFilesRequest( + files=[open("example_signature_request.pdf", "rb")], + ) + + template_id = "5de8179668f2033afac48da1868d0093bf133266" + + try: + response = template_api.template_update_files(template_id, data) + pprint(response) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + ``` ``` diff --git a/sdks/python/docs/TemplateCreateEmbeddedDraftRequest.md b/sdks/python/docs/TemplateCreateEmbeddedDraftRequest.md index 73ee457cf..2f257373d 100644 --- a/sdks/python/docs/TemplateCreateEmbeddedDraftRequest.md +++ b/sdks/python/docs/TemplateCreateEmbeddedDraftRequest.md @@ -5,56 +5,31 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `client_id`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Client id of the app you're using to create this draft. Used to apply the branding and callback url defined for the app. REPLACE_ME_WITH_DESCRIPTION_END | | -| `files` | ```List[io.IOBase]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Use `files[]` to indicate the uploaded file(s) to send for signature. - -This endpoint requires either **files** or **file_urls[]**, but not both. REPLACE_ME_WITH_DESCRIPTION_END | | -| `file_urls` | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | -| `allow_ccs` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN This allows the requester to specify whether the user is allowed to provide email addresses to CC when creating a template. REPLACE_ME_WITH_DESCRIPTION_END | [default to True] | -| `allow_reassign` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `attachments` | [```List[SubAttachment]```](SubAttachment.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN A list describing the attachments REPLACE_ME_WITH_DESCRIPTION_END | | -| `cc_roles` | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The CC roles that must be assigned when using the template to send a signature request REPLACE_ME_WITH_DESCRIPTION_END | | -| `editor_options` | [```SubEditorOptions```](SubEditorOptions.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `field_options` | [```SubFieldOptions```](SubFieldOptions.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `force_signer_roles` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Provide users the ability to review/edit the template signer roles. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `force_subject_message` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Provide users the ability to review/edit the template subject and message. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `form_field_groups` | [```List[SubFormFieldGroup]```](SubFormFieldGroup.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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`. REPLACE_ME_WITH_DESCRIPTION_END | | -| `form_field_rules` | [```List[SubFormFieldRule]```](SubFormFieldRule.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN Conditional Logic rules for fields defined in `form_fields_per_document`. REPLACE_ME_WITH_DESCRIPTION_END | | -| `form_fields_per_document` | [```List[SubFormFieldsPerDocumentBase]```](SubFormFieldsPerDocumentBase.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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` REPLACE_ME_WITH_DESCRIPTION_END | | -| `merge_fields` | [```List[SubMergeField]```](SubMergeField.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | -| `message` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The default template email message. REPLACE_ME_WITH_DESCRIPTION_END | | -| `metadata` | ```Dict[str, object]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | -| `show_preview` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `show_progress_stepper` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. REPLACE_ME_WITH_DESCRIPTION_END | [default to True] | -| `signer_roles` | [```List[SubTemplateRole]```](SubTemplateRole.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN An array of the designated signer roles that must be specified when sending a SignatureRequest using this Template. REPLACE_ME_WITH_DESCRIPTION_END | | -| `skip_me_now` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Disables the "Me (Now)" option for the person preparing the document. Does not work with type `send_document`. Defaults to `false`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `subject` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The template title (alias). REPLACE_ME_WITH_DESCRIPTION_END | | -| `test_mode` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `title` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The title you want to assign to the SignatureRequest. REPLACE_ME_WITH_DESCRIPTION_END | | -| `use_preexisting_fields` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Enable the detection of predefined PDF fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `client_id`*_required_ | ```str``` | 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` | ```List[io.IOBase]``` | 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` | ```List[str]``` | 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` | ```bool``` | This allows the requester to specify whether the user is allowed to provide email addresses to CC when creating a template. | [default to True] | +| `allow_reassign` | ```bool``` | 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. | [default to False] | +| `attachments` | [```List[SubAttachment]```](SubAttachment.md) | A list describing the attachments | | +| `cc_roles` | ```List[str]``` | The CC roles that must be assigned when using the template to send a signature request | | +| `editor_options` | [```SubEditorOptions```](SubEditorOptions.md) | | | +| `field_options` | [```SubFieldOptions```](SubFieldOptions.md) | | | +| `force_signer_roles` | ```bool``` | Provide users the ability to review/edit the template signer roles. | [default to False] | +| `force_subject_message` | ```bool``` | Provide users the ability to review/edit the template subject and message. | [default to False] | +| `form_field_groups` | [```List[SubFormFieldGroup]```](SubFormFieldGroup.md) | 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` | [```List[SubFormFieldRule]```](SubFormFieldRule.md) | Conditional Logic rules for fields defined in `form_fields_per_document`. | | +| `form_fields_per_document` | [```List[SubFormFieldsPerDocumentBase]```](SubFormFieldsPerDocumentBase.md) | 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` | [```List[SubMergeField]```](SubMergeField.md) | 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` | ```str``` | The default template email message. | | +| `metadata` | ```Dict[str, object]``` | 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` | ```bool``` | 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. | [default to False] | +| `show_progress_stepper` | ```bool``` | When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. | [default to True] | +| `signer_roles` | [```List[SubTemplateRole]```](SubTemplateRole.md) | An array of the designated signer roles that must be specified when sending a SignatureRequest using this Template. | | +| `skip_me_now` | ```bool``` | Disables the "Me (Now)" option for the person preparing the document. Does not work with type `send_document`. Defaults to `false`. | [default to False] | +| `subject` | ```str``` | The template title (alias). | | +| `test_mode` | ```bool``` | Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. | [default to False] | +| `title` | ```str``` | The title you want to assign to the SignatureRequest. | | +| `use_preexisting_fields` | ```bool``` | Enable the detection of predefined PDF fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). | [default to False] | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateCreateEmbeddedDraftResponse.md b/sdks/python/docs/TemplateCreateEmbeddedDraftResponse.md index 3a2cc70ed..c18848680 100644 --- a/sdks/python/docs/TemplateCreateEmbeddedDraftResponse.md +++ b/sdks/python/docs/TemplateCreateEmbeddedDraftResponse.md @@ -5,8 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `template` | [```TemplateCreateEmbeddedDraftResponseTemplate```](TemplateCreateEmbeddedDraftResponseTemplate.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN A list of warnings. REPLACE_ME_WITH_DESCRIPTION_END | | +| `template` | [```TemplateCreateEmbeddedDraftResponseTemplate```](TemplateCreateEmbeddedDraftResponseTemplate.md) | | | +| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | A list of warnings. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateCreateEmbeddedDraftResponseTemplate.md b/sdks/python/docs/TemplateCreateEmbeddedDraftResponseTemplate.md index 80f515238..56b48ec48 100644 --- a/sdks/python/docs/TemplateCreateEmbeddedDraftResponseTemplate.md +++ b/sdks/python/docs/TemplateCreateEmbeddedDraftResponseTemplate.md @@ -1,14 +1,14 @@ # TemplateCreateEmbeddedDraftResponseTemplate -Template object with parameters: `template_id`, `edit_url`, `expires_at`. +Template object with parameters: `template_id`, `edit_url`, `expires_at`. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `template_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The id of the Template. REPLACE_ME_WITH_DESCRIPTION_END | | -| `edit_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Link to edit the template. REPLACE_ME_WITH_DESCRIPTION_END | | -| `expires_at` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN When the link expires. REPLACE_ME_WITH_DESCRIPTION_END | | -| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN A list of warnings. REPLACE_ME_WITH_DESCRIPTION_END | | +| `template_id` | ```str``` | The id of the Template. | | +| `edit_url` | ```str``` | Link to edit the template. | | +| `expires_at` | ```int``` | When the link expires. | | +| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | A list of warnings. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateCreateRequest.md b/sdks/python/docs/TemplateCreateRequest.md index 8de7db73b..ec9fb40ea 100644 --- a/sdks/python/docs/TemplateCreateRequest.md +++ b/sdks/python/docs/TemplateCreateRequest.md @@ -5,46 +5,24 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `form_fields_per_document`*_required_ | [```List[SubFormFieldsPerDocumentBase]```](SubFormFieldsPerDocumentBase.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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` REPLACE_ME_WITH_DESCRIPTION_END | | -| `signer_roles`*_required_ | [```List[SubTemplateRole]```](SubTemplateRole.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN An array of the designated signer roles that must be specified when sending a SignatureRequest using this Template. REPLACE_ME_WITH_DESCRIPTION_END | | -| `files` | ```List[io.IOBase]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Use `files[]` to indicate the uploaded file(s) to send for signature. - -This endpoint requires either **files** or **file_urls[]**, but not both. REPLACE_ME_WITH_DESCRIPTION_END | | -| `file_urls` | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | -| `allow_reassign` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `attachments` | [```List[SubAttachment]```](SubAttachment.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN A list describing the attachments REPLACE_ME_WITH_DESCRIPTION_END | | -| `cc_roles` | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The CC roles that must be assigned when using the template to send a signature request REPLACE_ME_WITH_DESCRIPTION_END | | -| `client_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Client id of the app you're using to create this draft. Used to apply the branding and callback url defined for the app. REPLACE_ME_WITH_DESCRIPTION_END | | -| `field_options` | [```SubFieldOptions```](SubFieldOptions.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `form_field_groups` | [```List[SubFormFieldGroup]```](SubFormFieldGroup.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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`. REPLACE_ME_WITH_DESCRIPTION_END | | -| `form_field_rules` | [```List[SubFormFieldRule]```](SubFormFieldRule.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN Conditional Logic rules for fields defined in `form_fields_per_document`. REPLACE_ME_WITH_DESCRIPTION_END | | -| `merge_fields` | [```List[SubMergeField]```](SubMergeField.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | -| `message` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The default template email message. REPLACE_ME_WITH_DESCRIPTION_END | | -| `metadata` | ```Dict[str, object]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | -| `subject` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The template title (alias). REPLACE_ME_WITH_DESCRIPTION_END | | -| `test_mode` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `title` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The title you want to assign to the SignatureRequest. REPLACE_ME_WITH_DESCRIPTION_END | | -| `use_preexisting_fields` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Enable the detection of predefined PDF fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `form_fields_per_document`*_required_ | [```List[SubFormFieldsPerDocumentBase]```](SubFormFieldsPerDocumentBase.md) | 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`*_required_ | [```List[SubTemplateRole]```](SubTemplateRole.md) | An array of the designated signer roles that must be specified when sending a SignatureRequest using this Template. | | +| `files` | ```List[io.IOBase]``` | 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` | ```List[str]``` | 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` | ```bool``` | 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. | [default to False] | +| `attachments` | [```List[SubAttachment]```](SubAttachment.md) | A list describing the attachments | | +| `cc_roles` | ```List[str]``` | The CC roles that must be assigned when using the template to send a signature request | | +| `client_id` | ```str``` | 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` | [```SubFieldOptions```](SubFieldOptions.md) | | | +| `form_field_groups` | [```List[SubFormFieldGroup]```](SubFormFieldGroup.md) | 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` | [```List[SubFormFieldRule]```](SubFormFieldRule.md) | Conditional Logic rules for fields defined in `form_fields_per_document`. | | +| `merge_fields` | [```List[SubMergeField]```](SubMergeField.md) | 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` | ```str``` | The default template email message. | | +| `metadata` | ```Dict[str, object]``` | 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` | ```str``` | The template title (alias). | | +| `test_mode` | ```bool``` | Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. | [default to False] | +| `title` | ```str``` | The title you want to assign to the SignatureRequest. | | +| `use_preexisting_fields` | ```bool``` | Enable the detection of predefined PDF fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). | [default to False] | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateCreateResponse.md b/sdks/python/docs/TemplateCreateResponse.md index 86122951b..111543d54 100644 --- a/sdks/python/docs/TemplateCreateResponse.md +++ b/sdks/python/docs/TemplateCreateResponse.md @@ -5,8 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `template` | [```TemplateCreateResponseTemplate```](TemplateCreateResponseTemplate.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN A list of warnings. REPLACE_ME_WITH_DESCRIPTION_END | | +| `template` | [```TemplateCreateResponseTemplate```](TemplateCreateResponseTemplate.md) | | | +| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | A list of warnings. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateCreateResponseTemplate.md b/sdks/python/docs/TemplateCreateResponseTemplate.md index 07456de90..1c3d76f37 100644 --- a/sdks/python/docs/TemplateCreateResponseTemplate.md +++ b/sdks/python/docs/TemplateCreateResponseTemplate.md @@ -1,11 +1,11 @@ # TemplateCreateResponseTemplate -Template object with parameters: `template_id`. +Template object with parameters: `template_id`. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `template_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The id of the Template. REPLACE_ME_WITH_DESCRIPTION_END | | +| `template_id` | ```str``` | The id of the Template. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateEditResponse.md b/sdks/python/docs/TemplateEditResponse.md index b04adb394..56c36b40a 100644 --- a/sdks/python/docs/TemplateEditResponse.md +++ b/sdks/python/docs/TemplateEditResponse.md @@ -5,7 +5,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `template_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The id of the Template. REPLACE_ME_WITH_DESCRIPTION_END | | +| `template_id` | ```str``` | The id of the Template. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateGetResponse.md b/sdks/python/docs/TemplateGetResponse.md index bc43fa5e8..e8dfa24dd 100644 --- a/sdks/python/docs/TemplateGetResponse.md +++ b/sdks/python/docs/TemplateGetResponse.md @@ -5,8 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `template` | [```TemplateResponse```](TemplateResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN A list of warnings. REPLACE_ME_WITH_DESCRIPTION_END | | +| `template` | [```TemplateResponse```](TemplateResponse.md) | | | +| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | A list of warnings. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateListResponse.md b/sdks/python/docs/TemplateListResponse.md index a30f8aa73..f744bd249 100644 --- a/sdks/python/docs/TemplateListResponse.md +++ b/sdks/python/docs/TemplateListResponse.md @@ -5,9 +5,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `templates` | [```List[TemplateResponse]```](TemplateResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN List of templates that the API caller has access to. REPLACE_ME_WITH_DESCRIPTION_END | | -| `list_info` | [```ListInfoResponse```](ListInfoResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN A list of warnings. REPLACE_ME_WITH_DESCRIPTION_END | | +| `templates` | [```List[TemplateResponse]```](TemplateResponse.md) | List of templates that the API caller has access to. | | +| `list_info` | [```ListInfoResponse```](ListInfoResponse.md) | | | +| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | A list of warnings. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateRemoveUserRequest.md b/sdks/python/docs/TemplateRemoveUserRequest.md index 265e46d7a..36b2de004 100644 --- a/sdks/python/docs/TemplateRemoveUserRequest.md +++ b/sdks/python/docs/TemplateRemoveUserRequest.md @@ -5,8 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `account_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The id or email address of the Account to remove access to the Template. The account id prevails if both are provided. REPLACE_ME_WITH_DESCRIPTION_END | | -| `email_address` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The id or email address of the Account to remove access to the Template. The account id prevails if both are provided. REPLACE_ME_WITH_DESCRIPTION_END | | +| `account_id` | ```str``` | The id or email address of the Account to remove access to the Template. The account id prevails if both are provided. | | +| `email_address` | ```str``` | The id or email address of the Account to remove access to the Template. The account id prevails if both are provided. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateResponse.md b/sdks/python/docs/TemplateResponse.md index 952bb546a..7fb5cedbc 100644 --- a/sdks/python/docs/TemplateResponse.md +++ b/sdks/python/docs/TemplateResponse.md @@ -5,23 +5,21 @@ Contains information about the templates you and your team have created. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `template_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The id of the Template. REPLACE_ME_WITH_DESCRIPTION_END | | -| `title` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | -| `message` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | -| `updated_at` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Time the template was last updated. REPLACE_ME_WITH_DESCRIPTION_END | | -| `is_embedded` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN `true` if this template was created using an embedded flow, `false` if it was created on our website. REPLACE_ME_WITH_DESCRIPTION_END | | -| `is_creator` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN `true` if you are the owner of this template, `false` if it's been shared with you by a team member. REPLACE_ME_WITH_DESCRIPTION_END | | -| `can_edit` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Indicates whether edit rights have been granted to you by the owner (always `true` if that's you). REPLACE_ME_WITH_DESCRIPTION_END | | -| `is_locked` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | -| `metadata` | ```object``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The metadata attached to the template. REPLACE_ME_WITH_DESCRIPTION_END | | -| `signer_roles` | [```List[TemplateResponseSignerRole]```](TemplateResponseSignerRole.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN An array of the designated signer roles that must be specified when sending a SignatureRequest using this Template. REPLACE_ME_WITH_DESCRIPTION_END | | -| `cc_roles` | [```List[TemplateResponseCCRole]```](TemplateResponseCCRole.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN An array of the designated CC roles that must be specified when sending a SignatureRequest using this Template. REPLACE_ME_WITH_DESCRIPTION_END | | -| `documents` | [```List[TemplateResponseDocument]```](TemplateResponseDocument.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN An array describing each document associated with this Template. Includes form field data for each document. REPLACE_ME_WITH_DESCRIPTION_END | | -| `custom_fields` | [```List[TemplateResponseDocumentCustomFieldBase]```](TemplateResponseDocumentCustomFieldBase.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN Deprecated. Use `custom_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead. REPLACE_ME_WITH_DESCRIPTION_END | | -| `named_form_fields` | [```List[TemplateResponseDocumentFormFieldBase]```](TemplateResponseDocumentFormFieldBase.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN Deprecated. Use `form_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead. REPLACE_ME_WITH_DESCRIPTION_END | | -| `accounts` | [```List[TemplateResponseAccount]```](TemplateResponseAccount.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN An array of the Accounts that can use this Template. REPLACE_ME_WITH_DESCRIPTION_END | | +| `template_id` | ```str``` | The id of the Template. | | +| `title` | ```str``` | 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` | ```str``` | 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` | ```int``` | Time the template was last updated. | | +| `is_embedded` | ```bool``` | `true` if this template was created using an embedded flow, `false` if it was created on our website. | | +| `is_creator` | ```bool``` | `true` if you are the owner of this template, `false` if it's been shared with you by a team member. | | +| `can_edit` | ```bool``` | Indicates whether edit rights have been granted to you by the owner (always `true` if that's you). | | +| `is_locked` | ```bool``` | 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` | ```object``` | The metadata attached to the template. | | +| `signer_roles` | [```List[TemplateResponseSignerRole]```](TemplateResponseSignerRole.md) | An array of the designated signer roles that must be specified when sending a SignatureRequest using this Template. | | +| `cc_roles` | [```List[TemplateResponseCCRole]```](TemplateResponseCCRole.md) | An array of the designated CC roles that must be specified when sending a SignatureRequest using this Template. | | +| `documents` | [```List[TemplateResponseDocument]```](TemplateResponseDocument.md) | An array describing each document associated with this Template. Includes form field data for each document. | | +| `custom_fields` | [```List[TemplateResponseDocumentCustomFieldBase]```](TemplateResponseDocumentCustomFieldBase.md) | 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` | [```List[TemplateResponseDocumentFormFieldBase]```](TemplateResponseDocumentFormFieldBase.md) | 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` | [```List[TemplateResponseAccount]```](TemplateResponseAccount.md) | An array of the Accounts that can use this Template. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateResponseAccount.md b/sdks/python/docs/TemplateResponseAccount.md index 53d76fe47..7668fc726 100644 --- a/sdks/python/docs/TemplateResponseAccount.md +++ b/sdks/python/docs/TemplateResponseAccount.md @@ -5,12 +5,12 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `account_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The id of the Account. REPLACE_ME_WITH_DESCRIPTION_END | | -| `email_address` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The email address associated with the Account. REPLACE_ME_WITH_DESCRIPTION_END | | -| `is_locked` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Returns `true` if the user has been locked out of their account by a team admin. REPLACE_ME_WITH_DESCRIPTION_END | | -| `is_paid_hs` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Returns `true` if the user has a paid Dropbox Sign account. REPLACE_ME_WITH_DESCRIPTION_END | | -| `is_paid_hf` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Returns `true` if the user has a paid HelloFax account. REPLACE_ME_WITH_DESCRIPTION_END | | -| `quotas` | [```TemplateResponseAccountQuota```](TemplateResponseAccountQuota.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `account_id` | ```str``` | The id of the Account. | | +| `email_address` | ```str``` | The email address associated with the Account. | | +| `is_locked` | ```bool``` | Returns `true` if the user has been locked out of their account by a team admin. | | +| `is_paid_hs` | ```bool``` | Returns `true` if the user has a paid Dropbox Sign account. | | +| `is_paid_hf` | ```bool``` | Returns `true` if the user has a paid HelloFax account. | | +| `quotas` | [```TemplateResponseAccountQuota```](TemplateResponseAccountQuota.md) | | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateResponseAccountQuota.md b/sdks/python/docs/TemplateResponseAccountQuota.md index 8d683b39b..7e83dcc11 100644 --- a/sdks/python/docs/TemplateResponseAccountQuota.md +++ b/sdks/python/docs/TemplateResponseAccountQuota.md @@ -5,10 +5,10 @@ An array of the designated CC roles that must be specified when sending a Signat ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `templates_left` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN API templates remaining. REPLACE_ME_WITH_DESCRIPTION_END | | -| `api_signature_requests_left` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN API signature requests remaining. REPLACE_ME_WITH_DESCRIPTION_END | | -| `documents_left` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Signature requests remaining. REPLACE_ME_WITH_DESCRIPTION_END | | -| `sms_verifications_left` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN SMS verifications remaining. REPLACE_ME_WITH_DESCRIPTION_END | | +| `templates_left` | ```int``` | API templates remaining. | | +| `api_signature_requests_left` | ```int``` | API signature requests remaining. | | +| `documents_left` | ```int``` | Signature requests remaining. | | +| `sms_verifications_left` | ```int``` | SMS verifications remaining. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateResponseCCRole.md b/sdks/python/docs/TemplateResponseCCRole.md index 2d32d89a9..1aa9fa707 100644 --- a/sdks/python/docs/TemplateResponseCCRole.md +++ b/sdks/python/docs/TemplateResponseCCRole.md @@ -5,7 +5,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `name` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The name of the Role. REPLACE_ME_WITH_DESCRIPTION_END | | +| `name` | ```str``` | The name of the Role. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateResponseDocument.md b/sdks/python/docs/TemplateResponseDocument.md index 3f41f9dc8..8071995b9 100644 --- a/sdks/python/docs/TemplateResponseDocument.md +++ b/sdks/python/docs/TemplateResponseDocument.md @@ -5,12 +5,12 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `name` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Name of the associated file. REPLACE_ME_WITH_DESCRIPTION_END | | -| `index` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Document ordering, the lowest index is displayed first and the highest last (0-based indexing). REPLACE_ME_WITH_DESCRIPTION_END | | -| `field_groups` | [```List[TemplateResponseDocumentFieldGroup]```](TemplateResponseDocumentFieldGroup.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN An array of Form Field Group objects. REPLACE_ME_WITH_DESCRIPTION_END | | -| `form_fields` | [```List[TemplateResponseDocumentFormFieldBase]```](TemplateResponseDocumentFormFieldBase.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN An array of Form Field objects containing the name and type of each named field. REPLACE_ME_WITH_DESCRIPTION_END | | -| `custom_fields` | [```List[TemplateResponseDocumentCustomFieldBase]```](TemplateResponseDocumentCustomFieldBase.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN An array of Form Field objects containing the name and type of each named field. REPLACE_ME_WITH_DESCRIPTION_END | | -| `static_fields` | [```List[TemplateResponseDocumentStaticFieldBase]```](TemplateResponseDocumentStaticFieldBase.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN An array describing static overlay fields. **NOTE:** Only available for certain subscriptions. REPLACE_ME_WITH_DESCRIPTION_END | | +| `name` | ```str``` | Name of the associated file. | | +| `index` | ```int``` | Document ordering, the lowest index is displayed first and the highest last (0-based indexing). | | +| `field_groups` | [```List[TemplateResponseDocumentFieldGroup]```](TemplateResponseDocumentFieldGroup.md) | An array of Form Field Group objects. | | +| `form_fields` | [```List[TemplateResponseDocumentFormFieldBase]```](TemplateResponseDocumentFormFieldBase.md) | An array of Form Field objects containing the name and type of each named field. | | +| `custom_fields` | [```List[TemplateResponseDocumentCustomFieldBase]```](TemplateResponseDocumentCustomFieldBase.md) | An array of Form Field objects containing the name and type of each named field. | | +| `static_fields` | [```List[TemplateResponseDocumentStaticFieldBase]```](TemplateResponseDocumentStaticFieldBase.md) | An array describing static overlay fields. **NOTE:** Only available for certain subscriptions. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateResponseDocumentCustomFieldBase.md b/sdks/python/docs/TemplateResponseDocumentCustomFieldBase.md index 8242c180c..83354a3f4 100644 --- a/sdks/python/docs/TemplateResponseDocumentCustomFieldBase.md +++ b/sdks/python/docs/TemplateResponseDocumentCustomFieldBase.md @@ -5,16 +5,16 @@ An array of Form Field objects containing the name and type of each named field. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `api_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The unique ID for this field. REPLACE_ME_WITH_DESCRIPTION_END | | -| `name` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The name of the Custom Field. REPLACE_ME_WITH_DESCRIPTION_END | | -| `signer` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The signer of the Custom Field. Can be `null` if field is a merge field (assigned to Sender). REPLACE_ME_WITH_DESCRIPTION_END | | -| `x` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The horizontal offset in pixels for this form field. REPLACE_ME_WITH_DESCRIPTION_END | | -| `y` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The vertical offset in pixels for this form field. REPLACE_ME_WITH_DESCRIPTION_END | | -| `width` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The width in pixels of this form field. REPLACE_ME_WITH_DESCRIPTION_END | | -| `height` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The height in pixels of this form field. REPLACE_ME_WITH_DESCRIPTION_END | | -| `required` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Boolean showing whether or not this field is required. REPLACE_ME_WITH_DESCRIPTION_END | | -| `group` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The name of the group this field is in. If this field is not a group, this defaults to `null`. REPLACE_ME_WITH_DESCRIPTION_END | | +| `type`*_required_ | ```str``` | | | +| `api_id` | ```str``` | The unique ID for this field. | | +| `name` | ```str``` | The name of the Custom Field. | | +| `signer` | ```str``` | The signer of the Custom Field. Can be `null` if field is a merge field (assigned to Sender). | | +| `x` | ```int``` | The horizontal offset in pixels for this form field. | | +| `y` | ```int``` | The vertical offset in pixels for this form field. | | +| `width` | ```int``` | The width in pixels of this form field. | | +| `height` | ```int``` | The height in pixels of this form field. | | +| `required` | ```bool``` | Boolean showing whether or not this field is required. | | +| `group` | ```str``` | The name of the group this field is in. If this field is not a group, this defaults to `null`. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateResponseDocumentCustomFieldCheckbox.md b/sdks/python/docs/TemplateResponseDocumentCustomFieldCheckbox.md index cb57a3b9c..0bbf24c50 100644 --- a/sdks/python/docs/TemplateResponseDocumentCustomFieldCheckbox.md +++ b/sdks/python/docs/TemplateResponseDocumentCustomFieldCheckbox.md @@ -1,14 +1,11 @@ # TemplateResponseDocumentCustomFieldCheckbox -This class extends `TemplateResponseDocumentCustomFieldBase` +This class extends `TemplateResponseDocumentCustomFieldBase` ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The type of this Custom Field. Only `text` and `checkbox` are currently supported. - -* Text uses `TemplateResponseDocumentCustomFieldText` -* Checkbox uses `TemplateResponseDocumentCustomFieldCheckbox` REPLACE_ME_WITH_DESCRIPTION_END | [default to 'checkbox'] | +| `type`*_required_ | ```str``` | The type of this Custom Field. Only `text` and `checkbox` are currently supported.

* Text uses `TemplateResponseDocumentCustomFieldText`
* Checkbox uses `TemplateResponseDocumentCustomFieldCheckbox` | [default to 'checkbox'] | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateResponseDocumentCustomFieldText.md b/sdks/python/docs/TemplateResponseDocumentCustomFieldText.md index c78bb667a..474097e03 100644 --- a/sdks/python/docs/TemplateResponseDocumentCustomFieldText.md +++ b/sdks/python/docs/TemplateResponseDocumentCustomFieldText.md @@ -1,18 +1,15 @@ # TemplateResponseDocumentCustomFieldText -This class extends `TemplateResponseDocumentCustomFieldBase` +This class extends `TemplateResponseDocumentCustomFieldBase` ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The type of this Custom Field. Only `text` and `checkbox` are currently supported. - -* Text uses `TemplateResponseDocumentCustomFieldText` -* Checkbox uses `TemplateResponseDocumentCustomFieldCheckbox` REPLACE_ME_WITH_DESCRIPTION_END | [default to 'text'] | -| `avg_text_length` | [```TemplateResponseFieldAvgTextLength```](TemplateResponseFieldAvgTextLength.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `is_multiline` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Whether this form field is multiline text. REPLACE_ME_WITH_DESCRIPTION_END | | -| `original_font_size` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Original font size used in this form field's text. REPLACE_ME_WITH_DESCRIPTION_END | | -| `font_family` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Font family used in this form field's text. REPLACE_ME_WITH_DESCRIPTION_END | | +| `type`*_required_ | ```str``` | The type of this Custom Field. Only `text` and `checkbox` are currently supported.

* Text uses `TemplateResponseDocumentCustomFieldText`
* Checkbox uses `TemplateResponseDocumentCustomFieldCheckbox` | [default to 'text'] | +| `avg_text_length` | [```TemplateResponseFieldAvgTextLength```](TemplateResponseFieldAvgTextLength.md) | | | +| `is_multiline` | ```bool``` | Whether this form field is multiline text. | | +| `original_font_size` | ```int``` | Original font size used in this form field's text. | | +| `font_family` | ```str``` | Font family used in this form field's text. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateResponseDocumentFieldGroup.md b/sdks/python/docs/TemplateResponseDocumentFieldGroup.md index 37abac1c4..29a19c7cf 100644 --- a/sdks/python/docs/TemplateResponseDocumentFieldGroup.md +++ b/sdks/python/docs/TemplateResponseDocumentFieldGroup.md @@ -5,8 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `name` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The name of the form field group. REPLACE_ME_WITH_DESCRIPTION_END | | -| `rule` | [```TemplateResponseDocumentFieldGroupRule```](TemplateResponseDocumentFieldGroupRule.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `name` | ```str``` | The name of the form field group. | | +| `rule` | [```TemplateResponseDocumentFieldGroupRule```](TemplateResponseDocumentFieldGroupRule.md) | | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateResponseDocumentFieldGroupRule.md b/sdks/python/docs/TemplateResponseDocumentFieldGroupRule.md index 7cc8bcb83..3f0a44f1a 100644 --- a/sdks/python/docs/TemplateResponseDocumentFieldGroupRule.md +++ b/sdks/python/docs/TemplateResponseDocumentFieldGroupRule.md @@ -5,12 +5,8 @@ The rule used to validate checkboxes in the form field group. See [checkbox fiel ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `requirement` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | -| `group_label` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Name of the group REPLACE_ME_WITH_DESCRIPTION_END | | +| `requirement` | ```str``` | 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` | ```str``` | Name of the group | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateResponseDocumentFormFieldBase.md b/sdks/python/docs/TemplateResponseDocumentFormFieldBase.md index 43961b707..b8aecfa10 100644 --- a/sdks/python/docs/TemplateResponseDocumentFormFieldBase.md +++ b/sdks/python/docs/TemplateResponseDocumentFormFieldBase.md @@ -5,16 +5,16 @@ An array of Form Field objects containing the name and type of each named field. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `api_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN A unique id for the form field. REPLACE_ME_WITH_DESCRIPTION_END | | -| `name` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The name of the form field. REPLACE_ME_WITH_DESCRIPTION_END | | -| `signer` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The signer of the Form Field. REPLACE_ME_WITH_DESCRIPTION_END | | -| `x` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The horizontal offset in pixels for this form field. REPLACE_ME_WITH_DESCRIPTION_END | | -| `y` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The vertical offset in pixels for this form field. REPLACE_ME_WITH_DESCRIPTION_END | | -| `width` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The width in pixels of this form field. REPLACE_ME_WITH_DESCRIPTION_END | | -| `height` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The height in pixels of this form field. REPLACE_ME_WITH_DESCRIPTION_END | | -| `required` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Boolean showing whether or not this field is required. REPLACE_ME_WITH_DESCRIPTION_END | | -| `group` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. REPLACE_ME_WITH_DESCRIPTION_END | | +| `type`*_required_ | ```str``` | | | +| `api_id` | ```str``` | A unique id for the form field. | | +| `name` | ```str``` | The name of the form field. | | +| `signer` | ```str``` | The signer of the Form Field. | | +| `x` | ```int``` | The horizontal offset in pixels for this form field. | | +| `y` | ```int``` | The vertical offset in pixels for this form field. | | +| `width` | ```int``` | The width in pixels of this form field. | | +| `height` | ```int``` | The height in pixels of this form field. | | +| `required` | ```bool``` | Boolean showing whether or not this field is required. | | +| `group` | ```str``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateResponseDocumentFormFieldCheckbox.md b/sdks/python/docs/TemplateResponseDocumentFormFieldCheckbox.md index 3e7ac21b2..6d35e1c71 100644 --- a/sdks/python/docs/TemplateResponseDocumentFormFieldCheckbox.md +++ b/sdks/python/docs/TemplateResponseDocumentFormFieldCheckbox.md @@ -1,20 +1,11 @@ # TemplateResponseDocumentFormFieldCheckbox -This class extends `TemplateResponseDocumentFormFieldBase` +This class extends `TemplateResponseDocumentFormFieldBase` ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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` REPLACE_ME_WITH_DESCRIPTION_END | [default to 'checkbox'] | +| `type`*_required_ | ```str``` | 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` | [default to 'checkbox'] | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateResponseDocumentFormFieldDateSigned.md b/sdks/python/docs/TemplateResponseDocumentFormFieldDateSigned.md index c7add9fe4..863ed1190 100644 --- a/sdks/python/docs/TemplateResponseDocumentFormFieldDateSigned.md +++ b/sdks/python/docs/TemplateResponseDocumentFormFieldDateSigned.md @@ -1,20 +1,11 @@ # TemplateResponseDocumentFormFieldDateSigned -This class extends `TemplateResponseDocumentFormFieldBase` +This class extends `TemplateResponseDocumentFormFieldBase` ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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` REPLACE_ME_WITH_DESCRIPTION_END | [default to 'date_signed'] | +| `type`*_required_ | ```str``` | 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` | [default to 'date_signed'] | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateResponseDocumentFormFieldDropdown.md b/sdks/python/docs/TemplateResponseDocumentFormFieldDropdown.md index 833a860ce..99d07332c 100644 --- a/sdks/python/docs/TemplateResponseDocumentFormFieldDropdown.md +++ b/sdks/python/docs/TemplateResponseDocumentFormFieldDropdown.md @@ -1,20 +1,11 @@ # TemplateResponseDocumentFormFieldDropdown -This class extends `TemplateResponseDocumentFormFieldBase` +This class extends `TemplateResponseDocumentFormFieldBase` ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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` REPLACE_ME_WITH_DESCRIPTION_END | [default to 'dropdown'] | +| `type`*_required_ | ```str``` | 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` | [default to 'dropdown'] | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateResponseDocumentFormFieldHyperlink.md b/sdks/python/docs/TemplateResponseDocumentFormFieldHyperlink.md index d729a4209..dd7db8dde 100644 --- a/sdks/python/docs/TemplateResponseDocumentFormFieldHyperlink.md +++ b/sdks/python/docs/TemplateResponseDocumentFormFieldHyperlink.md @@ -1,24 +1,15 @@ # TemplateResponseDocumentFormFieldHyperlink -This class extends `TemplateResponseDocumentFormFieldBase` +This class extends `TemplateResponseDocumentFormFieldBase` ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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` REPLACE_ME_WITH_DESCRIPTION_END | [default to 'hyperlink'] | -| `avg_text_length` | [```TemplateResponseFieldAvgTextLength```](TemplateResponseFieldAvgTextLength.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `is_multiline` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Whether this form field is multiline text. REPLACE_ME_WITH_DESCRIPTION_END | | -| `original_font_size` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Original font size used in this form field's text. REPLACE_ME_WITH_DESCRIPTION_END | | -| `font_family` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Font family used in this form field's text. REPLACE_ME_WITH_DESCRIPTION_END | | +| `type`*_required_ | ```str``` | 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` | [default to 'hyperlink'] | +| `avg_text_length` | [```TemplateResponseFieldAvgTextLength```](TemplateResponseFieldAvgTextLength.md) | | | +| `is_multiline` | ```bool``` | Whether this form field is multiline text. | | +| `original_font_size` | ```int``` | Original font size used in this form field's text. | | +| `font_family` | ```str``` | Font family used in this form field's text. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateResponseDocumentFormFieldInitials.md b/sdks/python/docs/TemplateResponseDocumentFormFieldInitials.md index 1a02cca93..80cc52231 100644 --- a/sdks/python/docs/TemplateResponseDocumentFormFieldInitials.md +++ b/sdks/python/docs/TemplateResponseDocumentFormFieldInitials.md @@ -1,20 +1,11 @@ # TemplateResponseDocumentFormFieldInitials -This class extends `TemplateResponseDocumentFormFieldBase` +This class extends `TemplateResponseDocumentFormFieldBase` ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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` REPLACE_ME_WITH_DESCRIPTION_END | [default to 'initials'] | +| `type`*_required_ | ```str``` | 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` | [default to 'initials'] | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateResponseDocumentFormFieldRadio.md b/sdks/python/docs/TemplateResponseDocumentFormFieldRadio.md index 6d7727056..af3e60ed9 100644 --- a/sdks/python/docs/TemplateResponseDocumentFormFieldRadio.md +++ b/sdks/python/docs/TemplateResponseDocumentFormFieldRadio.md @@ -1,20 +1,11 @@ # TemplateResponseDocumentFormFieldRadio -This class extends `TemplateResponseDocumentFormFieldBase` +This class extends `TemplateResponseDocumentFormFieldBase` ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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` REPLACE_ME_WITH_DESCRIPTION_END | [default to 'radio'] | +| `type`*_required_ | ```str``` | 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` | [default to 'radio'] | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateResponseDocumentFormFieldSignature.md b/sdks/python/docs/TemplateResponseDocumentFormFieldSignature.md index fc80288b3..304eaf502 100644 --- a/sdks/python/docs/TemplateResponseDocumentFormFieldSignature.md +++ b/sdks/python/docs/TemplateResponseDocumentFormFieldSignature.md @@ -1,20 +1,11 @@ # TemplateResponseDocumentFormFieldSignature -This class extends `TemplateResponseDocumentFormFieldBase` +This class extends `TemplateResponseDocumentFormFieldBase` ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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` REPLACE_ME_WITH_DESCRIPTION_END | [default to 'signature'] | +| `type`*_required_ | ```str``` | 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` | [default to 'signature'] | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateResponseDocumentFormFieldText.md b/sdks/python/docs/TemplateResponseDocumentFormFieldText.md index a718c409d..bafb6e36b 100644 --- a/sdks/python/docs/TemplateResponseDocumentFormFieldText.md +++ b/sdks/python/docs/TemplateResponseDocumentFormFieldText.md @@ -1,25 +1,16 @@ # TemplateResponseDocumentFormFieldText -This class extends `TemplateResponseDocumentFormFieldBase` +This class extends `TemplateResponseDocumentFormFieldBase` ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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` REPLACE_ME_WITH_DESCRIPTION_END | [default to 'text'] | -| `avg_text_length` | [```TemplateResponseFieldAvgTextLength```](TemplateResponseFieldAvgTextLength.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `is_multiline` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Whether this form field is multiline text. REPLACE_ME_WITH_DESCRIPTION_END | | -| `original_font_size` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Original font size used in this form field's text. REPLACE_ME_WITH_DESCRIPTION_END | | -| `font_family` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Font family used in this form field's text. REPLACE_ME_WITH_DESCRIPTION_END | | -| `validation_type` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `type`*_required_ | ```str``` | 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` | [default to 'text'] | +| `avg_text_length` | [```TemplateResponseFieldAvgTextLength```](TemplateResponseFieldAvgTextLength.md) | | | +| `is_multiline` | ```bool``` | Whether this form field is multiline text. | | +| `original_font_size` | ```int``` | Original font size used in this form field's text. | | +| `font_family` | ```str``` | Font family used in this form field's text. | | +| `validation_type` | ```str``` | 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. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateResponseDocumentStaticFieldBase.md b/sdks/python/docs/TemplateResponseDocumentStaticFieldBase.md index fe209fb43..a7347b687 100644 --- a/sdks/python/docs/TemplateResponseDocumentStaticFieldBase.md +++ b/sdks/python/docs/TemplateResponseDocumentStaticFieldBase.md @@ -5,16 +5,16 @@ An array describing static overlay fields. **NOTE:** Only available for certain ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `api_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN A unique id for the static field. REPLACE_ME_WITH_DESCRIPTION_END | | -| `name` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The name of the static field. REPLACE_ME_WITH_DESCRIPTION_END | | -| `signer` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The signer of the Static Field. REPLACE_ME_WITH_DESCRIPTION_END | [default to 'me_now'] | -| `x` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The horizontal offset in pixels for this static field. REPLACE_ME_WITH_DESCRIPTION_END | | -| `y` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The vertical offset in pixels for this static field. REPLACE_ME_WITH_DESCRIPTION_END | | -| `width` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The width in pixels of this static field. REPLACE_ME_WITH_DESCRIPTION_END | | -| `height` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The height in pixels of this static field. REPLACE_ME_WITH_DESCRIPTION_END | | -| `required` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Boolean showing whether or not this field is required. REPLACE_ME_WITH_DESCRIPTION_END | | -| `group` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The name of the group this field is in. If this field is not a group, this defaults to `null`. REPLACE_ME_WITH_DESCRIPTION_END | | +| `type`*_required_ | ```str``` | | | +| `api_id` | ```str``` | A unique id for the static field. | | +| `name` | ```str``` | The name of the static field. | | +| `signer` | ```str``` | The signer of the Static Field. | [default to 'me_now'] | +| `x` | ```int``` | The horizontal offset in pixels for this static field. | | +| `y` | ```int``` | The vertical offset in pixels for this static field. | | +| `width` | ```int``` | The width in pixels of this static field. | | +| `height` | ```int``` | The height in pixels of this static field. | | +| `required` | ```bool``` | Boolean showing whether or not this field is required. | | +| `group` | ```str``` | The name of the group this field is in. If this field is not a group, this defaults to `null`. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateResponseDocumentStaticFieldCheckbox.md b/sdks/python/docs/TemplateResponseDocumentStaticFieldCheckbox.md index dcc985bb6..a1acbb17c 100644 --- a/sdks/python/docs/TemplateResponseDocumentStaticFieldCheckbox.md +++ b/sdks/python/docs/TemplateResponseDocumentStaticFieldCheckbox.md @@ -1,20 +1,11 @@ # TemplateResponseDocumentStaticFieldCheckbox -This class extends `TemplateResponseDocumentStaticFieldBase` +This class extends `TemplateResponseDocumentStaticFieldBase` ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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` REPLACE_ME_WITH_DESCRIPTION_END | [default to 'checkbox'] | +| `type`*_required_ | ```str``` | 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` | [default to 'checkbox'] | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateResponseDocumentStaticFieldDateSigned.md b/sdks/python/docs/TemplateResponseDocumentStaticFieldDateSigned.md index 4134058c8..62c4b1e7d 100644 --- a/sdks/python/docs/TemplateResponseDocumentStaticFieldDateSigned.md +++ b/sdks/python/docs/TemplateResponseDocumentStaticFieldDateSigned.md @@ -1,20 +1,11 @@ # TemplateResponseDocumentStaticFieldDateSigned -This class extends `TemplateResponseDocumentStaticFieldBase` +This class extends `TemplateResponseDocumentStaticFieldBase` ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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` REPLACE_ME_WITH_DESCRIPTION_END | [default to 'date_signed'] | +| `type`*_required_ | ```str``` | 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` | [default to 'date_signed'] | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateResponseDocumentStaticFieldDropdown.md b/sdks/python/docs/TemplateResponseDocumentStaticFieldDropdown.md index efd4deb1c..302afcf69 100644 --- a/sdks/python/docs/TemplateResponseDocumentStaticFieldDropdown.md +++ b/sdks/python/docs/TemplateResponseDocumentStaticFieldDropdown.md @@ -1,20 +1,11 @@ # TemplateResponseDocumentStaticFieldDropdown -This class extends `TemplateResponseDocumentStaticFieldBase` +This class extends `TemplateResponseDocumentStaticFieldBase` ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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` REPLACE_ME_WITH_DESCRIPTION_END | [default to 'dropdown'] | +| `type`*_required_ | ```str``` | 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` | [default to 'dropdown'] | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateResponseDocumentStaticFieldHyperlink.md b/sdks/python/docs/TemplateResponseDocumentStaticFieldHyperlink.md index d242b07a0..52e93c2ef 100644 --- a/sdks/python/docs/TemplateResponseDocumentStaticFieldHyperlink.md +++ b/sdks/python/docs/TemplateResponseDocumentStaticFieldHyperlink.md @@ -1,20 +1,11 @@ # TemplateResponseDocumentStaticFieldHyperlink -This class extends `TemplateResponseDocumentStaticFieldBase` +This class extends `TemplateResponseDocumentStaticFieldBase` ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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` REPLACE_ME_WITH_DESCRIPTION_END | [default to 'hyperlink'] | +| `type`*_required_ | ```str``` | 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` | [default to 'hyperlink'] | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateResponseDocumentStaticFieldInitials.md b/sdks/python/docs/TemplateResponseDocumentStaticFieldInitials.md index fbcfaa904..227f77c7b 100644 --- a/sdks/python/docs/TemplateResponseDocumentStaticFieldInitials.md +++ b/sdks/python/docs/TemplateResponseDocumentStaticFieldInitials.md @@ -1,20 +1,11 @@ # TemplateResponseDocumentStaticFieldInitials -This class extends `TemplateResponseDocumentStaticFieldBase` +This class extends `TemplateResponseDocumentStaticFieldBase` ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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` REPLACE_ME_WITH_DESCRIPTION_END | [default to 'initials'] | +| `type`*_required_ | ```str``` | 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` | [default to 'initials'] | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateResponseDocumentStaticFieldRadio.md b/sdks/python/docs/TemplateResponseDocumentStaticFieldRadio.md index 66331d2b2..8002b86de 100644 --- a/sdks/python/docs/TemplateResponseDocumentStaticFieldRadio.md +++ b/sdks/python/docs/TemplateResponseDocumentStaticFieldRadio.md @@ -1,20 +1,11 @@ # TemplateResponseDocumentStaticFieldRadio -This class extends `TemplateResponseDocumentStaticFieldBase` +This class extends `TemplateResponseDocumentStaticFieldBase` ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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` REPLACE_ME_WITH_DESCRIPTION_END | [default to 'radio'] | +| `type`*_required_ | ```str``` | 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` | [default to 'radio'] | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateResponseDocumentStaticFieldSignature.md b/sdks/python/docs/TemplateResponseDocumentStaticFieldSignature.md index b7c64690e..443328009 100644 --- a/sdks/python/docs/TemplateResponseDocumentStaticFieldSignature.md +++ b/sdks/python/docs/TemplateResponseDocumentStaticFieldSignature.md @@ -1,20 +1,11 @@ # TemplateResponseDocumentStaticFieldSignature -This class extends `TemplateResponseDocumentStaticFieldBase` +This class extends `TemplateResponseDocumentStaticFieldBase` ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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` REPLACE_ME_WITH_DESCRIPTION_END | [default to 'signature'] | +| `type`*_required_ | ```str``` | 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` | [default to 'signature'] | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateResponseDocumentStaticFieldText.md b/sdks/python/docs/TemplateResponseDocumentStaticFieldText.md index e9e4cded7..1988dc85f 100644 --- a/sdks/python/docs/TemplateResponseDocumentStaticFieldText.md +++ b/sdks/python/docs/TemplateResponseDocumentStaticFieldText.md @@ -1,20 +1,11 @@ # TemplateResponseDocumentStaticFieldText -This class extends `TemplateResponseDocumentStaticFieldBase` +This class extends `TemplateResponseDocumentStaticFieldBase` ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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` REPLACE_ME_WITH_DESCRIPTION_END | [default to 'text'] | +| `type`*_required_ | ```str``` | 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` | [default to 'text'] | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateResponseFieldAvgTextLength.md b/sdks/python/docs/TemplateResponseFieldAvgTextLength.md index 99d016336..f50991c74 100644 --- a/sdks/python/docs/TemplateResponseFieldAvgTextLength.md +++ b/sdks/python/docs/TemplateResponseFieldAvgTextLength.md @@ -5,8 +5,8 @@ Average text length in this field. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `num_lines` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Number of lines. REPLACE_ME_WITH_DESCRIPTION_END | | -| `num_chars_per_line` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Number of characters per line. REPLACE_ME_WITH_DESCRIPTION_END | | +| `num_lines` | ```int``` | Number of lines. | | +| `num_chars_per_line` | ```int``` | Number of characters per line. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateResponseSignerRole.md b/sdks/python/docs/TemplateResponseSignerRole.md index 49654fe83..7a65a361d 100644 --- a/sdks/python/docs/TemplateResponseSignerRole.md +++ b/sdks/python/docs/TemplateResponseSignerRole.md @@ -5,8 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `name` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The name of the Role. REPLACE_ME_WITH_DESCRIPTION_END | | -| `order` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN If signer order is assigned this is the 0-based index for this role. REPLACE_ME_WITH_DESCRIPTION_END | | +| `name` | ```str``` | The name of the Role. | | +| `order` | ```int``` | If signer order is assigned this is the 0-based index for this role. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateUpdateFilesRequest.md b/sdks/python/docs/TemplateUpdateFilesRequest.md index 3cbaaa7ee..7122faddb 100644 --- a/sdks/python/docs/TemplateUpdateFilesRequest.md +++ b/sdks/python/docs/TemplateUpdateFilesRequest.md @@ -5,16 +5,12 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `client_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Client id of the app you're using to update this template. REPLACE_ME_WITH_DESCRIPTION_END | | -| `files` | ```List[io.IOBase]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Use `files[]` to indicate the uploaded file(s) to use for the template. - -This endpoint requires either **files** or **file_urls[]**, but not both. REPLACE_ME_WITH_DESCRIPTION_END | | -| `file_urls` | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | -| `message` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The new default template email message. REPLACE_ME_WITH_DESCRIPTION_END | | -| `subject` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The new default template email subject. REPLACE_ME_WITH_DESCRIPTION_END | | -| `test_mode` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `client_id` | ```str``` | Client id of the app you're using to update this template. | | +| `files` | ```List[io.IOBase]``` | 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` | ```List[str]``` | 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` | ```str``` | The new default template email message. | | +| `subject` | ```str``` | The new default template email subject. | | +| `test_mode` | ```bool``` | Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. | [default to False] | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateUpdateFilesResponse.md b/sdks/python/docs/TemplateUpdateFilesResponse.md index 109e71068..cd5f57a80 100644 --- a/sdks/python/docs/TemplateUpdateFilesResponse.md +++ b/sdks/python/docs/TemplateUpdateFilesResponse.md @@ -5,7 +5,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `template` | [```TemplateUpdateFilesResponseTemplate```](TemplateUpdateFilesResponseTemplate.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | +| `template` | [```TemplateUpdateFilesResponseTemplate```](TemplateUpdateFilesResponseTemplate.md) | | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TemplateUpdateFilesResponseTemplate.md b/sdks/python/docs/TemplateUpdateFilesResponseTemplate.md index 5d6de872b..27ea3171f 100644 --- a/sdks/python/docs/TemplateUpdateFilesResponseTemplate.md +++ b/sdks/python/docs/TemplateUpdateFilesResponseTemplate.md @@ -5,8 +5,8 @@ Contains template id ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `template_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The id of the Template. REPLACE_ME_WITH_DESCRIPTION_END | | -| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN A list of warnings. REPLACE_ME_WITH_DESCRIPTION_END | | +| `template_id` | ```str``` | The id of the Template. | | +| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | A list of warnings. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/UnclaimedDraftApi.md b/sdks/python/docs/UnclaimedDraftApi.md index baabaf8e6..03e8228fb 100644 --- a/sdks/python/docs/UnclaimedDraftApi.md +++ b/sdks/python/docs/UnclaimedDraftApi.md @@ -23,7 +23,71 @@ Creates a new Draft that can be claimed using the claim URL. The first authentic * Bearer (JWT) Authentication (oauth2): ```python -REPLACE_ME_WITH_EXAMPLE_FOR__unclaimed_draft_create_Python_CODE +from pprint import pprint + +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", +) + +with ApiClient(configuration) as api_client: + unclaimed_draft_api = apis.UnclaimedDraftApi(api_client) + + signer_1 = models.SubUnclaimedDraftSigner( + email_address="jack@example.com", + name="Jack", + order=0, + ) + + signer_2 = models.SubUnclaimedDraftSigner( + email_address="jill@example.com", + name="Jill", + order=1, + ) + + signing_options = models.SubSigningOptions( + draw=True, + type=True, + upload=True, + phone=False, + default_type="draw", + ) + + field_options = models.SubFieldOptions( + date_format="DD - MM - YYYY", + ) + + data = models.UnclaimedDraftCreateRequest( + subject="The NDA we talked about", + type="request_signature", + message="Please sign this NDA and then we can discuss more. Let me know if you have any questions.", + signers=[signer_1, signer_2], + cc_email_addresses=[ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + files=[open("example_signature_request.pdf", "rb")], + metadata={ + "custom_id": 1234, + "custom_text": "NDA #9", + }, + signing_options=signing_options, + field_options=field_options, + test_mode=True, + ) + + try: + response = unclaimed_draft_api.unclaimed_draft_create(data) + pprint(response) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + ``` ``` @@ -67,7 +131,35 @@ Creates a new Draft that can be claimed and used in an embedded iFrame. The firs * Bearer (JWT) Authentication (oauth2): ```python -REPLACE_ME_WITH_EXAMPLE_FOR__unclaimed_draft_create_embedded_Python_CODE +from pprint import pprint + +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", +) + +with ApiClient(configuration) as api_client: + unclaimed_draft_api = apis.UnclaimedDraftApi(api_client) + + data = models.UnclaimedDraftCreateEmbeddedRequest( + client_id="ec64a202072370a737edf4a0eb7f4437", + files=[open("example_signature_request.pdf", "rb")], + requester_email_address="jack@dropboxsign.com", + test_mode=True, + ) + + try: + response = unclaimed_draft_api.unclaimed_draft_create_embedded(data) + pprint(response) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + ``` ``` @@ -111,7 +203,48 @@ Creates a new Draft with a previously saved template(s) that can be claimed and * Bearer (JWT) Authentication (oauth2): ```python -REPLACE_ME_WITH_EXAMPLE_FOR__unclaimed_draft_create_embedded_with_template_Python_CODE +from pprint import pprint + +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", +) + +with ApiClient(configuration) as api_client: + unclaimed_draft_api = apis.UnclaimedDraftApi(api_client) + + signer_1 = models.SubUnclaimedDraftTemplateSigner( + role="Client", + name="George", + email_address="george@example.com", + ) + + cc_1 = models.SubCC( + role="Accounting", + email_address="accounting@example.com", + ) + + data = models.UnclaimedDraftCreateEmbeddedWithTemplateRequest( + client_id="ec64a202072370a737edf4a0eb7f4437", + template_ids=["61a832ff0d8423f91d503e76bfbcc750f7417c78"], + requester_email_address="jack@dropboxsign.com", + signers=[signer_1], + ccs=[cc_1], + test_mode=True, + ) + + try: + 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) + ``` ``` @@ -155,7 +288,35 @@ Creates a new signature request from an embedded request that can be edited prio * Bearer (JWT) Authentication (oauth2): ```python -REPLACE_ME_WITH_EXAMPLE_FOR__unclaimed_draft_edit_and_resend_Python_CODE +from pprint import pprint + +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", +) + +with ApiClient(configuration) as api_client: + unclaimed_draft_api = apis.UnclaimedDraftApi(api_client) + + data = models.UnclaimedDraftEditAndResendRequest( + client_id="ec64a202072370a737edf4a0eb7f4437", + test_mode=True, + ) + + signature_request_id = "2f9781e1a83jdja934d808c153c2e1d3df6f8f2f" + + try: + 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/docs/UnclaimedDraftCreateEmbeddedRequest.md b/sdks/python/docs/UnclaimedDraftCreateEmbeddedRequest.md index 511e5f0be..bc81c3c4a 100644 --- a/sdks/python/docs/UnclaimedDraftCreateEmbeddedRequest.md +++ b/sdks/python/docs/UnclaimedDraftCreateEmbeddedRequest.md @@ -5,74 +5,42 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `client_id`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Client id of the app used to create the draft. Used to apply the branding and callback url defined for the app. REPLACE_ME_WITH_DESCRIPTION_END | | -| `requester_email_address`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The email address of the user that should be designated as the requester of this draft, if the draft type is `request_signature`. REPLACE_ME_WITH_DESCRIPTION_END | | -| `files` | ```List[io.IOBase]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Use `files[]` to indicate the uploaded file(s) to send for signature. - -This endpoint requires either **files** or **file_urls[]**, but not both. REPLACE_ME_WITH_DESCRIPTION_END | | -| `file_urls` | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | -| `allow_ccs` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN This allows the requester to specify whether the user is allowed to provide email addresses to CC when claiming the draft. REPLACE_ME_WITH_DESCRIPTION_END | [default to True] | -| `allow_decline` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Allows signers to decline to sign a document if `true`. Defaults to `false`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `allow_reassign` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `attachments` | [```List[SubAttachment]```](SubAttachment.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN A list describing the attachments REPLACE_ME_WITH_DESCRIPTION_END | | -| `cc_email_addresses` | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The email addresses that should be CCed. REPLACE_ME_WITH_DESCRIPTION_END | | -| `custom_fields` | [```List[SubCustomField]```](SubCustomField.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | -| `editor_options` | [```SubEditorOptions```](SubEditorOptions.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `field_options` | [```SubFieldOptions```](SubFieldOptions.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `force_signer_page` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Provide users the ability to review/edit the signers. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `force_subject_message` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Provide users the ability to review/edit the subject and message. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `form_field_groups` | [```List[SubFormFieldGroup]```](SubFormFieldGroup.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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`. REPLACE_ME_WITH_DESCRIPTION_END | | -| `form_field_rules` | [```List[SubFormFieldRule]```](SubFormFieldRule.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN Conditional Logic rules for fields defined in `form_fields_per_document`. REPLACE_ME_WITH_DESCRIPTION_END | | -| `form_fields_per_document` | [```List[SubFormFieldsPerDocumentBase]```](SubFormFieldsPerDocumentBase.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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` REPLACE_ME_WITH_DESCRIPTION_END | | -| `hide_text_tags` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `hold_request` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `is_for_embedded_signing` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The request created from this draft will also be signable in embedded mode if set to `true`. Defaults to `false`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `message` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The custom message in the email that will be sent to the signers. REPLACE_ME_WITH_DESCRIPTION_END | | -| `metadata` | ```Dict[str, object]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | -| `requesting_redirect_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The URL you want signers redirected to after they successfully request a signature. REPLACE_ME_WITH_DESCRIPTION_END | | -| `show_preview` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | -| `show_progress_stepper` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. REPLACE_ME_WITH_DESCRIPTION_END | [default to True] | -| `signers` | [```List[SubUnclaimedDraftSigner]```](SubUnclaimedDraftSigner.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN Add Signers to your Unclaimed Draft Signature Request. REPLACE_ME_WITH_DESCRIPTION_END | | -| `signing_options` | [```SubSigningOptions```](SubSigningOptions.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `signing_redirect_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The URL you want signers redirected to after they successfully sign. REPLACE_ME_WITH_DESCRIPTION_END | | -| `skip_me_now` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Disables the "Me (Now)" option for the person preparing the document. Does not work with type `send_document`. Defaults to `false`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `subject` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The subject in the email that will be sent to the signers. REPLACE_ME_WITH_DESCRIPTION_END | | -| `test_mode` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `type` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | [default to 'request_signature'] | -| `use_preexisting_fields` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `use_text_tags` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `populate_auto_fill_fields` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `expires_at` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `client_id`*_required_ | ```str``` | 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`*_required_ | ```str``` | The email address of the user that should be designated as the requester of this draft, if the draft type is `request_signature`. | | +| `files` | ```List[io.IOBase]``` | 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` | ```List[str]``` | 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` | ```bool``` | This allows the requester to specify whether the user is allowed to provide email addresses to CC when claiming the draft. | [default to True] | +| `allow_decline` | ```bool``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [default to False] | +| `allow_reassign` | ```bool``` | 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. | [default to False] | +| `attachments` | [```List[SubAttachment]```](SubAttachment.md) | A list describing the attachments | | +| `cc_email_addresses` | ```List[str]``` | The email addresses that should be CCed. | | +| `custom_fields` | [```List[SubCustomField]```](SubCustomField.md) | 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` | [```SubEditorOptions```](SubEditorOptions.md) | | | +| `field_options` | [```SubFieldOptions```](SubFieldOptions.md) | | | +| `force_signer_page` | ```bool``` | Provide users the ability to review/edit the signers. | [default to False] | +| `force_subject_message` | ```bool``` | Provide users the ability to review/edit the subject and message. | [default to False] | +| `form_field_groups` | [```List[SubFormFieldGroup]```](SubFormFieldGroup.md) | 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` | [```List[SubFormFieldRule]```](SubFormFieldRule.md) | Conditional Logic rules for fields defined in `form_fields_per_document`. | | +| `form_fields_per_document` | [```List[SubFormFieldsPerDocumentBase]```](SubFormFieldsPerDocumentBase.md) | 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` | ```bool``` | 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. | [default to False] | +| `hold_request` | ```bool``` | 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`. | [default to False] | +| `is_for_embedded_signing` | ```bool``` | The request created from this draft will also be signable in embedded mode if set to `true`. Defaults to `false`. | [default to False] | +| `message` | ```str``` | The custom message in the email that will be sent to the signers. | | +| `metadata` | ```Dict[str, object]``` | 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` | ```str``` | The URL you want signers redirected to after they successfully request a signature. | | +| `show_preview` | ```bool``` | 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` | ```bool``` | When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. | [default to True] | +| `signers` | [```List[SubUnclaimedDraftSigner]```](SubUnclaimedDraftSigner.md) | Add Signers to your Unclaimed Draft Signature Request. | | +| `signing_options` | [```SubSigningOptions```](SubSigningOptions.md) | | | +| `signing_redirect_url` | ```str``` | The URL you want signers redirected to after they successfully sign. | | +| `skip_me_now` | ```bool``` | Disables the "Me (Now)" option for the person preparing the document. Does not work with type `send_document`. Defaults to `false`. | [default to False] | +| `subject` | ```str``` | The subject in the email that will be sent to the signers. | | +| `test_mode` | ```bool``` | Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. | [default to False] | +| `type` | ```str``` | 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. | [default to 'request_signature'] | +| `use_preexisting_fields` | ```bool``` | 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. | [default to False] | +| `use_text_tags` | ```bool``` | 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. | [default to False] | +| `populate_auto_fill_fields` | ```bool``` | 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. | [default to False] | +| `expires_at` | ```int``` | 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. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/UnclaimedDraftCreateEmbeddedWithTemplateRequest.md b/sdks/python/docs/UnclaimedDraftCreateEmbeddedWithTemplateRequest.md index 5952325bb..ef959b997 100644 --- a/sdks/python/docs/UnclaimedDraftCreateEmbeddedWithTemplateRequest.md +++ b/sdks/python/docs/UnclaimedDraftCreateEmbeddedWithTemplateRequest.md @@ -5,54 +5,36 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `client_id`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Client id of the app used to create the draft. Used to apply the branding and callback url defined for the app. REPLACE_ME_WITH_DESCRIPTION_END | | -| `requester_email_address`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The email address of the user that should be designated as the requester of this draft. REPLACE_ME_WITH_DESCRIPTION_END | | -| `template_ids`*_required_ | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the templates will be used. REPLACE_ME_WITH_DESCRIPTION_END | | -| `allow_decline` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Allows signers to decline to sign a document if `true`. Defaults to `false`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `allow_reassign` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `ccs` | [```List[SubCC]```](SubCC.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN Add CC email recipients. Required when a CC role exists for the Template. REPLACE_ME_WITH_DESCRIPTION_END | | -| `custom_fields` | [```List[SubCustomField]```](SubCustomField.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN An array defining values and options for custom fields. Required when a custom field exists in the Template. REPLACE_ME_WITH_DESCRIPTION_END | | -| `editor_options` | [```SubEditorOptions```](SubEditorOptions.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `field_options` | [```SubFieldOptions```](SubFieldOptions.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `files` | ```List[io.IOBase]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | -| `file_urls` | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | -| `force_signer_roles` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Provide users the ability to review/edit the template signer roles. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `force_subject_message` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Provide users the ability to review/edit the template subject and message. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `hold_request` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `is_for_embedded_signing` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The request created from this draft will also be signable in embedded mode if set to `true`. Defaults to `false`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `message` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The custom message in the email that will be sent to the signers. REPLACE_ME_WITH_DESCRIPTION_END | | -| `metadata` | ```Dict[str, object]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | -| `preview_only` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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). REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `requesting_redirect_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The URL you want signers redirected to after they successfully request a signature. REPLACE_ME_WITH_DESCRIPTION_END | | -| `show_preview` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `show_progress_stepper` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. REPLACE_ME_WITH_DESCRIPTION_END | [default to True] | -| `signers` | [```List[SubUnclaimedDraftTemplateSigner]```](SubUnclaimedDraftTemplateSigner.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN Add Signers to your Templated-based Signature Request. REPLACE_ME_WITH_DESCRIPTION_END | | -| `signing_options` | [```SubSigningOptions```](SubSigningOptions.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `signing_redirect_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The URL you want signers redirected to after they successfully sign. REPLACE_ME_WITH_DESCRIPTION_END | | -| `skip_me_now` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Disables the "Me (Now)" option for the person preparing the document. Does not work with type `send_document`. Defaults to `false`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `subject` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The subject in the email that will be sent to the signers. REPLACE_ME_WITH_DESCRIPTION_END | | -| `test_mode` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `title` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The title you want to assign to the SignatureRequest. REPLACE_ME_WITH_DESCRIPTION_END | | -| `populate_auto_fill_fields` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `allow_ccs` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN This allows the requester to specify whether the user is allowed to provide email addresses to CC when claiming the draft. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `client_id`*_required_ | ```str``` | 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`*_required_ | ```str``` | The email address of the user that should be designated as the requester of this draft. | | +| `template_ids`*_required_ | ```List[str]``` | Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the templates will be used. | | +| `allow_decline` | ```bool``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [default to False] | +| `allow_reassign` | ```bool``` | 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. | [default to False] | +| `ccs` | [```List[SubCC]```](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | | +| `custom_fields` | [```List[SubCustomField]```](SubCustomField.md) | An array defining values and options for custom fields. Required when a custom field exists in the Template. | | +| `editor_options` | [```SubEditorOptions```](SubEditorOptions.md) | | | +| `field_options` | [```SubFieldOptions```](SubFieldOptions.md) | | | +| `files` | ```List[io.IOBase]``` | 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` | ```List[str]``` | 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` | ```bool``` | Provide users the ability to review/edit the template signer roles. | [default to False] | +| `force_subject_message` | ```bool``` | Provide users the ability to review/edit the template subject and message. | [default to False] | +| `hold_request` | ```bool``` | 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`. | [default to False] | +| `is_for_embedded_signing` | ```bool``` | The request created from this draft will also be signable in embedded mode if set to `true`. Defaults to `false`. | [default to False] | +| `message` | ```str``` | The custom message in the email that will be sent to the signers. | | +| `metadata` | ```Dict[str, object]``` | 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` | ```bool``` | 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). | [default to False] | +| `requesting_redirect_url` | ```str``` | The URL you want signers redirected to after they successfully request a signature. | | +| `show_preview` | ```bool``` | 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. | [default to False] | +| `show_progress_stepper` | ```bool``` | When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. | [default to True] | +| `signers` | [```List[SubUnclaimedDraftTemplateSigner]```](SubUnclaimedDraftTemplateSigner.md) | Add Signers to your Templated-based Signature Request. | | +| `signing_options` | [```SubSigningOptions```](SubSigningOptions.md) | | | +| `signing_redirect_url` | ```str``` | The URL you want signers redirected to after they successfully sign. | | +| `skip_me_now` | ```bool``` | Disables the "Me (Now)" option for the person preparing the document. Does not work with type `send_document`. Defaults to `false`. | [default to False] | +| `subject` | ```str``` | The subject in the email that will be sent to the signers. | | +| `test_mode` | ```bool``` | Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. | [default to False] | +| `title` | ```str``` | The title you want to assign to the SignatureRequest. | | +| `populate_auto_fill_fields` | ```bool``` | 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. | [default to False] | +| `allow_ccs` | ```bool``` | This allows the requester to specify whether the user is allowed to provide email addresses to CC when claiming the draft. | [default to False] | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/UnclaimedDraftCreateRequest.md b/sdks/python/docs/UnclaimedDraftCreateRequest.md index 6f20be192..61471fcf0 100644 --- a/sdks/python/docs/UnclaimedDraftCreateRequest.md +++ b/sdks/python/docs/UnclaimedDraftCreateRequest.md @@ -5,55 +5,30 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `type`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | -| `files` | ```List[io.IOBase]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Use `files[]` to indicate the uploaded file(s) to send for signature. - -This endpoint requires either **files** or **file_urls[]**, but not both. REPLACE_ME_WITH_DESCRIPTION_END | | -| `file_urls` | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | -| `allow_decline` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Allows signers to decline to sign a document if `true`. Defaults to `false`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `attachments` | [```List[SubAttachment]```](SubAttachment.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN A list describing the attachments REPLACE_ME_WITH_DESCRIPTION_END | | -| `cc_email_addresses` | ```List[str]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The email addresses that should be CCed. REPLACE_ME_WITH_DESCRIPTION_END | | -| `client_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Client id of the app used to create the draft. Used to apply the branding and callback url defined for the app. REPLACE_ME_WITH_DESCRIPTION_END | | -| `custom_fields` | [```List[SubCustomField]```](SubCustomField.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | -| `field_options` | [```SubFieldOptions```](SubFieldOptions.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `form_field_groups` | [```List[SubFormFieldGroup]```](SubFormFieldGroup.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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`. REPLACE_ME_WITH_DESCRIPTION_END | | -| `form_field_rules` | [```List[SubFormFieldRule]```](SubFormFieldRule.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN Conditional Logic rules for fields defined in `form_fields_per_document`. REPLACE_ME_WITH_DESCRIPTION_END | | -| `form_fields_per_document` | [```List[SubFormFieldsPerDocumentBase]```](SubFormFieldsPerDocumentBase.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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` REPLACE_ME_WITH_DESCRIPTION_END | | -| `hide_text_tags` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `message` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The custom message in the email that will be sent to the signers. REPLACE_ME_WITH_DESCRIPTION_END | | -| `metadata` | ```Dict[str, object]``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | -| `show_progress_stepper` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. REPLACE_ME_WITH_DESCRIPTION_END | [default to True] | -| `signers` | [```List[SubUnclaimedDraftSigner]```](SubUnclaimedDraftSigner.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN Add Signers to your Unclaimed Draft Signature Request. REPLACE_ME_WITH_DESCRIPTION_END | | -| `signing_options` | [```SubSigningOptions```](SubSigningOptions.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `signing_redirect_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The URL you want signers redirected to after they successfully sign. REPLACE_ME_WITH_DESCRIPTION_END | | -| `subject` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The subject in the email that will be sent to the signers. REPLACE_ME_WITH_DESCRIPTION_END | | -| `test_mode` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `use_preexisting_fields` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `use_text_tags` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | -| `expires_at` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | +| `type`*_required_ | ```str``` | 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` | ```List[io.IOBase]``` | 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` | ```List[str]``` | 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` | ```bool``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [default to False] | +| `attachments` | [```List[SubAttachment]```](SubAttachment.md) | A list describing the attachments | | +| `cc_email_addresses` | ```List[str]``` | The email addresses that should be CCed. | | +| `client_id` | ```str``` | Client id of the app used to create the draft. Used to apply the branding and callback url defined for the app. | | +| `custom_fields` | [```List[SubCustomField]```](SubCustomField.md) | 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` | [```SubFieldOptions```](SubFieldOptions.md) | | | +| `form_field_groups` | [```List[SubFormFieldGroup]```](SubFormFieldGroup.md) | 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` | [```List[SubFormFieldRule]```](SubFormFieldRule.md) | Conditional Logic rules for fields defined in `form_fields_per_document`. | | +| `form_fields_per_document` | [```List[SubFormFieldsPerDocumentBase]```](SubFormFieldsPerDocumentBase.md) | 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` | ```bool``` | 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. | [default to False] | +| `message` | ```str``` | The custom message in the email that will be sent to the signers. | | +| `metadata` | ```Dict[str, object]``` | 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` | ```bool``` | When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. | [default to True] | +| `signers` | [```List[SubUnclaimedDraftSigner]```](SubUnclaimedDraftSigner.md) | Add Signers to your Unclaimed Draft Signature Request. | | +| `signing_options` | [```SubSigningOptions```](SubSigningOptions.md) | | | +| `signing_redirect_url` | ```str``` | The URL you want signers redirected to after they successfully sign. | | +| `subject` | ```str``` | The subject in the email that will be sent to the signers. | | +| `test_mode` | ```bool``` | Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. | [default to False] | +| `use_preexisting_fields` | ```bool``` | 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. | [default to False] | +| `use_text_tags` | ```bool``` | 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. | [default to False] | +| `expires_at` | ```int``` | 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. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/UnclaimedDraftCreateResponse.md b/sdks/python/docs/UnclaimedDraftCreateResponse.md index 442f583db..7ad98aec0 100644 --- a/sdks/python/docs/UnclaimedDraftCreateResponse.md +++ b/sdks/python/docs/UnclaimedDraftCreateResponse.md @@ -5,8 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `unclaimed_draft` | [```UnclaimedDraftResponse```](UnclaimedDraftResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN A list of warnings. REPLACE_ME_WITH_DESCRIPTION_END | | +| `unclaimed_draft` | [```UnclaimedDraftResponse```](UnclaimedDraftResponse.md) | | | +| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | A list of warnings. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/UnclaimedDraftEditAndResendRequest.md b/sdks/python/docs/UnclaimedDraftEditAndResendRequest.md index 2647501ae..d13a104a7 100644 --- a/sdks/python/docs/UnclaimedDraftEditAndResendRequest.md +++ b/sdks/python/docs/UnclaimedDraftEditAndResendRequest.md @@ -5,14 +5,14 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `client_id`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Client id of the app used to create the draft. Used to apply the branding and callback url defined for the app. REPLACE_ME_WITH_DESCRIPTION_END | | -| `editor_options` | [```SubEditorOptions```](SubEditorOptions.md) | REPLACE_ME_WITH_DESCRIPTION_BEGIN REPLACE_ME_WITH_DESCRIPTION_END | | -| `is_for_embedded_signing` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The request created from this draft will also be signable in embedded mode if set to `true`. REPLACE_ME_WITH_DESCRIPTION_END | | -| `requester_email_address` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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. REPLACE_ME_WITH_DESCRIPTION_END | | -| `requesting_redirect_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The URL you want signers redirected to after they successfully request a signature. REPLACE_ME_WITH_DESCRIPTION_END | | -| `show_progress_stepper` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. REPLACE_ME_WITH_DESCRIPTION_END | [default to True] | -| `signing_redirect_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The URL you want signers redirected to after they successfully sign. REPLACE_ME_WITH_DESCRIPTION_END | | -| `test_mode` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. REPLACE_ME_WITH_DESCRIPTION_END | [default to False] | +| `client_id`*_required_ | ```str``` | Client id of the app used to create the draft. Used to apply the branding and callback url defined for the app. | | +| `editor_options` | [```SubEditorOptions```](SubEditorOptions.md) | | | +| `is_for_embedded_signing` | ```bool``` | The request created from this draft will also be signable in embedded mode if set to `true`. | | +| `requester_email_address` | ```str``` | 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` | ```str``` | The URL you want signers redirected to after they successfully request a signature. | | +| `show_progress_stepper` | ```bool``` | When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. | [default to True] | +| `signing_redirect_url` | ```str``` | The URL you want signers redirected to after they successfully sign. | | +| `test_mode` | ```bool``` | Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. | [default to False] | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/UnclaimedDraftResponse.md b/sdks/python/docs/UnclaimedDraftResponse.md index 1716de48a..2a3e4f967 100644 --- a/sdks/python/docs/UnclaimedDraftResponse.md +++ b/sdks/python/docs/UnclaimedDraftResponse.md @@ -5,12 +5,12 @@ A group of documents that a user can take ownership of via the claim URL. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `signature_request_id` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The ID of the signature request that is represented by this UnclaimedDraft. REPLACE_ME_WITH_DESCRIPTION_END | | -| `claim_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The URL to be used to claim this UnclaimedDraft. REPLACE_ME_WITH_DESCRIPTION_END | | -| `signing_redirect_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN The URL you want signers redirected to after they successfully sign. REPLACE_ME_WITH_DESCRIPTION_END | | -| `requesting_redirect_url` | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN 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.). REPLACE_ME_WITH_DESCRIPTION_END | | -| `expires_at` | ```int``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN When the link expires. REPLACE_ME_WITH_DESCRIPTION_END | | -| `test_mode` | ```bool``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Whether this is a test draft. Signature requests made from test drafts have no legal value. REPLACE_ME_WITH_DESCRIPTION_END | | +| `signature_request_id` | ```str``` | The ID of the signature request that is represented by this UnclaimedDraft. | | +| `claim_url` | ```str``` | The URL to be used to claim this UnclaimedDraft. | | +| `signing_redirect_url` | ```str``` | The URL you want signers redirected to after they successfully sign. | | +| `requesting_redirect_url` | ```str``` | 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` | ```int``` | When the link expires. | | +| `test_mode` | ```bool``` | Whether this is a test draft. Signature requests made from test drafts have no legal value. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/WarningResponse.md b/sdks/python/docs/WarningResponse.md index 1eb34fa49..3de57d0fc 100644 --- a/sdks/python/docs/WarningResponse.md +++ b/sdks/python/docs/WarningResponse.md @@ -5,8 +5,8 @@ A list of warnings. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `warning_msg`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Warning message REPLACE_ME_WITH_DESCRIPTION_END | | -| `warning_name`*_required_ | ```str``` | REPLACE_ME_WITH_DESCRIPTION_BEGIN Warning name REPLACE_ME_WITH_DESCRIPTION_END | | +| `warning_msg`*_required_ | ```str``` | Warning message | | +| `warning_name`*_required_ | ```str``` | Warning name | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/run-build b/sdks/python/run-build index e63d14ce1..1e3702718 100755 --- a/sdks/python/run-build +++ b/sdks/python/run-build @@ -15,8 +15,39 @@ docker run --rm \ -t "/local/templates" \ -o "/local/" +printf "\nInstalling composer dependencies ...\n" +mkdir -p "${DIR}/vendor" +bash "${DIR}/bin/php" composer install +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" + find "${DIR}/docs/" -type f -exec chmod 644 {} \; + find "${DIR}/examples/" -type f -exec chmod 644 {} \; + find "${DIR}/test_fixtures/" -type f -exec chmod 644 {} \; + find "${DIR}/dropbox_sign/" -type f -exec chmod 644 {} \; +fi + printf "Replacing strings ...\n" docker run --rm \ -v "${DIR}:${WORKING_DIR}" \ -w "${WORKING_DIR}" \ perl bash ./bin/replace + +printf "Scanning for prohibited keywords ...\n" +docker run --rm \ + -v "${DIR}:${WORKING_DIR}" \ + -w "${WORKING_DIR}" \ + perl bash ./bin/scan_for + +printf "Running tests ...\n" +bash "${DIR}/bin/python" python -m unittest discover tests + +printf "Success!\n" diff --git a/sdks/python/templates/README.mustache b/sdks/python/templates/README.mustache index bceb88f3b..5fe4264f5 100644 --- a/sdks/python/templates/README.mustache +++ b/sdks/python/templates/README.mustache @@ -3,6 +3,7 @@ {{{.}}} {{/appDescriptionWithNewLines}} +{{^useCustomTemplateCode}} This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: {{appVersion}} @@ -43,16 +44,76 @@ Install via [Setuptools](http://pypi.python.org/pypi/setuptools). python setup.py install --user ``` (or `sudo python setup.py install` to install the package for all users) +{{/useCustomTemplateCode}} +{{#useCustomTemplateCode}} +## Migrating from legacy SDK + +This SDK is generated from our officially maintained [OpenAPI spec](https://github.com/hellosign/hellosign-openapi/blob/main/openapi.yaml). +We've made important updates that introduce new functionality and create feature parity between the Dropbox Sign API and the SDK. +However, some of these changes are considered "breaking" in the sense that they'll require you to update your existing code in order to continue using the SDK. +Please refer to this [migration guide](https://developers.hellosign.com/docs/sdks/python/migration-guide/) for more information. + +## Contributing + +This repo is no longer accepting new issues or Pull Requests. All issues or +Pull Requests *must* be opened against the +[hellosign/hellosign-openapi](https://github.com/hellosign/hellosign-openapi) repo! + +### Changes to the SDK code + +You must make SDK code changes in the mustache file within the `templates` +directory that corresponds to the file you want updated. + +We use [OpenAPI Generator](https://openapi-generator.tech/) to automatically +generate this SDK from the OAS, using the template files. + +### Building + +You must have `docker` (or `podman` linked to `docker`) installed. Highly +recommended to use +[rootless docker](https://docs.docker.com/engine/security/rootless/). + +Run the following and everything is done for you: + +```shell +./run-build +``` + +*Attention*: Any changes you have made to the SDK code that you have not made +to the OAS file and/or the mustache template files _will be lost_ when you run +this command. + +## Installation & Usage + +### Requirements. + +Python {{{generatorLanguageVersion}}} + +### pip + +Install using `pip`: + +```shell +python3 -m pip install dropbox-sign=={{packageVersion}} +``` + +Alternatively: + +```shell +pip install git+https://github.com/hellosign/dropbox-sign-python.git +``` +{{/useCustomTemplateCode}} Then import the package: ```python import {{{packageName}}} ``` +{{^useCustomTemplateCode}} ### Tests - Execute `pytest` to run the tests. +{{/useCustomTemplateCode}} ## Getting Started Please follow the [installation procedure](#installation--usage) and then run the following: diff --git a/sdks/python/templates/common_README.mustache b/sdks/python/templates/common_README.mustache index b7ce4615d..163470c0b 100644 --- a/sdks/python/templates/common_README.mustache +++ b/sdks/python/templates/common_README.mustache @@ -1,3 +1,4 @@ +{{^useCustomTemplateCode}} ```python {{#apiInfo}}{{#apis}}{{#-last}}{{#hasHttpSignatureMethods}}import datetime{{/hasHttpSignatureMethods}}{{/-last}}{{/apis}}{{/apiInfo}} import {{{packageName}}} @@ -27,6 +28,14 @@ from pprint import pprint print("Exception when calling {{classname}}->{{operationId}}: %s\n" % e) {{/-first}}{{/operation}}{{/operations}}{{/-first}}{{/apis}}{{/apiInfo}} ``` +{{/useCustomTemplateCode}} +{{#useCustomTemplateCode}} +{{#apiInfo}}{{#apis}}{{#-first}}{{#operations}}{{#operation}}{{#-first}} +```python +REPLACE_ME_WITH_EXAMPLE_FOR__{{{operationId}}}_Python_CODE +``` +{{/-first}}{{/operation}}{{/operations}}{{/-first}}{{/apis}}{{/apiInfo}} +{{/useCustomTemplateCode}} ## Documentation for API Endpoints @@ -34,8 +43,14 @@ All URIs are relative to *{{{basePath}}}* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- +{{^useCustomTemplateCode}} {{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} +{{/useCustomTemplateCode}} +{{#useCustomTemplateCode}} +{{#apiInfo}}{{#apis}}{{#operations}}|{{#operation}}```{{classname}}``` | [```{{operationId}}```]({{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | ```{{httpMethod}} {{path}}``` | {{summary}}| +{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} +{{/useCustomTemplateCode}} ## Documentation For Models @@ -82,3 +97,19 @@ Class | Method | HTTP request | Description {{#apiInfo}}{{#apis}}{{#-last}}{{infoEmail}} {{/-last}}{{/apis}}{{/apiInfo}} + +{{#useCustomTemplateCode}} +## About this package + +This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: + +- API version: {{appVersion}} +- Package version: {{packageVersion}} +{{^hideGenerationTimestamp}} + - Build date: {{generatedDate}} +{{/hideGenerationTimestamp}} +- Build package: {{generatorClass}} +{{#infoUrl}} + For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) +{{/infoUrl}} +{{/useCustomTemplateCode}} From dc9c56471e8383cd97b525dfd257d1bfcce2c2f7 Mon Sep 17 00:00:00 2001 From: Juan Treminio Date: Thu, 29 Aug 2024 18:23:43 -0500 Subject: [PATCH 04/10] Some test fixes --- .../models/account_create_request.py | 6 +- .../models/account_create_response.py | 6 +- .../models/account_get_response.py | 6 +- .../dropbox_sign/models/account_response.py | 26 +----- .../models/account_response_quotas.py | 36 +-------- .../models/account_response_usage.py | 11 +-- .../models/account_update_request.py | 11 +-- .../models/account_verify_request.py | 6 +- .../models/account_verify_response.py | 6 +- .../models/account_verify_response_account.py | 6 +- .../models/api_app_create_request.py | 6 +- .../models/api_app_get_response.py | 6 +- .../models/api_app_list_response.py | 6 +- .../dropbox_sign/models/api_app_response.py | 26 +----- .../models/api_app_response_o_auth.py | 6 +- .../models/api_app_response_options.py | 6 +- .../models/api_app_response_owner_account.py | 6 +- ...api_app_response_white_labeling_options.py | 6 +- .../models/api_app_update_request.py | 6 +- .../models/bulk_send_job_get_response.py | 6 +- ...end_job_get_response_signature_requests.py | 56 +------------ .../models/bulk_send_job_list_response.py | 6 +- .../models/bulk_send_job_response.py | 11 +-- .../models/bulk_send_job_send_response.py | 6 +- .../models/embedded_edit_url_request.py | 6 +- .../models/embedded_edit_url_response.py | 6 +- .../embedded_edit_url_response_embedded.py | 6 +- .../models/embedded_sign_url_response.py | 6 +- .../embedded_sign_url_response_embedded.py | 6 +- .../dropbox_sign/models/error_response.py | 6 +- .../models/error_response_error.py | 6 +- .../models/event_callback_request.py | 6 +- .../models/event_callback_request_event.py | 6 +- .../event_callback_request_event_metadata.py | 26 +----- .../models/fax_line_add_user_request.py | 6 +- .../models/fax_line_area_code_get_response.py | 6 +- .../models/fax_line_create_request.py | 6 +- .../models/fax_line_delete_request.py | 6 +- .../models/fax_line_list_response.py | 6 +- .../models/fax_line_remove_user_request.py | 6 +- .../dropbox_sign/models/fax_line_response.py | 6 +- .../models/fax_line_response_fax_line.py | 6 +- .../dropbox_sign/models/file_response.py | 6 +- .../models/file_response_data_uri.py | 6 +- .../dropbox_sign/models/list_info_response.py | 11 +-- .../models/o_auth_token_generate_request.py | 6 +- .../models/o_auth_token_refresh_request.py | 6 +- .../models/o_auth_token_response.py | 11 +-- .../models/report_create_request.py | 6 +- .../models/report_create_response.py | 6 +- .../dropbox_sign/models/report_response.py | 6 +- ...k_create_embedded_with_template_request.py | 6 +- ...request_bulk_send_with_template_request.py | 6 +- ...gnature_request_create_embedded_request.py | 11 +-- ...t_create_embedded_with_template_request.py | 6 +- .../models/signature_request_get_response.py | 6 +- .../models/signature_request_list_response.py | 6 +- .../signature_request_remind_request.py | 6 +- .../models/signature_request_response.py | 61 +------------- .../signature_request_response_attachment.py | 16 +--- ...ture_request_response_custom_field_base.py | 6 +- ..._request_response_custom_field_checkbox.py | 6 +- ...ture_request_response_custom_field_text.py | 6 +- .../signature_request_response_data_base.py | 6 +- ...re_request_response_data_value_checkbox.py | 6 +- ...uest_response_data_value_checkbox_merge.py | 6 +- ...request_response_data_value_date_signed.py | 6 +- ...re_request_response_data_value_dropdown.py | 6 +- ...re_request_response_data_value_initials.py | 6 +- ...ature_request_response_data_value_radio.py | 6 +- ...e_request_response_data_value_signature.py | 6 +- ...nature_request_response_data_value_text.py | 6 +- ..._request_response_data_value_text_merge.py | 6 +- .../signature_request_response_signatures.py | 81 +------------------ .../models/signature_request_send_request.py | 11 +-- ...ture_request_send_with_template_request.py | 6 +- .../signature_request_update_request.py | 11 +-- .../dropbox_sign/models/sub_attachment.py | 6 +- .../models/sub_bulk_signer_list.py | 6 +- .../sub_bulk_signer_list_custom_field.py | 6 +- sdks/python/dropbox_sign/models/sub_cc.py | 6 +- .../dropbox_sign/models/sub_custom_field.py | 6 +- .../dropbox_sign/models/sub_editor_options.py | 6 +- .../dropbox_sign/models/sub_field_options.py | 6 +- .../models/sub_form_field_group.py | 6 +- .../models/sub_form_field_rule.py | 6 +- .../models/sub_form_field_rule_action.py | 6 +- .../models/sub_form_field_rule_trigger.py | 6 +- .../sub_form_fields_per_document_base.py | 11 +-- .../sub_form_fields_per_document_checkbox.py | 11 +-- ...form_fields_per_document_checkbox_merge.py | 11 +-- ...ub_form_fields_per_document_date_signed.py | 11 +-- .../sub_form_fields_per_document_dropdown.py | 11 +-- .../sub_form_fields_per_document_hyperlink.py | 11 +-- .../sub_form_fields_per_document_initials.py | 11 +-- .../sub_form_fields_per_document_radio.py | 11 +-- .../sub_form_fields_per_document_signature.py | 11 +-- .../sub_form_fields_per_document_text.py | 11 +-- ...sub_form_fields_per_document_text_merge.py | 11 +-- .../dropbox_sign/models/sub_merge_field.py | 6 +- sdks/python/dropbox_sign/models/sub_o_auth.py | 6 +- .../python/dropbox_sign/models/sub_options.py | 6 +- .../sub_signature_request_grouped_signers.py | 11 +-- .../models/sub_signature_request_signer.py | 11 +-- .../sub_signature_request_template_signer.py | 6 +- .../models/sub_signing_options.py | 6 +- .../dropbox_sign/models/sub_team_response.py | 6 +- .../dropbox_sign/models/sub_template_role.py | 11 +-- .../models/sub_unclaimed_draft_signer.py | 11 +-- .../sub_unclaimed_draft_template_signer.py | 6 +- .../models/sub_white_labeling_options.py | 6 +- .../models/team_add_member_request.py | 6 +- .../models/team_create_request.py | 6 +- .../models/team_get_info_response.py | 6 +- .../dropbox_sign/models/team_get_response.py | 6 +- .../dropbox_sign/models/team_info_response.py | 11 +-- .../models/team_invite_response.py | 6 +- .../models/team_invites_response.py | 6 +- .../models/team_member_response.py | 6 +- .../models/team_members_response.py | 6 +- .../models/team_parent_response.py | 6 +- .../models/team_remove_member_request.py | 6 +- .../dropbox_sign/models/team_response.py | 6 +- .../models/team_sub_teams_response.py | 6 +- .../models/team_update_request.py | 6 +- .../models/template_add_user_request.py | 6 +- .../template_create_embedded_draft_request.py | 6 +- ...template_create_embedded_draft_response.py | 6 +- ...create_embedded_draft_response_template.py | 6 +- .../models/template_create_request.py | 6 +- .../models/template_create_response.py | 6 +- .../template_create_response_template.py | 6 +- .../models/template_edit_response.py | 6 +- .../models/template_get_response.py | 6 +- .../models/template_list_response.py | 6 +- .../models/template_remove_user_request.py | 6 +- .../dropbox_sign/models/template_response.py | 41 +--------- .../models/template_response_account.py | 6 +- .../models/template_response_account_quota.py | 6 +- .../models/template_response_cc_role.py | 6 +- .../models/template_response_document.py | 11 +-- ...ate_response_document_custom_field_base.py | 16 +--- ...response_document_custom_field_checkbox.py | 16 +--- ...ate_response_document_custom_field_text.py | 16 +--- .../template_response_document_field_group.py | 6 +- ...late_response_document_field_group_rule.py | 6 +- ...plate_response_document_form_field_base.py | 11 +-- ...e_response_document_form_field_checkbox.py | 11 +-- ...esponse_document_form_field_date_signed.py | 11 +-- ...e_response_document_form_field_dropdown.py | 11 +-- ..._response_document_form_field_hyperlink.py | 11 +-- ...e_response_document_form_field_initials.py | 11 +-- ...late_response_document_form_field_radio.py | 11 +-- ..._response_document_form_field_signature.py | 11 +-- ...plate_response_document_form_field_text.py | 16 +--- ...ate_response_document_static_field_base.py | 11 +-- ...response_document_static_field_checkbox.py | 11 +-- ...ponse_document_static_field_date_signed.py | 11 +-- ...response_document_static_field_dropdown.py | 11 +-- ...esponse_document_static_field_hyperlink.py | 11 +-- ...response_document_static_field_initials.py | 11 +-- ...te_response_document_static_field_radio.py | 11 +-- ...esponse_document_static_field_signature.py | 11 +-- ...ate_response_document_static_field_text.py | 11 +-- ...template_response_field_avg_text_length.py | 6 +- .../models/template_response_signer_role.py | 6 +- .../models/template_update_files_request.py | 6 +- .../models/template_update_files_response.py | 6 +- ...template_update_files_response_template.py | 6 +- ...unclaimed_draft_create_embedded_request.py | 11 +-- ...t_create_embedded_with_template_request.py | 6 +- .../models/unclaimed_draft_create_request.py | 11 +-- .../models/unclaimed_draft_create_response.py | 6 +- ...unclaimed_draft_edit_and_resend_request.py | 6 +- .../models/unclaimed_draft_response.py | 26 +----- .../dropbox_sign/models/warning_response.py | 6 +- sdks/python/templates/model_generic.mustache | 10 ++- ...st_model_signature_request_send_request.py | 1 + 178 files changed, 359 insertions(+), 1303 deletions(-) diff --git a/sdks/python/dropbox_sign/models/account_create_request.py b/sdks/python/dropbox_sign/models/account_create_request.py index 79a85698c..22383c548 100644 --- a/sdks/python/dropbox_sign/models/account_create_request.py +++ b/sdks/python/dropbox_sign/models/account_create_request.py @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class AccountCreateRequest(BaseModel): """ @@ -38,6 +39,7 @@ class AccountCreateRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -118,7 +120,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - diff --git a/sdks/python/dropbox_sign/models/account_create_response.py b/sdks/python/dropbox_sign/models/account_create_response.py index b2fb080b1..0f0326808 100644 --- a/sdks/python/dropbox_sign/models/account_create_response.py +++ b/sdks/python/dropbox_sign/models/account_create_response.py @@ -26,6 +26,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class AccountCreateResponse(BaseModel): """ @@ -40,6 +41,7 @@ class AccountCreateResponse(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -132,7 +134,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: "warnings", ] - model_config = { - "arbitrary_types_allowed": True - } - diff --git a/sdks/python/dropbox_sign/models/account_get_response.py b/sdks/python/dropbox_sign/models/account_get_response.py index 8c57cce32..91819bd98 100644 --- a/sdks/python/dropbox_sign/models/account_get_response.py +++ b/sdks/python/dropbox_sign/models/account_get_response.py @@ -25,6 +25,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class AccountGetResponse(BaseModel): """ @@ -38,6 +39,7 @@ class AccountGetResponse(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -125,7 +127,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: "warnings", ] - model_config = { - "arbitrary_types_allowed": True - } - diff --git a/sdks/python/dropbox_sign/models/account_response.py b/sdks/python/dropbox_sign/models/account_response.py index 26ed3ad07..91847fa12 100644 --- a/sdks/python/dropbox_sign/models/account_response.py +++ b/sdks/python/dropbox_sign/models/account_response.py @@ -25,6 +25,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class AccountResponse(BaseModel): """ @@ -47,6 +48,7 @@ class AccountResponse(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -93,26 +95,6 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of usage if self.usage: _dict['usage'] = self.usage.to_dict() - # set to None if callback_url (nullable) is None - # and model_fields_set contains the field - if self.callback_url is None and "callback_url" in self.model_fields_set: - _dict['callback_url'] = None - - # set to None if role_code (nullable) is None - # and model_fields_set contains the field - if self.role_code is None and "role_code" in self.model_fields_set: - _dict['role_code'] = None - - # set to None if team_id (nullable) is None - # and model_fields_set contains the field - if self.team_id is None and "team_id" in self.model_fields_set: - _dict['team_id'] = None - - # set to None if locale (nullable) is None - # and model_fields_set contains the field - if self.locale is None and "locale" in self.model_fields_set: - _dict['locale'] = None - return _dict @classmethod @@ -167,7 +149,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - diff --git a/sdks/python/dropbox_sign/models/account_response_quotas.py b/sdks/python/dropbox_sign/models/account_response_quotas.py index c5e9d1b57..56aafc849 100644 --- a/sdks/python/dropbox_sign/models/account_response_quotas.py +++ b/sdks/python/dropbox_sign/models/account_response_quotas.py @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class AccountResponseQuotas(BaseModel): """ @@ -40,6 +41,7 @@ class AccountResponseQuotas(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -80,36 +82,6 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if api_signature_requests_left (nullable) is None - # and model_fields_set contains the field - if self.api_signature_requests_left is None and "api_signature_requests_left" in self.model_fields_set: - _dict['api_signature_requests_left'] = None - - # set to None if documents_left (nullable) is None - # and model_fields_set contains the field - if self.documents_left is None and "documents_left" in self.model_fields_set: - _dict['documents_left'] = None - - # set to None if templates_total (nullable) is None - # and model_fields_set contains the field - if self.templates_total is None and "templates_total" in self.model_fields_set: - _dict['templates_total'] = None - - # set to None if templates_left (nullable) is None - # and model_fields_set contains the field - if self.templates_left is None and "templates_left" in self.model_fields_set: - _dict['templates_left'] = None - - # set to None if sms_verifications_left (nullable) is None - # and model_fields_set contains the field - if self.sms_verifications_left is None and "sms_verifications_left" in self.model_fields_set: - _dict['sms_verifications_left'] = None - - # set to None if num_fax_pages_left (nullable) is None - # and model_fields_set contains the field - if self.num_fax_pages_left is None and "num_fax_pages_left" in self.model_fields_set: - _dict['num_fax_pages_left'] = None - return _dict @classmethod @@ -154,7 +126,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - diff --git a/sdks/python/dropbox_sign/models/account_response_usage.py b/sdks/python/dropbox_sign/models/account_response_usage.py index 4feed3b21..43c6e7371 100644 --- a/sdks/python/dropbox_sign/models/account_response_usage.py +++ b/sdks/python/dropbox_sign/models/account_response_usage.py @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class AccountResponseUsage(BaseModel): """ @@ -35,6 +36,7 @@ class AccountResponseUsage(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -75,11 +77,6 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if fax_pages_sent (nullable) is None - # and model_fields_set contains the field - if self.fax_pages_sent is None and "fax_pages_sent" in self.model_fields_set: - _dict['fax_pages_sent'] = None - return _dict @classmethod @@ -114,7 +111,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - diff --git a/sdks/python/dropbox_sign/models/account_update_request.py b/sdks/python/dropbox_sign/models/account_update_request.py index 8e88c5106..e6a158f6e 100644 --- a/sdks/python/dropbox_sign/models/account_update_request.py +++ b/sdks/python/dropbox_sign/models/account_update_request.py @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class AccountUpdateRequest(BaseModel): """ @@ -37,6 +38,7 @@ class AccountUpdateRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -77,11 +79,6 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if account_id (nullable) is None - # and model_fields_set contains the field - if self.account_id is None and "account_id" in self.model_fields_set: - _dict['account_id'] = None - return _dict @classmethod @@ -120,7 +117,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - diff --git a/sdks/python/dropbox_sign/models/account_verify_request.py b/sdks/python/dropbox_sign/models/account_verify_request.py index c1c6673c7..94572fa19 100644 --- a/sdks/python/dropbox_sign/models/account_verify_request.py +++ b/sdks/python/dropbox_sign/models/account_verify_request.py @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class AccountVerifyRequest(BaseModel): """ @@ -35,6 +36,7 @@ class AccountVerifyRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -109,7 +111,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - diff --git a/sdks/python/dropbox_sign/models/account_verify_response.py b/sdks/python/dropbox_sign/models/account_verify_response.py index 71317ad11..bab181431 100644 --- a/sdks/python/dropbox_sign/models/account_verify_response.py +++ b/sdks/python/dropbox_sign/models/account_verify_response.py @@ -25,6 +25,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class AccountVerifyResponse(BaseModel): """ @@ -38,6 +39,7 @@ class AccountVerifyResponse(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -125,7 +127,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: "warnings", ] - model_config = { - "arbitrary_types_allowed": True - } - 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 8f557854c..c275684af 100644 --- a/sdks/python/dropbox_sign/models/account_verify_response_account.py +++ b/sdks/python/dropbox_sign/models/account_verify_response_account.py @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class AccountVerifyResponseAccount(BaseModel): """ @@ -35,6 +36,7 @@ class AccountVerifyResponseAccount(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -109,7 +111,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 85975eee2..8b44d385e 100644 --- a/sdks/python/dropbox_sign/models/api_app_create_request.py +++ b/sdks/python/dropbox_sign/models/api_app_create_request.py @@ -27,6 +27,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class ApiAppCreateRequest(BaseModel): """ @@ -45,6 +46,7 @@ class ApiAppCreateRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -141,7 +143,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: "domains", ] - model_config = { - "arbitrary_types_allowed": True - } - 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 d2cf910a7..502ce1fa7 100644 --- a/sdks/python/dropbox_sign/models/api_app_get_response.py +++ b/sdks/python/dropbox_sign/models/api_app_get_response.py @@ -25,6 +25,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class ApiAppGetResponse(BaseModel): """ @@ -38,6 +39,7 @@ class ApiAppGetResponse(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -125,7 +127,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: "warnings", ] - model_config = { - "arbitrary_types_allowed": True - } - 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 73246ae8b..286a65434 100644 --- a/sdks/python/dropbox_sign/models/api_app_list_response.py +++ b/sdks/python/dropbox_sign/models/api_app_list_response.py @@ -26,6 +26,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class ApiAppListResponse(BaseModel): """ @@ -40,6 +41,7 @@ class ApiAppListResponse(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -137,7 +139,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: "warnings", ] - model_config = { - "arbitrary_types_allowed": True - } - diff --git a/sdks/python/dropbox_sign/models/api_app_response.py b/sdks/python/dropbox_sign/models/api_app_response.py index 7d1320403..fa5380ab6 100644 --- a/sdks/python/dropbox_sign/models/api_app_response.py +++ b/sdks/python/dropbox_sign/models/api_app_response.py @@ -27,6 +27,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class ApiAppResponse(BaseModel): """ @@ -48,6 +49,7 @@ class ApiAppResponse(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -100,26 +102,6 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: # 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() - # set to None if callback_url (nullable) is None - # and model_fields_set contains the field - if self.callback_url is None and "callback_url" in self.model_fields_set: - _dict['callback_url'] = None - - # set to None if oauth (nullable) is None - # and model_fields_set contains the field - if self.oauth is None and "oauth" in self.model_fields_set: - _dict['oauth'] = None - - # set to None if options (nullable) is None - # and model_fields_set contains the field - if self.options is None and "options" in self.model_fields_set: - _dict['options'] = None - - # set to None if white_labeling_options (nullable) is None - # and model_fields_set contains the field - if self.white_labeling_options is None and "white_labeling_options" in self.model_fields_set: - _dict['white_labeling_options'] = None - return _dict @classmethod @@ -173,7 +155,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: "domains", ] - model_config = { - "arbitrary_types_allowed": True - } - 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 c3778a168..7d3089b87 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 @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class ApiAppResponseOAuth(BaseModel): """ @@ -38,6 +39,7 @@ class ApiAppResponseOAuth(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -119,7 +121,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: "scopes", ] - model_config = { - "arbitrary_types_allowed": True - } - 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 6ffb071a3..77cd1689b 100644 --- a/sdks/python/dropbox_sign/models/api_app_response_options.py +++ b/sdks/python/dropbox_sign/models/api_app_response_options.py @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class ApiAppResponseOptions(BaseModel): """ @@ -35,6 +36,7 @@ class ApiAppResponseOptions(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -109,7 +111,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 a5951ab54..62191b1d2 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 @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class ApiAppResponseOwnerAccount(BaseModel): """ @@ -36,6 +37,7 @@ class ApiAppResponseOwnerAccount(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -112,7 +114,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 d076a3eba..af1854792 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 @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class ApiAppResponseWhiteLabelingOptions(BaseModel): """ @@ -48,6 +49,7 @@ class ApiAppResponseWhiteLabelingOptions(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -148,7 +150,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 523f17634..e8c4bb6af 100644 --- a/sdks/python/dropbox_sign/models/api_app_update_request.py +++ b/sdks/python/dropbox_sign/models/api_app_update_request.py @@ -27,6 +27,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class ApiAppUpdateRequest(BaseModel): """ @@ -45,6 +46,7 @@ class ApiAppUpdateRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -141,7 +143,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: "domains", ] - model_config = { - "arbitrary_types_allowed": True - } - 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 abff8fb5c..c777a1890 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 @@ -27,6 +27,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class BulkSendJobGetResponse(BaseModel): """ @@ -42,6 +43,7 @@ class BulkSendJobGetResponse(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -144,7 +146,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: "warnings", ] - model_config = { - "arbitrary_types_allowed": True - } - 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 864949a43..25052bb45 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 @@ -27,6 +27,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class BulkSendJobGetResponseSignatureRequests(BaseModel): """ @@ -63,6 +64,7 @@ class BulkSendJobGetResponseSignatureRequests(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -131,56 +133,6 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: if _item_signatures: _items.append(_item_signatures.to_dict()) _dict['signatures'] = _items - # set to None if test_mode (nullable) is None - # and model_fields_set contains the field - if self.test_mode is None and "test_mode" in self.model_fields_set: - _dict['test_mode'] = None - - # set to None if subject (nullable) is None - # and model_fields_set contains the field - if self.subject is None and "subject" in self.model_fields_set: - _dict['subject'] = None - - # set to None if message (nullable) is None - # and model_fields_set contains the field - if self.message is None and "message" in self.model_fields_set: - _dict['message'] = None - - # set to None if signing_url (nullable) is None - # and model_fields_set contains the field - if self.signing_url is None and "signing_url" in self.model_fields_set: - _dict['signing_url'] = None - - # set to None if signing_redirect_url (nullable) is None - # and model_fields_set contains the field - if self.signing_redirect_url is None and "signing_redirect_url" in self.model_fields_set: - _dict['signing_redirect_url'] = None - - # set to None if final_copy_uri (nullable) is None - # and model_fields_set contains the field - if self.final_copy_uri is None and "final_copy_uri" in self.model_fields_set: - _dict['final_copy_uri'] = None - - # set to None if template_ids (nullable) is None - # and model_fields_set contains the field - if self.template_ids is None and "template_ids" in self.model_fields_set: - _dict['template_ids'] = None - - # set to None if custom_fields (nullable) is None - # and model_fields_set contains the field - if self.custom_fields is None and "custom_fields" in self.model_fields_set: - _dict['custom_fields'] = None - - # set to None if attachments (nullable) is None - # and model_fields_set contains the field - if self.attachments is None and "attachments" in self.model_fields_set: - _dict['attachments'] = None - - # set to None if response_data (nullable) is None - # and model_fields_set contains the field - if self.response_data is None and "response_data" in self.model_fields_set: - _dict['response_data'] = None - return _dict @classmethod @@ -269,7 +221,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: "signatures", ] - model_config = { - "arbitrary_types_allowed": True - } - 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 4c44d210a..f65f53350 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 @@ -26,6 +26,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class BulkSendJobListResponse(BaseModel): """ @@ -40,6 +41,7 @@ class BulkSendJobListResponse(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -137,7 +139,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: "warnings", ] - model_config = { - "arbitrary_types_allowed": True - } - 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 6be8d79f7..e50e33a10 100644 --- a/sdks/python/dropbox_sign/models/bulk_send_job_response.py +++ b/sdks/python/dropbox_sign/models/bulk_send_job_response.py @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class BulkSendJobResponse(BaseModel): """ @@ -38,6 +39,7 @@ class BulkSendJobResponse(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -78,11 +80,6 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if bulk_send_job_id (nullable) is None - # and model_fields_set contains the field - if self.bulk_send_job_id is None and "bulk_send_job_id" in self.model_fields_set: - _dict['bulk_send_job_id'] = None - return _dict @classmethod @@ -123,7 +120,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 07dca961d..28ad47f43 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 @@ -25,6 +25,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class BulkSendJobSendResponse(BaseModel): """ @@ -38,6 +39,7 @@ class BulkSendJobSendResponse(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -125,7 +127,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: "warnings", ] - model_config = { - "arbitrary_types_allowed": True - } - 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 16e5aec39..0c2b83d89 100644 --- a/sdks/python/dropbox_sign/models/embedded_edit_url_request.py +++ b/sdks/python/dropbox_sign/models/embedded_edit_url_request.py @@ -25,6 +25,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class EmbeddedEditUrlRequest(BaseModel): """ @@ -46,6 +47,7 @@ class EmbeddedEditUrlRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -150,7 +152,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: "merge_fields", ] - model_config = { - "arbitrary_types_allowed": True - } - 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 33273e216..b9ee37e96 100644 --- a/sdks/python/dropbox_sign/models/embedded_edit_url_response.py +++ b/sdks/python/dropbox_sign/models/embedded_edit_url_response.py @@ -25,6 +25,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class EmbeddedEditUrlResponse(BaseModel): """ @@ -38,6 +39,7 @@ class EmbeddedEditUrlResponse(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -125,7 +127,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: "warnings", ] - model_config = { - "arbitrary_types_allowed": True - } - 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 faa8ea65f..c1d807bed 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 @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class EmbeddedEditUrlResponseEmbedded(BaseModel): """ @@ -36,6 +37,7 @@ class EmbeddedEditUrlResponseEmbedded(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -112,7 +114,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 0ea5ea54a..bafb79b8e 100644 --- a/sdks/python/dropbox_sign/models/embedded_sign_url_response.py +++ b/sdks/python/dropbox_sign/models/embedded_sign_url_response.py @@ -25,6 +25,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class EmbeddedSignUrlResponse(BaseModel): """ @@ -38,6 +39,7 @@ class EmbeddedSignUrlResponse(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -125,7 +127,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: "warnings", ] - model_config = { - "arbitrary_types_allowed": True - } - 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 28bfcc34e..f60da2936 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 @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class EmbeddedSignUrlResponseEmbedded(BaseModel): """ @@ -36,6 +37,7 @@ class EmbeddedSignUrlResponseEmbedded(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -112,7 +114,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - diff --git a/sdks/python/dropbox_sign/models/error_response.py b/sdks/python/dropbox_sign/models/error_response.py index c26f8f21b..1035835c5 100644 --- a/sdks/python/dropbox_sign/models/error_response.py +++ b/sdks/python/dropbox_sign/models/error_response.py @@ -24,6 +24,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class ErrorResponse(BaseModel): """ @@ -36,6 +37,7 @@ class ErrorResponse(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -113,7 +115,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - diff --git a/sdks/python/dropbox_sign/models/error_response_error.py b/sdks/python/dropbox_sign/models/error_response_error.py index 210eca755..b96657d95 100644 --- a/sdks/python/dropbox_sign/models/error_response_error.py +++ b/sdks/python/dropbox_sign/models/error_response_error.py @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class ErrorResponseError(BaseModel): """ @@ -37,6 +38,7 @@ class ErrorResponseError(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -115,7 +117,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - diff --git a/sdks/python/dropbox_sign/models/event_callback_request.py b/sdks/python/dropbox_sign/models/event_callback_request.py index c74d0e115..cedcfaa21 100644 --- a/sdks/python/dropbox_sign/models/event_callback_request.py +++ b/sdks/python/dropbox_sign/models/event_callback_request.py @@ -27,6 +27,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class EventCallbackRequest(BaseModel): """ @@ -42,6 +43,7 @@ class EventCallbackRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -134,7 +136,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 c564a0515..1c7872f07 100644 --- a/sdks/python/dropbox_sign/models/event_callback_request_event.py +++ b/sdks/python/dropbox_sign/models/event_callback_request_event.py @@ -24,6 +24,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class EventCallbackRequestEvent(BaseModel): """ @@ -46,6 +47,7 @@ def event_type_validate_enum(cls, value): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -129,7 +131,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 e962564f6..10643c953 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 @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class EventCallbackRequestEventMetadata(BaseModel): """ @@ -38,6 +39,7 @@ class EventCallbackRequestEventMetadata(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -78,26 +80,6 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if related_signature_id (nullable) is None - # and model_fields_set contains the field - if self.related_signature_id is None and "related_signature_id" in self.model_fields_set: - _dict['related_signature_id'] = None - - # set to None if reported_for_account_id (nullable) is None - # and model_fields_set contains the field - if self.reported_for_account_id is None and "reported_for_account_id" in self.model_fields_set: - _dict['reported_for_account_id'] = None - - # set to None if reported_for_app_id (nullable) is None - # and model_fields_set contains the field - if self.reported_for_app_id is None and "reported_for_app_id" in self.model_fields_set: - _dict['reported_for_app_id'] = None - - # set to None if event_message (nullable) is None - # and model_fields_set contains the field - if self.event_message is None and "event_message" in self.model_fields_set: - _dict['event_message'] = None - return _dict @classmethod @@ -138,7 +120,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 2d6259598..0664c9ce9 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 @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class FaxLineAddUserRequest(BaseModel): """ @@ -37,6 +38,7 @@ class FaxLineAddUserRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -115,7 +117,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 523c3be6b..2b2520e1a 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 @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class FaxLineAreaCodeGetResponse(BaseModel): """ @@ -35,6 +36,7 @@ class FaxLineAreaCodeGetResponse(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -110,7 +112,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: "area_codes", ] - model_config = { - "arbitrary_types_allowed": True - } - 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 5afd37096..3f14c5ec4 100644 --- a/sdks/python/dropbox_sign/models/fax_line_create_request.py +++ b/sdks/python/dropbox_sign/models/fax_line_create_request.py @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class FaxLineCreateRequest(BaseModel): """ @@ -45,6 +46,7 @@ def country_validate_enum(cls, value): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -125,7 +127,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 0cdd94db1..6a8bf43d4 100644 --- a/sdks/python/dropbox_sign/models/fax_line_delete_request.py +++ b/sdks/python/dropbox_sign/models/fax_line_delete_request.py @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class FaxLineDeleteRequest(BaseModel): """ @@ -35,6 +36,7 @@ class FaxLineDeleteRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -109,7 +111,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 040d9e604..baa04c5b1 100644 --- a/sdks/python/dropbox_sign/models/fax_line_list_response.py +++ b/sdks/python/dropbox_sign/models/fax_line_list_response.py @@ -26,6 +26,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class FaxLineListResponse(BaseModel): """ @@ -40,6 +41,7 @@ class FaxLineListResponse(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -132,7 +134,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: "fax_lines", ] - model_config = { - "arbitrary_types_allowed": True - } - 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 ba5531e6a..8281a5f23 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 @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class FaxLineRemoveUserRequest(BaseModel): """ @@ -37,6 +38,7 @@ class FaxLineRemoveUserRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -115,7 +117,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - diff --git a/sdks/python/dropbox_sign/models/fax_line_response.py b/sdks/python/dropbox_sign/models/fax_line_response.py index 8583d1670..c0a4934a6 100644 --- a/sdks/python/dropbox_sign/models/fax_line_response.py +++ b/sdks/python/dropbox_sign/models/fax_line_response.py @@ -25,6 +25,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class FaxLineResponse(BaseModel): """ @@ -38,6 +39,7 @@ class FaxLineResponse(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -120,7 +122,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 b803d7eba..4ee240c9b 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 @@ -24,6 +24,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class FaxLineResponseFaxLine(BaseModel): """ @@ -39,6 +40,7 @@ class FaxLineResponseFaxLine(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -127,7 +129,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: "accounts", ] - model_config = { - "arbitrary_types_allowed": True - } - diff --git a/sdks/python/dropbox_sign/models/file_response.py b/sdks/python/dropbox_sign/models/file_response.py index 0e3ac5281..5bcde8c96 100644 --- a/sdks/python/dropbox_sign/models/file_response.py +++ b/sdks/python/dropbox_sign/models/file_response.py @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class FileResponse(BaseModel): """ @@ -36,6 +37,7 @@ class FileResponse(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -112,7 +114,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 562253a3c..adfaede5a 100644 --- a/sdks/python/dropbox_sign/models/file_response_data_uri.py +++ b/sdks/python/dropbox_sign/models/file_response_data_uri.py @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class FileResponseDataUri(BaseModel): """ @@ -35,6 +36,7 @@ class FileResponseDataUri(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -109,7 +111,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - diff --git a/sdks/python/dropbox_sign/models/list_info_response.py b/sdks/python/dropbox_sign/models/list_info_response.py index 4b2242fda..37992939c 100644 --- a/sdks/python/dropbox_sign/models/list_info_response.py +++ b/sdks/python/dropbox_sign/models/list_info_response.py @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class ListInfoResponse(BaseModel): """ @@ -38,6 +39,7 @@ class ListInfoResponse(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -78,11 +80,6 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if num_results (nullable) is None - # and model_fields_set contains the field - if self.num_results is None and "num_results" in self.model_fields_set: - _dict['num_results'] = None - return _dict @classmethod @@ -123,7 +120,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 812275242..7112900cb 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 @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class OAuthTokenGenerateRequest(BaseModel): """ @@ -39,6 +40,7 @@ class OAuthTokenGenerateRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -121,7 +123,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 e1c4953e2..da8e51a6e 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 @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class OAuthTokenRefreshRequest(BaseModel): """ @@ -36,6 +37,7 @@ class OAuthTokenRefreshRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -112,7 +114,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 229f826cb..3ab1ab3f2 100644 --- a/sdks/python/dropbox_sign/models/o_auth_token_response.py +++ b/sdks/python/dropbox_sign/models/o_auth_token_response.py @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class OAuthTokenResponse(BaseModel): """ @@ -39,6 +40,7 @@ class OAuthTokenResponse(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -79,11 +81,6 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if state (nullable) is None - # and model_fields_set contains the field - if self.state is None and "state" in self.model_fields_set: - _dict['state'] = None - return _dict @classmethod @@ -126,7 +123,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - diff --git a/sdks/python/dropbox_sign/models/report_create_request.py b/sdks/python/dropbox_sign/models/report_create_request.py index 47983e178..1a3710841 100644 --- a/sdks/python/dropbox_sign/models/report_create_request.py +++ b/sdks/python/dropbox_sign/models/report_create_request.py @@ -24,6 +24,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class ReportCreateRequest(BaseModel): """ @@ -46,6 +47,7 @@ def report_type_validate_enum(cls, value): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -125,7 +127,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: "report_type", ] - model_config = { - "arbitrary_types_allowed": True - } - diff --git a/sdks/python/dropbox_sign/models/report_create_response.py b/sdks/python/dropbox_sign/models/report_create_response.py index e409c9806..dae9e9f9f 100644 --- a/sdks/python/dropbox_sign/models/report_create_response.py +++ b/sdks/python/dropbox_sign/models/report_create_response.py @@ -25,6 +25,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class ReportCreateResponse(BaseModel): """ @@ -38,6 +39,7 @@ class ReportCreateResponse(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -125,7 +127,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: "warnings", ] - model_config = { - "arbitrary_types_allowed": True - } - diff --git a/sdks/python/dropbox_sign/models/report_response.py b/sdks/python/dropbox_sign/models/report_response.py index 8432a4368..200876dd5 100644 --- a/sdks/python/dropbox_sign/models/report_response.py +++ b/sdks/python/dropbox_sign/models/report_response.py @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class ReportResponse(BaseModel): """ @@ -49,6 +50,7 @@ def report_type_validate_enum(cls, value): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -130,7 +132,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: "report_type", ] - model_config = { - "arbitrary_types_allowed": True - } - 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 e21ba0476..8e422057a 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 @@ -27,6 +27,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class SignatureRequestBulkCreateEmbeddedWithTemplateRequest(BaseModel): """ @@ -51,6 +52,7 @@ class SignatureRequestBulkCreateEmbeddedWithTemplateRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -174,7 +176,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: "custom_fields", ] - model_config = { - "arbitrary_types_allowed": True - } - 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 ecb149c5e..a3ebf2ed5 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 @@ -27,6 +27,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class SignatureRequestBulkSendWithTemplateRequest(BaseModel): """ @@ -51,6 +52,7 @@ class SignatureRequestBulkSendWithTemplateRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -174,7 +176,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: "custom_fields", ] - model_config = { - "arbitrary_types_allowed": True - } - 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 276be674d..ae63bd978 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 @@ -33,6 +33,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class SignatureRequestCreateEmbeddedRequest(BaseModel): """ @@ -68,6 +69,7 @@ class SignatureRequestCreateEmbeddedRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -163,11 +165,6 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: # 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() - # set to None if expires_at (nullable) is None - # and model_fields_set contains the field - if self.expires_at is None and "expires_at" in self.model_fields_set: - _dict['expires_at'] = None - return _dict @classmethod @@ -258,7 +255,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: "form_fields_per_document", ] - model_config = { - "arbitrary_types_allowed": True - } - 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 d6bb039d8..ad53c9c66 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 @@ -28,6 +28,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class SignatureRequestCreateEmbeddedWithTemplateRequest(BaseModel): """ @@ -54,6 +55,7 @@ class SignatureRequestCreateEmbeddedWithTemplateRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -186,7 +188,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: "file_urls", ] - model_config = { - "arbitrary_types_allowed": True - } - 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 779b1f16b..b5dc68324 100644 --- a/sdks/python/dropbox_sign/models/signature_request_get_response.py +++ b/sdks/python/dropbox_sign/models/signature_request_get_response.py @@ -25,6 +25,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class SignatureRequestGetResponse(BaseModel): """ @@ -38,6 +39,7 @@ class SignatureRequestGetResponse(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -125,7 +127,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: "warnings", ] - model_config = { - "arbitrary_types_allowed": True - } - 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 051d535a0..76b781886 100644 --- a/sdks/python/dropbox_sign/models/signature_request_list_response.py +++ b/sdks/python/dropbox_sign/models/signature_request_list_response.py @@ -26,6 +26,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class SignatureRequestListResponse(BaseModel): """ @@ -40,6 +41,7 @@ class SignatureRequestListResponse(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -137,7 +139,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: "warnings", ] - model_config = { - "arbitrary_types_allowed": True - } - 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 590f0f43e..061944090 100644 --- a/sdks/python/dropbox_sign/models/signature_request_remind_request.py +++ b/sdks/python/dropbox_sign/models/signature_request_remind_request.py @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class SignatureRequestRemindRequest(BaseModel): """ @@ -36,6 +37,7 @@ class SignatureRequestRemindRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -112,7 +114,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - diff --git a/sdks/python/dropbox_sign/models/signature_request_response.py b/sdks/python/dropbox_sign/models/signature_request_response.py index 7de733db4..16deb5503 100644 --- a/sdks/python/dropbox_sign/models/signature_request_response.py +++ b/sdks/python/dropbox_sign/models/signature_request_response.py @@ -27,6 +27,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class SignatureRequestResponse(BaseModel): """ @@ -63,6 +64,7 @@ class SignatureRequestResponse(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -131,61 +133,6 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: if _item_signatures: _items.append(_item_signatures.to_dict()) _dict['signatures'] = _items - # set to None if test_mode (nullable) is None - # and model_fields_set contains the field - if self.test_mode is None and "test_mode" in self.model_fields_set: - _dict['test_mode'] = None - - # set to None if subject (nullable) is None - # and model_fields_set contains the field - if self.subject is None and "subject" in self.model_fields_set: - _dict['subject'] = None - - # set to None if message (nullable) is None - # and model_fields_set contains the field - if self.message is None and "message" in self.model_fields_set: - _dict['message'] = None - - # set to None if signing_url (nullable) is None - # and model_fields_set contains the field - if self.signing_url is None and "signing_url" in self.model_fields_set: - _dict['signing_url'] = None - - # set to None if signing_redirect_url (nullable) is None - # and model_fields_set contains the field - if self.signing_redirect_url is None and "signing_redirect_url" in self.model_fields_set: - _dict['signing_redirect_url'] = None - - # set to None if final_copy_uri (nullable) is None - # and model_fields_set contains the field - if self.final_copy_uri is None and "final_copy_uri" in self.model_fields_set: - _dict['final_copy_uri'] = None - - # set to None if template_ids (nullable) is None - # and model_fields_set contains the field - if self.template_ids is None and "template_ids" in self.model_fields_set: - _dict['template_ids'] = None - - # set to None if custom_fields (nullable) is None - # and model_fields_set contains the field - if self.custom_fields is None and "custom_fields" in self.model_fields_set: - _dict['custom_fields'] = None - - # set to None if attachments (nullable) is None - # and model_fields_set contains the field - if self.attachments is None and "attachments" in self.model_fields_set: - _dict['attachments'] = None - - # set to None if response_data (nullable) is None - # and model_fields_set contains the field - if self.response_data is None and "response_data" in self.model_fields_set: - _dict['response_data'] = None - - # set to None if bulk_send_job_id (nullable) is None - # and model_fields_set contains the field - if self.bulk_send_job_id is None and "bulk_send_job_id" in self.model_fields_set: - _dict['bulk_send_job_id'] = None - return _dict @classmethod @@ -274,7 +221,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: "signatures", ] - model_config = { - "arbitrary_types_allowed": True - } - 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 5a7081491..aa898cd4b 100644 --- a/sdks/python/dropbox_sign/models/signature_request_response_attachment.py +++ b/sdks/python/dropbox_sign/models/signature_request_response_attachment.py @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class SignatureRequestResponseAttachment(BaseModel): """ @@ -40,6 +41,7 @@ class SignatureRequestResponseAttachment(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -80,16 +82,6 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if instructions (nullable) is None - # and model_fields_set contains the field - if self.instructions is None and "instructions" in self.model_fields_set: - _dict['instructions'] = None - - # set to None if uploaded_at (nullable) is None - # and model_fields_set contains the field - if self.uploaded_at is None and "uploaded_at" in self.model_fields_set: - _dict['uploaded_at'] = None - return _dict @classmethod @@ -134,7 +126,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 5998bb547..a16fa567a 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 @@ -24,6 +24,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool from typing import TYPE_CHECKING if TYPE_CHECKING: @@ -45,6 +46,7 @@ class SignatureRequestResponseCustomFieldBase(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -134,7 +136,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 6b7430327..bf64d8087 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 @@ -24,6 +24,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class SignatureRequestResponseCustomFieldCheckbox(SignatureRequestResponseCustomFieldBase): """ @@ -37,6 +38,7 @@ class SignatureRequestResponseCustomFieldCheckbox(SignatureRequestResponseCustom populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -121,7 +123,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 a0917369a..4cce3dd01 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 @@ -24,6 +24,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class SignatureRequestResponseCustomFieldText(SignatureRequestResponseCustomFieldBase): """ @@ -37,6 +38,7 @@ class SignatureRequestResponseCustomFieldText(SignatureRequestResponseCustomFiel populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -121,7 +123,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 59db1c3cb..715f87c3f 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 @@ -24,6 +24,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool from typing import TYPE_CHECKING if TYPE_CHECKING: @@ -52,6 +53,7 @@ class SignatureRequestResponseDataBase(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -155,7 +157,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 7737d3069..d0f1abb32 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 @@ -24,6 +24,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class SignatureRequestResponseDataValueCheckbox(SignatureRequestResponseDataBase): """ @@ -37,6 +38,7 @@ class SignatureRequestResponseDataValueCheckbox(SignatureRequestResponseDataBase populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -121,7 +123,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 cd3d29cfe..8369612c7 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 @@ -24,6 +24,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class SignatureRequestResponseDataValueCheckboxMerge(SignatureRequestResponseDataBase): """ @@ -37,6 +38,7 @@ class SignatureRequestResponseDataValueCheckboxMerge(SignatureRequestResponseDat populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -121,7 +123,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 8fa45af57..cdf8ef1be 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 @@ -24,6 +24,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class SignatureRequestResponseDataValueDateSigned(SignatureRequestResponseDataBase): """ @@ -37,6 +38,7 @@ class SignatureRequestResponseDataValueDateSigned(SignatureRequestResponseDataBa populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -121,7 +123,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 135859d75..6c532d378 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 @@ -24,6 +24,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class SignatureRequestResponseDataValueDropdown(SignatureRequestResponseDataBase): """ @@ -37,6 +38,7 @@ class SignatureRequestResponseDataValueDropdown(SignatureRequestResponseDataBase populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -121,7 +123,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 b4ea18d5d..df914db75 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 @@ -24,6 +24,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class SignatureRequestResponseDataValueInitials(SignatureRequestResponseDataBase): """ @@ -37,6 +38,7 @@ class SignatureRequestResponseDataValueInitials(SignatureRequestResponseDataBase populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -121,7 +123,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 3f319cd19..e427a5d54 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 @@ -24,6 +24,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class SignatureRequestResponseDataValueRadio(SignatureRequestResponseDataBase): """ @@ -37,6 +38,7 @@ class SignatureRequestResponseDataValueRadio(SignatureRequestResponseDataBase): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -121,7 +123,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 800c3e128..5eae43a6c 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 @@ -24,6 +24,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class SignatureRequestResponseDataValueSignature(SignatureRequestResponseDataBase): """ @@ -37,6 +38,7 @@ class SignatureRequestResponseDataValueSignature(SignatureRequestResponseDataBas populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -121,7 +123,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 c30f858ee..930cf3f31 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 @@ -24,6 +24,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class SignatureRequestResponseDataValueText(SignatureRequestResponseDataBase): """ @@ -37,6 +38,7 @@ class SignatureRequestResponseDataValueText(SignatureRequestResponseDataBase): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -121,7 +123,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 eed5f633c..26e9741e3 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 @@ -24,6 +24,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class SignatureRequestResponseDataValueTextMerge(SignatureRequestResponseDataBase): """ @@ -37,6 +38,7 @@ class SignatureRequestResponseDataValueTextMerge(SignatureRequestResponseDataBas populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -121,7 +123,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 245243026..4835926fc 100644 --- a/sdks/python/dropbox_sign/models/signature_request_response_signatures.py +++ b/sdks/python/dropbox_sign/models/signature_request_response_signatures.py @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class SignatureRequestResponseSignatures(BaseModel): """ @@ -53,6 +54,7 @@ class SignatureRequestResponseSignatures(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -93,81 +95,6 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if signer_group_guid (nullable) is None - # and model_fields_set contains the field - if self.signer_group_guid is None and "signer_group_guid" in self.model_fields_set: - _dict['signer_group_guid'] = None - - # set to None if signer_name (nullable) is None - # and model_fields_set contains the field - if self.signer_name is None and "signer_name" in self.model_fields_set: - _dict['signer_name'] = None - - # set to None if signer_role (nullable) is None - # and model_fields_set contains the field - if self.signer_role is None and "signer_role" in self.model_fields_set: - _dict['signer_role'] = None - - # set to None if order (nullable) is None - # and model_fields_set contains the field - if self.order is None and "order" in self.model_fields_set: - _dict['order'] = None - - # set to None if decline_reason (nullable) is None - # and model_fields_set contains the field - if self.decline_reason is None and "decline_reason" in self.model_fields_set: - _dict['decline_reason'] = None - - # set to None if signed_at (nullable) is None - # and model_fields_set contains the field - if self.signed_at is None and "signed_at" in self.model_fields_set: - _dict['signed_at'] = None - - # set to None if last_viewed_at (nullable) is None - # and model_fields_set contains the field - if self.last_viewed_at is None and "last_viewed_at" in self.model_fields_set: - _dict['last_viewed_at'] = None - - # set to None if last_reminded_at (nullable) is None - # and model_fields_set contains the field - if self.last_reminded_at is None and "last_reminded_at" in self.model_fields_set: - _dict['last_reminded_at'] = None - - # set to None if has_sms_auth (nullable) is None - # and model_fields_set contains the field - if self.has_sms_auth is None and "has_sms_auth" in self.model_fields_set: - _dict['has_sms_auth'] = None - - # set to None if has_sms_delivery (nullable) is None - # and model_fields_set contains the field - if self.has_sms_delivery is None and "has_sms_delivery" in self.model_fields_set: - _dict['has_sms_delivery'] = None - - # set to None if sms_phone_number (nullable) is None - # and model_fields_set contains the field - if self.sms_phone_number is None and "sms_phone_number" in self.model_fields_set: - _dict['sms_phone_number'] = None - - # set to None if reassigned_by (nullable) is None - # and model_fields_set contains the field - if self.reassigned_by is None and "reassigned_by" in self.model_fields_set: - _dict['reassigned_by'] = None - - # set to None if reassignment_reason (nullable) is None - # and model_fields_set contains the field - if self.reassignment_reason is None and "reassignment_reason" in self.model_fields_set: - _dict['reassignment_reason'] = None - - # set to None if reassigned_from (nullable) is None - # and model_fields_set contains the field - if self.reassigned_from is None and "reassigned_from" in self.model_fields_set: - _dict['reassigned_from'] = None - - # set to None if error (nullable) is None - # and model_fields_set contains the field - if self.error is None and "error" in self.model_fields_set: - _dict['error'] = None - return _dict @classmethod @@ -238,7 +165,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 ddde85979..94dd20d1e 100644 --- a/sdks/python/dropbox_sign/models/signature_request_send_request.py +++ b/sdks/python/dropbox_sign/models/signature_request_send_request.py @@ -33,6 +33,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class SignatureRequestSendRequest(BaseModel): """ @@ -70,6 +71,7 @@ class SignatureRequestSendRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -165,11 +167,6 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: # 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() - # set to None if expires_at (nullable) is None - # and model_fields_set contains the field - if self.expires_at is None and "expires_at" in self.model_fields_set: - _dict['expires_at'] = None - return _dict @classmethod @@ -264,7 +261,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: "form_fields_per_document", ] - model_config = { - "arbitrary_types_allowed": True - } - 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 f26530e6b..dc1845b13 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 @@ -28,6 +28,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class SignatureRequestSendWithTemplateRequest(BaseModel): """ @@ -56,6 +57,7 @@ class SignatureRequestSendWithTemplateRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -192,7 +194,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: "file_urls", ] - model_config = { - "arbitrary_types_allowed": True - } - 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 401c55241..dffa81a60 100644 --- a/sdks/python/dropbox_sign/models/signature_request_update_request.py +++ b/sdks/python/dropbox_sign/models/signature_request_update_request.py @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class SignatureRequestUpdateRequest(BaseModel): """ @@ -38,6 +39,7 @@ class SignatureRequestUpdateRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -78,11 +80,6 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if expires_at (nullable) is None - # and model_fields_set contains the field - if self.expires_at is None and "expires_at" in self.model_fields_set: - _dict['expires_at'] = None - return _dict @classmethod @@ -123,7 +120,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - diff --git a/sdks/python/dropbox_sign/models/sub_attachment.py b/sdks/python/dropbox_sign/models/sub_attachment.py index cecd70255..186162aee 100644 --- a/sdks/python/dropbox_sign/models/sub_attachment.py +++ b/sdks/python/dropbox_sign/models/sub_attachment.py @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class SubAttachment(BaseModel): """ @@ -38,6 +39,7 @@ class SubAttachment(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -118,7 +120,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 e08fcd586..8cfdf6550 100644 --- a/sdks/python/dropbox_sign/models/sub_bulk_signer_list.py +++ b/sdks/python/dropbox_sign/models/sub_bulk_signer_list.py @@ -25,6 +25,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class SubBulkSignerList(BaseModel): """ @@ -38,6 +39,7 @@ class SubBulkSignerList(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -130,7 +132,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: "signers", ] - model_config = { - "arbitrary_types_allowed": True - } - 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 da5c90a65..70edc7bda 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 @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class SubBulkSignerListCustomField(BaseModel): """ @@ -36,6 +37,7 @@ class SubBulkSignerListCustomField(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -112,7 +114,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - diff --git a/sdks/python/dropbox_sign/models/sub_cc.py b/sdks/python/dropbox_sign/models/sub_cc.py index 5c37419eb..4965a3d4d 100644 --- a/sdks/python/dropbox_sign/models/sub_cc.py +++ b/sdks/python/dropbox_sign/models/sub_cc.py @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class SubCC(BaseModel): """ @@ -36,6 +37,7 @@ class SubCC(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -112,7 +114,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - diff --git a/sdks/python/dropbox_sign/models/sub_custom_field.py b/sdks/python/dropbox_sign/models/sub_custom_field.py index 85a4cbfdb..8d3b4eebd 100644 --- a/sdks/python/dropbox_sign/models/sub_custom_field.py +++ b/sdks/python/dropbox_sign/models/sub_custom_field.py @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class SubCustomField(BaseModel): """ @@ -38,6 +39,7 @@ class SubCustomField(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -118,7 +120,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - diff --git a/sdks/python/dropbox_sign/models/sub_editor_options.py b/sdks/python/dropbox_sign/models/sub_editor_options.py index 09e47bbe4..90dc452b5 100644 --- a/sdks/python/dropbox_sign/models/sub_editor_options.py +++ b/sdks/python/dropbox_sign/models/sub_editor_options.py @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class SubEditorOptions(BaseModel): """ @@ -36,6 +37,7 @@ class SubEditorOptions(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -112,7 +114,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - diff --git a/sdks/python/dropbox_sign/models/sub_field_options.py b/sdks/python/dropbox_sign/models/sub_field_options.py index d3b0f338c..74768bf63 100644 --- a/sdks/python/dropbox_sign/models/sub_field_options.py +++ b/sdks/python/dropbox_sign/models/sub_field_options.py @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class SubFieldOptions(BaseModel): """ @@ -42,6 +43,7 @@ def date_format_validate_enum(cls, value): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -116,7 +118,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 d4c82993d..27365d0fe 100644 --- a/sdks/python/dropbox_sign/models/sub_form_field_group.py +++ b/sdks/python/dropbox_sign/models/sub_form_field_group.py @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class SubFormFieldGroup(BaseModel): """ @@ -37,6 +38,7 @@ class SubFormFieldGroup(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -115,7 +117,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 5c304b185..9e1b5565c 100644 --- a/sdks/python/dropbox_sign/models/sub_form_field_rule.py +++ b/sdks/python/dropbox_sign/models/sub_form_field_rule.py @@ -26,6 +26,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class SubFormFieldRule(BaseModel): """ @@ -41,6 +42,7 @@ class SubFormFieldRule(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -137,7 +139,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: "actions", ] - model_config = { - "arbitrary_types_allowed": True - } - 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 4f19ad097..c291b3eee 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 @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class SubFormFieldRuleAction(BaseModel): """ @@ -45,6 +46,7 @@ def type_validate_enum(cls, value): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -125,7 +127,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 9e91e53be..71b4f8b36 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 @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class SubFormFieldRuleTrigger(BaseModel): """ @@ -45,6 +46,7 @@ def operator_validate_enum(cls, value): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -126,7 +128,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: "values", ] - model_config = { - "arbitrary_types_allowed": True - } - 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 2e5f5ea81..91e80ded0 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 @@ -24,6 +24,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool from typing import TYPE_CHECKING if TYPE_CHECKING: @@ -59,6 +60,7 @@ class SubFormFieldsPerDocumentBase(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -116,11 +118,6 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if page (nullable) is None - # and model_fields_set contains the field - if self.page is None and "page" in self.model_fields_set: - _dict['page'] = None - return _dict @classmethod @@ -175,7 +172,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 081c8632e..3096f17f8 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 @@ -24,6 +24,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class SubFormFieldsPerDocumentCheckbox(SubFormFieldsPerDocumentBase): """ @@ -38,6 +39,7 @@ class SubFormFieldsPerDocumentCheckbox(SubFormFieldsPerDocumentBase): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -78,11 +80,6 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if page (nullable) is None - # and model_fields_set contains the field - if self.page is None and "page" in self.model_fields_set: - _dict['page'] = None - return _dict @classmethod @@ -141,7 +138,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 96de218a2..afee62f41 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 @@ -24,6 +24,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class SubFormFieldsPerDocumentCheckboxMerge(SubFormFieldsPerDocumentBase): """ @@ -36,6 +37,7 @@ class SubFormFieldsPerDocumentCheckboxMerge(SubFormFieldsPerDocumentBase): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -76,11 +78,6 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if page (nullable) is None - # and model_fields_set contains the field - if self.page is None and "page" in self.model_fields_set: - _dict['page'] = None - return _dict @classmethod @@ -135,7 +132,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 62cd38e5b..3cd5b380c 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 @@ -24,6 +24,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class SubFormFieldsPerDocumentDateSigned(SubFormFieldsPerDocumentBase): """ @@ -48,6 +49,7 @@ def font_family_validate_enum(cls, value): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -88,11 +90,6 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if page (nullable) is None - # and model_fields_set contains the field - if self.page is None and "page" in self.model_fields_set: - _dict['page'] = None - return _dict @classmethod @@ -151,7 +148,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 108960a03..fde36830e 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 @@ -25,6 +25,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class SubFormFieldsPerDocumentDropdown(SubFormFieldsPerDocumentBase): """ @@ -51,6 +52,7 @@ def font_family_validate_enum(cls, value): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -91,11 +93,6 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if page (nullable) is None - # and model_fields_set contains the field - if self.page is None and "page" in self.model_fields_set: - _dict['page'] = None - return _dict @classmethod @@ -159,7 +156,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: "options", ] - model_config = { - "arbitrary_types_allowed": True - } - 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 14d29ae0f..b734f0525 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 @@ -24,6 +24,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class SubFormFieldsPerDocumentHyperlink(SubFormFieldsPerDocumentBase): """ @@ -50,6 +51,7 @@ def font_family_validate_enum(cls, value): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -90,11 +92,6 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if page (nullable) is None - # and model_fields_set contains the field - if self.page is None and "page" in self.model_fields_set: - _dict['page'] = None - return _dict @classmethod @@ -157,7 +154,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 c45f92fc8..06bc8c61c 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 @@ -24,6 +24,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class SubFormFieldsPerDocumentInitials(SubFormFieldsPerDocumentBase): """ @@ -36,6 +37,7 @@ class SubFormFieldsPerDocumentInitials(SubFormFieldsPerDocumentBase): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -76,11 +78,6 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if page (nullable) is None - # and model_fields_set contains the field - if self.page is None and "page" in self.model_fields_set: - _dict['page'] = None - return _dict @classmethod @@ -135,7 +132,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 90b7e4668..b6d5e8d4b 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 @@ -24,6 +24,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class SubFormFieldsPerDocumentRadio(SubFormFieldsPerDocumentBase): """ @@ -38,6 +39,7 @@ class SubFormFieldsPerDocumentRadio(SubFormFieldsPerDocumentBase): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -78,11 +80,6 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if page (nullable) is None - # and model_fields_set contains the field - if self.page is None and "page" in self.model_fields_set: - _dict['page'] = None - return _dict @classmethod @@ -141,7 +138,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 1048b27bc..4e43a8d80 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 @@ -24,6 +24,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class SubFormFieldsPerDocumentSignature(SubFormFieldsPerDocumentBase): """ @@ -36,6 +37,7 @@ class SubFormFieldsPerDocumentSignature(SubFormFieldsPerDocumentBase): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -76,11 +78,6 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if page (nullable) is None - # and model_fields_set contains the field - if self.page is None and "page" in self.model_fields_set: - _dict['page'] = None - return _dict @classmethod @@ -135,7 +132,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 868c1d563..9d8ea5d3a 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 @@ -24,6 +24,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class SubFormFieldsPerDocumentText(SubFormFieldsPerDocumentBase): """ @@ -66,6 +67,7 @@ def font_family_validate_enum(cls, value): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -106,11 +108,6 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if page (nullable) is None - # and model_fields_set contains the field - if self.page is None and "page" in self.model_fields_set: - _dict['page'] = None - return _dict @classmethod @@ -185,7 +182,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 ba94c956d..df6a6f871 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 @@ -24,6 +24,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class SubFormFieldsPerDocumentTextMerge(SubFormFieldsPerDocumentBase): """ @@ -48,6 +49,7 @@ def font_family_validate_enum(cls, value): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -88,11 +90,6 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if page (nullable) is None - # and model_fields_set contains the field - if self.page is None and "page" in self.model_fields_set: - _dict['page'] = None - return _dict @classmethod @@ -151,7 +148,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - diff --git a/sdks/python/dropbox_sign/models/sub_merge_field.py b/sdks/python/dropbox_sign/models/sub_merge_field.py index fc728892e..151a9d933 100644 --- a/sdks/python/dropbox_sign/models/sub_merge_field.py +++ b/sdks/python/dropbox_sign/models/sub_merge_field.py @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class SubMergeField(BaseModel): """ @@ -43,6 +44,7 @@ def type_validate_enum(cls, value): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -119,7 +121,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - diff --git a/sdks/python/dropbox_sign/models/sub_o_auth.py b/sdks/python/dropbox_sign/models/sub_o_auth.py index fa1fe8418..24e6735f2 100644 --- a/sdks/python/dropbox_sign/models/sub_o_auth.py +++ b/sdks/python/dropbox_sign/models/sub_o_auth.py @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class SubOAuth(BaseModel): """ @@ -47,6 +48,7 @@ def scopes_validate_enum(cls, value): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -124,7 +126,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: "scopes", ] - model_config = { - "arbitrary_types_allowed": True - } - diff --git a/sdks/python/dropbox_sign/models/sub_options.py b/sdks/python/dropbox_sign/models/sub_options.py index 633bb9674..eaaa91ed3 100644 --- a/sdks/python/dropbox_sign/models/sub_options.py +++ b/sdks/python/dropbox_sign/models/sub_options.py @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class SubOptions(BaseModel): """ @@ -35,6 +36,7 @@ class SubOptions(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -109,7 +111,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 bf2ef4e91..6e2fb7756 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 @@ -24,6 +24,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class SubSignatureRequestGroupedSigners(BaseModel): """ @@ -38,6 +39,7 @@ class SubSignatureRequestGroupedSigners(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -85,11 +87,6 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: if _item_signers: _items.append(_item_signers.to_dict()) _dict['signers'] = _items - # set to None if order (nullable) is None - # and model_fields_set contains the field - if self.order is None and "order" in self.model_fields_set: - _dict['order'] = None - return _dict @classmethod @@ -129,7 +126,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: "signers", ] - model_config = { - "arbitrary_types_allowed": True - } - 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 32aa0f1f0..d7245dc0c 100644 --- a/sdks/python/dropbox_sign/models/sub_signature_request_signer.py +++ b/sdks/python/dropbox_sign/models/sub_signature_request_signer.py @@ -24,6 +24,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class SubSignatureRequestSigner(BaseModel): """ @@ -51,6 +52,7 @@ def sms_phone_number_type_validate_enum(cls, value): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -91,11 +93,6 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if order (nullable) is None - # and model_fields_set contains the field - if self.order is None and "order" in self.model_fields_set: - _dict['order'] = None - return _dict @classmethod @@ -140,7 +137,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 ab456bcfa..b2fd8792d 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 @@ -24,6 +24,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class SubSignatureRequestTemplateSigner(BaseModel): """ @@ -51,6 +52,7 @@ def sms_phone_number_type_validate_enum(cls, value): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -135,7 +137,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - diff --git a/sdks/python/dropbox_sign/models/sub_signing_options.py b/sdks/python/dropbox_sign/models/sub_signing_options.py index c7789f2f7..a7aa16e7a 100644 --- a/sdks/python/dropbox_sign/models/sub_signing_options.py +++ b/sdks/python/dropbox_sign/models/sub_signing_options.py @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class SubSigningOptions(BaseModel): """ @@ -46,6 +47,7 @@ def default_type_validate_enum(cls, value): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -128,7 +130,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - diff --git a/sdks/python/dropbox_sign/models/sub_team_response.py b/sdks/python/dropbox_sign/models/sub_team_response.py index 639ed6946..baa11f6a0 100644 --- a/sdks/python/dropbox_sign/models/sub_team_response.py +++ b/sdks/python/dropbox_sign/models/sub_team_response.py @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class SubTeamResponse(BaseModel): """ @@ -36,6 +37,7 @@ class SubTeamResponse(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -112,7 +114,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - diff --git a/sdks/python/dropbox_sign/models/sub_template_role.py b/sdks/python/dropbox_sign/models/sub_template_role.py index df6c62998..52aace8fa 100644 --- a/sdks/python/dropbox_sign/models/sub_template_role.py +++ b/sdks/python/dropbox_sign/models/sub_template_role.py @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class SubTemplateRole(BaseModel): """ @@ -36,6 +37,7 @@ class SubTemplateRole(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -76,11 +78,6 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if order (nullable) is None - # and model_fields_set contains the field - if self.order is None and "order" in self.model_fields_set: - _dict['order'] = None - return _dict @classmethod @@ -117,7 +114,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 e115f1670..f4a493899 100644 --- a/sdks/python/dropbox_sign/models/sub_unclaimed_draft_signer.py +++ b/sdks/python/dropbox_sign/models/sub_unclaimed_draft_signer.py @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class SubUnclaimedDraftSigner(BaseModel): """ @@ -37,6 +38,7 @@ class SubUnclaimedDraftSigner(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -77,11 +79,6 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if order (nullable) is None - # and model_fields_set contains the field - if self.order is None and "order" in self.model_fields_set: - _dict['order'] = None - return _dict @classmethod @@ -120,7 +117,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 7d11022b2..dcf7cc46d 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 @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class SubUnclaimedDraftTemplateSigner(BaseModel): """ @@ -37,6 +38,7 @@ class SubUnclaimedDraftTemplateSigner(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -115,7 +117,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 1b15fb818..511a20571 100644 --- a/sdks/python/dropbox_sign/models/sub_white_labeling_options.py +++ b/sdks/python/dropbox_sign/models/sub_white_labeling_options.py @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class SubWhiteLabelingOptions(BaseModel): """ @@ -59,6 +60,7 @@ def legal_version_validate_enum(cls, value): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -161,7 +163,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 ab8116266..f05a74f85 100644 --- a/sdks/python/dropbox_sign/models/team_add_member_request.py +++ b/sdks/python/dropbox_sign/models/team_add_member_request.py @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class TeamAddMemberRequest(BaseModel): """ @@ -47,6 +48,7 @@ def role_validate_enum(cls, value): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -125,7 +127,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - diff --git a/sdks/python/dropbox_sign/models/team_create_request.py b/sdks/python/dropbox_sign/models/team_create_request.py index 7ebd6b393..fb20a937e 100644 --- a/sdks/python/dropbox_sign/models/team_create_request.py +++ b/sdks/python/dropbox_sign/models/team_create_request.py @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class TeamCreateRequest(BaseModel): """ @@ -35,6 +36,7 @@ class TeamCreateRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -109,7 +111,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 97837743f..aacb4f11e 100644 --- a/sdks/python/dropbox_sign/models/team_get_info_response.py +++ b/sdks/python/dropbox_sign/models/team_get_info_response.py @@ -25,6 +25,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class TeamGetInfoResponse(BaseModel): """ @@ -38,6 +39,7 @@ class TeamGetInfoResponse(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -125,7 +127,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: "warnings", ] - model_config = { - "arbitrary_types_allowed": True - } - diff --git a/sdks/python/dropbox_sign/models/team_get_response.py b/sdks/python/dropbox_sign/models/team_get_response.py index 534dd9224..1d8575e41 100644 --- a/sdks/python/dropbox_sign/models/team_get_response.py +++ b/sdks/python/dropbox_sign/models/team_get_response.py @@ -25,6 +25,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class TeamGetResponse(BaseModel): """ @@ -38,6 +39,7 @@ class TeamGetResponse(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -125,7 +127,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: "warnings", ] - model_config = { - "arbitrary_types_allowed": True - } - diff --git a/sdks/python/dropbox_sign/models/team_info_response.py b/sdks/python/dropbox_sign/models/team_info_response.py index 032763673..36a69ed5f 100644 --- a/sdks/python/dropbox_sign/models/team_info_response.py +++ b/sdks/python/dropbox_sign/models/team_info_response.py @@ -24,6 +24,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class TeamInfoResponse(BaseModel): """ @@ -40,6 +41,7 @@ class TeamInfoResponse(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -83,11 +85,6 @@ 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() - # set to None if team_parent (nullable) is None - # and model_fields_set contains the field - if self.team_parent is None and "team_parent" in self.model_fields_set: - _dict['team_parent'] = None - return _dict @classmethod @@ -130,7 +127,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - diff --git a/sdks/python/dropbox_sign/models/team_invite_response.py b/sdks/python/dropbox_sign/models/team_invite_response.py index 0a7988d5d..338a2db75 100644 --- a/sdks/python/dropbox_sign/models/team_invite_response.py +++ b/sdks/python/dropbox_sign/models/team_invite_response.py @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class TeamInviteResponse(BaseModel): """ @@ -40,6 +41,7 @@ class TeamInviteResponse(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -124,7 +126,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - diff --git a/sdks/python/dropbox_sign/models/team_invites_response.py b/sdks/python/dropbox_sign/models/team_invites_response.py index 35fdf9135..3e42cea14 100644 --- a/sdks/python/dropbox_sign/models/team_invites_response.py +++ b/sdks/python/dropbox_sign/models/team_invites_response.py @@ -25,6 +25,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class TeamInvitesResponse(BaseModel): """ @@ -38,6 +39,7 @@ class TeamInvitesResponse(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -130,7 +132,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: "warnings", ] - model_config = { - "arbitrary_types_allowed": True - } - diff --git a/sdks/python/dropbox_sign/models/team_member_response.py b/sdks/python/dropbox_sign/models/team_member_response.py index 0967c3922..607b28499 100644 --- a/sdks/python/dropbox_sign/models/team_member_response.py +++ b/sdks/python/dropbox_sign/models/team_member_response.py @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class TeamMemberResponse(BaseModel): """ @@ -37,6 +38,7 @@ class TeamMemberResponse(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -115,7 +117,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - diff --git a/sdks/python/dropbox_sign/models/team_members_response.py b/sdks/python/dropbox_sign/models/team_members_response.py index 1c6d90e24..5cba894b0 100644 --- a/sdks/python/dropbox_sign/models/team_members_response.py +++ b/sdks/python/dropbox_sign/models/team_members_response.py @@ -26,6 +26,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class TeamMembersResponse(BaseModel): """ @@ -40,6 +41,7 @@ class TeamMembersResponse(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -137,7 +139,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: "warnings", ] - model_config = { - "arbitrary_types_allowed": True - } - diff --git a/sdks/python/dropbox_sign/models/team_parent_response.py b/sdks/python/dropbox_sign/models/team_parent_response.py index e61fb4d2c..05e134e7d 100644 --- a/sdks/python/dropbox_sign/models/team_parent_response.py +++ b/sdks/python/dropbox_sign/models/team_parent_response.py @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class TeamParentResponse(BaseModel): """ @@ -36,6 +37,7 @@ class TeamParentResponse(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -112,7 +114,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 e11765024..b32f9ff74 100644 --- a/sdks/python/dropbox_sign/models/team_remove_member_request.py +++ b/sdks/python/dropbox_sign/models/team_remove_member_request.py @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class TeamRemoveMemberRequest(BaseModel): """ @@ -49,6 +50,7 @@ def new_role_validate_enum(cls, value): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -131,7 +133,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - diff --git a/sdks/python/dropbox_sign/models/team_response.py b/sdks/python/dropbox_sign/models/team_response.py index d7467e954..46d31f1ea 100644 --- a/sdks/python/dropbox_sign/models/team_response.py +++ b/sdks/python/dropbox_sign/models/team_response.py @@ -24,6 +24,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class TeamResponse(BaseModel): """ @@ -39,6 +40,7 @@ class TeamResponse(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -136,7 +138,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: "invited_emails", ] - model_config = { - "arbitrary_types_allowed": True - } - 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 43f1c42be..70e3e3328 100644 --- a/sdks/python/dropbox_sign/models/team_sub_teams_response.py +++ b/sdks/python/dropbox_sign/models/team_sub_teams_response.py @@ -26,6 +26,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class TeamSubTeamsResponse(BaseModel): """ @@ -40,6 +41,7 @@ class TeamSubTeamsResponse(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -137,7 +139,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: "warnings", ] - model_config = { - "arbitrary_types_allowed": True - } - diff --git a/sdks/python/dropbox_sign/models/team_update_request.py b/sdks/python/dropbox_sign/models/team_update_request.py index f30c01eae..fb08689f2 100644 --- a/sdks/python/dropbox_sign/models/team_update_request.py +++ b/sdks/python/dropbox_sign/models/team_update_request.py @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class TeamUpdateRequest(BaseModel): """ @@ -35,6 +36,7 @@ class TeamUpdateRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -109,7 +111,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 1ac3e7c42..8d1c4b435 100644 --- a/sdks/python/dropbox_sign/models/template_add_user_request.py +++ b/sdks/python/dropbox_sign/models/template_add_user_request.py @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class TemplateAddUserRequest(BaseModel): """ @@ -37,6 +38,7 @@ class TemplateAddUserRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -115,7 +117,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 10e039868..39da761c9 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 @@ -32,6 +32,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class TemplateCreateEmbeddedDraftRequest(BaseModel): """ @@ -68,6 +69,7 @@ class TemplateCreateEmbeddedDraftRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -247,7 +249,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: "signer_roles", ] - model_config = { - "arbitrary_types_allowed": True - } - 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 f46da8cf0..20301585a 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 @@ -25,6 +25,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class TemplateCreateEmbeddedDraftResponse(BaseModel): """ @@ -38,6 +39,7 @@ class TemplateCreateEmbeddedDraftResponse(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -125,7 +127,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: "warnings", ] - model_config = { - "arbitrary_types_allowed": True - } - 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 dc845ed0d..dc877ba73 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 @@ -24,6 +24,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class TemplateCreateEmbeddedDraftResponseTemplate(BaseModel): """ @@ -39,6 +40,7 @@ class TemplateCreateEmbeddedDraftResponseTemplate(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -127,7 +129,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: "warnings", ] - model_config = { - "arbitrary_types_allowed": True - } - diff --git a/sdks/python/dropbox_sign/models/template_create_request.py b/sdks/python/dropbox_sign/models/template_create_request.py index 09f3c62a5..c295fee17 100644 --- a/sdks/python/dropbox_sign/models/template_create_request.py +++ b/sdks/python/dropbox_sign/models/template_create_request.py @@ -31,6 +31,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class TemplateCreateRequest(BaseModel): """ @@ -60,6 +61,7 @@ class TemplateCreateRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -222,7 +224,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: "merge_fields", ] - model_config = { - "arbitrary_types_allowed": True - } - diff --git a/sdks/python/dropbox_sign/models/template_create_response.py b/sdks/python/dropbox_sign/models/template_create_response.py index 6990df31c..98bf743bf 100644 --- a/sdks/python/dropbox_sign/models/template_create_response.py +++ b/sdks/python/dropbox_sign/models/template_create_response.py @@ -25,6 +25,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class TemplateCreateResponse(BaseModel): """ @@ -38,6 +39,7 @@ class TemplateCreateResponse(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -125,7 +127,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: "warnings", ] - model_config = { - "arbitrary_types_allowed": True - } - 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 4b2e1b424..90badfcf3 100644 --- a/sdks/python/dropbox_sign/models/template_create_response_template.py +++ b/sdks/python/dropbox_sign/models/template_create_response_template.py @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class TemplateCreateResponseTemplate(BaseModel): """ @@ -35,6 +36,7 @@ class TemplateCreateResponseTemplate(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -109,7 +111,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - diff --git a/sdks/python/dropbox_sign/models/template_edit_response.py b/sdks/python/dropbox_sign/models/template_edit_response.py index fcdd1c364..ec948944d 100644 --- a/sdks/python/dropbox_sign/models/template_edit_response.py +++ b/sdks/python/dropbox_sign/models/template_edit_response.py @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class TemplateEditResponse(BaseModel): """ @@ -35,6 +36,7 @@ class TemplateEditResponse(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -109,7 +111,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - diff --git a/sdks/python/dropbox_sign/models/template_get_response.py b/sdks/python/dropbox_sign/models/template_get_response.py index 48cfdf091..588978f77 100644 --- a/sdks/python/dropbox_sign/models/template_get_response.py +++ b/sdks/python/dropbox_sign/models/template_get_response.py @@ -25,6 +25,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class TemplateGetResponse(BaseModel): """ @@ -38,6 +39,7 @@ class TemplateGetResponse(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -125,7 +127,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: "warnings", ] - model_config = { - "arbitrary_types_allowed": True - } - diff --git a/sdks/python/dropbox_sign/models/template_list_response.py b/sdks/python/dropbox_sign/models/template_list_response.py index b69461a44..ed24f5c94 100644 --- a/sdks/python/dropbox_sign/models/template_list_response.py +++ b/sdks/python/dropbox_sign/models/template_list_response.py @@ -26,6 +26,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class TemplateListResponse(BaseModel): """ @@ -40,6 +41,7 @@ class TemplateListResponse(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -137,7 +139,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: "warnings", ] - model_config = { - "arbitrary_types_allowed": True - } - 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 5371e565f..8b56856ff 100644 --- a/sdks/python/dropbox_sign/models/template_remove_user_request.py +++ b/sdks/python/dropbox_sign/models/template_remove_user_request.py @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class TemplateRemoveUserRequest(BaseModel): """ @@ -36,6 +37,7 @@ class TemplateRemoveUserRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -112,7 +114,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - diff --git a/sdks/python/dropbox_sign/models/template_response.py b/sdks/python/dropbox_sign/models/template_response.py index 96d680e0b..ddce85d9b 100644 --- a/sdks/python/dropbox_sign/models/template_response.py +++ b/sdks/python/dropbox_sign/models/template_response.py @@ -29,6 +29,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class TemplateResponse(BaseModel): """ @@ -55,6 +56,7 @@ class TemplateResponse(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -137,41 +139,6 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: if _item_accounts: _items.append(_item_accounts.to_dict()) _dict['accounts'] = _items - # set to None if is_embedded (nullable) is None - # and model_fields_set contains the field - if self.is_embedded is None and "is_embedded" in self.model_fields_set: - _dict['is_embedded'] = None - - # set to None if is_creator (nullable) is None - # and model_fields_set contains the field - if self.is_creator is None and "is_creator" in self.model_fields_set: - _dict['is_creator'] = None - - # set to None if can_edit (nullable) is None - # and model_fields_set contains the field - if self.can_edit is None and "can_edit" in self.model_fields_set: - _dict['can_edit'] = None - - # set to None if is_locked (nullable) is None - # and model_fields_set contains the field - if self.is_locked is None and "is_locked" in self.model_fields_set: - _dict['is_locked'] = None - - # set to None if custom_fields (nullable) is None - # and model_fields_set contains the field - if self.custom_fields is None and "custom_fields" in self.model_fields_set: - _dict['custom_fields'] = None - - # set to None if named_form_fields (nullable) is None - # and model_fields_set contains the field - if self.named_form_fields is None and "named_form_fields" in self.model_fields_set: - _dict['named_form_fields'] = None - - # set to None if accounts (nullable) is None - # and model_fields_set contains the field - if self.accounts is None and "accounts" in self.model_fields_set: - _dict['accounts'] = None - return _dict @classmethod @@ -240,7 +207,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: "accounts", ] - model_config = { - "arbitrary_types_allowed": True - } - diff --git a/sdks/python/dropbox_sign/models/template_response_account.py b/sdks/python/dropbox_sign/models/template_response_account.py index 6e7f7dfb7..15223ba71 100644 --- a/sdks/python/dropbox_sign/models/template_response_account.py +++ b/sdks/python/dropbox_sign/models/template_response_account.py @@ -24,6 +24,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class TemplateResponseAccount(BaseModel): """ @@ -41,6 +42,7 @@ class TemplateResponseAccount(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -128,7 +130,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 d4b6bb1da..0a14822b6 100644 --- a/sdks/python/dropbox_sign/models/template_response_account_quota.py +++ b/sdks/python/dropbox_sign/models/template_response_account_quota.py @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class TemplateResponseAccountQuota(BaseModel): """ @@ -38,6 +39,7 @@ class TemplateResponseAccountQuota(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -118,7 +120,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 d3a6a6f9b..642e3d477 100644 --- a/sdks/python/dropbox_sign/models/template_response_cc_role.py +++ b/sdks/python/dropbox_sign/models/template_response_cc_role.py @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class TemplateResponseCCRole(BaseModel): """ @@ -35,6 +36,7 @@ class TemplateResponseCCRole(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -109,7 +111,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - diff --git a/sdks/python/dropbox_sign/models/template_response_document.py b/sdks/python/dropbox_sign/models/template_response_document.py index 16caa7149..8d4edf252 100644 --- a/sdks/python/dropbox_sign/models/template_response_document.py +++ b/sdks/python/dropbox_sign/models/template_response_document.py @@ -27,6 +27,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class TemplateResponseDocument(BaseModel): """ @@ -44,6 +45,7 @@ class TemplateResponseDocument(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -112,11 +114,6 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: if _item_static_fields: _items.append(_item_static_fields.to_dict()) _dict['static_fields'] = _items - # set to None if static_fields (nullable) is None - # and model_fields_set contains the field - if self.static_fields is None and "static_fields" in self.model_fields_set: - _dict['static_fields'] = None - return _dict @classmethod @@ -165,7 +162,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: "static_fields", ] - model_config = { - "arbitrary_types_allowed": True - } - 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 b7cb21a56..692154ae9 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 @@ -24,6 +24,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool from typing import TYPE_CHECKING if TYPE_CHECKING: @@ -50,6 +51,7 @@ class TemplateResponseDocumentCustomFieldBase(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -107,16 +109,6 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if signer (nullable) is None - # and model_fields_set contains the field - if self.signer is None and "signer" in self.model_fields_set: - _dict['signer'] = None - - # set to None if group (nullable) is None - # and model_fields_set contains the field - if self.group is None and "group" in self.model_fields_set: - _dict['group'] = None - return _dict @classmethod @@ -154,7 +146,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 c1c930015..504977708 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 @@ -24,6 +24,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class TemplateResponseDocumentCustomFieldCheckbox(TemplateResponseDocumentCustomFieldBase): """ @@ -36,6 +37,7 @@ class TemplateResponseDocumentCustomFieldCheckbox(TemplateResponseDocumentCustom populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -76,16 +78,6 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if signer (nullable) is None - # and model_fields_set contains the field - if self.signer is None and "signer" in self.model_fields_set: - _dict['signer'] = None - - # set to None if group (nullable) is None - # and model_fields_set contains the field - if self.group is None and "group" in self.model_fields_set: - _dict['group'] = None - return _dict @classmethod @@ -138,7 +130,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 ebe65e6e1..856e1a6e3 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 @@ -25,6 +25,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class TemplateResponseDocumentCustomFieldText(TemplateResponseDocumentCustomFieldBase): """ @@ -41,6 +42,7 @@ class TemplateResponseDocumentCustomFieldText(TemplateResponseDocumentCustomFiel populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -84,16 +86,6 @@ 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() - # set to None if signer (nullable) is None - # and model_fields_set contains the field - if self.signer is None and "signer" in self.model_fields_set: - _dict['signer'] = None - - # set to None if group (nullable) is None - # and model_fields_set contains the field - if self.group is None and "group" in self.model_fields_set: - _dict['group'] = None - return _dict @classmethod @@ -154,7 +146,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 e37cc7f08..51854778b 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 @@ -24,6 +24,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class TemplateResponseDocumentFieldGroup(BaseModel): """ @@ -37,6 +38,7 @@ class TemplateResponseDocumentFieldGroup(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -116,7 +118,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 9edef01c6..4c6311d0a 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 @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class TemplateResponseDocumentFieldGroupRule(BaseModel): """ @@ -36,6 +37,7 @@ class TemplateResponseDocumentFieldGroupRule(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -112,7 +114,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 0e0d13d0a..5ff875251 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 @@ -24,6 +24,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool from typing import TYPE_CHECKING if TYPE_CHECKING: @@ -56,6 +57,7 @@ class TemplateResponseDocumentFormFieldBase(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -113,11 +115,6 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if group (nullable) is None - # and model_fields_set contains the field - if self.group is None and "group" in self.model_fields_set: - _dict['group'] = None - return _dict @classmethod @@ -167,7 +164,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 7c4c7f083..93efbe02f 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 @@ -24,6 +24,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class TemplateResponseDocumentFormFieldCheckbox(TemplateResponseDocumentFormFieldBase): """ @@ -36,6 +37,7 @@ class TemplateResponseDocumentFormFieldCheckbox(TemplateResponseDocumentFormFiel populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -76,11 +78,6 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if group (nullable) is None - # and model_fields_set contains the field - if self.group is None and "group" in self.model_fields_set: - _dict['group'] = None - return _dict @classmethod @@ -133,7 +130,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 2ed1a56b7..643606f8e 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 @@ -24,6 +24,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class TemplateResponseDocumentFormFieldDateSigned(TemplateResponseDocumentFormFieldBase): """ @@ -36,6 +37,7 @@ class TemplateResponseDocumentFormFieldDateSigned(TemplateResponseDocumentFormFi populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -76,11 +78,6 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if group (nullable) is None - # and model_fields_set contains the field - if self.group is None and "group" in self.model_fields_set: - _dict['group'] = None - return _dict @classmethod @@ -133,7 +130,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 b72f40cba..0fa7af8a2 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 @@ -24,6 +24,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class TemplateResponseDocumentFormFieldDropdown(TemplateResponseDocumentFormFieldBase): """ @@ -36,6 +37,7 @@ class TemplateResponseDocumentFormFieldDropdown(TemplateResponseDocumentFormFiel populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -76,11 +78,6 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if group (nullable) is None - # and model_fields_set contains the field - if self.group is None and "group" in self.model_fields_set: - _dict['group'] = None - return _dict @classmethod @@ -133,7 +130,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 8ff5ffb8d..ec73e2b9c 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 @@ -25,6 +25,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class TemplateResponseDocumentFormFieldHyperlink(TemplateResponseDocumentFormFieldBase): """ @@ -41,6 +42,7 @@ class TemplateResponseDocumentFormFieldHyperlink(TemplateResponseDocumentFormFie populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -84,11 +86,6 @@ 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() - # set to None if group (nullable) is None - # and model_fields_set contains the field - if self.group is None and "group" in self.model_fields_set: - _dict['group'] = None - return _dict @classmethod @@ -149,7 +146,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 5743cfe3c..020bf3ff4 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 @@ -24,6 +24,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class TemplateResponseDocumentFormFieldInitials(TemplateResponseDocumentFormFieldBase): """ @@ -36,6 +37,7 @@ class TemplateResponseDocumentFormFieldInitials(TemplateResponseDocumentFormFiel populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -76,11 +78,6 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if group (nullable) is None - # and model_fields_set contains the field - if self.group is None and "group" in self.model_fields_set: - _dict['group'] = None - return _dict @classmethod @@ -133,7 +130,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 559d22d62..89d8c81a4 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 @@ -24,6 +24,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class TemplateResponseDocumentFormFieldRadio(TemplateResponseDocumentFormFieldBase): """ @@ -36,6 +37,7 @@ class TemplateResponseDocumentFormFieldRadio(TemplateResponseDocumentFormFieldBa populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -76,11 +78,6 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if group (nullable) is None - # and model_fields_set contains the field - if self.group is None and "group" in self.model_fields_set: - _dict['group'] = None - return _dict @classmethod @@ -133,7 +130,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 bd78200dc..7ff4f7234 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 @@ -24,6 +24,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class TemplateResponseDocumentFormFieldSignature(TemplateResponseDocumentFormFieldBase): """ @@ -36,6 +37,7 @@ class TemplateResponseDocumentFormFieldSignature(TemplateResponseDocumentFormFie populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -76,11 +78,6 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if group (nullable) is None - # and model_fields_set contains the field - if self.group is None and "group" in self.model_fields_set: - _dict['group'] = None - return _dict @classmethod @@ -133,7 +130,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 e2ea3ffaa..8bd26c853 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 @@ -25,6 +25,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class TemplateResponseDocumentFormFieldText(TemplateResponseDocumentFormFieldBase): """ @@ -52,6 +53,7 @@ def validation_type_validate_enum(cls, value): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -95,16 +97,6 @@ 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() - # set to None if group (nullable) is None - # and model_fields_set contains the field - if self.group is None and "group" in self.model_fields_set: - _dict['group'] = None - - # set to None if validation_type (nullable) is None - # and model_fields_set contains the field - if self.validation_type is None and "validation_type" in self.model_fields_set: - _dict['validation_type'] = None - return _dict @classmethod @@ -167,7 +159,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 b2fbc96b5..f93e71bf4 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 @@ -24,6 +24,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool from typing import TYPE_CHECKING if TYPE_CHECKING: @@ -56,6 +57,7 @@ class TemplateResponseDocumentStaticFieldBase(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -113,11 +115,6 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if group (nullable) is None - # and model_fields_set contains the field - if self.group is None and "group" in self.model_fields_set: - _dict['group'] = None - return _dict @classmethod @@ -167,7 +164,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 9c265f41c..6e0219783 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 @@ -24,6 +24,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class TemplateResponseDocumentStaticFieldCheckbox(TemplateResponseDocumentStaticFieldBase): """ @@ -36,6 +37,7 @@ class TemplateResponseDocumentStaticFieldCheckbox(TemplateResponseDocumentStatic populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -76,11 +78,6 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if group (nullable) is None - # and model_fields_set contains the field - if self.group is None and "group" in self.model_fields_set: - _dict['group'] = None - return _dict @classmethod @@ -133,7 +130,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 8173416f4..2d9757ee7 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 @@ -24,6 +24,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class TemplateResponseDocumentStaticFieldDateSigned(TemplateResponseDocumentStaticFieldBase): """ @@ -36,6 +37,7 @@ class TemplateResponseDocumentStaticFieldDateSigned(TemplateResponseDocumentStat populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -76,11 +78,6 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if group (nullable) is None - # and model_fields_set contains the field - if self.group is None and "group" in self.model_fields_set: - _dict['group'] = None - return _dict @classmethod @@ -133,7 +130,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 e02a3465f..c928a1802 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 @@ -24,6 +24,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class TemplateResponseDocumentStaticFieldDropdown(TemplateResponseDocumentStaticFieldBase): """ @@ -36,6 +37,7 @@ class TemplateResponseDocumentStaticFieldDropdown(TemplateResponseDocumentStatic populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -76,11 +78,6 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if group (nullable) is None - # and model_fields_set contains the field - if self.group is None and "group" in self.model_fields_set: - _dict['group'] = None - return _dict @classmethod @@ -133,7 +130,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 d72e743a8..ad90e0334 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 @@ -24,6 +24,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class TemplateResponseDocumentStaticFieldHyperlink(TemplateResponseDocumentStaticFieldBase): """ @@ -36,6 +37,7 @@ class TemplateResponseDocumentStaticFieldHyperlink(TemplateResponseDocumentStati populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -76,11 +78,6 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if group (nullable) is None - # and model_fields_set contains the field - if self.group is None and "group" in self.model_fields_set: - _dict['group'] = None - return _dict @classmethod @@ -133,7 +130,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 9509a8949..46de138cc 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 @@ -24,6 +24,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class TemplateResponseDocumentStaticFieldInitials(TemplateResponseDocumentStaticFieldBase): """ @@ -36,6 +37,7 @@ class TemplateResponseDocumentStaticFieldInitials(TemplateResponseDocumentStatic populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -76,11 +78,6 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if group (nullable) is None - # and model_fields_set contains the field - if self.group is None and "group" in self.model_fields_set: - _dict['group'] = None - return _dict @classmethod @@ -133,7 +130,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 b1c697bdc..da2e6f94a 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 @@ -24,6 +24,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class TemplateResponseDocumentStaticFieldRadio(TemplateResponseDocumentStaticFieldBase): """ @@ -36,6 +37,7 @@ class TemplateResponseDocumentStaticFieldRadio(TemplateResponseDocumentStaticFie populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -76,11 +78,6 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if group (nullable) is None - # and model_fields_set contains the field - if self.group is None and "group" in self.model_fields_set: - _dict['group'] = None - return _dict @classmethod @@ -133,7 +130,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 87c40f6b2..61672ef3d 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 @@ -24,6 +24,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class TemplateResponseDocumentStaticFieldSignature(TemplateResponseDocumentStaticFieldBase): """ @@ -36,6 +37,7 @@ class TemplateResponseDocumentStaticFieldSignature(TemplateResponseDocumentStati populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -76,11 +78,6 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if group (nullable) is None - # and model_fields_set contains the field - if self.group is None and "group" in self.model_fields_set: - _dict['group'] = None - return _dict @classmethod @@ -133,7 +130,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 35c83d653..cfcbf9738 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 @@ -24,6 +24,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class TemplateResponseDocumentStaticFieldText(TemplateResponseDocumentStaticFieldBase): """ @@ -36,6 +37,7 @@ class TemplateResponseDocumentStaticFieldText(TemplateResponseDocumentStaticFiel populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -76,11 +78,6 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if group (nullable) is None - # and model_fields_set contains the field - if self.group is None and "group" in self.model_fields_set: - _dict['group'] = None - return _dict @classmethod @@ -133,7 +130,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 35ea8a659..d7fdb69c9 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 @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class TemplateResponseFieldAvgTextLength(BaseModel): """ @@ -36,6 +37,7 @@ class TemplateResponseFieldAvgTextLength(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -112,7 +114,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 3d874d174..88fd01666 100644 --- a/sdks/python/dropbox_sign/models/template_response_signer_role.py +++ b/sdks/python/dropbox_sign/models/template_response_signer_role.py @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class TemplateResponseSignerRole(BaseModel): """ @@ -36,6 +37,7 @@ class TemplateResponseSignerRole(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -112,7 +114,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 025f5c44f..64b96e60c 100644 --- a/sdks/python/dropbox_sign/models/template_update_files_request.py +++ b/sdks/python/dropbox_sign/models/template_update_files_request.py @@ -24,6 +24,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class TemplateUpdateFilesRequest(BaseModel): """ @@ -41,6 +42,7 @@ class TemplateUpdateFilesRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -127,7 +129,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: "file_urls", ] - model_config = { - "arbitrary_types_allowed": True - } - 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 30aa99fd9..abb6d66af 100644 --- a/sdks/python/dropbox_sign/models/template_update_files_response.py +++ b/sdks/python/dropbox_sign/models/template_update_files_response.py @@ -24,6 +24,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class TemplateUpdateFilesResponse(BaseModel): """ @@ -36,6 +37,7 @@ class TemplateUpdateFilesResponse(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -113,7 +115,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - 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 2415503e6..712256336 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 @@ -24,6 +24,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class TemplateUpdateFilesResponseTemplate(BaseModel): """ @@ -37,6 +38,7 @@ class TemplateUpdateFilesResponseTemplate(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -121,7 +123,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: "warnings", ] - model_config = { - "arbitrary_types_allowed": True - } - 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 9d6f9dedf..cc2752899 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 @@ -33,6 +33,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class UnclaimedDraftCreateEmbeddedRequest(BaseModel): """ @@ -90,6 +91,7 @@ def type_validate_enum(cls, value): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -181,11 +183,6 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: # 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() - # set to None if expires_at (nullable) is None - # and model_fields_set contains the field - if self.expires_at is None and "expires_at" in self.model_fields_set: - _dict['expires_at'] = None - return _dict @classmethod @@ -299,7 +296,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: "signers", ] - model_config = { - "arbitrary_types_allowed": True - } - 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 31d9757a1..3137975f8 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 @@ -30,6 +30,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class UnclaimedDraftCreateEmbeddedWithTemplateRequest(BaseModel): """ @@ -71,6 +72,7 @@ class UnclaimedDraftCreateEmbeddedWithTemplateRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -239,7 +241,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: "signers", ] - model_config = { - "arbitrary_types_allowed": True - } - 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 ce8f02175..a217d17f1 100644 --- a/sdks/python/dropbox_sign/models/unclaimed_draft_create_request.py +++ b/sdks/python/dropbox_sign/models/unclaimed_draft_create_request.py @@ -32,6 +32,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class UnclaimedDraftCreateRequest(BaseModel): """ @@ -74,6 +75,7 @@ def type_validate_enum(cls, value): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -162,11 +164,6 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: # 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() - # set to None if expires_at (nullable) is None - # and model_fields_set contains the field - if self.expires_at is None and "expires_at" in self.model_fields_set: - _dict['expires_at'] = None - return _dict @classmethod @@ -256,7 +253,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: "signers", ] - model_config = { - "arbitrary_types_allowed": True - } - 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 248c53ee8..5d09e0ef3 100644 --- a/sdks/python/dropbox_sign/models/unclaimed_draft_create_response.py +++ b/sdks/python/dropbox_sign/models/unclaimed_draft_create_response.py @@ -25,6 +25,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class UnclaimedDraftCreateResponse(BaseModel): """ @@ -38,6 +39,7 @@ class UnclaimedDraftCreateResponse(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -125,7 +127,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: "warnings", ] - model_config = { - "arbitrary_types_allowed": True - } - 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 9865efaae..93985b75f 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 @@ -24,6 +24,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class UnclaimedDraftEditAndResendRequest(BaseModel): """ @@ -43,6 +44,7 @@ class UnclaimedDraftEditAndResendRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -134,7 +136,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - diff --git a/sdks/python/dropbox_sign/models/unclaimed_draft_response.py b/sdks/python/dropbox_sign/models/unclaimed_draft_response.py index a8dd3ac7b..62eb23c70 100644 --- a/sdks/python/dropbox_sign/models/unclaimed_draft_response.py +++ b/sdks/python/dropbox_sign/models/unclaimed_draft_response.py @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class UnclaimedDraftResponse(BaseModel): """ @@ -40,6 +41,7 @@ class UnclaimedDraftResponse(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -80,26 +82,6 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if signature_request_id (nullable) is None - # and model_fields_set contains the field - if self.signature_request_id is None and "signature_request_id" in self.model_fields_set: - _dict['signature_request_id'] = None - - # set to None if signing_redirect_url (nullable) is None - # and model_fields_set contains the field - if self.signing_redirect_url is None and "signing_redirect_url" in self.model_fields_set: - _dict['signing_redirect_url'] = None - - # set to None if requesting_redirect_url (nullable) is None - # and model_fields_set contains the field - if self.requesting_redirect_url is None and "requesting_redirect_url" in self.model_fields_set: - _dict['requesting_redirect_url'] = None - - # set to None if expires_at (nullable) is None - # and model_fields_set contains the field - if self.expires_at is None and "expires_at" in self.model_fields_set: - _dict['expires_at'] = None - return _dict @classmethod @@ -144,7 +126,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - diff --git a/sdks/python/dropbox_sign/models/warning_response.py b/sdks/python/dropbox_sign/models/warning_response.py index d754ccb4e..3d8eefe59 100644 --- a/sdks/python/dropbox_sign/models/warning_response.py +++ b/sdks/python/dropbox_sign/models/warning_response.py @@ -23,6 +23,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self import io +from pydantic import StrictBool class WarningResponse(BaseModel): """ @@ -36,6 +37,7 @@ class WarningResponse(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + arbitrary_types_allowed=True, ) @@ -112,7 +114,3 @@ def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: return property_name in [ ] - model_config = { - "arbitrary_types_allowed": True - } - diff --git a/sdks/python/templates/model_generic.mustache b/sdks/python/templates/model_generic.mustache index e44116d09..2c647d9cc 100644 --- a/sdks/python/templates/model_generic.mustache +++ b/sdks/python/templates/model_generic.mustache @@ -18,6 +18,7 @@ from typing import Optional, Set, Tuple from typing_extensions import Self {{#useCustomTemplateCode}} import io +from pydantic import StrictBool {{/useCustomTemplateCode}} {{#hasChildren}} @@ -103,6 +104,9 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}} populate_by_name=True, validate_assignment=True, protected_namespaces=(), +{{#useCustomTemplateCode}} + arbitrary_types_allowed=True, +{{/useCustomTemplateCode}} ) @@ -269,6 +273,7 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}} _dict[_key] = _value {{/isAdditionalPropertiesTrue}} +{{^useCustomTemplateCode}} {{#allVars}} {{#isNullable}} # set to None if {{{name}}} (nullable) is None @@ -278,6 +283,7 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}} {{/isNullable}} {{/allVars}} +{{/useCustomTemplateCode}} return _dict {{#hasChildren}} @@ -452,10 +458,6 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}} {{/isArray}} {{/vars}} ] - - model_config = { - "arbitrary_types_allowed": True - } {{/useCustomTemplateCode}} {{#vendorExtensions.x-py-postponed-model-imports.size}} {{#vendorExtensions.x-py-postponed-model-imports}} 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 82947b4b0..54d36435c 100644 --- a/sdks/python/tests/test_model_signature_request_send_request.py +++ b/sdks/python/tests/test_model_signature_request_send_request.py @@ -59,6 +59,7 @@ def test_is_valid(self): height=16, x=112, y=328, + required=False, ) data = models.SignatureRequestSendRequest( From 73d05c6896abc55c78bdd585586cd0cb77bd7f23 Mon Sep 17 00:00:00 2001 From: Juan Treminio Date: Thu, 29 Aug 2024 18:26:37 -0500 Subject: [PATCH 05/10] More test fixes --- sdks/python/tests/test_fixtures.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sdks/python/tests/test_fixtures.py b/sdks/python/tests/test_fixtures.py index 252d2df74..626d38d3b 100644 --- a/sdks/python/tests/test_fixtures.py +++ b/sdks/python/tests/test_fixtures.py @@ -50,17 +50,16 @@ def test_is_valid(self): yanked_files = {} data = {} - openapi_types = class_type.openapi_types - for param, param_value in openapi_types.items(): + for param, param_value in class_type.openapi_types().items(): if param not in fixt_data.keys(): continue data[param] = fixt_data[param] obj = api_client.deserialize( - response=type('obj_dict', (object,), {'data': json.dumps(data)}), - response_type=[class_type], - _check_type=True, + response_text=json.dumps(data), + response_type=class_type, + content_type="application/json", ) for yanked_key, yanked_file in yanked_files.items(): From 068c2813b7f71c3a1b1802db5f5cf932a03b3a47 Mon Sep 17 00:00:00 2001 From: Juan Treminio Date: Thu, 29 Aug 2024 18:44:14 -0500 Subject: [PATCH 06/10] Fixing more tests! --- sdks/python/README.md | 4 ++-- sdks/python/VERSION | 2 +- sdks/python/dropbox_sign/__init__.py | 2 +- sdks/python/dropbox_sign/api/account_api.py | 9 ++++--- sdks/python/dropbox_sign/api/api_app_api.py | 6 +++-- sdks/python/dropbox_sign/api/embedded_api.py | 3 ++- sdks/python/dropbox_sign/api/fax_line_api.py | 12 ++++++---- sdks/python/dropbox_sign/api/o_auth_api.py | 6 +++-- sdks/python/dropbox_sign/api/report_api.py | 3 ++- .../dropbox_sign/api/signature_request_api.py | 24 ++++++++++++------- sdks/python/dropbox_sign/api/team_api.py | 12 ++++++---- sdks/python/dropbox_sign/api/template_api.py | 15 ++++++++---- .../dropbox_sign/api/unclaimed_draft_api.py | 12 ++++++---- sdks/python/dropbox_sign/api_client.py | 2 +- sdks/python/dropbox_sign/configuration.py | 2 +- .../models/account_create_request.py | 9 ++++--- .../models/account_create_response.py | 9 ++++--- .../models/account_get_response.py | 9 ++++--- .../dropbox_sign/models/account_response.py | 9 ++++--- .../models/account_response_quotas.py | 9 ++++--- .../models/account_response_usage.py | 9 ++++--- .../models/account_update_request.py | 9 ++++--- .../models/account_verify_request.py | 9 ++++--- .../models/account_verify_response.py | 9 ++++--- .../models/account_verify_response_account.py | 9 ++++--- .../models/api_app_create_request.py | 9 ++++--- .../models/api_app_get_response.py | 9 ++++--- .../models/api_app_list_response.py | 9 ++++--- .../dropbox_sign/models/api_app_response.py | 9 ++++--- .../models/api_app_response_o_auth.py | 9 ++++--- .../models/api_app_response_options.py | 9 ++++--- .../models/api_app_response_owner_account.py | 9 ++++--- ...api_app_response_white_labeling_options.py | 9 ++++--- .../models/api_app_update_request.py | 9 ++++--- .../models/bulk_send_job_get_response.py | 9 ++++--- ...end_job_get_response_signature_requests.py | 9 ++++--- .../models/bulk_send_job_list_response.py | 9 ++++--- .../models/bulk_send_job_response.py | 9 ++++--- .../models/bulk_send_job_send_response.py | 9 ++++--- .../models/embedded_edit_url_request.py | 9 ++++--- .../models/embedded_edit_url_response.py | 9 ++++--- .../embedded_edit_url_response_embedded.py | 9 ++++--- .../models/embedded_sign_url_response.py | 9 ++++--- .../embedded_sign_url_response_embedded.py | 9 ++++--- .../dropbox_sign/models/error_response.py | 9 ++++--- .../models/error_response_error.py | 9 ++++--- .../models/event_callback_request.py | 9 ++++--- .../models/event_callback_request_event.py | 9 ++++--- .../event_callback_request_event_metadata.py | 9 ++++--- .../models/fax_line_add_user_request.py | 9 ++++--- .../models/fax_line_area_code_get_response.py | 9 ++++--- .../models/fax_line_create_request.py | 9 ++++--- .../models/fax_line_delete_request.py | 9 ++++--- .../models/fax_line_list_response.py | 9 ++++--- .../models/fax_line_remove_user_request.py | 9 ++++--- .../dropbox_sign/models/fax_line_response.py | 9 ++++--- .../models/fax_line_response_fax_line.py | 9 ++++--- .../dropbox_sign/models/file_response.py | 9 ++++--- .../models/file_response_data_uri.py | 9 ++++--- .../dropbox_sign/models/list_info_response.py | 9 ++++--- .../models/o_auth_token_generate_request.py | 9 ++++--- .../models/o_auth_token_refresh_request.py | 9 ++++--- .../models/o_auth_token_response.py | 9 ++++--- .../models/report_create_request.py | 9 ++++--- .../models/report_create_response.py | 9 ++++--- .../dropbox_sign/models/report_response.py | 9 ++++--- ...k_create_embedded_with_template_request.py | 9 ++++--- ...request_bulk_send_with_template_request.py | 9 ++++--- ...gnature_request_create_embedded_request.py | 9 ++++--- ...t_create_embedded_with_template_request.py | 9 ++++--- .../models/signature_request_get_response.py | 9 ++++--- .../models/signature_request_list_response.py | 9 ++++--- .../signature_request_remind_request.py | 9 ++++--- .../models/signature_request_response.py | 9 ++++--- .../signature_request_response_attachment.py | 9 ++++--- ...ture_request_response_custom_field_base.py | 4 ++-- ..._request_response_custom_field_checkbox.py | 9 ++++--- ...ture_request_response_custom_field_text.py | 9 ++++--- .../signature_request_response_data_base.py | 4 ++-- ...re_request_response_data_value_checkbox.py | 9 ++++--- ...uest_response_data_value_checkbox_merge.py | 9 ++++--- ...request_response_data_value_date_signed.py | 9 ++++--- ...re_request_response_data_value_dropdown.py | 9 ++++--- ...re_request_response_data_value_initials.py | 9 ++++--- ...ature_request_response_data_value_radio.py | 9 ++++--- ...e_request_response_data_value_signature.py | 9 ++++--- ...nature_request_response_data_value_text.py | 9 ++++--- ..._request_response_data_value_text_merge.py | 9 ++++--- .../signature_request_response_signatures.py | 9 ++++--- .../models/signature_request_send_request.py | 9 ++++--- ...ture_request_send_with_template_request.py | 9 ++++--- .../signature_request_update_request.py | 9 ++++--- .../dropbox_sign/models/sub_attachment.py | 9 ++++--- .../models/sub_bulk_signer_list.py | 9 ++++--- .../sub_bulk_signer_list_custom_field.py | 9 ++++--- sdks/python/dropbox_sign/models/sub_cc.py | 9 ++++--- .../dropbox_sign/models/sub_custom_field.py | 9 ++++--- .../dropbox_sign/models/sub_editor_options.py | 9 ++++--- .../dropbox_sign/models/sub_field_options.py | 9 ++++--- .../models/sub_form_field_group.py | 9 ++++--- .../models/sub_form_field_rule.py | 9 ++++--- .../models/sub_form_field_rule_action.py | 9 ++++--- .../models/sub_form_field_rule_trigger.py | 9 ++++--- .../sub_form_fields_per_document_base.py | 4 ++-- .../sub_form_fields_per_document_checkbox.py | 9 ++++--- ...form_fields_per_document_checkbox_merge.py | 9 ++++--- ...ub_form_fields_per_document_date_signed.py | 9 ++++--- .../sub_form_fields_per_document_dropdown.py | 9 ++++--- .../sub_form_fields_per_document_hyperlink.py | 9 ++++--- .../sub_form_fields_per_document_initials.py | 9 ++++--- .../sub_form_fields_per_document_radio.py | 9 ++++--- .../sub_form_fields_per_document_signature.py | 9 ++++--- .../sub_form_fields_per_document_text.py | 9 ++++--- ...sub_form_fields_per_document_text_merge.py | 9 ++++--- .../dropbox_sign/models/sub_merge_field.py | 9 ++++--- sdks/python/dropbox_sign/models/sub_o_auth.py | 9 ++++--- .../python/dropbox_sign/models/sub_options.py | 9 ++++--- .../sub_signature_request_grouped_signers.py | 9 ++++--- .../models/sub_signature_request_signer.py | 9 ++++--- .../sub_signature_request_template_signer.py | 9 ++++--- .../models/sub_signing_options.py | 9 ++++--- .../dropbox_sign/models/sub_team_response.py | 9 ++++--- .../dropbox_sign/models/sub_template_role.py | 9 ++++--- .../models/sub_unclaimed_draft_signer.py | 9 ++++--- .../sub_unclaimed_draft_template_signer.py | 9 ++++--- .../models/sub_white_labeling_options.py | 9 ++++--- .../models/team_add_member_request.py | 9 ++++--- .../models/team_create_request.py | 9 ++++--- .../models/team_get_info_response.py | 9 ++++--- .../dropbox_sign/models/team_get_response.py | 9 ++++--- .../dropbox_sign/models/team_info_response.py | 9 ++++--- .../models/team_invite_response.py | 9 ++++--- .../models/team_invites_response.py | 9 ++++--- .../models/team_member_response.py | 9 ++++--- .../models/team_members_response.py | 9 ++++--- .../models/team_parent_response.py | 9 ++++--- .../models/team_remove_member_request.py | 9 ++++--- .../dropbox_sign/models/team_response.py | 9 ++++--- .../models/team_sub_teams_response.py | 9 ++++--- .../models/team_update_request.py | 9 ++++--- .../models/template_add_user_request.py | 9 ++++--- .../template_create_embedded_draft_request.py | 9 ++++--- ...template_create_embedded_draft_response.py | 9 ++++--- ...create_embedded_draft_response_template.py | 9 ++++--- .../models/template_create_request.py | 9 ++++--- .../models/template_create_response.py | 9 ++++--- .../template_create_response_template.py | 9 ++++--- .../models/template_edit_response.py | 9 ++++--- .../models/template_get_response.py | 9 ++++--- .../models/template_list_response.py | 9 ++++--- .../models/template_remove_user_request.py | 9 ++++--- .../dropbox_sign/models/template_response.py | 9 ++++--- .../models/template_response_account.py | 9 ++++--- .../models/template_response_account_quota.py | 9 ++++--- .../models/template_response_cc_role.py | 9 ++++--- .../models/template_response_document.py | 9 ++++--- ...ate_response_document_custom_field_base.py | 4 ++-- ...response_document_custom_field_checkbox.py | 9 ++++--- ...ate_response_document_custom_field_text.py | 9 ++++--- .../template_response_document_field_group.py | 9 ++++--- ...late_response_document_field_group_rule.py | 9 ++++--- ...plate_response_document_form_field_base.py | 4 ++-- ...e_response_document_form_field_checkbox.py | 9 ++++--- ...esponse_document_form_field_date_signed.py | 9 ++++--- ...e_response_document_form_field_dropdown.py | 9 ++++--- ..._response_document_form_field_hyperlink.py | 9 ++++--- ...e_response_document_form_field_initials.py | 9 ++++--- ...late_response_document_form_field_radio.py | 9 ++++--- ..._response_document_form_field_signature.py | 9 ++++--- ...plate_response_document_form_field_text.py | 9 ++++--- ...ate_response_document_static_field_base.py | 4 ++-- ...response_document_static_field_checkbox.py | 9 ++++--- ...ponse_document_static_field_date_signed.py | 9 ++++--- ...response_document_static_field_dropdown.py | 9 ++++--- ...esponse_document_static_field_hyperlink.py | 9 ++++--- ...response_document_static_field_initials.py | 9 ++++--- ...te_response_document_static_field_radio.py | 9 ++++--- ...esponse_document_static_field_signature.py | 9 ++++--- ...ate_response_document_static_field_text.py | 9 ++++--- ...template_response_field_avg_text_length.py | 9 ++++--- .../models/template_response_signer_role.py | 9 ++++--- .../models/template_update_files_request.py | 9 ++++--- .../models/template_update_files_response.py | 9 ++++--- ...template_update_files_response_template.py | 9 ++++--- ...unclaimed_draft_create_embedded_request.py | 9 ++++--- ...t_create_embedded_with_template_request.py | 9 ++++--- .../models/unclaimed_draft_create_request.py | 9 ++++--- .../models/unclaimed_draft_create_response.py | 9 ++++--- ...unclaimed_draft_edit_and_resend_request.py | 9 ++++--- .../models/unclaimed_draft_response.py | 9 ++++--- .../dropbox_sign/models/warning_response.py | 9 ++++--- sdks/python/openapi-config.yaml | 2 +- sdks/python/pyproject.toml | 2 +- sdks/python/setup.py | 2 +- sdks/python/templates/api.mustache | 3 ++- sdks/python/templates/model_generic.mustache | 9 ++++--- sdks/python/tests/test_account_api.py | 4 ++-- 197 files changed, 1119 insertions(+), 571 deletions(-) diff --git a/sdks/python/README.md b/sdks/python/README.md index 4bf0ec6fa..b14d4a9b8 100644 --- a/sdks/python/README.md +++ b/sdks/python/README.md @@ -49,7 +49,7 @@ Python 3.7+ Install using `pip`: ```shell -python3 -m pip install dropbox-sign==2.0-dev +python3 -m pip install dropbox-sign==1.5-dev ``` Alternatively: @@ -383,6 +383,6 @@ apisupport@hellosign.com This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: 3.0.0 -- Package version: 2.0-dev +- Package version: 1.5-dev - Build package: org.openapitools.codegen.languages.PythonClientCodegen diff --git a/sdks/python/VERSION b/sdks/python/VERSION index c3bb52e88..6f3dd2f48 100644 --- a/sdks/python/VERSION +++ b/sdks/python/VERSION @@ -1 +1 @@ -2.0-dev +1.5-dev diff --git a/sdks/python/dropbox_sign/__init__.py b/sdks/python/dropbox_sign/__init__.py index bbbfc127c..306055dd0 100644 --- a/sdks/python/dropbox_sign/__init__.py +++ b/sdks/python/dropbox_sign/__init__.py @@ -15,7 +15,7 @@ """ # noqa: E501 -__version__ = "2.0-dev" +__version__ = "1.5-dev" # import apis into sdk package from dropbox_sign.apis import * diff --git a/sdks/python/dropbox_sign/api/account_api.py b/sdks/python/dropbox_sign/api/account_api.py index c57629f33..f4cb4dca5 100644 --- a/sdks/python/dropbox_sign/api/account_api.py +++ b/sdks/python/dropbox_sign/api/account_api.py @@ -286,7 +286,8 @@ def _account_create_serialize( else: _files[param_name] = param_value - _form_params = body_param.to_json_form_params(excluded_json_fields) + if has_files is True: + _form_params = body_param.to_json_form_params(excluded_json_fields) # process the path parameters # process the query parameters @@ -865,7 +866,8 @@ def _account_update_serialize( else: _files[param_name] = param_value - _form_params = body_param.to_json_form_params(excluded_json_fields) + if has_files is True: + _form_params = body_param.to_json_form_params(excluded_json_fields) # process the path parameters # process the query parameters @@ -1162,7 +1164,8 @@ def _account_verify_serialize( else: _files[param_name] = param_value - _form_params = body_param.to_json_form_params(excluded_json_fields) + if has_files is True: + _form_params = body_param.to_json_form_params(excluded_json_fields) # process the path parameters # process the query parameters diff --git a/sdks/python/dropbox_sign/api/api_app_api.py b/sdks/python/dropbox_sign/api/api_app_api.py index 5e444567c..ab502c58b 100644 --- a/sdks/python/dropbox_sign/api/api_app_api.py +++ b/sdks/python/dropbox_sign/api/api_app_api.py @@ -284,7 +284,8 @@ def _api_app_create_serialize( else: _files[param_name] = param_value - _form_params = body_param.to_json_form_params(excluded_json_fields) + if has_files is True: + _form_params = body_param.to_json_form_params(excluded_json_fields) # process the path parameters # process the query parameters @@ -1403,7 +1404,8 @@ def _api_app_update_serialize( else: _files[param_name] = param_value - _form_params = body_param.to_json_form_params(excluded_json_fields) + if has_files is True: + _form_params = body_param.to_json_form_params(excluded_json_fields) # process the path parameters if client_id is not None: diff --git a/sdks/python/dropbox_sign/api/embedded_api.py b/sdks/python/dropbox_sign/api/embedded_api.py index 481533027..8d9f6237e 100644 --- a/sdks/python/dropbox_sign/api/embedded_api.py +++ b/sdks/python/dropbox_sign/api/embedded_api.py @@ -295,7 +295,8 @@ def _embedded_edit_url_serialize( else: _files[param_name] = param_value - _form_params = body_param.to_json_form_params(excluded_json_fields) + if has_files is True: + _form_params = body_param.to_json_form_params(excluded_json_fields) # process the path parameters if template_id is not None: diff --git a/sdks/python/dropbox_sign/api/fax_line_api.py b/sdks/python/dropbox_sign/api/fax_line_api.py index 27b3b8a3a..5d9aa8809 100644 --- a/sdks/python/dropbox_sign/api/fax_line_api.py +++ b/sdks/python/dropbox_sign/api/fax_line_api.py @@ -287,7 +287,8 @@ def _fax_line_add_user_serialize( else: _files[param_name] = param_value - _form_params = body_param.to_json_form_params(excluded_json_fields) + if has_files is True: + _form_params = body_param.to_json_form_params(excluded_json_fields) # process the path parameters # process the query parameters @@ -898,7 +899,8 @@ def _fax_line_create_serialize( else: _files[param_name] = param_value - _form_params = body_param.to_json_form_params(excluded_json_fields) + if has_files is True: + _form_params = body_param.to_json_form_params(excluded_json_fields) # process the path parameters # process the query parameters @@ -1194,7 +1196,8 @@ def _fax_line_delete_serialize( else: _files[param_name] = param_value - _form_params = body_param.to_json_form_params(excluded_json_fields) + if has_files is True: + _form_params = body_param.to_json_form_params(excluded_json_fields) # process the path parameters # process the query parameters @@ -2069,7 +2072,8 @@ def _fax_line_remove_user_serialize( else: _files[param_name] = param_value - _form_params = body_param.to_json_form_params(excluded_json_fields) + if has_files is True: + _form_params = body_param.to_json_form_params(excluded_json_fields) # process the path parameters # process the query parameters diff --git a/sdks/python/dropbox_sign/api/o_auth_api.py b/sdks/python/dropbox_sign/api/o_auth_api.py index e2d6c5f8d..12165fcbc 100644 --- a/sdks/python/dropbox_sign/api/o_auth_api.py +++ b/sdks/python/dropbox_sign/api/o_auth_api.py @@ -280,7 +280,8 @@ def _oauth_token_generate_serialize( else: _files[param_name] = param_value - _form_params = body_param.to_json_form_params(excluded_json_fields) + if has_files is True: + _form_params = body_param.to_json_form_params(excluded_json_fields) # process the path parameters # process the query parameters @@ -575,7 +576,8 @@ def _oauth_token_refresh_serialize( else: _files[param_name] = param_value - _form_params = body_param.to_json_form_params(excluded_json_fields) + if has_files is True: + _form_params = body_param.to_json_form_params(excluded_json_fields) # process the path parameters # process the query parameters diff --git a/sdks/python/dropbox_sign/api/report_api.py b/sdks/python/dropbox_sign/api/report_api.py index d1b0c9429..8ce80c120 100644 --- a/sdks/python/dropbox_sign/api/report_api.py +++ b/sdks/python/dropbox_sign/api/report_api.py @@ -279,7 +279,8 @@ def _report_create_serialize( else: _files[param_name] = param_value - _form_params = body_param.to_json_form_params(excluded_json_fields) + if has_files is True: + _form_params = body_param.to_json_form_params(excluded_json_fields) # process the path parameters # process the query parameters diff --git a/sdks/python/dropbox_sign/api/signature_request_api.py b/sdks/python/dropbox_sign/api/signature_request_api.py index ccb5f4eaa..d95641f60 100644 --- a/sdks/python/dropbox_sign/api/signature_request_api.py +++ b/sdks/python/dropbox_sign/api/signature_request_api.py @@ -293,7 +293,8 @@ def _signature_request_bulk_create_embedded_with_template_serialize( else: _files[param_name] = param_value - _form_params = body_param.to_json_form_params(excluded_json_fields) + if has_files is True: + _form_params = body_param.to_json_form_params(excluded_json_fields) # process the path parameters # process the query parameters @@ -590,7 +591,8 @@ def _signature_request_bulk_send_with_template_serialize( else: _files[param_name] = param_value - _form_params = body_param.to_json_form_params(excluded_json_fields) + if has_files is True: + _form_params = body_param.to_json_form_params(excluded_json_fields) # process the path parameters # process the query parameters @@ -1151,7 +1153,8 @@ def _signature_request_create_embedded_serialize( else: _files[param_name] = param_value - _form_params = body_param.to_json_form_params(excluded_json_fields) + if has_files is True: + _form_params = body_param.to_json_form_params(excluded_json_fields) # process the path parameters # process the query parameters @@ -1449,7 +1452,8 @@ def _signature_request_create_embedded_with_template_serialize( else: _files[param_name] = param_value - _form_params = body_param.to_json_form_params(excluded_json_fields) + if has_files is True: + _form_params = body_param.to_json_form_params(excluded_json_fields) # process the path parameters # process the query parameters @@ -3427,7 +3431,8 @@ def _signature_request_remind_serialize( else: _files[param_name] = param_value - _form_params = body_param.to_json_form_params(excluded_json_fields) + if has_files is True: + _form_params = body_param.to_json_form_params(excluded_json_fields) # process the path parameters if signature_request_id is not None: @@ -3988,7 +3993,8 @@ def _signature_request_send_serialize( else: _files[param_name] = param_value - _form_params = body_param.to_json_form_params(excluded_json_fields) + if has_files is True: + _form_params = body_param.to_json_form_params(excluded_json_fields) # process the path parameters # process the query parameters @@ -4286,7 +4292,8 @@ def _signature_request_send_with_template_serialize( else: _files[param_name] = param_value - _form_params = body_param.to_json_form_params(excluded_json_fields) + if has_files is True: + _form_params = body_param.to_json_form_params(excluded_json_fields) # process the path parameters # process the query parameters @@ -4597,7 +4604,8 @@ def _signature_request_update_serialize( else: _files[param_name] = param_value - _form_params = body_param.to_json_form_params(excluded_json_fields) + if has_files is True: + _form_params = body_param.to_json_form_params(excluded_json_fields) # process the path parameters if signature_request_id is not None: diff --git a/sdks/python/dropbox_sign/api/team_api.py b/sdks/python/dropbox_sign/api/team_api.py index 6cce0fbc1..a4c5db66a 100644 --- a/sdks/python/dropbox_sign/api/team_api.py +++ b/sdks/python/dropbox_sign/api/team_api.py @@ -302,7 +302,8 @@ def _team_add_member_serialize( else: _files[param_name] = param_value - _form_params = body_param.to_json_form_params(excluded_json_fields) + if has_files is True: + _form_params = body_param.to_json_form_params(excluded_json_fields) # process the path parameters # process the query parameters @@ -603,7 +604,8 @@ def _team_create_serialize( else: _files[param_name] = param_value - _form_params = body_param.to_json_form_params(excluded_json_fields) + if has_files is True: + _form_params = body_param.to_json_form_params(excluded_json_fields) # process the path parameters # process the query parameters @@ -2223,7 +2225,8 @@ def _team_remove_member_serialize( else: _files[param_name] = param_value - _form_params = body_param.to_json_form_params(excluded_json_fields) + if has_files is True: + _form_params = body_param.to_json_form_params(excluded_json_fields) # process the path parameters # process the query parameters @@ -2817,7 +2820,8 @@ def _team_update_serialize( else: _files[param_name] = param_value - _form_params = body_param.to_json_form_params(excluded_json_fields) + if has_files is True: + _form_params = body_param.to_json_form_params(excluded_json_fields) # process the path parameters # process the query parameters diff --git a/sdks/python/dropbox_sign/api/template_api.py b/sdks/python/dropbox_sign/api/template_api.py index ab0500a4c..459469f5e 100644 --- a/sdks/python/dropbox_sign/api/template_api.py +++ b/sdks/python/dropbox_sign/api/template_api.py @@ -305,7 +305,8 @@ def _template_add_user_serialize( else: _files[param_name] = param_value - _form_params = body_param.to_json_form_params(excluded_json_fields) + if has_files is True: + _form_params = body_param.to_json_form_params(excluded_json_fields) # process the path parameters if template_id is not None: @@ -604,7 +605,8 @@ def _template_create_serialize( else: _files[param_name] = param_value - _form_params = body_param.to_json_form_params(excluded_json_fields) + if has_files is True: + _form_params = body_param.to_json_form_params(excluded_json_fields) # process the path parameters # process the query parameters @@ -902,7 +904,8 @@ def _template_create_embedded_draft_serialize( else: _files[param_name] = param_value - _form_params = body_param.to_json_form_params(excluded_json_fields) + if has_files is True: + _form_params = body_param.to_json_form_params(excluded_json_fields) # process the path parameters # process the query parameters @@ -2880,7 +2883,8 @@ def _template_remove_user_serialize( else: _files[param_name] = param_value - _form_params = body_param.to_json_form_params(excluded_json_fields) + if has_files is True: + _form_params = body_param.to_json_form_params(excluded_json_fields) # process the path parameters if template_id is not None: @@ -3192,7 +3196,8 @@ def _template_update_files_serialize( else: _files[param_name] = param_value - _form_params = body_param.to_json_form_params(excluded_json_fields) + if has_files is True: + _form_params = body_param.to_json_form_params(excluded_json_fields) # process the path parameters if template_id is not None: diff --git a/sdks/python/dropbox_sign/api/unclaimed_draft_api.py b/sdks/python/dropbox_sign/api/unclaimed_draft_api.py index 9b12974fe..24580c554 100644 --- a/sdks/python/dropbox_sign/api/unclaimed_draft_api.py +++ b/sdks/python/dropbox_sign/api/unclaimed_draft_api.py @@ -284,7 +284,8 @@ def _unclaimed_draft_create_serialize( else: _files[param_name] = param_value - _form_params = body_param.to_json_form_params(excluded_json_fields) + if has_files is True: + _form_params = body_param.to_json_form_params(excluded_json_fields) # process the path parameters # process the query parameters @@ -582,7 +583,8 @@ def _unclaimed_draft_create_embedded_serialize( else: _files[param_name] = param_value - _form_params = body_param.to_json_form_params(excluded_json_fields) + if has_files is True: + _form_params = body_param.to_json_form_params(excluded_json_fields) # process the path parameters # process the query parameters @@ -880,7 +882,8 @@ def _unclaimed_draft_create_embedded_with_template_serialize( else: _files[param_name] = param_value - _form_params = body_param.to_json_form_params(excluded_json_fields) + if has_files is True: + _form_params = body_param.to_json_form_params(excluded_json_fields) # process the path parameters # process the query parameters @@ -1191,7 +1194,8 @@ def _unclaimed_draft_edit_and_resend_serialize( else: _files[param_name] = param_value - _form_params = body_param.to_json_form_params(excluded_json_fields) + if has_files is True: + _form_params = body_param.to_json_form_params(excluded_json_fields) # process the path parameters if signature_request_id is not None: diff --git a/sdks/python/dropbox_sign/api_client.py b/sdks/python/dropbox_sign/api_client.py index 9a11e845d..95d097009 100644 --- a/sdks/python/dropbox_sign/api_client.py +++ b/sdks/python/dropbox_sign/api_client.py @@ -92,7 +92,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/2.0-dev/python' + self.user_agent = 'OpenAPI-Generator/1.5-dev/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/sdks/python/dropbox_sign/configuration.py b/sdks/python/dropbox_sign/configuration.py index b5a62eeaa..895999db1 100644 --- a/sdks/python/dropbox_sign/configuration.py +++ b/sdks/python/dropbox_sign/configuration.py @@ -416,7 +416,7 @@ def to_debug_report(self): "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: 3.0.0\n"\ - "SDK Package Version: 2.0-dev".\ + "SDK Package Version: 1.5-dev".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/sdks/python/dropbox_sign/models/account_create_request.py b/sdks/python/dropbox_sign/models/account_create_request.py index 22383c548..58c78ffd7 100644 --- a/sdks/python/dropbox_sign/models/account_create_request.py +++ b/sdks/python/dropbox_sign/models/account_create_request.py @@ -100,14 +100,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "email_address": "(str,)", "client_id": "(str,)", @@ -116,7 +119,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 0f0326808..076186f6d 100644 --- a/sdks/python/dropbox_sign/models/account_create_response.py +++ b/sdks/python/dropbox_sign/models/account_create_response.py @@ -114,14 +114,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "account": "(AccountResponse,)", "oauth_data": "(OAuthTokenResponse,)", @@ -129,7 +132,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + 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 91819bd98..b6fea2b15 100644 --- a/sdks/python/dropbox_sign/models/account_get_response.py +++ b/sdks/python/dropbox_sign/models/account_get_response.py @@ -108,21 +108,24 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "account": "(AccountResponse,)", "warnings": "(List[WarningResponse],)", } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + 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 91847fa12..900d2a2bf 100644 --- a/sdks/python/dropbox_sign/models/account_response.py +++ b/sdks/python/dropbox_sign/models/account_response.py @@ -122,14 +122,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "account_id": "(str,)", "email_address": "(str,)", @@ -145,7 +148,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 56aafc849..97b12f2f9 100644 --- a/sdks/python/dropbox_sign/models/account_response_quotas.py +++ b/sdks/python/dropbox_sign/models/account_response_quotas.py @@ -104,14 +104,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "api_signature_requests_left": "(int,)", "documents_left": "(int,)", @@ -122,7 +125,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 43c6e7371..887c09d44 100644 --- a/sdks/python/dropbox_sign/models/account_response_usage.py +++ b/sdks/python/dropbox_sign/models/account_response_usage.py @@ -94,20 +94,23 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "fax_pages_sent": "(int,)", } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 e6a158f6e..7ab96c200 100644 --- a/sdks/python/dropbox_sign/models/account_update_request.py +++ b/sdks/python/dropbox_sign/models/account_update_request.py @@ -98,14 +98,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "account_id": "(str,)", "callback_url": "(str,)", @@ -113,7 +116,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 94572fa19..a43cde826 100644 --- a/sdks/python/dropbox_sign/models/account_verify_request.py +++ b/sdks/python/dropbox_sign/models/account_verify_request.py @@ -94,20 +94,23 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "email_address": "(str,)", } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 bab181431..0dade76a1 100644 --- a/sdks/python/dropbox_sign/models/account_verify_response.py +++ b/sdks/python/dropbox_sign/models/account_verify_response.py @@ -108,21 +108,24 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "account": "(AccountVerifyResponseAccount,)", "warnings": "(List[WarningResponse],)", } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + 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 c275684af..15defb8e5 100644 --- a/sdks/python/dropbox_sign/models/account_verify_response_account.py +++ b/sdks/python/dropbox_sign/models/account_verify_response_account.py @@ -94,20 +94,23 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "email_address": "(str,)", } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 8b44d385e..51547615c 100644 --- a/sdks/python/dropbox_sign/models/api_app_create_request.py +++ b/sdks/python/dropbox_sign/models/api_app_create_request.py @@ -119,14 +119,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "domains": "(List[str],)", "name": "(str,)", @@ -138,7 +141,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + 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 502ce1fa7..890207429 100644 --- a/sdks/python/dropbox_sign/models/api_app_get_response.py +++ b/sdks/python/dropbox_sign/models/api_app_get_response.py @@ -108,21 +108,24 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "api_app": "(ApiAppResponse,)", "warnings": "(List[WarningResponse],)", } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + 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 286a65434..fff834913 100644 --- a/sdks/python/dropbox_sign/models/api_app_list_response.py +++ b/sdks/python/dropbox_sign/models/api_app_list_response.py @@ -118,14 +118,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "api_apps": "(List[ApiAppResponse],)", "list_info": "(ListInfoResponse,)", @@ -133,7 +136,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: return property_name in [ "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 fa5380ab6..139a2bf23 100644 --- a/sdks/python/dropbox_sign/models/api_app_response.py +++ b/sdks/python/dropbox_sign/models/api_app_response.py @@ -128,14 +128,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "callback_url": "(str,)", "client_id": "(str,)", @@ -150,7 +153,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + 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 7d3089b87..5463c707d 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 @@ -100,14 +100,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "callback_url": "(str,)", "secret": "(str,)", @@ -116,7 +119,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + 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 77cd1689b..8d7021bb5 100644 --- a/sdks/python/dropbox_sign/models/api_app_response_options.py +++ b/sdks/python/dropbox_sign/models/api_app_response_options.py @@ -94,20 +94,23 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "can_insert_everywhere": "(bool,)", } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 62191b1d2..92066e97f 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 @@ -96,21 +96,24 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "account_id": "(str,)", "email_address": "(str,)", } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 af1854792..65f9874ec 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 @@ -120,14 +120,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "header_background_color": "(str,)", "legal_version": "(str,)", @@ -146,7 +149,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 e8c4bb6af..ddafee54f 100644 --- a/sdks/python/dropbox_sign/models/api_app_update_request.py +++ b/sdks/python/dropbox_sign/models/api_app_update_request.py @@ -119,14 +119,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "callback_url": "(str,)", "custom_logo_file": "(io.IOBase,)", @@ -138,7 +141,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + 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 c777a1890..c39c1879c 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 @@ -124,14 +124,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "bulk_send_job": "(BulkSendJobResponse,)", "list_info": "(ListInfoResponse,)", @@ -140,7 +143,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: return property_name in [ "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 25052bb45..8be653454 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 @@ -174,14 +174,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "test_mode": "(bool,)", "signature_request_id": "(str,)", @@ -211,7 +214,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: return property_name in [ "cc_email_addresses", "template_ids", 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 f65f53350..bc17ad4de 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 @@ -118,14 +118,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "bulk_send_jobs": "(List[BulkSendJobResponse],)", "list_info": "(ListInfoResponse,)", @@ -133,7 +136,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: return property_name in [ "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 e50e33a10..aab9ea81d 100644 --- a/sdks/python/dropbox_sign/models/bulk_send_job_response.py +++ b/sdks/python/dropbox_sign/models/bulk_send_job_response.py @@ -100,14 +100,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "bulk_send_job_id": "(str,)", "total": "(int,)", @@ -116,7 +119,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 28ad47f43..b8a193cf0 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 @@ -108,21 +108,24 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "bulk_send_job": "(BulkSendJobResponse,)", "warnings": "(List[WarningResponse],)", } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + 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 0c2b83d89..37b06a883 100644 --- a/sdks/python/dropbox_sign/models/embedded_edit_url_request.py +++ b/sdks/python/dropbox_sign/models/embedded_edit_url_request.py @@ -124,14 +124,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "allow_edit_ccs": "(bool,)", "cc_roles": "(List[str],)", @@ -146,7 +149,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: return property_name in [ "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 b9ee37e96..c06a74085 100644 --- a/sdks/python/dropbox_sign/models/embedded_edit_url_response.py +++ b/sdks/python/dropbox_sign/models/embedded_edit_url_response.py @@ -108,21 +108,24 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "embedded": "(EmbeddedEditUrlResponseEmbedded,)", "warnings": "(List[WarningResponse],)", } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + 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 c1d807bed..940dd9185 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 @@ -96,21 +96,24 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "edit_url": "(str,)", "expires_at": "(int,)", } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 bafb79b8e..1698346ee 100644 --- a/sdks/python/dropbox_sign/models/embedded_sign_url_response.py +++ b/sdks/python/dropbox_sign/models/embedded_sign_url_response.py @@ -108,21 +108,24 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "embedded": "(EmbeddedSignUrlResponseEmbedded,)", "warnings": "(List[WarningResponse],)", } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + 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 f60da2936..c0a9ae690 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 @@ -96,21 +96,24 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "sign_url": "(str,)", "expires_at": "(int,)", } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 1035835c5..2682fe9a0 100644 --- a/sdks/python/dropbox_sign/models/error_response.py +++ b/sdks/python/dropbox_sign/models/error_response.py @@ -98,20 +98,23 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "error": "(ErrorResponseError,)", } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 b96657d95..809b7b2ec 100644 --- a/sdks/python/dropbox_sign/models/error_response_error.py +++ b/sdks/python/dropbox_sign/models/error_response_error.py @@ -98,14 +98,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "error_msg": "(str,)", "error_name": "(str,)", @@ -113,7 +116,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 cedcfaa21..fe1e6a711 100644 --- a/sdks/python/dropbox_sign/models/event_callback_request.py +++ b/sdks/python/dropbox_sign/models/event_callback_request.py @@ -116,14 +116,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "event": "(EventCallbackRequestEvent,)", "account": "(AccountResponse,)", @@ -132,7 +135,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 1c7872f07..003fa7dd2 100644 --- a/sdks/python/dropbox_sign/models/event_callback_request_event.py +++ b/sdks/python/dropbox_sign/models/event_callback_request_event.py @@ -111,14 +111,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "event_time": "(str,)", "event_type": "(str,)", @@ -127,7 +130,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 10643c953..0ec811c6f 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 @@ -100,14 +100,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "related_signature_id": "(str,)", "reported_for_account_id": "(str,)", @@ -116,7 +119,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 0664c9ce9..3831d0b62 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 @@ -98,14 +98,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "number": "(str,)", "account_id": "(str,)", @@ -113,7 +116,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: return property_name in [ ] 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 2b2520e1a..cd32d527c 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 @@ -94,20 +94,23 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "area_codes": "(List[int],)", } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + 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_create_request.py b/sdks/python/dropbox_sign/models/fax_line_create_request.py index 3f14c5ec4..157d93331 100644 --- a/sdks/python/dropbox_sign/models/fax_line_create_request.py +++ b/sdks/python/dropbox_sign/models/fax_line_create_request.py @@ -107,14 +107,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "area_code": "(int,)", "country": "(str,)", @@ -123,7 +126,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 6a8bf43d4..233d011d4 100644 --- a/sdks/python/dropbox_sign/models/fax_line_delete_request.py +++ b/sdks/python/dropbox_sign/models/fax_line_delete_request.py @@ -94,20 +94,23 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "number": "(str,)", } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 baa04c5b1..139540d98 100644 --- a/sdks/python/dropbox_sign/models/fax_line_list_response.py +++ b/sdks/python/dropbox_sign/models/fax_line_list_response.py @@ -114,14 +114,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "list_info": "(ListInfoResponse,)", "fax_lines": "(List[FaxLineResponseFaxLine],)", @@ -129,7 +132,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + 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 8281a5f23..49eb3c1f5 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 @@ -98,14 +98,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "number": "(str,)", "account_id": "(str,)", @@ -113,7 +116,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 c0a4934a6..7a41e8f1b 100644 --- a/sdks/python/dropbox_sign/models/fax_line_response.py +++ b/sdks/python/dropbox_sign/models/fax_line_response.py @@ -104,21 +104,24 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "fax_line": "(FaxLineResponseFaxLine,)", "warnings": "(WarningResponse,)", } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 4ee240c9b..20638282b 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 @@ -108,14 +108,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "number": "(str,)", "created_at": "(int,)", @@ -124,7 +127,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + 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 5bcde8c96..4f098692f 100644 --- a/sdks/python/dropbox_sign/models/file_response.py +++ b/sdks/python/dropbox_sign/models/file_response.py @@ -96,21 +96,24 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "file_url": "(str,)", "expires_at": "(int,)", } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 adfaede5a..dbbfaf9a8 100644 --- a/sdks/python/dropbox_sign/models/file_response_data_uri.py +++ b/sdks/python/dropbox_sign/models/file_response_data_uri.py @@ -94,20 +94,23 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "data_uri": "(str,)", } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 37992939c..770b79420 100644 --- a/sdks/python/dropbox_sign/models/list_info_response.py +++ b/sdks/python/dropbox_sign/models/list_info_response.py @@ -100,14 +100,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "num_pages": "(int,)", "num_results": "(int,)", @@ -116,7 +119,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 7112900cb..7c6f789d1 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 @@ -102,14 +102,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "client_id": "(str,)", "client_secret": "(str,)", @@ -119,7 +122,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 da8e51a6e..8f7549d6b 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 @@ -96,21 +96,24 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "grant_type": "(str,)", "refresh_token": "(str,)", } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 3ab1ab3f2..ff49cb301 100644 --- a/sdks/python/dropbox_sign/models/o_auth_token_response.py +++ b/sdks/python/dropbox_sign/models/o_auth_token_response.py @@ -102,14 +102,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "access_token": "(str,)", "token_type": "(str,)", @@ -119,7 +122,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 1a3710841..83b162806 100644 --- a/sdks/python/dropbox_sign/models/report_create_request.py +++ b/sdks/python/dropbox_sign/models/report_create_request.py @@ -107,14 +107,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "end_date": "(str,)", "report_type": "(List[str],)", @@ -122,7 +125,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + 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 dae9e9f9f..dc1db8b62 100644 --- a/sdks/python/dropbox_sign/models/report_create_response.py +++ b/sdks/python/dropbox_sign/models/report_create_response.py @@ -108,21 +108,24 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "report": "(ReportResponse,)", "warnings": "(List[WarningResponse],)", } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + 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 200876dd5..36a10896c 100644 --- a/sdks/python/dropbox_sign/models/report_response.py +++ b/sdks/python/dropbox_sign/models/report_response.py @@ -111,14 +111,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "success": "(str,)", "start_date": "(str,)", @@ -127,7 +130,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + 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 8e422057a..df10250ee 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 @@ -143,14 +143,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "template_ids": "(List[str],)", "client_id": "(str,)", @@ -168,7 +171,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: return property_name in [ "template_ids", "signer_list", 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 a3ebf2ed5..c6e75f4b4 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 @@ -143,14 +143,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "template_ids": "(List[str],)", "signer_file": "(io.IOBase,)", @@ -168,7 +171,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: return property_name in [ "template_ids", "signer_list", 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 ae63bd978..9fa132b71 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 @@ -205,14 +205,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "client_id": "(str,)", "files": "(List[io.IOBase],)", @@ -241,7 +244,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: return property_name in [ "files", "file_urls", 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 ad53c9c66..069b7c4da 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 @@ -151,14 +151,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "template_ids": "(List[str],)", "client_id": "(str,)", @@ -178,7 +181,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: return property_name in [ "template_ids", "signers", 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 b5dc68324..6a2fddaa7 100644 --- a/sdks/python/dropbox_sign/models/signature_request_get_response.py +++ b/sdks/python/dropbox_sign/models/signature_request_get_response.py @@ -108,21 +108,24 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "signature_request": "(SignatureRequestResponse,)", "warnings": "(List[WarningResponse],)", } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + 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 76b781886..d802f5e96 100644 --- a/sdks/python/dropbox_sign/models/signature_request_list_response.py +++ b/sdks/python/dropbox_sign/models/signature_request_list_response.py @@ -118,14 +118,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "signature_requests": "(List[SignatureRequestResponse],)", "list_info": "(ListInfoResponse,)", @@ -133,7 +136,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: return property_name in [ "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 061944090..5d68cb9ab 100644 --- a/sdks/python/dropbox_sign/models/signature_request_remind_request.py +++ b/sdks/python/dropbox_sign/models/signature_request_remind_request.py @@ -96,21 +96,24 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "email_address": "(str,)", "name": "(str,)", } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 16deb5503..b0918ac42 100644 --- a/sdks/python/dropbox_sign/models/signature_request_response.py +++ b/sdks/python/dropbox_sign/models/signature_request_response.py @@ -174,14 +174,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "test_mode": "(bool,)", "signature_request_id": "(str,)", @@ -211,7 +214,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: return property_name in [ "cc_email_addresses", "template_ids", 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 aa898cd4b..d4b9f4986 100644 --- a/sdks/python/dropbox_sign/models/signature_request_response_attachment.py +++ b/sdks/python/dropbox_sign/models/signature_request_response_attachment.py @@ -104,14 +104,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "id": "(str,)", "signer": "(str,)", @@ -122,7 +125,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 a16fa567a..7ce1b9ac0 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 @@ -122,7 +122,7 @@ def from_dict(cls, obj: Dict[str, Any]) -> Optional[Union[SignatureRequestRespon @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "type": "(str,)", "name": "(str,)", @@ -132,7 +132,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 bf64d8087..d0a5ca1d5 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 @@ -101,14 +101,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "type": "(str,)", "name": "(str,)", @@ -119,7 +122,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 4cce3dd01..72efe3371 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 @@ -101,14 +101,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "type": "(str,)", "name": "(str,)", @@ -119,7 +122,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: return property_name in [ ] 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 715f87c3f..3315edc62 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 @@ -143,7 +143,7 @@ def from_dict(cls, obj: Dict[str, Any]) -> Optional[Union[SignatureRequestRespon @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "api_id": "(str,)", "signature_id": "(str,)", @@ -153,7 +153,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: return property_name in [ ] 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 d0f1abb32..117b7e870 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 @@ -101,14 +101,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "type": "(str,)", "value": "(bool,)", @@ -119,7 +122,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 8369612c7..bd0a16217 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 @@ -101,14 +101,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "type": "(str,)", "value": "(str,)", @@ -119,7 +122,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 cdf8ef1be..07925f760 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 @@ -101,14 +101,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "type": "(str,)", "value": "(str,)", @@ -119,7 +122,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 6c532d378..bde3a88fa 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 @@ -101,14 +101,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "type": "(str,)", "value": "(str,)", @@ -119,7 +122,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 df914db75..20c01a2ba 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 @@ -101,14 +101,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "type": "(str,)", "value": "(str,)", @@ -119,7 +122,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 e427a5d54..887954bf3 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 @@ -101,14 +101,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "type": "(str,)", "value": "(bool,)", @@ -119,7 +122,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 5eae43a6c..765536634 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 @@ -101,14 +101,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "type": "(str,)", "value": "(str,)", @@ -119,7 +122,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 930cf3f31..8ded9e0db 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 @@ -101,14 +101,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "type": "(str,)", "value": "(str,)", @@ -119,7 +122,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 26e9741e3..f0dbfb3c8 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 @@ -101,14 +101,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "type": "(str,)", "value": "(str,)", @@ -119,7 +122,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 4835926fc..e24c7d86f 100644 --- a/sdks/python/dropbox_sign/models/signature_request_response_signatures.py +++ b/sdks/python/dropbox_sign/models/signature_request_response_signatures.py @@ -130,14 +130,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "signature_id": "(str,)", "signer_group_guid": "(str,)", @@ -161,7 +164,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 94dd20d1e..f903629bd 100644 --- a/sdks/python/dropbox_sign/models/signature_request_send_request.py +++ b/sdks/python/dropbox_sign/models/signature_request_send_request.py @@ -209,14 +209,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "files": "(List[io.IOBase],)", "file_urls": "(List[str],)", @@ -247,7 +250,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: return property_name in [ "files", "file_urls", 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 dc1845b13..3ce65fc0f 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 @@ -155,14 +155,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "template_ids": "(List[str],)", "signers": "(List[SubSignatureRequestTemplateSigner],)", @@ -184,7 +187,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: return property_name in [ "template_ids", "signers", 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 dffa81a60..efbdbf170 100644 --- a/sdks/python/dropbox_sign/models/signature_request_update_request.py +++ b/sdks/python/dropbox_sign/models/signature_request_update_request.py @@ -100,14 +100,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "signature_id": "(str,)", "email_address": "(str,)", @@ -116,7 +119,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 186162aee..4d956d937 100644 --- a/sdks/python/dropbox_sign/models/sub_attachment.py +++ b/sdks/python/dropbox_sign/models/sub_attachment.py @@ -100,14 +100,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "name": "(str,)", "signer_index": "(int,)", @@ -116,7 +119,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 8cfdf6550..e70041668 100644 --- a/sdks/python/dropbox_sign/models/sub_bulk_signer_list.py +++ b/sdks/python/dropbox_sign/models/sub_bulk_signer_list.py @@ -112,21 +112,24 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "custom_fields": "(List[SubBulkSignerListCustomField],)", "signers": "(List[SubSignatureRequestTemplateSigner],)", } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: return property_name in [ "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 70edc7bda..a6b433ad3 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 @@ -96,21 +96,24 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "name": "(str,)", "value": "(str,)", } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 4965a3d4d..1f4b55365 100644 --- a/sdks/python/dropbox_sign/models/sub_cc.py +++ b/sdks/python/dropbox_sign/models/sub_cc.py @@ -96,21 +96,24 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "role": "(str,)", "email_address": "(str,)", } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 8d3b4eebd..e72e6df1a 100644 --- a/sdks/python/dropbox_sign/models/sub_custom_field.py +++ b/sdks/python/dropbox_sign/models/sub_custom_field.py @@ -100,14 +100,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "name": "(str,)", "editor": "(str,)", @@ -116,7 +119,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 90dc452b5..5cfce299a 100644 --- a/sdks/python/dropbox_sign/models/sub_editor_options.py +++ b/sdks/python/dropbox_sign/models/sub_editor_options.py @@ -96,21 +96,24 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "allow_edit_signers": "(bool,)", "allow_edit_documents": "(bool,)", } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 74768bf63..e61937ca3 100644 --- a/sdks/python/dropbox_sign/models/sub_field_options.py +++ b/sdks/python/dropbox_sign/models/sub_field_options.py @@ -101,20 +101,23 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "date_format": "(str,)", } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 27365d0fe..6a4b20dcc 100644 --- a/sdks/python/dropbox_sign/models/sub_form_field_group.py +++ b/sdks/python/dropbox_sign/models/sub_form_field_group.py @@ -98,14 +98,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "group_id": "(str,)", "group_label": "(str,)", @@ -113,7 +116,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 9e1b5565c..d90448baa 100644 --- a/sdks/python/dropbox_sign/models/sub_form_field_rule.py +++ b/sdks/python/dropbox_sign/models/sub_form_field_rule.py @@ -117,14 +117,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "id": "(str,)", "trigger_operator": "(str,)", @@ -133,7 +136,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: return property_name in [ "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 c291b3eee..3eda5f982 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 @@ -107,14 +107,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "hidden": "(bool,)", "type": "(str,)", @@ -123,7 +126,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 71b4f8b36..c29426117 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 @@ -107,14 +107,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "id": "(str,)", "operator": "(str,)", @@ -123,7 +126,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + 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 91e80ded0..3e2c07ccb 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 @@ -152,7 +152,7 @@ def from_dict(cls, obj: Dict[str, Any]) -> Optional[Union[SubFormFieldsPerDocume @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "document_index": "(int,)", "api_id": "(str,)", @@ -168,7 +168,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 3096f17f8..44f0a1097 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 @@ -109,14 +109,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "type": "(str,)", "is_checked": "(bool,)", @@ -134,7 +137,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 afee62f41..30208f6a0 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 @@ -105,14 +105,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "type": "(str,)", "document_index": "(int,)", @@ -128,7 +131,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 3cd5b380c..87106ece0 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 @@ -119,14 +119,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "type": "(str,)", "document_index": "(int,)", @@ -144,7 +147,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 fde36830e..6090a99d3 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 @@ -124,14 +124,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "type": "(str,)", "options": "(List[str],)", @@ -151,7 +154,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + 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_hyperlink.py b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_hyperlink.py index b734f0525..d98a7f6e2 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 @@ -123,14 +123,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "type": "(str,)", "content": "(str,)", @@ -150,7 +153,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 06bc8c61c..8869e4998 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 @@ -105,14 +105,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "type": "(str,)", "document_index": "(int,)", @@ -128,7 +131,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 b6d5e8d4b..63e099677 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 @@ -109,14 +109,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "type": "(str,)", "group": "(str,)", @@ -134,7 +137,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 4e43a8d80..fb22d9b4c 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 @@ -105,14 +105,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "type": "(str,)", "document_index": "(int,)", @@ -128,7 +131,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 9d8ea5d3a..56ce14a24 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 @@ -145,14 +145,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "type": "(str,)", "document_index": "(int,)", @@ -178,7 +181,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 df6a6f871..b25ab5f56 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 @@ -119,14 +119,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "type": "(str,)", "document_index": "(int,)", @@ -144,7 +147,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: return property_name in [ ] diff --git a/sdks/python/dropbox_sign/models/sub_merge_field.py b/sdks/python/dropbox_sign/models/sub_merge_field.py index 151a9d933..63f160b2b 100644 --- a/sdks/python/dropbox_sign/models/sub_merge_field.py +++ b/sdks/python/dropbox_sign/models/sub_merge_field.py @@ -103,21 +103,24 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "name": "(str,)", "type": "(str,)", } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 24e6735f2..f98072b48 100644 --- a/sdks/python/dropbox_sign/models/sub_o_auth.py +++ b/sdks/python/dropbox_sign/models/sub_o_auth.py @@ -107,21 +107,24 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "callback_url": "(str,)", "scopes": "(List[str],)", } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + 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 eaaa91ed3..0c98777b6 100644 --- a/sdks/python/dropbox_sign/models/sub_options.py +++ b/sdks/python/dropbox_sign/models/sub_options.py @@ -94,20 +94,23 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "can_insert_everywhere": "(bool,)", } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 6e2fb7756..35d55b3f4 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 @@ -106,14 +106,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "group": "(str,)", "signers": "(List[SubSignatureRequestSigner],)", @@ -121,7 +124,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + 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 d7245dc0c..31527846b 100644 --- a/sdks/python/dropbox_sign/models/sub_signature_request_signer.py +++ b/sdks/python/dropbox_sign/models/sub_signature_request_signer.py @@ -115,14 +115,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "name": "(str,)", "email_address": "(str,)", @@ -133,7 +136,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 b2fd8792d..9fe46b9ee 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 @@ -115,14 +115,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "role": "(str,)", "name": "(str,)", @@ -133,7 +136,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 a7aa16e7a..79f3df45f 100644 --- a/sdks/python/dropbox_sign/models/sub_signing_options.py +++ b/sdks/python/dropbox_sign/models/sub_signing_options.py @@ -109,14 +109,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "default_type": "(str,)", "draw": "(bool,)", @@ -126,7 +129,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 baa11f6a0..046e7fe67 100644 --- a/sdks/python/dropbox_sign/models/sub_team_response.py +++ b/sdks/python/dropbox_sign/models/sub_team_response.py @@ -96,21 +96,24 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "team_id": "(str,)", "name": "(str,)", } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 52aace8fa..fbd594173 100644 --- a/sdks/python/dropbox_sign/models/sub_template_role.py +++ b/sdks/python/dropbox_sign/models/sub_template_role.py @@ -96,21 +96,24 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "name": "(str,)", "order": "(int,)", } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 f4a493899..ea4680bdc 100644 --- a/sdks/python/dropbox_sign/models/sub_unclaimed_draft_signer.py +++ b/sdks/python/dropbox_sign/models/sub_unclaimed_draft_signer.py @@ -98,14 +98,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "email_address": "(str,)", "name": "(str,)", @@ -113,7 +116,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 dcf7cc46d..60105ed09 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 @@ -98,14 +98,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "role": "(str,)", "name": "(str,)", @@ -113,7 +116,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 511a20571..edb52fa3d 100644 --- a/sdks/python/dropbox_sign/models/sub_white_labeling_options.py +++ b/sdks/python/dropbox_sign/models/sub_white_labeling_options.py @@ -132,14 +132,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "header_background_color": "(str,)", "legal_version": "(str,)", @@ -159,7 +162,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 f05a74f85..73b7d5336 100644 --- a/sdks/python/dropbox_sign/models/team_add_member_request.py +++ b/sdks/python/dropbox_sign/models/team_add_member_request.py @@ -108,14 +108,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "account_id": "(str,)", "email_address": "(str,)", @@ -123,7 +126,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 fb20a937e..5b9995e72 100644 --- a/sdks/python/dropbox_sign/models/team_create_request.py +++ b/sdks/python/dropbox_sign/models/team_create_request.py @@ -94,20 +94,23 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "name": "(str,)", } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 aacb4f11e..a8a0c0591 100644 --- a/sdks/python/dropbox_sign/models/team_get_info_response.py +++ b/sdks/python/dropbox_sign/models/team_get_info_response.py @@ -108,21 +108,24 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "team": "(TeamInfoResponse,)", "warnings": "(List[WarningResponse],)", } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + 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 1d8575e41..d0fbef7a8 100644 --- a/sdks/python/dropbox_sign/models/team_get_response.py +++ b/sdks/python/dropbox_sign/models/team_get_response.py @@ -108,21 +108,24 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "team": "(TeamResponse,)", "warnings": "(List[WarningResponse],)", } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + 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 36a69ed5f..6d776ce14 100644 --- a/sdks/python/dropbox_sign/models/team_info_response.py +++ b/sdks/python/dropbox_sign/models/team_info_response.py @@ -106,14 +106,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "team_id": "(str,)", "team_parent": "(TeamParentResponse,)", @@ -123,7 +126,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 338a2db75..0758b30a4 100644 --- a/sdks/python/dropbox_sign/models/team_invite_response.py +++ b/sdks/python/dropbox_sign/models/team_invite_response.py @@ -104,14 +104,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "email_address": "(str,)", "team_id": "(str,)", @@ -122,7 +125,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 3e42cea14..9e03cc035 100644 --- a/sdks/python/dropbox_sign/models/team_invites_response.py +++ b/sdks/python/dropbox_sign/models/team_invites_response.py @@ -112,21 +112,24 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "team_invites": "(List[TeamInviteResponse],)", "warnings": "(List[WarningResponse],)", } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: return property_name in [ "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 607b28499..956b52925 100644 --- a/sdks/python/dropbox_sign/models/team_member_response.py +++ b/sdks/python/dropbox_sign/models/team_member_response.py @@ -98,14 +98,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "account_id": "(str,)", "email_address": "(str,)", @@ -113,7 +116,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 5cba894b0..4bc8f46df 100644 --- a/sdks/python/dropbox_sign/models/team_members_response.py +++ b/sdks/python/dropbox_sign/models/team_members_response.py @@ -118,14 +118,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "team_members": "(List[TeamMemberResponse],)", "list_info": "(ListInfoResponse,)", @@ -133,7 +136,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: return property_name in [ "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 05e134e7d..a55c3643e 100644 --- a/sdks/python/dropbox_sign/models/team_parent_response.py +++ b/sdks/python/dropbox_sign/models/team_parent_response.py @@ -96,21 +96,24 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "team_id": "(str,)", "name": "(str,)", } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 b32f9ff74..115467aed 100644 --- a/sdks/python/dropbox_sign/models/team_remove_member_request.py +++ b/sdks/python/dropbox_sign/models/team_remove_member_request.py @@ -112,14 +112,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "account_id": "(str,)", "email_address": "(str,)", @@ -129,7 +132,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 46d31f1ea..11c838035 100644 --- a/sdks/python/dropbox_sign/models/team_response.py +++ b/sdks/python/dropbox_sign/models/team_response.py @@ -115,14 +115,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "name": "(str,)", "accounts": "(List[AccountResponse],)", @@ -131,7 +134,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: return property_name in [ "accounts", "invited_accounts", 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 70e3e3328..1112ef624 100644 --- a/sdks/python/dropbox_sign/models/team_sub_teams_response.py +++ b/sdks/python/dropbox_sign/models/team_sub_teams_response.py @@ -118,14 +118,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "sub_teams": "(List[SubTeamResponse],)", "list_info": "(ListInfoResponse,)", @@ -133,7 +136,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: return property_name in [ "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 fb08689f2..7e47de2a9 100644 --- a/sdks/python/dropbox_sign/models/team_update_request.py +++ b/sdks/python/dropbox_sign/models/team_update_request.py @@ -94,20 +94,23 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "name": "(str,)", } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 8d1c4b435..9c529130d 100644 --- a/sdks/python/dropbox_sign/models/template_add_user_request.py +++ b/sdks/python/dropbox_sign/models/template_add_user_request.py @@ -98,14 +98,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "account_id": "(str,)", "email_address": "(str,)", @@ -113,7 +116,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 39da761c9..e8fccb549 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 @@ -199,14 +199,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "client_id": "(str,)", "files": "(List[io.IOBase],)", @@ -236,7 +239,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: return property_name in [ "files", "file_urls", 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 20301585a..97b14e7f3 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 @@ -108,21 +108,24 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "template": "(TemplateCreateEmbeddedDraftResponseTemplate,)", "warnings": "(List[WarningResponse],)", } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + 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 dc877ba73..b463a2b3c 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 @@ -108,14 +108,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "template_id": "(str,)", "edit_url": "(str,)", @@ -124,7 +127,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + 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 c295fee17..77106b640 100644 --- a/sdks/python/dropbox_sign/models/template_create_request.py +++ b/sdks/python/dropbox_sign/models/template_create_request.py @@ -181,14 +181,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "form_fields_per_document": "(List[SubFormFieldsPerDocumentBase],)", "signer_roles": "(List[SubTemplateRole],)", @@ -211,7 +214,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: return property_name in [ "form_fields_per_document", "signer_roles", diff --git a/sdks/python/dropbox_sign/models/template_create_response.py b/sdks/python/dropbox_sign/models/template_create_response.py index 98bf743bf..a4696160c 100644 --- a/sdks/python/dropbox_sign/models/template_create_response.py +++ b/sdks/python/dropbox_sign/models/template_create_response.py @@ -108,21 +108,24 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "template": "(TemplateCreateResponseTemplate,)", "warnings": "(List[WarningResponse],)", } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + 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 90badfcf3..325555d2b 100644 --- a/sdks/python/dropbox_sign/models/template_create_response_template.py +++ b/sdks/python/dropbox_sign/models/template_create_response_template.py @@ -94,20 +94,23 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "template_id": "(str,)", } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 ec948944d..98c626014 100644 --- a/sdks/python/dropbox_sign/models/template_edit_response.py +++ b/sdks/python/dropbox_sign/models/template_edit_response.py @@ -94,20 +94,23 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "template_id": "(str,)", } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 588978f77..f049a0d7f 100644 --- a/sdks/python/dropbox_sign/models/template_get_response.py +++ b/sdks/python/dropbox_sign/models/template_get_response.py @@ -108,21 +108,24 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "template": "(TemplateResponse,)", "warnings": "(List[WarningResponse],)", } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + 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 ed24f5c94..5e868c4fc 100644 --- a/sdks/python/dropbox_sign/models/template_list_response.py +++ b/sdks/python/dropbox_sign/models/template_list_response.py @@ -118,14 +118,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "templates": "(List[TemplateResponse],)", "list_info": "(ListInfoResponse,)", @@ -133,7 +136,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: return property_name in [ "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 8b56856ff..16c32f13b 100644 --- a/sdks/python/dropbox_sign/models/template_remove_user_request.py +++ b/sdks/python/dropbox_sign/models/template_remove_user_request.py @@ -96,21 +96,24 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "account_id": "(str,)", "email_address": "(str,)", } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 ddce85d9b..73c6be6ff 100644 --- a/sdks/python/dropbox_sign/models/template_response.py +++ b/sdks/python/dropbox_sign/models/template_response.py @@ -170,14 +170,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "template_id": "(str,)", "title": "(str,)", @@ -197,7 +200,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: return property_name in [ "signer_roles", "cc_roles", diff --git a/sdks/python/dropbox_sign/models/template_response_account.py b/sdks/python/dropbox_sign/models/template_response_account.py index 15223ba71..52db37b69 100644 --- a/sdks/python/dropbox_sign/models/template_response_account.py +++ b/sdks/python/dropbox_sign/models/template_response_account.py @@ -108,14 +108,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "account_id": "(str,)", "email_address": "(str,)", @@ -126,7 +129,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 0a14822b6..a4ec4ac4f 100644 --- a/sdks/python/dropbox_sign/models/template_response_account_quota.py +++ b/sdks/python/dropbox_sign/models/template_response_account_quota.py @@ -100,14 +100,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "templates_left": "(int,)", "api_signature_requests_left": "(int,)", @@ -116,7 +119,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 642e3d477..5743054d3 100644 --- a/sdks/python/dropbox_sign/models/template_response_cc_role.py +++ b/sdks/python/dropbox_sign/models/template_response_cc_role.py @@ -94,20 +94,23 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "name": "(str,)", } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 8d4edf252..e2fe35d60 100644 --- a/sdks/python/dropbox_sign/models/template_response_document.py +++ b/sdks/python/dropbox_sign/models/template_response_document.py @@ -136,14 +136,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "name": "(str,)", "index": "(int,)", @@ -154,7 +157,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: return property_name in [ "field_groups", "form_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 692154ae9..6f1d397f4 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 @@ -127,7 +127,7 @@ def from_dict(cls, obj: Dict[str, Any]) -> Optional[Union[TemplateResponseDocume @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "type": "(str,)", "api_id": "(str,)", @@ -142,7 +142,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 504977708..164a22b98 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 @@ -104,14 +104,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "type": "(str,)", "api_id": "(str,)", @@ -126,7 +129,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 856e1a6e3..f75b97f51 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 @@ -116,14 +116,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "type": "(str,)", "avg_text_length": "(TemplateResponseFieldAvgTextLength,)", @@ -142,7 +145,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 51854778b..a52712a1b 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 @@ -100,21 +100,24 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "name": "(str,)", "rule": "(TemplateResponseDocumentFieldGroupRule,)", } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 4c6311d0a..f3539c6a6 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 @@ -96,21 +96,24 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "requirement": "(str,)", "group_label": "(str,)", } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 5ff875251..d712a1388 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 @@ -145,7 +145,7 @@ def from_dict(cls, obj: Dict[str, Any]) -> Optional[Union[TemplateResponseDocume @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "type": "(str,)", "api_id": "(str,)", @@ -160,7 +160,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 93efbe02f..24406c657 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 @@ -104,14 +104,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "type": "(str,)", "api_id": "(str,)", @@ -126,7 +129,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 643606f8e..0a6c98504 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 @@ -104,14 +104,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "type": "(str,)", "api_id": "(str,)", @@ -126,7 +129,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 0fa7af8a2..b0cb05c1c 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 @@ -104,14 +104,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "type": "(str,)", "api_id": "(str,)", @@ -126,7 +129,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 ec73e2b9c..44c8a7841 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 @@ -116,14 +116,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "type": "(str,)", "avg_text_length": "(TemplateResponseFieldAvgTextLength,)", @@ -142,7 +145,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 020bf3ff4..fb6526a7b 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 @@ -104,14 +104,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "type": "(str,)", "api_id": "(str,)", @@ -126,7 +129,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 89d8c81a4..cef02346a 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 @@ -104,14 +104,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "type": "(str,)", "group": "(str,)", @@ -126,7 +129,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 7ff4f7234..fd884c7a9 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 @@ -104,14 +104,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "type": "(str,)", "api_id": "(str,)", @@ -126,7 +129,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 8bd26c853..2d00971e5 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 @@ -128,14 +128,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "type": "(str,)", "avg_text_length": "(TemplateResponseFieldAvgTextLength,)", @@ -155,7 +158,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 f93e71bf4..36ff5debf 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 @@ -145,7 +145,7 @@ def from_dict(cls, obj: Dict[str, Any]) -> Optional[Union[TemplateResponseDocume @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "type": "(str,)", "api_id": "(str,)", @@ -160,7 +160,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 6e0219783..a1aefd826 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 @@ -104,14 +104,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "type": "(str,)", "api_id": "(str,)", @@ -126,7 +129,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 2d9757ee7..f471825c4 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 @@ -104,14 +104,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "type": "(str,)", "api_id": "(str,)", @@ -126,7 +129,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 c928a1802..7272a1d87 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 @@ -104,14 +104,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "type": "(str,)", "api_id": "(str,)", @@ -126,7 +129,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 ad90e0334..88f03f93f 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 @@ -104,14 +104,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "type": "(str,)", "api_id": "(str,)", @@ -126,7 +129,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 46de138cc..f937e2852 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 @@ -104,14 +104,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "type": "(str,)", "api_id": "(str,)", @@ -126,7 +129,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 da2e6f94a..38faa07b3 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 @@ -104,14 +104,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "type": "(str,)", "api_id": "(str,)", @@ -126,7 +129,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 61672ef3d..8a654cb37 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 @@ -104,14 +104,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "type": "(str,)", "api_id": "(str,)", @@ -126,7 +129,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 cfcbf9738..7ec04d852 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 @@ -104,14 +104,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "type": "(str,)", "api_id": "(str,)", @@ -126,7 +129,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 d7fdb69c9..87293fa60 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 @@ -96,21 +96,24 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "num_lines": "(int,)", "num_chars_per_line": "(int,)", } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 88fd01666..56124662c 100644 --- a/sdks/python/dropbox_sign/models/template_response_signer_role.py +++ b/sdks/python/dropbox_sign/models/template_response_signer_role.py @@ -96,21 +96,24 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "name": "(str,)", "order": "(int,)", } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 64b96e60c..678d8699f 100644 --- a/sdks/python/dropbox_sign/models/template_update_files_request.py +++ b/sdks/python/dropbox_sign/models/template_update_files_request.py @@ -105,14 +105,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "client_id": "(str,)", "files": "(List[io.IOBase],)", @@ -123,7 +126,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: return property_name in [ "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 abb6d66af..bebade717 100644 --- a/sdks/python/dropbox_sign/models/template_update_files_response.py +++ b/sdks/python/dropbox_sign/models/template_update_files_response.py @@ -98,20 +98,23 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "template": "(TemplateUpdateFilesResponseTemplate,)", } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 712256336..f3dfabaf2 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 @@ -104,21 +104,24 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "template_id": "(str,)", "warnings": "(List[WarningResponse],)", } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + 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 cc2752899..238c353e7 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 @@ -235,14 +235,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "client_id": "(str,)", "requester_email_address": "(str,)", @@ -283,7 +286,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: return property_name in [ "files", "file_urls", 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 3137975f8..92370d31a 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 @@ -189,14 +189,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "client_id": "(str,)", "requester_email_address": "(str,)", @@ -231,7 +234,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: return property_name in [ "template_ids", "ccs", 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 a217d17f1..dfbc3b61b 100644 --- a/sdks/python/dropbox_sign/models/unclaimed_draft_create_request.py +++ b/sdks/python/dropbox_sign/models/unclaimed_draft_create_request.py @@ -204,14 +204,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "type": "(str,)", "files": "(List[io.IOBase],)", @@ -240,7 +243,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: return property_name in [ "files", "file_urls", 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 5d09e0ef3..f605b59bb 100644 --- a/sdks/python/dropbox_sign/models/unclaimed_draft_create_response.py +++ b/sdks/python/dropbox_sign/models/unclaimed_draft_create_response.py @@ -108,21 +108,24 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "unclaimed_draft": "(UnclaimedDraftResponse,)", "warnings": "(List[WarningResponse],)", } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + 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 93985b75f..3a08e0504 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 @@ -112,14 +112,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "client_id": "(str,)", "editor_options": "(SubEditorOptions,)", @@ -132,7 +135,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 62eb23c70..5943a5bc9 100644 --- a/sdks/python/dropbox_sign/models/unclaimed_draft_response.py +++ b/sdks/python/dropbox_sign/models/unclaimed_draft_response.py @@ -104,14 +104,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "signature_request_id": "(str,)", "claim_url": "(str,)", @@ -122,7 +125,7 @@ def openapi_types(cls) -> Dict[StrictStr, StrictStr]: } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: 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 3d8eefe59..c1247355e 100644 --- a/sdks/python/dropbox_sign/models/warning_response.py +++ b/sdks/python/dropbox_sign/models/warning_response.py @@ -96,21 +96,24 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return _obj @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { "warning_msg": "(str,)", "warning_name": "(str,)", } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: return property_name in [ ] diff --git a/sdks/python/openapi-config.yaml b/sdks/python/openapi-config.yaml index dbfc1db30..83a8432fa 100644 --- a/sdks/python/openapi-config.yaml +++ b/sdks/python/openapi-config.yaml @@ -5,7 +5,7 @@ additionalProperties: generatorLanguageVersion: ">=3.7" packageName: dropbox_sign projectName: dropbox-sign - packageVersion: 2.0-dev + packageVersion: 1.5-dev sortModelPropertiesByRequiredFlag: true legacyDiscriminatorBehavior: true packageAuthor: Dropbox Sign API Team diff --git a/sdks/python/pyproject.toml b/sdks/python/pyproject.toml index dea9190b4..ca9a949e1 100644 --- a/sdks/python/pyproject.toml +++ b/sdks/python/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "dropbox_sign" -version = "2.0-dev" +version = "1.5-dev" description = "Dropbox Sign API" authors = ["Official Python SDK for the Dropbox Sign API "] license = "MIT" diff --git a/sdks/python/setup.py b/sdks/python/setup.py index 83d9c0950..bb30cc9e4 100644 --- a/sdks/python/setup.py +++ b/sdks/python/setup.py @@ -23,7 +23,7 @@ # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools NAME = "dropbox-sign" -VERSION = "2.0-dev" +VERSION = "1.5-dev" PYTHON_REQUIRES = ">=3.7" REQUIRES = [ "urllib3 >= 1.25.3, < 2.1.0", diff --git a/sdks/python/templates/api.mustache b/sdks/python/templates/api.mustache index 08c6f1563..3a3c7cd29 100644 --- a/sdks/python/templates/api.mustache +++ b/sdks/python/templates/api.mustache @@ -128,7 +128,8 @@ class {{classname}}: else: _files[param_name] = param_value - _form_params = body_param.to_json_form_params(excluded_json_fields) + if has_files is True: + _form_params = body_param.to_json_form_params(excluded_json_fields) {{/bodyParam}} {{/useCustomTemplateCode}} diff --git a/sdks/python/templates/model_generic.mustache b/sdks/python/templates/model_generic.mustache index 2c647d9cc..5f621f8ad 100644 --- a/sdks/python/templates/model_generic.mustache +++ b/sdks/python/templates/model_generic.mustache @@ -431,15 +431,18 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}} {{#useCustomTemplateCode}} {{^discriminator}} @classmethod - def init(cls, data: Optional[Dict[str, Any]]) -> Self: + def init(cls, data: Any) -> Self: """ Attempt to instantiate and hydrate a new instance of this class """ + if isinstance(data, str): + data = json.loads(data) + return cls.from_dict(data) {{/discriminator}} @classmethod - def openapi_types(cls) -> Dict[StrictStr, StrictStr]: + def openapi_types(cls) -> Dict[str, str]: return { {{#requiredVars}} "{{name}}": "({{#vendorExtensions.x-int-or-string}}int, str{{/vendorExtensions.x-int-or-string}}{{^vendorExtensions.x-int-or-string}}{{{dataType}}}{{/vendorExtensions.x-int-or-string}},)", @@ -450,7 +453,7 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}} } @classmethod - def openapi_type_is_array(cls, property_name: StrictStr) -> StrictBool: + def openapi_type_is_array(cls, property_name: str) -> bool: return property_name in [ {{#vars}} {{#isArray}} diff --git a/sdks/python/tests/test_account_api.py b/sdks/python/tests/test_account_api.py index 626550a36..c11171457 100644 --- a/sdks/python/tests/test_account_api.py +++ b/sdks/python/tests/test_account_api.py @@ -35,8 +35,8 @@ def test_http_code_range(self): try: self.api.account_create(obj) except ApiException as e: - self.assertEqual(e.body.__class__.__name__, response_class) - self.assertEqual(e.body, expected) + self.assertEqual(e.data.__class__.__name__, response_class) + self.assertEqual(e.data, expected) def test_account_create(self): request_class = 'AccountCreateRequest' From d15ebe31e02ae874ef6053eb446ec1daa988def6 Mon Sep 17 00:00:00 2001 From: Juan Treminio Date: Fri, 30 Aug 2024 10:02:32 -0500 Subject: [PATCH 07/10] Finalize tests --- .../models/account_create_request.py | 10 ++++-- .../models/account_create_response.py | 10 ++++-- .../models/account_get_response.py | 10 ++++-- .../dropbox_sign/models/account_response.py | 10 ++++-- .../models/account_response_quotas.py | 10 ++++-- .../models/account_response_usage.py | 10 ++++-- .../models/account_update_request.py | 10 ++++-- .../models/account_verify_request.py | 10 ++++-- .../models/account_verify_response.py | 10 ++++-- .../models/account_verify_response_account.py | 10 ++++-- .../models/api_app_create_request.py | 10 ++++-- .../models/api_app_get_response.py | 10 ++++-- .../models/api_app_list_response.py | 10 ++++-- .../dropbox_sign/models/api_app_response.py | 10 ++++-- .../models/api_app_response_o_auth.py | 10 ++++-- .../models/api_app_response_options.py | 10 ++++-- .../models/api_app_response_owner_account.py | 10 ++++-- ...api_app_response_white_labeling_options.py | 10 ++++-- .../models/api_app_update_request.py | 10 ++++-- .../models/bulk_send_job_get_response.py | 10 ++++-- ...end_job_get_response_signature_requests.py | 10 ++++-- .../models/bulk_send_job_list_response.py | 10 ++++-- .../models/bulk_send_job_response.py | 10 ++++-- .../models/bulk_send_job_send_response.py | 10 ++++-- .../models/embedded_edit_url_request.py | 10 ++++-- .../models/embedded_edit_url_response.py | 10 ++++-- .../embedded_edit_url_response_embedded.py | 10 ++++-- .../models/embedded_sign_url_response.py | 10 ++++-- .../embedded_sign_url_response_embedded.py | 10 ++++-- .../dropbox_sign/models/error_response.py | 10 ++++-- .../models/error_response_error.py | 10 ++++-- .../models/event_callback_request.py | 10 ++++-- .../models/event_callback_request_event.py | 10 ++++-- .../event_callback_request_event_metadata.py | 10 ++++-- .../models/fax_line_add_user_request.py | 10 ++++-- .../models/fax_line_area_code_get_response.py | 10 ++++-- .../models/fax_line_create_request.py | 10 ++++-- .../models/fax_line_delete_request.py | 10 ++++-- .../models/fax_line_list_response.py | 10 ++++-- .../models/fax_line_remove_user_request.py | 10 ++++-- .../dropbox_sign/models/fax_line_response.py | 10 ++++-- .../models/fax_line_response_fax_line.py | 10 ++++-- .../dropbox_sign/models/file_response.py | 10 ++++-- .../models/file_response_data_uri.py | 10 ++++-- .../dropbox_sign/models/list_info_response.py | 10 ++++-- .../models/o_auth_token_generate_request.py | 10 ++++-- .../models/o_auth_token_refresh_request.py | 10 ++++-- .../models/o_auth_token_response.py | 10 ++++-- .../models/report_create_request.py | 10 ++++-- .../models/report_create_response.py | 10 ++++-- .../dropbox_sign/models/report_response.py | 10 ++++-- ...k_create_embedded_with_template_request.py | 10 ++++-- ...request_bulk_send_with_template_request.py | 10 ++++-- ...gnature_request_create_embedded_request.py | 10 ++++-- ...t_create_embedded_with_template_request.py | 10 ++++-- .../models/signature_request_get_response.py | 10 ++++-- .../models/signature_request_list_response.py | 10 ++++-- .../signature_request_remind_request.py | 10 ++++-- .../models/signature_request_response.py | 10 ++++-- .../signature_request_response_attachment.py | 10 ++++-- ...ture_request_response_custom_field_base.py | 10 ++++-- ..._request_response_custom_field_checkbox.py | 10 ++++-- ...ture_request_response_custom_field_text.py | 10 ++++-- .../signature_request_response_data_base.py | 10 ++++-- ...re_request_response_data_value_checkbox.py | 10 ++++-- ...uest_response_data_value_checkbox_merge.py | 10 ++++-- ...request_response_data_value_date_signed.py | 10 ++++-- ...re_request_response_data_value_dropdown.py | 10 ++++-- ...re_request_response_data_value_initials.py | 10 ++++-- ...ature_request_response_data_value_radio.py | 10 ++++-- ...e_request_response_data_value_signature.py | 10 ++++-- ...nature_request_response_data_value_text.py | 10 ++++-- ..._request_response_data_value_text_merge.py | 10 ++++-- .../signature_request_response_signatures.py | 10 ++++-- .../models/signature_request_send_request.py | 10 ++++-- ...ture_request_send_with_template_request.py | 10 ++++-- .../signature_request_update_request.py | 10 ++++-- .../dropbox_sign/models/sub_attachment.py | 10 ++++-- .../models/sub_bulk_signer_list.py | 10 ++++-- .../sub_bulk_signer_list_custom_field.py | 10 ++++-- sdks/python/dropbox_sign/models/sub_cc.py | 10 ++++-- .../dropbox_sign/models/sub_custom_field.py | 10 ++++-- .../dropbox_sign/models/sub_editor_options.py | 10 ++++-- .../dropbox_sign/models/sub_field_options.py | 10 ++++-- .../models/sub_form_field_group.py | 10 ++++-- .../models/sub_form_field_rule.py | 10 ++++-- .../models/sub_form_field_rule_action.py | 10 ++++-- .../models/sub_form_field_rule_trigger.py | 10 ++++-- .../sub_form_fields_per_document_base.py | 10 ++++-- .../sub_form_fields_per_document_checkbox.py | 10 ++++-- ...form_fields_per_document_checkbox_merge.py | 10 ++++-- ...ub_form_fields_per_document_date_signed.py | 10 ++++-- .../sub_form_fields_per_document_dropdown.py | 10 ++++-- .../sub_form_fields_per_document_hyperlink.py | 10 ++++-- .../sub_form_fields_per_document_initials.py | 10 ++++-- .../sub_form_fields_per_document_radio.py | 10 ++++-- .../sub_form_fields_per_document_signature.py | 10 ++++-- .../sub_form_fields_per_document_text.py | 10 ++++-- ...sub_form_fields_per_document_text_merge.py | 10 ++++-- .../dropbox_sign/models/sub_merge_field.py | 10 ++++-- sdks/python/dropbox_sign/models/sub_o_auth.py | 10 ++++-- .../python/dropbox_sign/models/sub_options.py | 10 ++++-- .../sub_signature_request_grouped_signers.py | 10 ++++-- .../models/sub_signature_request_signer.py | 10 ++++-- .../sub_signature_request_template_signer.py | 10 ++++-- .../models/sub_signing_options.py | 10 ++++-- .../dropbox_sign/models/sub_team_response.py | 10 ++++-- .../dropbox_sign/models/sub_template_role.py | 10 ++++-- .../models/sub_unclaimed_draft_signer.py | 10 ++++-- .../sub_unclaimed_draft_template_signer.py | 10 ++++-- .../models/sub_white_labeling_options.py | 10 ++++-- .../models/team_add_member_request.py | 10 ++++-- .../models/team_create_request.py | 10 ++++-- .../models/team_get_info_response.py | 10 ++++-- .../dropbox_sign/models/team_get_response.py | 10 ++++-- .../dropbox_sign/models/team_info_response.py | 10 ++++-- .../models/team_invite_response.py | 10 ++++-- .../models/team_invites_response.py | 10 ++++-- .../models/team_member_response.py | 10 ++++-- .../models/team_members_response.py | 10 ++++-- .../models/team_parent_response.py | 10 ++++-- .../models/team_remove_member_request.py | 10 ++++-- .../dropbox_sign/models/team_response.py | 10 ++++-- .../models/team_sub_teams_response.py | 10 ++++-- .../models/team_update_request.py | 10 ++++-- .../models/template_add_user_request.py | 10 ++++-- .../template_create_embedded_draft_request.py | 10 ++++-- ...template_create_embedded_draft_response.py | 10 ++++-- ...create_embedded_draft_response_template.py | 10 ++++-- .../models/template_create_request.py | 10 ++++-- .../models/template_create_response.py | 10 ++++-- .../template_create_response_template.py | 10 ++++-- .../models/template_edit_response.py | 10 ++++-- .../models/template_get_response.py | 10 ++++-- .../models/template_list_response.py | 10 ++++-- .../models/template_remove_user_request.py | 10 ++++-- .../dropbox_sign/models/template_response.py | 10 ++++-- .../models/template_response_account.py | 10 ++++-- .../models/template_response_account_quota.py | 10 ++++-- .../models/template_response_cc_role.py | 10 ++++-- .../models/template_response_document.py | 10 ++++-- ...ate_response_document_custom_field_base.py | 10 ++++-- ...response_document_custom_field_checkbox.py | 10 ++++-- ...ate_response_document_custom_field_text.py | 10 ++++-- .../template_response_document_field_group.py | 10 ++++-- ...late_response_document_field_group_rule.py | 10 ++++-- ...plate_response_document_form_field_base.py | 10 ++++-- ...e_response_document_form_field_checkbox.py | 10 ++++-- ...esponse_document_form_field_date_signed.py | 10 ++++-- ...e_response_document_form_field_dropdown.py | 10 ++++-- ..._response_document_form_field_hyperlink.py | 10 ++++-- ...e_response_document_form_field_initials.py | 10 ++++-- ...late_response_document_form_field_radio.py | 10 ++++-- ..._response_document_form_field_signature.py | 10 ++++-- ...plate_response_document_form_field_text.py | 10 ++++-- ...ate_response_document_static_field_base.py | 10 ++++-- ...response_document_static_field_checkbox.py | 10 ++++-- ...ponse_document_static_field_date_signed.py | 10 ++++-- ...response_document_static_field_dropdown.py | 10 ++++-- ...esponse_document_static_field_hyperlink.py | 10 ++++-- ...response_document_static_field_initials.py | 10 ++++-- ...te_response_document_static_field_radio.py | 10 ++++-- ...esponse_document_static_field_signature.py | 10 ++++-- ...ate_response_document_static_field_text.py | 10 ++++-- ...template_response_field_avg_text_length.py | 10 ++++-- .../models/template_response_signer_role.py | 10 ++++-- .../models/template_update_files_request.py | 10 ++++-- .../models/template_update_files_response.py | 10 ++++-- ...template_update_files_response_template.py | 10 ++++-- ...unclaimed_draft_create_embedded_request.py | 10 ++++-- ...t_create_embedded_with_template_request.py | 10 ++++-- .../models/unclaimed_draft_create_request.py | 10 ++++-- .../models/unclaimed_draft_create_response.py | 10 ++++-- ...unclaimed_draft_edit_and_resend_request.py | 10 ++++-- .../models/unclaimed_draft_response.py | 10 ++++-- .../dropbox_sign/models/warning_response.py | 10 ++++-- sdks/python/templates/model_generic.mustache | 10 +++--- sdks/python/tests/test_api_app_api.py | 3 +- .../tests/test_signature_request_api.py | 34 +++++++++---------- sdks/python/tests/test_team_api.py | 3 +- sdks/python/tests/test_utils.py | 8 +++++ 181 files changed, 1264 insertions(+), 554 deletions(-) diff --git a/sdks/python/dropbox_sign/models/account_create_request.py b/sdks/python/dropbox_sign/models/account_create_request.py index 58c78ffd7..7e58df82a 100644 --- a/sdks/python/dropbox_sign/models/account_create_request.py +++ b/sdks/python/dropbox_sign/models/account_create_request.py @@ -47,15 +47,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data diff --git a/sdks/python/dropbox_sign/models/account_create_response.py b/sdks/python/dropbox_sign/models/account_create_response.py index 076186f6d..8ebd5c8d7 100644 --- a/sdks/python/dropbox_sign/models/account_create_response.py +++ b/sdks/python/dropbox_sign/models/account_create_response.py @@ -49,15 +49,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data diff --git a/sdks/python/dropbox_sign/models/account_get_response.py b/sdks/python/dropbox_sign/models/account_get_response.py index b6fea2b15..a0d99561c 100644 --- a/sdks/python/dropbox_sign/models/account_get_response.py +++ b/sdks/python/dropbox_sign/models/account_get_response.py @@ -47,15 +47,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data diff --git a/sdks/python/dropbox_sign/models/account_response.py b/sdks/python/dropbox_sign/models/account_response.py index 900d2a2bf..1f1ce926a 100644 --- a/sdks/python/dropbox_sign/models/account_response.py +++ b/sdks/python/dropbox_sign/models/account_response.py @@ -56,15 +56,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data diff --git a/sdks/python/dropbox_sign/models/account_response_quotas.py b/sdks/python/dropbox_sign/models/account_response_quotas.py index 97b12f2f9..fcdac4935 100644 --- a/sdks/python/dropbox_sign/models/account_response_quotas.py +++ b/sdks/python/dropbox_sign/models/account_response_quotas.py @@ -49,15 +49,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data diff --git a/sdks/python/dropbox_sign/models/account_response_usage.py b/sdks/python/dropbox_sign/models/account_response_usage.py index 887c09d44..59eab6105 100644 --- a/sdks/python/dropbox_sign/models/account_response_usage.py +++ b/sdks/python/dropbox_sign/models/account_response_usage.py @@ -44,15 +44,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data diff --git a/sdks/python/dropbox_sign/models/account_update_request.py b/sdks/python/dropbox_sign/models/account_update_request.py index 7ab96c200..c3c5a7256 100644 --- a/sdks/python/dropbox_sign/models/account_update_request.py +++ b/sdks/python/dropbox_sign/models/account_update_request.py @@ -46,15 +46,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data diff --git a/sdks/python/dropbox_sign/models/account_verify_request.py b/sdks/python/dropbox_sign/models/account_verify_request.py index a43cde826..34614362c 100644 --- a/sdks/python/dropbox_sign/models/account_verify_request.py +++ b/sdks/python/dropbox_sign/models/account_verify_request.py @@ -44,15 +44,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data diff --git a/sdks/python/dropbox_sign/models/account_verify_response.py b/sdks/python/dropbox_sign/models/account_verify_response.py index 0dade76a1..974c07b33 100644 --- a/sdks/python/dropbox_sign/models/account_verify_response.py +++ b/sdks/python/dropbox_sign/models/account_verify_response.py @@ -47,15 +47,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 15defb8e5..f934f77c4 100644 --- a/sdks/python/dropbox_sign/models/account_verify_response_account.py +++ b/sdks/python/dropbox_sign/models/account_verify_response_account.py @@ -44,15 +44,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 51547615c..416b25dba 100644 --- a/sdks/python/dropbox_sign/models/api_app_create_request.py +++ b/sdks/python/dropbox_sign/models/api_app_create_request.py @@ -54,15 +54,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 890207429..fb3b9dc91 100644 --- a/sdks/python/dropbox_sign/models/api_app_get_response.py +++ b/sdks/python/dropbox_sign/models/api_app_get_response.py @@ -47,15 +47,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 fff834913..2b78c35f9 100644 --- a/sdks/python/dropbox_sign/models/api_app_list_response.py +++ b/sdks/python/dropbox_sign/models/api_app_list_response.py @@ -49,15 +49,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data diff --git a/sdks/python/dropbox_sign/models/api_app_response.py b/sdks/python/dropbox_sign/models/api_app_response.py index 139a2bf23..bf44aff91 100644 --- a/sdks/python/dropbox_sign/models/api_app_response.py +++ b/sdks/python/dropbox_sign/models/api_app_response.py @@ -57,15 +57,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 5463c707d..8e8ee3fe2 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 @@ -47,15 +47,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 8d7021bb5..0aa73691a 100644 --- a/sdks/python/dropbox_sign/models/api_app_response_options.py +++ b/sdks/python/dropbox_sign/models/api_app_response_options.py @@ -44,15 +44,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 92066e97f..f655b653b 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 @@ -45,15 +45,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 65f9874ec..b38e8e4e6 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 @@ -57,15 +57,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 ddafee54f..9b342132f 100644 --- a/sdks/python/dropbox_sign/models/api_app_update_request.py +++ b/sdks/python/dropbox_sign/models/api_app_update_request.py @@ -54,15 +54,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 c39c1879c..f9a336a1f 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 @@ -51,15 +51,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 8be653454..1f62019b9 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 @@ -72,15 +72,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 bc17ad4de..92244da66 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 @@ -49,15 +49,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 aab9ea81d..bfe427f12 100644 --- a/sdks/python/dropbox_sign/models/bulk_send_job_response.py +++ b/sdks/python/dropbox_sign/models/bulk_send_job_response.py @@ -47,15 +47,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 b8a193cf0..b17834089 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 @@ -47,15 +47,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 37b06a883..1f15bdeb9 100644 --- a/sdks/python/dropbox_sign/models/embedded_edit_url_request.py +++ b/sdks/python/dropbox_sign/models/embedded_edit_url_request.py @@ -55,15 +55,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 c06a74085..b0fd24b35 100644 --- a/sdks/python/dropbox_sign/models/embedded_edit_url_response.py +++ b/sdks/python/dropbox_sign/models/embedded_edit_url_response.py @@ -47,15 +47,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 940dd9185..f07bf811e 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 @@ -45,15 +45,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 1698346ee..2eaaea082 100644 --- a/sdks/python/dropbox_sign/models/embedded_sign_url_response.py +++ b/sdks/python/dropbox_sign/models/embedded_sign_url_response.py @@ -47,15 +47,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 c0a9ae690..d11e70293 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 @@ -45,15 +45,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data diff --git a/sdks/python/dropbox_sign/models/error_response.py b/sdks/python/dropbox_sign/models/error_response.py index 2682fe9a0..514e78812 100644 --- a/sdks/python/dropbox_sign/models/error_response.py +++ b/sdks/python/dropbox_sign/models/error_response.py @@ -45,15 +45,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data diff --git a/sdks/python/dropbox_sign/models/error_response_error.py b/sdks/python/dropbox_sign/models/error_response_error.py index 809b7b2ec..d18f99ef5 100644 --- a/sdks/python/dropbox_sign/models/error_response_error.py +++ b/sdks/python/dropbox_sign/models/error_response_error.py @@ -46,15 +46,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data diff --git a/sdks/python/dropbox_sign/models/event_callback_request.py b/sdks/python/dropbox_sign/models/event_callback_request.py index fe1e6a711..296065613 100644 --- a/sdks/python/dropbox_sign/models/event_callback_request.py +++ b/sdks/python/dropbox_sign/models/event_callback_request.py @@ -51,15 +51,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 003fa7dd2..18626f914 100644 --- a/sdks/python/dropbox_sign/models/event_callback_request_event.py +++ b/sdks/python/dropbox_sign/models/event_callback_request_event.py @@ -55,15 +55,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 0ec811c6f..ea5b71047 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 @@ -47,15 +47,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 3831d0b62..33195b8c1 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 @@ -46,15 +46,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 cd32d527c..d51260c76 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 @@ -44,15 +44,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 157d93331..cc213900f 100644 --- a/sdks/python/dropbox_sign/models/fax_line_create_request.py +++ b/sdks/python/dropbox_sign/models/fax_line_create_request.py @@ -54,15 +54,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 233d011d4..f778c80f4 100644 --- a/sdks/python/dropbox_sign/models/fax_line_delete_request.py +++ b/sdks/python/dropbox_sign/models/fax_line_delete_request.py @@ -44,15 +44,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 139540d98..db051e146 100644 --- a/sdks/python/dropbox_sign/models/fax_line_list_response.py +++ b/sdks/python/dropbox_sign/models/fax_line_list_response.py @@ -49,15 +49,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 49eb3c1f5..a892189cc 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 @@ -46,15 +46,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data diff --git a/sdks/python/dropbox_sign/models/fax_line_response.py b/sdks/python/dropbox_sign/models/fax_line_response.py index 7a41e8f1b..1b885502d 100644 --- a/sdks/python/dropbox_sign/models/fax_line_response.py +++ b/sdks/python/dropbox_sign/models/fax_line_response.py @@ -47,15 +47,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 20638282b..35e1d0f91 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 @@ -48,15 +48,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data diff --git a/sdks/python/dropbox_sign/models/file_response.py b/sdks/python/dropbox_sign/models/file_response.py index 4f098692f..400ba6176 100644 --- a/sdks/python/dropbox_sign/models/file_response.py +++ b/sdks/python/dropbox_sign/models/file_response.py @@ -45,15 +45,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 dbbfaf9a8..0d004ed06 100644 --- a/sdks/python/dropbox_sign/models/file_response_data_uri.py +++ b/sdks/python/dropbox_sign/models/file_response_data_uri.py @@ -44,15 +44,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data diff --git a/sdks/python/dropbox_sign/models/list_info_response.py b/sdks/python/dropbox_sign/models/list_info_response.py index 770b79420..06c7885d7 100644 --- a/sdks/python/dropbox_sign/models/list_info_response.py +++ b/sdks/python/dropbox_sign/models/list_info_response.py @@ -47,15 +47,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 7c6f789d1..c6e431f50 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 @@ -48,15 +48,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 8f7549d6b..0d3b42121 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 @@ -45,15 +45,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 ff49cb301..603c5c5d3 100644 --- a/sdks/python/dropbox_sign/models/o_auth_token_response.py +++ b/sdks/python/dropbox_sign/models/o_auth_token_response.py @@ -48,15 +48,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data diff --git a/sdks/python/dropbox_sign/models/report_create_request.py b/sdks/python/dropbox_sign/models/report_create_request.py index 83b162806..cca0f7fa6 100644 --- a/sdks/python/dropbox_sign/models/report_create_request.py +++ b/sdks/python/dropbox_sign/models/report_create_request.py @@ -55,15 +55,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data diff --git a/sdks/python/dropbox_sign/models/report_create_response.py b/sdks/python/dropbox_sign/models/report_create_response.py index dc1db8b62..4ca5c8671 100644 --- a/sdks/python/dropbox_sign/models/report_create_response.py +++ b/sdks/python/dropbox_sign/models/report_create_response.py @@ -47,15 +47,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data diff --git a/sdks/python/dropbox_sign/models/report_response.py b/sdks/python/dropbox_sign/models/report_response.py index 36a10896c..0c45dd868 100644 --- a/sdks/python/dropbox_sign/models/report_response.py +++ b/sdks/python/dropbox_sign/models/report_response.py @@ -58,15 +58,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 df10250ee..599e40bcc 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 @@ -60,15 +60,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 c6e75f4b4..cf02265a9 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 @@ -60,15 +60,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 9fa132b71..f7e074440 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 @@ -77,15 +77,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 069b7c4da..7712b58aa 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 @@ -63,15 +63,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 6a2fddaa7..bd033d3e4 100644 --- a/sdks/python/dropbox_sign/models/signature_request_get_response.py +++ b/sdks/python/dropbox_sign/models/signature_request_get_response.py @@ -47,15 +47,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 d802f5e96..569a1dae1 100644 --- a/sdks/python/dropbox_sign/models/signature_request_list_response.py +++ b/sdks/python/dropbox_sign/models/signature_request_list_response.py @@ -49,15 +49,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 5d68cb9ab..e5e210206 100644 --- a/sdks/python/dropbox_sign/models/signature_request_remind_request.py +++ b/sdks/python/dropbox_sign/models/signature_request_remind_request.py @@ -45,15 +45,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data diff --git a/sdks/python/dropbox_sign/models/signature_request_response.py b/sdks/python/dropbox_sign/models/signature_request_response.py index b0918ac42..09c937d56 100644 --- a/sdks/python/dropbox_sign/models/signature_request_response.py +++ b/sdks/python/dropbox_sign/models/signature_request_response.py @@ -72,15 +72,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 d4b9f4986..ea5218cf9 100644 --- a/sdks/python/dropbox_sign/models/signature_request_response_attachment.py +++ b/sdks/python/dropbox_sign/models/signature_request_response_attachment.py @@ -49,15 +49,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 7ce1b9ac0..da4cac722 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 @@ -71,15 +71,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 d0a5ca1d5..e30d5ce49 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 @@ -46,15 +46,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 72efe3371..977296b7b 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 @@ -46,15 +46,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 3315edc62..7c6e8f336 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 @@ -78,15 +78,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 117b7e870..1ab2b5795 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 @@ -46,15 +46,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 bd0a16217..bdae2e484 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 @@ -46,15 +46,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 07925f760..4b7d1113c 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 @@ -46,15 +46,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 bde3a88fa..3009269d8 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 @@ -46,15 +46,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 20c01a2ba..d06d0b265 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 @@ -46,15 +46,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 887954bf3..c1e826e3a 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 @@ -46,15 +46,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 765536634..a1431daa7 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 @@ -46,15 +46,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 8ded9e0db..95fc2f5ce 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 @@ -46,15 +46,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 f0dbfb3c8..628e24caa 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 @@ -46,15 +46,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 e24c7d86f..aebb969ef 100644 --- a/sdks/python/dropbox_sign/models/signature_request_response_signatures.py +++ b/sdks/python/dropbox_sign/models/signature_request_response_signatures.py @@ -62,15 +62,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 f903629bd..236ef989d 100644 --- a/sdks/python/dropbox_sign/models/signature_request_send_request.py +++ b/sdks/python/dropbox_sign/models/signature_request_send_request.py @@ -79,15 +79,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 3ce65fc0f..e3f88ee3b 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 @@ -65,15 +65,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 efbdbf170..b8bfe6d3a 100644 --- a/sdks/python/dropbox_sign/models/signature_request_update_request.py +++ b/sdks/python/dropbox_sign/models/signature_request_update_request.py @@ -47,15 +47,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data diff --git a/sdks/python/dropbox_sign/models/sub_attachment.py b/sdks/python/dropbox_sign/models/sub_attachment.py index 4d956d937..82d96bc5f 100644 --- a/sdks/python/dropbox_sign/models/sub_attachment.py +++ b/sdks/python/dropbox_sign/models/sub_attachment.py @@ -47,15 +47,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 e70041668..78746924f 100644 --- a/sdks/python/dropbox_sign/models/sub_bulk_signer_list.py +++ b/sdks/python/dropbox_sign/models/sub_bulk_signer_list.py @@ -47,15 +47,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 a6b433ad3..f51fd8c3c 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 @@ -45,15 +45,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data diff --git a/sdks/python/dropbox_sign/models/sub_cc.py b/sdks/python/dropbox_sign/models/sub_cc.py index 1f4b55365..546028903 100644 --- a/sdks/python/dropbox_sign/models/sub_cc.py +++ b/sdks/python/dropbox_sign/models/sub_cc.py @@ -45,15 +45,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data diff --git a/sdks/python/dropbox_sign/models/sub_custom_field.py b/sdks/python/dropbox_sign/models/sub_custom_field.py index e72e6df1a..8c7e419c7 100644 --- a/sdks/python/dropbox_sign/models/sub_custom_field.py +++ b/sdks/python/dropbox_sign/models/sub_custom_field.py @@ -47,15 +47,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data diff --git a/sdks/python/dropbox_sign/models/sub_editor_options.py b/sdks/python/dropbox_sign/models/sub_editor_options.py index 5cfce299a..3e95a0da3 100644 --- a/sdks/python/dropbox_sign/models/sub_editor_options.py +++ b/sdks/python/dropbox_sign/models/sub_editor_options.py @@ -45,15 +45,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data diff --git a/sdks/python/dropbox_sign/models/sub_field_options.py b/sdks/python/dropbox_sign/models/sub_field_options.py index e61937ca3..412a0e899 100644 --- a/sdks/python/dropbox_sign/models/sub_field_options.py +++ b/sdks/python/dropbox_sign/models/sub_field_options.py @@ -51,15 +51,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 6a4b20dcc..341e974c5 100644 --- a/sdks/python/dropbox_sign/models/sub_form_field_group.py +++ b/sdks/python/dropbox_sign/models/sub_form_field_group.py @@ -46,15 +46,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 d90448baa..af3d60dfe 100644 --- a/sdks/python/dropbox_sign/models/sub_form_field_rule.py +++ b/sdks/python/dropbox_sign/models/sub_form_field_rule.py @@ -50,15 +50,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 3eda5f982..c9f051a83 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 @@ -54,15 +54,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 c29426117..7723f860d 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 @@ -54,15 +54,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 3e2c07ccb..a1cbbf757 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 @@ -85,15 +85,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 44f0a1097..d0c0b2375 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 @@ -47,15 +47,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 30208f6a0..9a4df4cb0 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 @@ -45,15 +45,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 87106ece0..e20187462 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 @@ -57,15 +57,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 6090a99d3..33f2eafe7 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 @@ -60,15 +60,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 d98a7f6e2..7584de3a5 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 @@ -59,15 +59,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 8869e4998..8b5648512 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 @@ -45,15 +45,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 63e099677..aabf98e6a 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 @@ -47,15 +47,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 fb22d9b4c..897cb88d2 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 @@ -45,15 +45,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 56ce14a24..90deea309 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 @@ -75,15 +75,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 b25ab5f56..c5e847609 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 @@ -57,15 +57,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data diff --git a/sdks/python/dropbox_sign/models/sub_merge_field.py b/sdks/python/dropbox_sign/models/sub_merge_field.py index 63f160b2b..ad7390e1c 100644 --- a/sdks/python/dropbox_sign/models/sub_merge_field.py +++ b/sdks/python/dropbox_sign/models/sub_merge_field.py @@ -52,15 +52,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data diff --git a/sdks/python/dropbox_sign/models/sub_o_auth.py b/sdks/python/dropbox_sign/models/sub_o_auth.py index f98072b48..7ef163291 100644 --- a/sdks/python/dropbox_sign/models/sub_o_auth.py +++ b/sdks/python/dropbox_sign/models/sub_o_auth.py @@ -56,15 +56,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data diff --git a/sdks/python/dropbox_sign/models/sub_options.py b/sdks/python/dropbox_sign/models/sub_options.py index 0c98777b6..a2a891e6b 100644 --- a/sdks/python/dropbox_sign/models/sub_options.py +++ b/sdks/python/dropbox_sign/models/sub_options.py @@ -44,15 +44,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 35d55b3f4..0f360a7fc 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 @@ -47,15 +47,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 31527846b..3696316e3 100644 --- a/sdks/python/dropbox_sign/models/sub_signature_request_signer.py +++ b/sdks/python/dropbox_sign/models/sub_signature_request_signer.py @@ -60,15 +60,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 9fe46b9ee..0d8c257b3 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 @@ -60,15 +60,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data diff --git a/sdks/python/dropbox_sign/models/sub_signing_options.py b/sdks/python/dropbox_sign/models/sub_signing_options.py index 79f3df45f..c46b9577a 100644 --- a/sdks/python/dropbox_sign/models/sub_signing_options.py +++ b/sdks/python/dropbox_sign/models/sub_signing_options.py @@ -55,15 +55,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data diff --git a/sdks/python/dropbox_sign/models/sub_team_response.py b/sdks/python/dropbox_sign/models/sub_team_response.py index 046e7fe67..28c9360bb 100644 --- a/sdks/python/dropbox_sign/models/sub_team_response.py +++ b/sdks/python/dropbox_sign/models/sub_team_response.py @@ -45,15 +45,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data diff --git a/sdks/python/dropbox_sign/models/sub_template_role.py b/sdks/python/dropbox_sign/models/sub_template_role.py index fbd594173..4aefc44b2 100644 --- a/sdks/python/dropbox_sign/models/sub_template_role.py +++ b/sdks/python/dropbox_sign/models/sub_template_role.py @@ -45,15 +45,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 ea4680bdc..8feb7ab44 100644 --- a/sdks/python/dropbox_sign/models/sub_unclaimed_draft_signer.py +++ b/sdks/python/dropbox_sign/models/sub_unclaimed_draft_signer.py @@ -46,15 +46,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 60105ed09..8a897e983 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 @@ -46,15 +46,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 edb52fa3d..d3c6d184d 100644 --- a/sdks/python/dropbox_sign/models/sub_white_labeling_options.py +++ b/sdks/python/dropbox_sign/models/sub_white_labeling_options.py @@ -68,15 +68,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 73b7d5336..5c0cba434 100644 --- a/sdks/python/dropbox_sign/models/team_add_member_request.py +++ b/sdks/python/dropbox_sign/models/team_add_member_request.py @@ -56,15 +56,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data diff --git a/sdks/python/dropbox_sign/models/team_create_request.py b/sdks/python/dropbox_sign/models/team_create_request.py index 5b9995e72..7fd0973d5 100644 --- a/sdks/python/dropbox_sign/models/team_create_request.py +++ b/sdks/python/dropbox_sign/models/team_create_request.py @@ -44,15 +44,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 a8a0c0591..1553c4014 100644 --- a/sdks/python/dropbox_sign/models/team_get_info_response.py +++ b/sdks/python/dropbox_sign/models/team_get_info_response.py @@ -47,15 +47,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data diff --git a/sdks/python/dropbox_sign/models/team_get_response.py b/sdks/python/dropbox_sign/models/team_get_response.py index d0fbef7a8..f490e1b5f 100644 --- a/sdks/python/dropbox_sign/models/team_get_response.py +++ b/sdks/python/dropbox_sign/models/team_get_response.py @@ -47,15 +47,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data diff --git a/sdks/python/dropbox_sign/models/team_info_response.py b/sdks/python/dropbox_sign/models/team_info_response.py index 6d776ce14..56af4156b 100644 --- a/sdks/python/dropbox_sign/models/team_info_response.py +++ b/sdks/python/dropbox_sign/models/team_info_response.py @@ -49,15 +49,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data diff --git a/sdks/python/dropbox_sign/models/team_invite_response.py b/sdks/python/dropbox_sign/models/team_invite_response.py index 0758b30a4..cec20cb07 100644 --- a/sdks/python/dropbox_sign/models/team_invite_response.py +++ b/sdks/python/dropbox_sign/models/team_invite_response.py @@ -49,15 +49,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data diff --git a/sdks/python/dropbox_sign/models/team_invites_response.py b/sdks/python/dropbox_sign/models/team_invites_response.py index 9e03cc035..cc60de55f 100644 --- a/sdks/python/dropbox_sign/models/team_invites_response.py +++ b/sdks/python/dropbox_sign/models/team_invites_response.py @@ -47,15 +47,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data diff --git a/sdks/python/dropbox_sign/models/team_member_response.py b/sdks/python/dropbox_sign/models/team_member_response.py index 956b52925..90f0a025e 100644 --- a/sdks/python/dropbox_sign/models/team_member_response.py +++ b/sdks/python/dropbox_sign/models/team_member_response.py @@ -46,15 +46,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data diff --git a/sdks/python/dropbox_sign/models/team_members_response.py b/sdks/python/dropbox_sign/models/team_members_response.py index 4bc8f46df..bd229c94c 100644 --- a/sdks/python/dropbox_sign/models/team_members_response.py +++ b/sdks/python/dropbox_sign/models/team_members_response.py @@ -49,15 +49,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data diff --git a/sdks/python/dropbox_sign/models/team_parent_response.py b/sdks/python/dropbox_sign/models/team_parent_response.py index a55c3643e..e7243a288 100644 --- a/sdks/python/dropbox_sign/models/team_parent_response.py +++ b/sdks/python/dropbox_sign/models/team_parent_response.py @@ -45,15 +45,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 115467aed..6b2566abc 100644 --- a/sdks/python/dropbox_sign/models/team_remove_member_request.py +++ b/sdks/python/dropbox_sign/models/team_remove_member_request.py @@ -58,15 +58,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data diff --git a/sdks/python/dropbox_sign/models/team_response.py b/sdks/python/dropbox_sign/models/team_response.py index 11c838035..ba41f4de3 100644 --- a/sdks/python/dropbox_sign/models/team_response.py +++ b/sdks/python/dropbox_sign/models/team_response.py @@ -48,15 +48,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 1112ef624..ffcc73a41 100644 --- a/sdks/python/dropbox_sign/models/team_sub_teams_response.py +++ b/sdks/python/dropbox_sign/models/team_sub_teams_response.py @@ -49,15 +49,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data diff --git a/sdks/python/dropbox_sign/models/team_update_request.py b/sdks/python/dropbox_sign/models/team_update_request.py index 7e47de2a9..8b5113e5f 100644 --- a/sdks/python/dropbox_sign/models/team_update_request.py +++ b/sdks/python/dropbox_sign/models/team_update_request.py @@ -44,15 +44,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 9c529130d..7036cfd4e 100644 --- a/sdks/python/dropbox_sign/models/template_add_user_request.py +++ b/sdks/python/dropbox_sign/models/template_add_user_request.py @@ -46,15 +46,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 e8fccb549..9d9b696bd 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 @@ -77,15 +77,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 97b14e7f3..db8125607 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 @@ -47,15 +47,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 b463a2b3c..a3102e6bf 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 @@ -48,15 +48,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data diff --git a/sdks/python/dropbox_sign/models/template_create_request.py b/sdks/python/dropbox_sign/models/template_create_request.py index 77106b640..0f22cad64 100644 --- a/sdks/python/dropbox_sign/models/template_create_request.py +++ b/sdks/python/dropbox_sign/models/template_create_request.py @@ -69,15 +69,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data diff --git a/sdks/python/dropbox_sign/models/template_create_response.py b/sdks/python/dropbox_sign/models/template_create_response.py index a4696160c..e63da6bb1 100644 --- a/sdks/python/dropbox_sign/models/template_create_response.py +++ b/sdks/python/dropbox_sign/models/template_create_response.py @@ -47,15 +47,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 325555d2b..3e5654934 100644 --- a/sdks/python/dropbox_sign/models/template_create_response_template.py +++ b/sdks/python/dropbox_sign/models/template_create_response_template.py @@ -44,15 +44,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data diff --git a/sdks/python/dropbox_sign/models/template_edit_response.py b/sdks/python/dropbox_sign/models/template_edit_response.py index 98c626014..b14e9b187 100644 --- a/sdks/python/dropbox_sign/models/template_edit_response.py +++ b/sdks/python/dropbox_sign/models/template_edit_response.py @@ -44,15 +44,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data diff --git a/sdks/python/dropbox_sign/models/template_get_response.py b/sdks/python/dropbox_sign/models/template_get_response.py index f049a0d7f..78a371681 100644 --- a/sdks/python/dropbox_sign/models/template_get_response.py +++ b/sdks/python/dropbox_sign/models/template_get_response.py @@ -47,15 +47,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data diff --git a/sdks/python/dropbox_sign/models/template_list_response.py b/sdks/python/dropbox_sign/models/template_list_response.py index 5e868c4fc..367d4a922 100644 --- a/sdks/python/dropbox_sign/models/template_list_response.py +++ b/sdks/python/dropbox_sign/models/template_list_response.py @@ -49,15 +49,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 16c32f13b..56afa5af1 100644 --- a/sdks/python/dropbox_sign/models/template_remove_user_request.py +++ b/sdks/python/dropbox_sign/models/template_remove_user_request.py @@ -45,15 +45,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data diff --git a/sdks/python/dropbox_sign/models/template_response.py b/sdks/python/dropbox_sign/models/template_response.py index 73c6be6ff..fbd571886 100644 --- a/sdks/python/dropbox_sign/models/template_response.py +++ b/sdks/python/dropbox_sign/models/template_response.py @@ -64,15 +64,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data diff --git a/sdks/python/dropbox_sign/models/template_response_account.py b/sdks/python/dropbox_sign/models/template_response_account.py index 52db37b69..c7433cdfe 100644 --- a/sdks/python/dropbox_sign/models/template_response_account.py +++ b/sdks/python/dropbox_sign/models/template_response_account.py @@ -50,15 +50,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 a4ec4ac4f..cbfba5ea1 100644 --- a/sdks/python/dropbox_sign/models/template_response_account_quota.py +++ b/sdks/python/dropbox_sign/models/template_response_account_quota.py @@ -47,15 +47,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 5743054d3..5ecd26320 100644 --- a/sdks/python/dropbox_sign/models/template_response_cc_role.py +++ b/sdks/python/dropbox_sign/models/template_response_cc_role.py @@ -44,15 +44,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data diff --git a/sdks/python/dropbox_sign/models/template_response_document.py b/sdks/python/dropbox_sign/models/template_response_document.py index e2fe35d60..c2c602254 100644 --- a/sdks/python/dropbox_sign/models/template_response_document.py +++ b/sdks/python/dropbox_sign/models/template_response_document.py @@ -53,15 +53,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 6f1d397f4..40ac4f6ef 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 @@ -76,15 +76,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 164a22b98..08c47dff5 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 @@ -45,15 +45,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 f75b97f51..2395afd0b 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 @@ -50,15 +50,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 a52712a1b..0d07b2588 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 @@ -46,15 +46,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 f3539c6a6..2b331e6cc 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 @@ -45,15 +45,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 d712a1388..c2b573867 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 @@ -82,15 +82,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 24406c657..9fb275bb8 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 @@ -45,15 +45,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 0a6c98504..a3279e9b3 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 @@ -45,15 +45,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 b0cb05c1c..3318790fe 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 @@ -45,15 +45,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 44c8a7841..e9fb0be6e 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 @@ -50,15 +50,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 fb6526a7b..f51b01c1c 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 @@ -45,15 +45,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 cef02346a..fd0e4c73e 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 @@ -45,15 +45,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 fd884c7a9..f2862e52b 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 @@ -45,15 +45,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 2d00971e5..9666c4946 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 @@ -61,15 +61,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 36ff5debf..266985ee4 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 @@ -82,15 +82,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 a1aefd826..3af7e2e83 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 @@ -45,15 +45,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 f471825c4..9c3ad86ae 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 @@ -45,15 +45,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 7272a1d87..1ef1988c0 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 @@ -45,15 +45,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 88f03f93f..2b773aea9 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 @@ -45,15 +45,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 f937e2852..3819dc91a 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 @@ -45,15 +45,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 38faa07b3..b3351376f 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 @@ -45,15 +45,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 8a654cb37..e74d7b148 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 @@ -45,15 +45,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 7ec04d852..58749c297 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 @@ -45,15 +45,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 87293fa60..b835362a2 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 @@ -45,15 +45,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 56124662c..f15ec1964 100644 --- a/sdks/python/dropbox_sign/models/template_response_signer_role.py +++ b/sdks/python/dropbox_sign/models/template_response_signer_role.py @@ -45,15 +45,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 678d8699f..c8348b4a2 100644 --- a/sdks/python/dropbox_sign/models/template_update_files_request.py +++ b/sdks/python/dropbox_sign/models/template_update_files_request.py @@ -50,15 +50,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 bebade717..9aef5b5e1 100644 --- a/sdks/python/dropbox_sign/models/template_update_files_response.py +++ b/sdks/python/dropbox_sign/models/template_update_files_response.py @@ -45,15 +45,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 f3dfabaf2..e2c5c5281 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 @@ -46,15 +46,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 238c353e7..8ca4b45ab 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 @@ -99,15 +99,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 92370d31a..ab3753602 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 @@ -80,15 +80,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 dfbc3b61b..aada57194 100644 --- a/sdks/python/dropbox_sign/models/unclaimed_draft_create_request.py +++ b/sdks/python/dropbox_sign/models/unclaimed_draft_create_request.py @@ -83,15 +83,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 f605b59bb..c749665f1 100644 --- a/sdks/python/dropbox_sign/models/unclaimed_draft_create_response.py +++ b/sdks/python/dropbox_sign/models/unclaimed_draft_create_response.py @@ -47,15 +47,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data 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 3a08e0504..cce251393 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 @@ -52,15 +52,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data diff --git a/sdks/python/dropbox_sign/models/unclaimed_draft_response.py b/sdks/python/dropbox_sign/models/unclaimed_draft_response.py index 5943a5bc9..ebde856d0 100644 --- a/sdks/python/dropbox_sign/models/unclaimed_draft_response.py +++ b/sdks/python/dropbox_sign/models/unclaimed_draft_response.py @@ -49,15 +49,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data diff --git a/sdks/python/dropbox_sign/models/warning_response.py b/sdks/python/dropbox_sign/models/warning_response.py index c1247355e..5138093ec 100644 --- a/sdks/python/dropbox_sign/models/warning_response.py +++ b/sdks/python/dropbox_sign/models/warning_response.py @@ -45,15 +45,19 @@ def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) - def to_json(self, excluded_fields: Set[str] = None) -> str: + def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) + # 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]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data diff --git a/sdks/python/templates/model_generic.mustache b/sdks/python/templates/model_generic.mustache index 5f621f8ad..0a44c414a 100644 --- a/sdks/python/templates/model_generic.mustache +++ b/sdks/python/templates/model_generic.mustache @@ -135,22 +135,20 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}} """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) -{{^useCustomTemplateCode}} def to_json(self) -> str: """Returns the JSON representation of the model using alias""" # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) -{{/useCustomTemplateCode}} {{#useCustomTemplateCode}} - def to_json(self, excluded_fields: Set[str] = None) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict(excluded_fields)) 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(): - data.append((key, json.dumps(value))) + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) return data {{/useCustomTemplateCode}} diff --git a/sdks/python/tests/test_api_app_api.py b/sdks/python/tests/test_api_app_api.py index 46d76f27c..58b4ecee3 100644 --- a/sdks/python/tests/test_api_app_api.py +++ b/sdks/python/tests/test_api_app_api.py @@ -23,7 +23,8 @@ def test_api_app_create(self): self.mock_pool.expect_request( content_type='multipart/form-data', data=request_data, - response=response_data + response=response_data, + status=201, ) obj = m.ApiAppCreateRequest.init(request_data) diff --git a/sdks/python/tests/test_signature_request_api.py b/sdks/python/tests/test_signature_request_api.py index 1146f3580..b4b8b0310 100644 --- a/sdks/python/tests/test_signature_request_api.py +++ b/sdks/python/tests/test_signature_request_api.py @@ -39,7 +39,6 @@ def test_init_allows_binary_file(self): "required": True, "signer": "0", "page": 1, - "placeholder": "My placeholder value", } ], "files": [open(get_base_path() + "/../test_fixtures/pdf-sample.pdf", "rb")] @@ -67,7 +66,6 @@ def test_init_allows_binary_file(self): 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]["placeholder"], obj.form_fields_per_document[0].placeholder) self.assertEqual(data["files"][0], obj.files[0]) @@ -105,9 +103,9 @@ def test_init_allows_jsony_chars_in_strings(self): fields = self.mock_pool.get_fields() - title_result = fields[1] - subject_result = fields[2] - message_result = fields[3] + title_result = fields[9] + subject_result = fields[7] + message_result = fields[6] self.assertEqual(title_result[1], title) self.assertEqual(subject_result[1], subject) @@ -254,7 +252,7 @@ def test_signature_request_list_null_query_value_removed(self): self.api.signature_request_list(account_id=account_id) - request_fields = self.mock_pool.get_fields() + request_fields = self.mock_pool.get_query_params() self.assertTrue(not request_fields) account_id = None @@ -267,7 +265,7 @@ def test_signature_request_list_null_query_value_removed(self): self.api.signature_request_list(account_id=account_id, query=query) - request_fields = self.mock_pool.get_fields() + request_fields = self.mock_pool.get_query_params() self.assertTrue(not request_fields) account_id = 'ABC123' @@ -280,11 +278,11 @@ def test_signature_request_list_null_query_value_removed(self): self.api.signature_request_list(account_id=account_id, query=query) - request_fields = self.mock_pool.get_fields() - expected_fields = [ - ('account_id', account_id), - ] - self.assertTrue(expected_fields == request_fields) + request_fields = self.mock_pool.get_query_params() + expected_fields = { + 'account_id': [account_id], + } + self.assertEqual(expected_fields, request_fields) account_id = 'ABC123' query = 'My amazing query' @@ -296,12 +294,12 @@ def test_signature_request_list_null_query_value_removed(self): self.api.signature_request_list(account_id=account_id, query=query) - request_fields = self.mock_pool.get_fields() - expected_fields = [ - ('account_id', account_id), - ('query', query), - ] - self.assertTrue(expected_fields == request_fields) + request_fields = self.mock_pool.get_query_params() + expected_fields = { + 'account_id': [account_id], + 'query': [query], + } + self.assertEqual(expected_fields, request_fields) def test_signature_request_release_hold(self): signature_request_id = 'fa5c8a0b0f492d768749333ad6fcc214c111e967' diff --git a/sdks/python/tests/test_team_api.py b/sdks/python/tests/test_team_api.py index 0701770ec..f0a8a8cbc 100644 --- a/sdks/python/tests/test_team_api.py +++ b/sdks/python/tests/test_team_api.py @@ -101,7 +101,8 @@ def test_team_remove_member(self): self.mock_pool.expect_request( content_type='application/json', data=request_data, - response=response_data + response=response_data, + status=201, ) expected = m.TeamGetResponse.init(response_data) obj = m.TeamRemoveMemberRequest.init(request_data) diff --git a/sdks/python/tests/test_utils.py b/sdks/python/tests/test_utils.py index 18e70a279..952c7e40d 100644 --- a/sdks/python/tests/test_utils.py +++ b/sdks/python/tests/test_utils.py @@ -1,6 +1,8 @@ import os import json import urllib3 +from urllib.parse import urlparse +from urllib.parse import parse_qs def get_base_path(): @@ -23,6 +25,7 @@ def __init__(self, tc): self._expected_request = {} self._expected_response = {} self._request_fields = [] + self._query_params = {} def expect_request(self, content_type, data=None, response=None, status=200): self._expected_request = { @@ -44,6 +47,8 @@ def request(self, *args, **kwargs): 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'], preload_content=True, @@ -52,3 +57,6 @@ def request(self, *args, **kwargs): def get_fields(self): return self._request_fields + + def get_query_params(self): + return self._query_params From 594a7f756c18acc7800bbf4cf561522d5cd2dcdd Mon Sep 17 00:00:00 2001 From: Juan Treminio Date: Tue, 3 Sep 2024 18:25:37 -0500 Subject: [PATCH 08/10] Version bump --- sdks/python/README.md | 4 ++-- sdks/python/VERSION | 2 +- sdks/python/dropbox_sign/__init__.py | 2 +- sdks/python/dropbox_sign/api_client.py | 2 +- sdks/python/dropbox_sign/configuration.py | 2 +- sdks/python/openapi-config.yaml | 2 +- sdks/python/pyproject.toml | 2 +- sdks/python/setup.py | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sdks/python/README.md b/sdks/python/README.md index b14d4a9b8..8d7552d8c 100644 --- a/sdks/python/README.md +++ b/sdks/python/README.md @@ -49,7 +49,7 @@ Python 3.7+ Install using `pip`: ```shell -python3 -m pip install dropbox-sign==1.5-dev +python3 -m pip install dropbox-sign==1.6-dev ``` Alternatively: @@ -383,6 +383,6 @@ apisupport@hellosign.com This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: 3.0.0 -- Package version: 1.5-dev +- Package version: 1.6-dev - Build package: org.openapitools.codegen.languages.PythonClientCodegen diff --git a/sdks/python/VERSION b/sdks/python/VERSION index 6f3dd2f48..78ca9a102 100644 --- a/sdks/python/VERSION +++ b/sdks/python/VERSION @@ -1 +1 @@ -1.5-dev +1.6-dev diff --git a/sdks/python/dropbox_sign/__init__.py b/sdks/python/dropbox_sign/__init__.py index 306055dd0..c8eb4dc5d 100644 --- a/sdks/python/dropbox_sign/__init__.py +++ b/sdks/python/dropbox_sign/__init__.py @@ -15,7 +15,7 @@ """ # noqa: E501 -__version__ = "1.5-dev" +__version__ = "1.6-dev" # import apis into sdk package from dropbox_sign.apis import * diff --git a/sdks/python/dropbox_sign/api_client.py b/sdks/python/dropbox_sign/api_client.py index 95d097009..9916d6995 100644 --- a/sdks/python/dropbox_sign/api_client.py +++ b/sdks/python/dropbox_sign/api_client.py @@ -92,7 +92,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/1.5-dev/python' + self.user_agent = 'OpenAPI-Generator/1.6-dev/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/sdks/python/dropbox_sign/configuration.py b/sdks/python/dropbox_sign/configuration.py index 895999db1..4041cb85a 100644 --- a/sdks/python/dropbox_sign/configuration.py +++ b/sdks/python/dropbox_sign/configuration.py @@ -416,7 +416,7 @@ def to_debug_report(self): "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: 3.0.0\n"\ - "SDK Package Version: 1.5-dev".\ + "SDK Package Version: 1.6-dev".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/sdks/python/openapi-config.yaml b/sdks/python/openapi-config.yaml index 83a8432fa..348a1f82f 100644 --- a/sdks/python/openapi-config.yaml +++ b/sdks/python/openapi-config.yaml @@ -5,7 +5,7 @@ additionalProperties: generatorLanguageVersion: ">=3.7" packageName: dropbox_sign projectName: dropbox-sign - packageVersion: 1.5-dev + packageVersion: 1.6-dev sortModelPropertiesByRequiredFlag: true legacyDiscriminatorBehavior: true packageAuthor: Dropbox Sign API Team diff --git a/sdks/python/pyproject.toml b/sdks/python/pyproject.toml index ca9a949e1..6eefc3900 100644 --- a/sdks/python/pyproject.toml +++ b/sdks/python/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "dropbox_sign" -version = "1.5-dev" +version = "1.6-dev" description = "Dropbox Sign API" authors = ["Official Python SDK for the Dropbox Sign API "] license = "MIT" diff --git a/sdks/python/setup.py b/sdks/python/setup.py index bb30cc9e4..7d3d8d385 100644 --- a/sdks/python/setup.py +++ b/sdks/python/setup.py @@ -23,7 +23,7 @@ # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools NAME = "dropbox-sign" -VERSION = "1.5-dev" +VERSION = "1.6-dev" PYTHON_REQUIRES = ">=3.7" REQUIRES = [ "urllib3 >= 1.25.3, < 2.1.0", From 75664bcfbad1138d365eb1cf2d8cdb033179c234 Mon Sep 17 00:00:00 2001 From: Juan Treminio Date: Tue, 3 Sep 2024 19:19:26 -0500 Subject: [PATCH 09/10] Initial integrations test; fix for int|string|none --- openapi-raw.yaml | 3 ++ openapi-sdk.yaml | 3 ++ openapi.yaml | 3 ++ sandbox/python/tests/.config.dist.json | 6 +++ sandbox/python/tests/.gitignore | 1 + .../python/tests/test_signature_request.py | 51 +++++++++++++++++++ .../models/account_create_request.py | 1 + .../models/account_create_response.py | 1 + .../models/account_get_response.py | 1 + .../dropbox_sign/models/account_response.py | 1 + .../models/account_response_quotas.py | 1 + .../models/account_response_usage.py | 1 + .../models/account_update_request.py | 1 + .../models/account_verify_request.py | 1 + .../models/account_verify_response.py | 1 + .../models/account_verify_response_account.py | 1 + .../models/api_app_create_request.py | 1 + .../models/api_app_get_response.py | 1 + .../models/api_app_list_response.py | 1 + .../dropbox_sign/models/api_app_response.py | 1 + .../models/api_app_response_o_auth.py | 1 + .../models/api_app_response_options.py | 1 + .../models/api_app_response_owner_account.py | 1 + ...api_app_response_white_labeling_options.py | 1 + .../models/api_app_update_request.py | 1 + .../models/bulk_send_job_get_response.py | 1 + ...end_job_get_response_signature_requests.py | 1 + .../models/bulk_send_job_list_response.py | 1 + .../models/bulk_send_job_response.py | 1 + .../models/bulk_send_job_send_response.py | 1 + .../models/embedded_edit_url_request.py | 1 + .../models/embedded_edit_url_response.py | 1 + .../embedded_edit_url_response_embedded.py | 1 + .../models/embedded_sign_url_response.py | 1 + .../embedded_sign_url_response_embedded.py | 1 + .../dropbox_sign/models/error_response.py | 1 + .../models/error_response_error.py | 1 + .../models/event_callback_request.py | 1 + .../models/event_callback_request_event.py | 1 + .../event_callback_request_event_metadata.py | 1 + .../models/fax_line_add_user_request.py | 1 + .../models/fax_line_area_code_get_response.py | 1 + .../models/fax_line_create_request.py | 1 + .../models/fax_line_delete_request.py | 1 + .../models/fax_line_list_response.py | 1 + .../models/fax_line_remove_user_request.py | 1 + .../dropbox_sign/models/fax_line_response.py | 1 + .../models/fax_line_response_fax_line.py | 1 + .../dropbox_sign/models/file_response.py | 1 + .../models/file_response_data_uri.py | 1 + .../dropbox_sign/models/list_info_response.py | 1 + .../models/o_auth_token_generate_request.py | 1 + .../models/o_auth_token_refresh_request.py | 1 + .../models/o_auth_token_response.py | 1 + .../models/report_create_request.py | 1 + .../models/report_create_response.py | 1 + .../dropbox_sign/models/report_response.py | 1 + ...k_create_embedded_with_template_request.py | 1 + ...request_bulk_send_with_template_request.py | 1 + ...gnature_request_create_embedded_request.py | 1 + ...t_create_embedded_with_template_request.py | 1 + .../models/signature_request_get_response.py | 1 + .../models/signature_request_list_response.py | 1 + .../signature_request_remind_request.py | 1 + .../models/signature_request_response.py | 1 + .../signature_request_response_attachment.py | 5 +- ...ture_request_response_custom_field_base.py | 1 + ..._request_response_custom_field_checkbox.py | 1 + ...ture_request_response_custom_field_text.py | 1 + .../signature_request_response_data_base.py | 1 + ...re_request_response_data_value_checkbox.py | 1 + ...uest_response_data_value_checkbox_merge.py | 1 + ...request_response_data_value_date_signed.py | 1 + ...re_request_response_data_value_dropdown.py | 1 + ...re_request_response_data_value_initials.py | 1 + ...ature_request_response_data_value_radio.py | 1 + ...e_request_response_data_value_signature.py | 1 + ...nature_request_response_data_value_text.py | 1 + ..._request_response_data_value_text_merge.py | 1 + .../signature_request_response_signatures.py | 1 + .../models/signature_request_send_request.py | 1 + ...ture_request_send_with_template_request.py | 1 + .../signature_request_update_request.py | 1 + .../dropbox_sign/models/sub_attachment.py | 1 + .../models/sub_bulk_signer_list.py | 1 + .../sub_bulk_signer_list_custom_field.py | 1 + sdks/python/dropbox_sign/models/sub_cc.py | 1 + .../dropbox_sign/models/sub_custom_field.py | 1 + .../dropbox_sign/models/sub_editor_options.py | 1 + .../dropbox_sign/models/sub_field_options.py | 1 + .../models/sub_form_field_group.py | 1 + .../models/sub_form_field_rule.py | 1 + .../models/sub_form_field_rule_action.py | 1 + .../models/sub_form_field_rule_trigger.py | 1 + .../sub_form_fields_per_document_base.py | 1 + .../sub_form_fields_per_document_checkbox.py | 1 + ...form_fields_per_document_checkbox_merge.py | 1 + ...ub_form_fields_per_document_date_signed.py | 1 + .../sub_form_fields_per_document_dropdown.py | 1 + .../sub_form_fields_per_document_hyperlink.py | 1 + .../sub_form_fields_per_document_initials.py | 1 + .../sub_form_fields_per_document_radio.py | 1 + .../sub_form_fields_per_document_signature.py | 1 + .../sub_form_fields_per_document_text.py | 1 + ...sub_form_fields_per_document_text_merge.py | 1 + .../dropbox_sign/models/sub_merge_field.py | 1 + sdks/python/dropbox_sign/models/sub_o_auth.py | 1 + .../python/dropbox_sign/models/sub_options.py | 1 + .../sub_signature_request_grouped_signers.py | 1 + .../models/sub_signature_request_signer.py | 1 + .../sub_signature_request_template_signer.py | 1 + .../models/sub_signing_options.py | 1 + .../dropbox_sign/models/sub_team_response.py | 1 + .../dropbox_sign/models/sub_template_role.py | 1 + .../models/sub_unclaimed_draft_signer.py | 1 + .../sub_unclaimed_draft_template_signer.py | 1 + .../models/sub_white_labeling_options.py | 1 + .../models/team_add_member_request.py | 1 + .../models/team_create_request.py | 1 + .../models/team_get_info_response.py | 1 + .../dropbox_sign/models/team_get_response.py | 1 + .../dropbox_sign/models/team_info_response.py | 1 + .../models/team_invite_response.py | 1 + .../models/team_invites_response.py | 1 + .../models/team_member_response.py | 1 + .../models/team_members_response.py | 1 + .../models/team_parent_response.py | 1 + .../models/team_remove_member_request.py | 1 + .../dropbox_sign/models/team_response.py | 1 + .../models/team_sub_teams_response.py | 1 + .../models/team_update_request.py | 1 + .../models/template_add_user_request.py | 1 + .../template_create_embedded_draft_request.py | 1 + ...template_create_embedded_draft_response.py | 1 + ...create_embedded_draft_response_template.py | 1 + .../models/template_create_request.py | 1 + .../models/template_create_response.py | 1 + .../template_create_response_template.py | 1 + .../models/template_edit_response.py | 1 + .../models/template_get_response.py | 1 + .../models/template_list_response.py | 1 + .../models/template_remove_user_request.py | 1 + .../dropbox_sign/models/template_response.py | 1 + .../models/template_response_account.py | 1 + .../models/template_response_account_quota.py | 1 + .../models/template_response_cc_role.py | 1 + .../models/template_response_document.py | 1 + ...ate_response_document_custom_field_base.py | 5 +- ...response_document_custom_field_checkbox.py | 3 +- ...ate_response_document_custom_field_text.py | 3 +- .../template_response_document_field_group.py | 1 + ...late_response_document_field_group_rule.py | 1 + ...plate_response_document_form_field_base.py | 5 +- ...e_response_document_form_field_checkbox.py | 3 +- ...esponse_document_form_field_date_signed.py | 3 +- ...e_response_document_form_field_dropdown.py | 3 +- ..._response_document_form_field_hyperlink.py | 3 +- ...e_response_document_form_field_initials.py | 3 +- ...late_response_document_form_field_radio.py | 3 +- ..._response_document_form_field_signature.py | 3 +- ...plate_response_document_form_field_text.py | 3 +- ...ate_response_document_static_field_base.py | 1 + ...response_document_static_field_checkbox.py | 1 + ...ponse_document_static_field_date_signed.py | 1 + ...response_document_static_field_dropdown.py | 1 + ...esponse_document_static_field_hyperlink.py | 1 + ...response_document_static_field_initials.py | 1 + ...te_response_document_static_field_radio.py | 1 + ...esponse_document_static_field_signature.py | 1 + ...ate_response_document_static_field_text.py | 1 + ...template_response_field_avg_text_length.py | 1 + .../models/template_response_signer_role.py | 1 + .../models/template_update_files_request.py | 1 + .../models/template_update_files_response.py | 1 + ...template_update_files_response_template.py | 1 + ...unclaimed_draft_create_embedded_request.py | 1 + ...t_create_embedded_with_template_request.py | 1 + .../models/unclaimed_draft_create_request.py | 1 + .../models/unclaimed_draft_create_response.py | 1 + ...unclaimed_draft_edit_and_resend_request.py | 1 + .../models/unclaimed_draft_response.py | 1 + .../dropbox_sign/models/warning_response.py | 1 + sdks/python/templates/model_generic.mustache | 3 +- 183 files changed, 261 insertions(+), 17 deletions(-) create mode 100644 sandbox/python/tests/.config.dist.json create mode 100644 sandbox/python/tests/.gitignore create mode 100644 sandbox/python/tests/test_signature_request.py diff --git a/openapi-raw.yaml b/openapi-raw.yaml index 340eca1ed..7f4f5d86d 100644 --- a/openapi-raw.yaml +++ b/openapi-raw.yaml @@ -10114,6 +10114,7 @@ components: signer: description: '_t__SignatureRequestResponseAttachment::SIGNER' type: string + x-int-or-string: true name: description: '_t__SignatureRequestResponseAttachment::NAME' type: string @@ -10736,6 +10737,7 @@ components: description: '_t__TemplateResponseDocumentCustomField::SIGNER' type: string nullable: true + x-int-or-string: true x: description: '_t__TemplateResponseDocumentCustomField::X' type: integer @@ -10838,6 +10840,7 @@ components: signer: description: '_t__TemplateResponseDocumentFormField::SIGNER' type: string + x-int-or-string: true x: description: '_t__TemplateResponseDocumentFormField::X' type: integer diff --git a/openapi-sdk.yaml b/openapi-sdk.yaml index 342ab7631..ddbf4df34 100644 --- a/openapi-sdk.yaml +++ b/openapi-sdk.yaml @@ -10726,6 +10726,7 @@ components: signer: description: 'The Signer this attachment is assigned to.' type: string + x-int-or-string: true name: description: 'The name of this attachment.' type: string @@ -11355,6 +11356,7 @@ components: description: 'The signer of the Custom Field. Can be `null` if field is a merge field (assigned to Sender).' type: string nullable: true + x-int-or-string: true x: description: 'The horizontal offset in pixels for this form field.' type: integer @@ -11470,6 +11472,7 @@ components: signer: description: 'The signer of the Form Field.' type: string + x-int-or-string: true x: description: 'The horizontal offset in pixels for this form field.' type: integer diff --git a/openapi.yaml b/openapi.yaml index 8a8f9f08f..385f6fbb2 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -10704,6 +10704,7 @@ components: signer: description: 'The Signer this attachment is assigned to.' type: string + x-int-or-string: true name: description: 'The name of this attachment.' type: string @@ -11333,6 +11334,7 @@ components: description: 'The signer of the Custom Field. Can be `null` if field is a merge field (assigned to Sender).' type: string nullable: true + x-int-or-string: true x: description: 'The horizontal offset in pixels for this form field.' type: integer @@ -11448,6 +11450,7 @@ components: signer: description: 'The signer of the Form Field.' type: string + x-int-or-string: true x: description: 'The horizontal offset in pixels for this form field.' type: integer diff --git a/sandbox/python/tests/.config.dist.json b/sandbox/python/tests/.config.dist.json new file mode 100644 index 000000000..601c6a5f9 --- /dev/null +++ b/sandbox/python/tests/.config.dist.json @@ -0,0 +1,6 @@ +{ + "BASE_URL": "https://api.hellosign.com/v3", + "API_KEY": "", + "CLIENT_ID": "", + "USE_XDEBUG": 0 +} diff --git a/sandbox/python/tests/.gitignore b/sandbox/python/tests/.gitignore new file mode 100644 index 000000000..a9b8cc8b8 --- /dev/null +++ b/sandbox/python/tests/.gitignore @@ -0,0 +1 @@ +.config.json diff --git a/sandbox/python/tests/test_signature_request.py b/sandbox/python/tests/test_signature_request.py new file mode 100644 index 000000000..c12b90cf0 --- /dev/null +++ b/sandbox/python/tests/test_signature_request.py @@ -0,0 +1,51 @@ +import json +import os +import unittest + +from dropbox_sign import ApiClient, Configuration, apis, models + + +class TestSignatureRequest(unittest.TestCase): + def setUp(self): + self.base_path = os.path.dirname(os.path.abspath(__file__)) + "/.." + config_merged = self.get_config() + + self.configuration = Configuration( + username=config_merged["API_KEY"], + host=config_merged["BASE_URL"], + ) + + def get_config(self): + file = open(f'{self.base_path}/tests/.config.dist.json', 'r') + config_dist = json.load(file) + file.close() + + file = open(f'{self.base_path}/tests/.config.json', 'r') + config_custom = json.load(file) + file.close() + + config_dist.update(config_custom) + + return config_dist + + def test_send(self): + api_client = ApiClient(self.configuration) + signature_request_api = apis.SignatureRequestApi(api_client) + + file = open(f'{self.base_path}/test_fixtures/SignatureRequestSendRequest.json', 'r') + data = json.load(file) + file.close() + + send_request = models.SignatureRequestSendRequest.init(data) + send_request.files = [open(f'{self.base_path}/test_fixtures/pdf-sample.pdf', 'rb')] + + send_response = signature_request_api.signature_request_send(send_request) + + self.assertEqual( + send_request.form_fields_per_document[0].api_id, + send_response.signature_request.custom_fields[0].api_id, + ) + + +if __name__ == '__main__': + unittest.main() diff --git a/sdks/python/dropbox_sign/models/account_create_request.py b/sdks/python/dropbox_sign/models/account_create_request.py index 7e58df82a..698d4ba18 100644 --- a/sdks/python/dropbox_sign/models/account_create_request.py +++ b/sdks/python/dropbox_sign/models/account_create_request.py @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class AccountCreateRequest(BaseModel): """ diff --git a/sdks/python/dropbox_sign/models/account_create_response.py b/sdks/python/dropbox_sign/models/account_create_response.py index 8ebd5c8d7..2e275fa40 100644 --- a/sdks/python/dropbox_sign/models/account_create_response.py +++ b/sdks/python/dropbox_sign/models/account_create_response.py @@ -27,6 +27,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class AccountCreateResponse(BaseModel): """ diff --git a/sdks/python/dropbox_sign/models/account_get_response.py b/sdks/python/dropbox_sign/models/account_get_response.py index a0d99561c..7c5ab9483 100644 --- a/sdks/python/dropbox_sign/models/account_get_response.py +++ b/sdks/python/dropbox_sign/models/account_get_response.py @@ -26,6 +26,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class AccountGetResponse(BaseModel): """ diff --git a/sdks/python/dropbox_sign/models/account_response.py b/sdks/python/dropbox_sign/models/account_response.py index 1f1ce926a..48fc371ac 100644 --- a/sdks/python/dropbox_sign/models/account_response.py +++ b/sdks/python/dropbox_sign/models/account_response.py @@ -26,6 +26,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class AccountResponse(BaseModel): """ diff --git a/sdks/python/dropbox_sign/models/account_response_quotas.py b/sdks/python/dropbox_sign/models/account_response_quotas.py index fcdac4935..b67e442bb 100644 --- a/sdks/python/dropbox_sign/models/account_response_quotas.py +++ b/sdks/python/dropbox_sign/models/account_response_quotas.py @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class AccountResponseQuotas(BaseModel): """ diff --git a/sdks/python/dropbox_sign/models/account_response_usage.py b/sdks/python/dropbox_sign/models/account_response_usage.py index 59eab6105..72bf13210 100644 --- a/sdks/python/dropbox_sign/models/account_response_usage.py +++ b/sdks/python/dropbox_sign/models/account_response_usage.py @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class AccountResponseUsage(BaseModel): """ diff --git a/sdks/python/dropbox_sign/models/account_update_request.py b/sdks/python/dropbox_sign/models/account_update_request.py index c3c5a7256..4165071bb 100644 --- a/sdks/python/dropbox_sign/models/account_update_request.py +++ b/sdks/python/dropbox_sign/models/account_update_request.py @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class AccountUpdateRequest(BaseModel): """ diff --git a/sdks/python/dropbox_sign/models/account_verify_request.py b/sdks/python/dropbox_sign/models/account_verify_request.py index 34614362c..5d018cd3c 100644 --- a/sdks/python/dropbox_sign/models/account_verify_request.py +++ b/sdks/python/dropbox_sign/models/account_verify_request.py @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class AccountVerifyRequest(BaseModel): """ diff --git a/sdks/python/dropbox_sign/models/account_verify_response.py b/sdks/python/dropbox_sign/models/account_verify_response.py index 974c07b33..7c3e5ccd2 100644 --- a/sdks/python/dropbox_sign/models/account_verify_response.py +++ b/sdks/python/dropbox_sign/models/account_verify_response.py @@ -26,6 +26,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class AccountVerifyResponse(BaseModel): """ 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 f934f77c4..112abc2cd 100644 --- a/sdks/python/dropbox_sign/models/account_verify_response_account.py +++ b/sdks/python/dropbox_sign/models/account_verify_response_account.py @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class AccountVerifyResponseAccount(BaseModel): """ 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 416b25dba..e9319cc9c 100644 --- a/sdks/python/dropbox_sign/models/api_app_create_request.py +++ b/sdks/python/dropbox_sign/models/api_app_create_request.py @@ -28,6 +28,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class ApiAppCreateRequest(BaseModel): """ 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 fb3b9dc91..c45a27eeb 100644 --- a/sdks/python/dropbox_sign/models/api_app_get_response.py +++ b/sdks/python/dropbox_sign/models/api_app_get_response.py @@ -26,6 +26,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class ApiAppGetResponse(BaseModel): """ 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 2b78c35f9..6de525ecf 100644 --- a/sdks/python/dropbox_sign/models/api_app_list_response.py +++ b/sdks/python/dropbox_sign/models/api_app_list_response.py @@ -27,6 +27,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class ApiAppListResponse(BaseModel): """ diff --git a/sdks/python/dropbox_sign/models/api_app_response.py b/sdks/python/dropbox_sign/models/api_app_response.py index bf44aff91..b45d59bb6 100644 --- a/sdks/python/dropbox_sign/models/api_app_response.py +++ b/sdks/python/dropbox_sign/models/api_app_response.py @@ -28,6 +28,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class ApiAppResponse(BaseModel): """ 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 8e8ee3fe2..554bb05bd 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 @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class ApiAppResponseOAuth(BaseModel): """ 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 0aa73691a..effa7a15d 100644 --- a/sdks/python/dropbox_sign/models/api_app_response_options.py +++ b/sdks/python/dropbox_sign/models/api_app_response_options.py @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class ApiAppResponseOptions(BaseModel): """ 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 f655b653b..325b6f72b 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 @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class ApiAppResponseOwnerAccount(BaseModel): """ 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 b38e8e4e6..7934751ed 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 @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class ApiAppResponseWhiteLabelingOptions(BaseModel): """ 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 9b342132f..649ad361a 100644 --- a/sdks/python/dropbox_sign/models/api_app_update_request.py +++ b/sdks/python/dropbox_sign/models/api_app_update_request.py @@ -28,6 +28,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class ApiAppUpdateRequest(BaseModel): """ 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 f9a336a1f..fce467f56 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 @@ -28,6 +28,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class BulkSendJobGetResponse(BaseModel): """ 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 1f62019b9..71bdd8157 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 @@ -28,6 +28,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class BulkSendJobGetResponseSignatureRequests(BaseModel): """ 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 92244da66..bc8575235 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 @@ -27,6 +27,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class BulkSendJobListResponse(BaseModel): """ 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 bfe427f12..164d399e5 100644 --- a/sdks/python/dropbox_sign/models/bulk_send_job_response.py +++ b/sdks/python/dropbox_sign/models/bulk_send_job_response.py @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class BulkSendJobResponse(BaseModel): """ 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 b17834089..227f361ea 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 @@ -26,6 +26,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class BulkSendJobSendResponse(BaseModel): """ 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 1f15bdeb9..4eadf9c9e 100644 --- a/sdks/python/dropbox_sign/models/embedded_edit_url_request.py +++ b/sdks/python/dropbox_sign/models/embedded_edit_url_request.py @@ -26,6 +26,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class EmbeddedEditUrlRequest(BaseModel): """ 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 b0fd24b35..eb96fc23b 100644 --- a/sdks/python/dropbox_sign/models/embedded_edit_url_response.py +++ b/sdks/python/dropbox_sign/models/embedded_edit_url_response.py @@ -26,6 +26,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class EmbeddedEditUrlResponse(BaseModel): """ 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 f07bf811e..74e23aa0c 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 @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class EmbeddedEditUrlResponseEmbedded(BaseModel): """ 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 2eaaea082..de2a26d11 100644 --- a/sdks/python/dropbox_sign/models/embedded_sign_url_response.py +++ b/sdks/python/dropbox_sign/models/embedded_sign_url_response.py @@ -26,6 +26,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class EmbeddedSignUrlResponse(BaseModel): """ 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 d11e70293..fd3eebaf2 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 @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class EmbeddedSignUrlResponseEmbedded(BaseModel): """ diff --git a/sdks/python/dropbox_sign/models/error_response.py b/sdks/python/dropbox_sign/models/error_response.py index 514e78812..adfda3ef1 100644 --- a/sdks/python/dropbox_sign/models/error_response.py +++ b/sdks/python/dropbox_sign/models/error_response.py @@ -25,6 +25,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class ErrorResponse(BaseModel): """ diff --git a/sdks/python/dropbox_sign/models/error_response_error.py b/sdks/python/dropbox_sign/models/error_response_error.py index d18f99ef5..d5bf7fc62 100644 --- a/sdks/python/dropbox_sign/models/error_response_error.py +++ b/sdks/python/dropbox_sign/models/error_response_error.py @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class ErrorResponseError(BaseModel): """ diff --git a/sdks/python/dropbox_sign/models/event_callback_request.py b/sdks/python/dropbox_sign/models/event_callback_request.py index 296065613..ad851fbd6 100644 --- a/sdks/python/dropbox_sign/models/event_callback_request.py +++ b/sdks/python/dropbox_sign/models/event_callback_request.py @@ -28,6 +28,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class EventCallbackRequest(BaseModel): """ 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 18626f914..ad57d9dc1 100644 --- a/sdks/python/dropbox_sign/models/event_callback_request_event.py +++ b/sdks/python/dropbox_sign/models/event_callback_request_event.py @@ -25,6 +25,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class EventCallbackRequestEvent(BaseModel): """ 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 ea5b71047..79a90dc3c 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 @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class EventCallbackRequestEventMetadata(BaseModel): """ 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 33195b8c1..9afd9eeeb 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 @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class FaxLineAddUserRequest(BaseModel): """ 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 d51260c76..d478f9773 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 @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class FaxLineAreaCodeGetResponse(BaseModel): """ 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 cc213900f..aa27a9bc6 100644 --- a/sdks/python/dropbox_sign/models/fax_line_create_request.py +++ b/sdks/python/dropbox_sign/models/fax_line_create_request.py @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class FaxLineCreateRequest(BaseModel): """ 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 f778c80f4..f52880d49 100644 --- a/sdks/python/dropbox_sign/models/fax_line_delete_request.py +++ b/sdks/python/dropbox_sign/models/fax_line_delete_request.py @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class FaxLineDeleteRequest(BaseModel): """ 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 db051e146..19f2f4eb5 100644 --- a/sdks/python/dropbox_sign/models/fax_line_list_response.py +++ b/sdks/python/dropbox_sign/models/fax_line_list_response.py @@ -27,6 +27,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class FaxLineListResponse(BaseModel): """ 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 a892189cc..e4c10045e 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 @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class FaxLineRemoveUserRequest(BaseModel): """ diff --git a/sdks/python/dropbox_sign/models/fax_line_response.py b/sdks/python/dropbox_sign/models/fax_line_response.py index 1b885502d..cd3c49ab2 100644 --- a/sdks/python/dropbox_sign/models/fax_line_response.py +++ b/sdks/python/dropbox_sign/models/fax_line_response.py @@ -26,6 +26,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class FaxLineResponse(BaseModel): """ 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 35e1d0f91..cedc50d83 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 @@ -25,6 +25,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class FaxLineResponseFaxLine(BaseModel): """ diff --git a/sdks/python/dropbox_sign/models/file_response.py b/sdks/python/dropbox_sign/models/file_response.py index 400ba6176..bea95b88d 100644 --- a/sdks/python/dropbox_sign/models/file_response.py +++ b/sdks/python/dropbox_sign/models/file_response.py @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class FileResponse(BaseModel): """ 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 0d004ed06..75ed1e880 100644 --- a/sdks/python/dropbox_sign/models/file_response_data_uri.py +++ b/sdks/python/dropbox_sign/models/file_response_data_uri.py @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class FileResponseDataUri(BaseModel): """ diff --git a/sdks/python/dropbox_sign/models/list_info_response.py b/sdks/python/dropbox_sign/models/list_info_response.py index 06c7885d7..816accbda 100644 --- a/sdks/python/dropbox_sign/models/list_info_response.py +++ b/sdks/python/dropbox_sign/models/list_info_response.py @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class ListInfoResponse(BaseModel): """ 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 c6e431f50..0f2f0ae78 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 @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class OAuthTokenGenerateRequest(BaseModel): """ 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 0d3b42121..7b4ee8b41 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 @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class OAuthTokenRefreshRequest(BaseModel): """ 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 603c5c5d3..6ababb429 100644 --- a/sdks/python/dropbox_sign/models/o_auth_token_response.py +++ b/sdks/python/dropbox_sign/models/o_auth_token_response.py @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class OAuthTokenResponse(BaseModel): """ diff --git a/sdks/python/dropbox_sign/models/report_create_request.py b/sdks/python/dropbox_sign/models/report_create_request.py index cca0f7fa6..3276ff25b 100644 --- a/sdks/python/dropbox_sign/models/report_create_request.py +++ b/sdks/python/dropbox_sign/models/report_create_request.py @@ -25,6 +25,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class ReportCreateRequest(BaseModel): """ diff --git a/sdks/python/dropbox_sign/models/report_create_response.py b/sdks/python/dropbox_sign/models/report_create_response.py index 4ca5c8671..e6e7f7b1b 100644 --- a/sdks/python/dropbox_sign/models/report_create_response.py +++ b/sdks/python/dropbox_sign/models/report_create_response.py @@ -26,6 +26,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class ReportCreateResponse(BaseModel): """ diff --git a/sdks/python/dropbox_sign/models/report_response.py b/sdks/python/dropbox_sign/models/report_response.py index 0c45dd868..b801a3021 100644 --- a/sdks/python/dropbox_sign/models/report_response.py +++ b/sdks/python/dropbox_sign/models/report_response.py @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class ReportResponse(BaseModel): """ 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 599e40bcc..f6be2bb63 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 @@ -28,6 +28,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class SignatureRequestBulkCreateEmbeddedWithTemplateRequest(BaseModel): """ 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 cf02265a9..4e4abf801 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 @@ -28,6 +28,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class SignatureRequestBulkSendWithTemplateRequest(BaseModel): """ 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 f7e074440..f4474c5c1 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 @@ -34,6 +34,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class SignatureRequestCreateEmbeddedRequest(BaseModel): """ 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 7712b58aa..d99187212 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 @@ -29,6 +29,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class SignatureRequestCreateEmbeddedWithTemplateRequest(BaseModel): """ 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 bd033d3e4..023839eb9 100644 --- a/sdks/python/dropbox_sign/models/signature_request_get_response.py +++ b/sdks/python/dropbox_sign/models/signature_request_get_response.py @@ -26,6 +26,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class SignatureRequestGetResponse(BaseModel): """ 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 569a1dae1..e9f17201d 100644 --- a/sdks/python/dropbox_sign/models/signature_request_list_response.py +++ b/sdks/python/dropbox_sign/models/signature_request_list_response.py @@ -27,6 +27,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class SignatureRequestListResponse(BaseModel): """ 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 e5e210206..5b7c9a27a 100644 --- a/sdks/python/dropbox_sign/models/signature_request_remind_request.py +++ b/sdks/python/dropbox_sign/models/signature_request_remind_request.py @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class SignatureRequestRemindRequest(BaseModel): """ diff --git a/sdks/python/dropbox_sign/models/signature_request_response.py b/sdks/python/dropbox_sign/models/signature_request_response.py index 09c937d56..08cf1cf26 100644 --- a/sdks/python/dropbox_sign/models/signature_request_response.py +++ b/sdks/python/dropbox_sign/models/signature_request_response.py @@ -28,6 +28,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class SignatureRequestResponse(BaseModel): """ 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 ea5218cf9..6c833fd3e 100644 --- a/sdks/python/dropbox_sign/models/signature_request_response_attachment.py +++ b/sdks/python/dropbox_sign/models/signature_request_response_attachment.py @@ -24,13 +24,14 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class SignatureRequestResponseAttachment(BaseModel): """ Signer attachments. """ # noqa: E501 id: StrictStr = Field(description="The unique ID for this attachment.") - signer: StrictStr = 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.") @@ -121,7 +122,7 @@ def init(cls, data: Any) -> Self: def openapi_types(cls) -> Dict[str, str]: return { "id": "(str,)", - "signer": "(str,)", + "signer": "(int, str,)", "name": "(str,)", "required": "(bool,)", "instructions": "(str,)", 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 da4cac722..4f320f394 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 @@ -25,6 +25,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union from typing import TYPE_CHECKING if TYPE_CHECKING: 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 e30d5ce49..e0ca67386 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 @@ -25,6 +25,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class SignatureRequestResponseCustomFieldCheckbox(SignatureRequestResponseCustomFieldBase): """ 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 977296b7b..7ee2fe800 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 @@ -25,6 +25,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class SignatureRequestResponseCustomFieldText(SignatureRequestResponseCustomFieldBase): """ 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 7c6e8f336..4e9f139f2 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 @@ -25,6 +25,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union from typing import TYPE_CHECKING if TYPE_CHECKING: 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 1ab2b5795..658f9179f 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 @@ -25,6 +25,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class SignatureRequestResponseDataValueCheckbox(SignatureRequestResponseDataBase): """ 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 bdae2e484..e391d75ba 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 @@ -25,6 +25,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class SignatureRequestResponseDataValueCheckboxMerge(SignatureRequestResponseDataBase): """ 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 4b7d1113c..e7508f97d 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 @@ -25,6 +25,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class SignatureRequestResponseDataValueDateSigned(SignatureRequestResponseDataBase): """ 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 3009269d8..bf79e05c0 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 @@ -25,6 +25,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class SignatureRequestResponseDataValueDropdown(SignatureRequestResponseDataBase): """ 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 d06d0b265..eb8b8ac2e 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 @@ -25,6 +25,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class SignatureRequestResponseDataValueInitials(SignatureRequestResponseDataBase): """ 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 c1e826e3a..8c7c734fd 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 @@ -25,6 +25,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class SignatureRequestResponseDataValueRadio(SignatureRequestResponseDataBase): """ 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 a1431daa7..589801d69 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 @@ -25,6 +25,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class SignatureRequestResponseDataValueSignature(SignatureRequestResponseDataBase): """ 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 95fc2f5ce..2bfb27d52 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 @@ -25,6 +25,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class SignatureRequestResponseDataValueText(SignatureRequestResponseDataBase): """ 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 628e24caa..518dc2c3e 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 @@ -25,6 +25,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class SignatureRequestResponseDataValueTextMerge(SignatureRequestResponseDataBase): """ 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 aebb969ef..da2db2e20 100644 --- a/sdks/python/dropbox_sign/models/signature_request_response_signatures.py +++ b/sdks/python/dropbox_sign/models/signature_request_response_signatures.py @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class SignatureRequestResponseSignatures(BaseModel): """ 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 236ef989d..a6744fa97 100644 --- a/sdks/python/dropbox_sign/models/signature_request_send_request.py +++ b/sdks/python/dropbox_sign/models/signature_request_send_request.py @@ -34,6 +34,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class SignatureRequestSendRequest(BaseModel): """ 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 e3f88ee3b..36e806aa0 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 @@ -29,6 +29,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class SignatureRequestSendWithTemplateRequest(BaseModel): """ 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 b8bfe6d3a..0f9b554b7 100644 --- a/sdks/python/dropbox_sign/models/signature_request_update_request.py +++ b/sdks/python/dropbox_sign/models/signature_request_update_request.py @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class SignatureRequestUpdateRequest(BaseModel): """ diff --git a/sdks/python/dropbox_sign/models/sub_attachment.py b/sdks/python/dropbox_sign/models/sub_attachment.py index 82d96bc5f..200c6a5ab 100644 --- a/sdks/python/dropbox_sign/models/sub_attachment.py +++ b/sdks/python/dropbox_sign/models/sub_attachment.py @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class SubAttachment(BaseModel): """ 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 78746924f..06991dbe2 100644 --- a/sdks/python/dropbox_sign/models/sub_bulk_signer_list.py +++ b/sdks/python/dropbox_sign/models/sub_bulk_signer_list.py @@ -26,6 +26,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class SubBulkSignerList(BaseModel): """ 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 f51fd8c3c..2a171a16e 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 @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class SubBulkSignerListCustomField(BaseModel): """ diff --git a/sdks/python/dropbox_sign/models/sub_cc.py b/sdks/python/dropbox_sign/models/sub_cc.py index 546028903..840897e19 100644 --- a/sdks/python/dropbox_sign/models/sub_cc.py +++ b/sdks/python/dropbox_sign/models/sub_cc.py @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class SubCC(BaseModel): """ diff --git a/sdks/python/dropbox_sign/models/sub_custom_field.py b/sdks/python/dropbox_sign/models/sub_custom_field.py index 8c7e419c7..ac22b9896 100644 --- a/sdks/python/dropbox_sign/models/sub_custom_field.py +++ b/sdks/python/dropbox_sign/models/sub_custom_field.py @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class SubCustomField(BaseModel): """ diff --git a/sdks/python/dropbox_sign/models/sub_editor_options.py b/sdks/python/dropbox_sign/models/sub_editor_options.py index 3e95a0da3..fbe6ecb95 100644 --- a/sdks/python/dropbox_sign/models/sub_editor_options.py +++ b/sdks/python/dropbox_sign/models/sub_editor_options.py @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class SubEditorOptions(BaseModel): """ diff --git a/sdks/python/dropbox_sign/models/sub_field_options.py b/sdks/python/dropbox_sign/models/sub_field_options.py index 412a0e899..15413583c 100644 --- a/sdks/python/dropbox_sign/models/sub_field_options.py +++ b/sdks/python/dropbox_sign/models/sub_field_options.py @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class SubFieldOptions(BaseModel): """ 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 341e974c5..ee3dcb964 100644 --- a/sdks/python/dropbox_sign/models/sub_form_field_group.py +++ b/sdks/python/dropbox_sign/models/sub_form_field_group.py @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class SubFormFieldGroup(BaseModel): """ 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 af3d60dfe..bd2680277 100644 --- a/sdks/python/dropbox_sign/models/sub_form_field_rule.py +++ b/sdks/python/dropbox_sign/models/sub_form_field_rule.py @@ -27,6 +27,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class SubFormFieldRule(BaseModel): """ 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 c9f051a83..b9deef4e4 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 @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class SubFormFieldRuleAction(BaseModel): """ 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 7723f860d..888fc01f5 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 @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class SubFormFieldRuleTrigger(BaseModel): """ 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 a1cbbf757..3209cd0a4 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 @@ -25,6 +25,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union from typing import TYPE_CHECKING if TYPE_CHECKING: 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 d0c0b2375..b134fd0a0 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 @@ -25,6 +25,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class SubFormFieldsPerDocumentCheckbox(SubFormFieldsPerDocumentBase): """ 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 9a4df4cb0..f63525f4d 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 @@ -25,6 +25,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class SubFormFieldsPerDocumentCheckboxMerge(SubFormFieldsPerDocumentBase): """ 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 e20187462..291c4ef8a 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 @@ -25,6 +25,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class SubFormFieldsPerDocumentDateSigned(SubFormFieldsPerDocumentBase): """ 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 33f2eafe7..7a1d38433 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 @@ -26,6 +26,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class SubFormFieldsPerDocumentDropdown(SubFormFieldsPerDocumentBase): """ 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 7584de3a5..9526b36fb 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 @@ -25,6 +25,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class SubFormFieldsPerDocumentHyperlink(SubFormFieldsPerDocumentBase): """ 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 8b5648512..45b2f1914 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 @@ -25,6 +25,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class SubFormFieldsPerDocumentInitials(SubFormFieldsPerDocumentBase): """ 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 aabf98e6a..a40731c01 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 @@ -25,6 +25,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class SubFormFieldsPerDocumentRadio(SubFormFieldsPerDocumentBase): """ 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 897cb88d2..86806693c 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 @@ -25,6 +25,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class SubFormFieldsPerDocumentSignature(SubFormFieldsPerDocumentBase): """ 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 90deea309..7e569bcfb 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 @@ -25,6 +25,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class SubFormFieldsPerDocumentText(SubFormFieldsPerDocumentBase): """ 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 c5e847609..a60f04b44 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 @@ -25,6 +25,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class SubFormFieldsPerDocumentTextMerge(SubFormFieldsPerDocumentBase): """ diff --git a/sdks/python/dropbox_sign/models/sub_merge_field.py b/sdks/python/dropbox_sign/models/sub_merge_field.py index ad7390e1c..9e24d5584 100644 --- a/sdks/python/dropbox_sign/models/sub_merge_field.py +++ b/sdks/python/dropbox_sign/models/sub_merge_field.py @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class SubMergeField(BaseModel): """ diff --git a/sdks/python/dropbox_sign/models/sub_o_auth.py b/sdks/python/dropbox_sign/models/sub_o_auth.py index 7ef163291..d3860181c 100644 --- a/sdks/python/dropbox_sign/models/sub_o_auth.py +++ b/sdks/python/dropbox_sign/models/sub_o_auth.py @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class SubOAuth(BaseModel): """ diff --git a/sdks/python/dropbox_sign/models/sub_options.py b/sdks/python/dropbox_sign/models/sub_options.py index a2a891e6b..1f80f2a4b 100644 --- a/sdks/python/dropbox_sign/models/sub_options.py +++ b/sdks/python/dropbox_sign/models/sub_options.py @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class SubOptions(BaseModel): """ 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 0f360a7fc..b0734b9dc 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 @@ -25,6 +25,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class SubSignatureRequestGroupedSigners(BaseModel): """ 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 3696316e3..ff4091a46 100644 --- a/sdks/python/dropbox_sign/models/sub_signature_request_signer.py +++ b/sdks/python/dropbox_sign/models/sub_signature_request_signer.py @@ -25,6 +25,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class SubSignatureRequestSigner(BaseModel): """ 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 0d8c257b3..d5affd2e9 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 @@ -25,6 +25,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class SubSignatureRequestTemplateSigner(BaseModel): """ diff --git a/sdks/python/dropbox_sign/models/sub_signing_options.py b/sdks/python/dropbox_sign/models/sub_signing_options.py index c46b9577a..eec7baf9c 100644 --- a/sdks/python/dropbox_sign/models/sub_signing_options.py +++ b/sdks/python/dropbox_sign/models/sub_signing_options.py @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class SubSigningOptions(BaseModel): """ diff --git a/sdks/python/dropbox_sign/models/sub_team_response.py b/sdks/python/dropbox_sign/models/sub_team_response.py index 28c9360bb..8cd9ad5db 100644 --- a/sdks/python/dropbox_sign/models/sub_team_response.py +++ b/sdks/python/dropbox_sign/models/sub_team_response.py @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class SubTeamResponse(BaseModel): """ diff --git a/sdks/python/dropbox_sign/models/sub_template_role.py b/sdks/python/dropbox_sign/models/sub_template_role.py index 4aefc44b2..95eda3741 100644 --- a/sdks/python/dropbox_sign/models/sub_template_role.py +++ b/sdks/python/dropbox_sign/models/sub_template_role.py @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class SubTemplateRole(BaseModel): """ 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 8feb7ab44..9f705a09a 100644 --- a/sdks/python/dropbox_sign/models/sub_unclaimed_draft_signer.py +++ b/sdks/python/dropbox_sign/models/sub_unclaimed_draft_signer.py @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class SubUnclaimedDraftSigner(BaseModel): """ 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 8a897e983..fbe77604b 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 @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class SubUnclaimedDraftTemplateSigner(BaseModel): """ 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 d3c6d184d..d6e722663 100644 --- a/sdks/python/dropbox_sign/models/sub_white_labeling_options.py +++ b/sdks/python/dropbox_sign/models/sub_white_labeling_options.py @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class SubWhiteLabelingOptions(BaseModel): """ 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 5c0cba434..3358304f7 100644 --- a/sdks/python/dropbox_sign/models/team_add_member_request.py +++ b/sdks/python/dropbox_sign/models/team_add_member_request.py @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class TeamAddMemberRequest(BaseModel): """ diff --git a/sdks/python/dropbox_sign/models/team_create_request.py b/sdks/python/dropbox_sign/models/team_create_request.py index 7fd0973d5..6ffdbbe0f 100644 --- a/sdks/python/dropbox_sign/models/team_create_request.py +++ b/sdks/python/dropbox_sign/models/team_create_request.py @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class TeamCreateRequest(BaseModel): """ 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 1553c4014..9f4840395 100644 --- a/sdks/python/dropbox_sign/models/team_get_info_response.py +++ b/sdks/python/dropbox_sign/models/team_get_info_response.py @@ -26,6 +26,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class TeamGetInfoResponse(BaseModel): """ diff --git a/sdks/python/dropbox_sign/models/team_get_response.py b/sdks/python/dropbox_sign/models/team_get_response.py index f490e1b5f..55955b5b9 100644 --- a/sdks/python/dropbox_sign/models/team_get_response.py +++ b/sdks/python/dropbox_sign/models/team_get_response.py @@ -26,6 +26,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class TeamGetResponse(BaseModel): """ diff --git a/sdks/python/dropbox_sign/models/team_info_response.py b/sdks/python/dropbox_sign/models/team_info_response.py index 56af4156b..533d3eba1 100644 --- a/sdks/python/dropbox_sign/models/team_info_response.py +++ b/sdks/python/dropbox_sign/models/team_info_response.py @@ -25,6 +25,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class TeamInfoResponse(BaseModel): """ diff --git a/sdks/python/dropbox_sign/models/team_invite_response.py b/sdks/python/dropbox_sign/models/team_invite_response.py index cec20cb07..5a5068b00 100644 --- a/sdks/python/dropbox_sign/models/team_invite_response.py +++ b/sdks/python/dropbox_sign/models/team_invite_response.py @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class TeamInviteResponse(BaseModel): """ diff --git a/sdks/python/dropbox_sign/models/team_invites_response.py b/sdks/python/dropbox_sign/models/team_invites_response.py index cc60de55f..e9a65a9dd 100644 --- a/sdks/python/dropbox_sign/models/team_invites_response.py +++ b/sdks/python/dropbox_sign/models/team_invites_response.py @@ -26,6 +26,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class TeamInvitesResponse(BaseModel): """ diff --git a/sdks/python/dropbox_sign/models/team_member_response.py b/sdks/python/dropbox_sign/models/team_member_response.py index 90f0a025e..d880c3cc0 100644 --- a/sdks/python/dropbox_sign/models/team_member_response.py +++ b/sdks/python/dropbox_sign/models/team_member_response.py @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class TeamMemberResponse(BaseModel): """ diff --git a/sdks/python/dropbox_sign/models/team_members_response.py b/sdks/python/dropbox_sign/models/team_members_response.py index bd229c94c..e475afeb3 100644 --- a/sdks/python/dropbox_sign/models/team_members_response.py +++ b/sdks/python/dropbox_sign/models/team_members_response.py @@ -27,6 +27,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class TeamMembersResponse(BaseModel): """ diff --git a/sdks/python/dropbox_sign/models/team_parent_response.py b/sdks/python/dropbox_sign/models/team_parent_response.py index e7243a288..35cc1c00d 100644 --- a/sdks/python/dropbox_sign/models/team_parent_response.py +++ b/sdks/python/dropbox_sign/models/team_parent_response.py @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class TeamParentResponse(BaseModel): """ 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 6b2566abc..c1470da82 100644 --- a/sdks/python/dropbox_sign/models/team_remove_member_request.py +++ b/sdks/python/dropbox_sign/models/team_remove_member_request.py @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class TeamRemoveMemberRequest(BaseModel): """ diff --git a/sdks/python/dropbox_sign/models/team_response.py b/sdks/python/dropbox_sign/models/team_response.py index ba41f4de3..cba0fc05f 100644 --- a/sdks/python/dropbox_sign/models/team_response.py +++ b/sdks/python/dropbox_sign/models/team_response.py @@ -25,6 +25,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class TeamResponse(BaseModel): """ 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 ffcc73a41..83ac18a38 100644 --- a/sdks/python/dropbox_sign/models/team_sub_teams_response.py +++ b/sdks/python/dropbox_sign/models/team_sub_teams_response.py @@ -27,6 +27,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class TeamSubTeamsResponse(BaseModel): """ diff --git a/sdks/python/dropbox_sign/models/team_update_request.py b/sdks/python/dropbox_sign/models/team_update_request.py index 8b5113e5f..48eed77ee 100644 --- a/sdks/python/dropbox_sign/models/team_update_request.py +++ b/sdks/python/dropbox_sign/models/team_update_request.py @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class TeamUpdateRequest(BaseModel): """ 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 7036cfd4e..bf8702fc6 100644 --- a/sdks/python/dropbox_sign/models/template_add_user_request.py +++ b/sdks/python/dropbox_sign/models/template_add_user_request.py @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class TemplateAddUserRequest(BaseModel): """ 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 9d9b696bd..cd27ea0ff 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 @@ -33,6 +33,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class TemplateCreateEmbeddedDraftRequest(BaseModel): """ 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 db8125607..164b63b28 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 @@ -26,6 +26,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class TemplateCreateEmbeddedDraftResponse(BaseModel): """ 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 a3102e6bf..8aea2c7bc 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 @@ -25,6 +25,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class TemplateCreateEmbeddedDraftResponseTemplate(BaseModel): """ diff --git a/sdks/python/dropbox_sign/models/template_create_request.py b/sdks/python/dropbox_sign/models/template_create_request.py index 0f22cad64..06a9870da 100644 --- a/sdks/python/dropbox_sign/models/template_create_request.py +++ b/sdks/python/dropbox_sign/models/template_create_request.py @@ -32,6 +32,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class TemplateCreateRequest(BaseModel): """ diff --git a/sdks/python/dropbox_sign/models/template_create_response.py b/sdks/python/dropbox_sign/models/template_create_response.py index e63da6bb1..8e30b0c8e 100644 --- a/sdks/python/dropbox_sign/models/template_create_response.py +++ b/sdks/python/dropbox_sign/models/template_create_response.py @@ -26,6 +26,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class TemplateCreateResponse(BaseModel): """ 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 3e5654934..aa5ab6f3e 100644 --- a/sdks/python/dropbox_sign/models/template_create_response_template.py +++ b/sdks/python/dropbox_sign/models/template_create_response_template.py @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class TemplateCreateResponseTemplate(BaseModel): """ diff --git a/sdks/python/dropbox_sign/models/template_edit_response.py b/sdks/python/dropbox_sign/models/template_edit_response.py index b14e9b187..24069f78f 100644 --- a/sdks/python/dropbox_sign/models/template_edit_response.py +++ b/sdks/python/dropbox_sign/models/template_edit_response.py @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class TemplateEditResponse(BaseModel): """ diff --git a/sdks/python/dropbox_sign/models/template_get_response.py b/sdks/python/dropbox_sign/models/template_get_response.py index 78a371681..d896b3e8a 100644 --- a/sdks/python/dropbox_sign/models/template_get_response.py +++ b/sdks/python/dropbox_sign/models/template_get_response.py @@ -26,6 +26,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class TemplateGetResponse(BaseModel): """ diff --git a/sdks/python/dropbox_sign/models/template_list_response.py b/sdks/python/dropbox_sign/models/template_list_response.py index 367d4a922..faf504111 100644 --- a/sdks/python/dropbox_sign/models/template_list_response.py +++ b/sdks/python/dropbox_sign/models/template_list_response.py @@ -27,6 +27,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class TemplateListResponse(BaseModel): """ 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 56afa5af1..335ef827d 100644 --- a/sdks/python/dropbox_sign/models/template_remove_user_request.py +++ b/sdks/python/dropbox_sign/models/template_remove_user_request.py @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class TemplateRemoveUserRequest(BaseModel): """ diff --git a/sdks/python/dropbox_sign/models/template_response.py b/sdks/python/dropbox_sign/models/template_response.py index fbd571886..246f4d312 100644 --- a/sdks/python/dropbox_sign/models/template_response.py +++ b/sdks/python/dropbox_sign/models/template_response.py @@ -30,6 +30,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class TemplateResponse(BaseModel): """ diff --git a/sdks/python/dropbox_sign/models/template_response_account.py b/sdks/python/dropbox_sign/models/template_response_account.py index c7433cdfe..9e8f4c1ff 100644 --- a/sdks/python/dropbox_sign/models/template_response_account.py +++ b/sdks/python/dropbox_sign/models/template_response_account.py @@ -25,6 +25,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class TemplateResponseAccount(BaseModel): """ 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 cbfba5ea1..8ffa3c46e 100644 --- a/sdks/python/dropbox_sign/models/template_response_account_quota.py +++ b/sdks/python/dropbox_sign/models/template_response_account_quota.py @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class TemplateResponseAccountQuota(BaseModel): """ 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 5ecd26320..953966e9c 100644 --- a/sdks/python/dropbox_sign/models/template_response_cc_role.py +++ b/sdks/python/dropbox_sign/models/template_response_cc_role.py @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class TemplateResponseCCRole(BaseModel): """ diff --git a/sdks/python/dropbox_sign/models/template_response_document.py b/sdks/python/dropbox_sign/models/template_response_document.py index c2c602254..d296ee21a 100644 --- a/sdks/python/dropbox_sign/models/template_response_document.py +++ b/sdks/python/dropbox_sign/models/template_response_document.py @@ -28,6 +28,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class TemplateResponseDocument(BaseModel): """ 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 40ac4f6ef..eddd05408 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 @@ -25,6 +25,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union from typing import TYPE_CHECKING if TYPE_CHECKING: @@ -38,7 +39,7 @@ class TemplateResponseDocumentCustomFieldBase(BaseModel): 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: Optional[StrictStr] = Field(default=None, description="The signer of the Custom Field. Can be `null` if field is a merge field (assigned to Sender).") + 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.") @@ -136,7 +137,7 @@ def openapi_types(cls) -> Dict[str, str]: "type": "(str,)", "api_id": "(str,)", "name": "(str,)", - "signer": "(str,)", + "signer": "(int, str,)", "x": "(int,)", "y": "(int,)", "width": "(int,)", 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 08c47dff5..6180833eb 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 @@ -25,6 +25,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class TemplateResponseDocumentCustomFieldCheckbox(TemplateResponseDocumentCustomFieldBase): """ @@ -123,7 +124,7 @@ def openapi_types(cls) -> Dict[str, str]: "type": "(str,)", "api_id": "(str,)", "name": "(str,)", - "signer": "(str,)", + "signer": "(int, str,)", "x": "(int,)", "y": "(int,)", "width": "(int,)", 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 2395afd0b..761cfa6a0 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 @@ -26,6 +26,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class TemplateResponseDocumentCustomFieldText(TemplateResponseDocumentCustomFieldBase): """ @@ -139,7 +140,7 @@ def openapi_types(cls) -> Dict[str, str]: "font_family": "(str,)", "api_id": "(str,)", "name": "(str,)", - "signer": "(str,)", + "signer": "(int, str,)", "x": "(int,)", "y": "(int,)", "width": "(int,)", 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 0d07b2588..4d560744e 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 @@ -25,6 +25,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class TemplateResponseDocumentFieldGroup(BaseModel): """ 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 2b331e6cc..b3e07181a 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 @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class TemplateResponseDocumentFieldGroupRule(BaseModel): """ 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 c2b573867..dc851374c 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 @@ -25,6 +25,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union from typing import TYPE_CHECKING if TYPE_CHECKING: @@ -44,7 +45,7 @@ class TemplateResponseDocumentFormFieldBase(BaseModel): 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: Optional[StrictStr] = Field(default=None, description="The signer 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.") @@ -154,7 +155,7 @@ def openapi_types(cls) -> Dict[str, str]: "type": "(str,)", "api_id": "(str,)", "name": "(str,)", - "signer": "(str,)", + "signer": "(int, str,)", "x": "(int,)", "y": "(int,)", "width": "(int,)", 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 9fb275bb8..9cd961d5f 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 @@ -25,6 +25,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class TemplateResponseDocumentFormFieldCheckbox(TemplateResponseDocumentFormFieldBase): """ @@ -123,7 +124,7 @@ def openapi_types(cls) -> Dict[str, str]: "type": "(str,)", "api_id": "(str,)", "name": "(str,)", - "signer": "(str,)", + "signer": "(int, str,)", "x": "(int,)", "y": "(int,)", "width": "(int,)", 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 a3279e9b3..130dd8d26 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 @@ -25,6 +25,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class TemplateResponseDocumentFormFieldDateSigned(TemplateResponseDocumentFormFieldBase): """ @@ -123,7 +124,7 @@ def openapi_types(cls) -> Dict[str, str]: "type": "(str,)", "api_id": "(str,)", "name": "(str,)", - "signer": "(str,)", + "signer": "(int, str,)", "x": "(int,)", "y": "(int,)", "width": "(int,)", 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 3318790fe..c135186f7 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 @@ -25,6 +25,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class TemplateResponseDocumentFormFieldDropdown(TemplateResponseDocumentFormFieldBase): """ @@ -123,7 +124,7 @@ def openapi_types(cls) -> Dict[str, str]: "type": "(str,)", "api_id": "(str,)", "name": "(str,)", - "signer": "(str,)", + "signer": "(int, str,)", "x": "(int,)", "y": "(int,)", "width": "(int,)", 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 e9fb0be6e..fb8eb9d4b 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 @@ -26,6 +26,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class TemplateResponseDocumentFormFieldHyperlink(TemplateResponseDocumentFormFieldBase): """ @@ -139,7 +140,7 @@ def openapi_types(cls) -> Dict[str, str]: "font_family": "(str,)", "api_id": "(str,)", "name": "(str,)", - "signer": "(str,)", + "signer": "(int, str,)", "x": "(int,)", "y": "(int,)", "width": "(int,)", 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 f51b01c1c..2656c8903 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 @@ -25,6 +25,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class TemplateResponseDocumentFormFieldInitials(TemplateResponseDocumentFormFieldBase): """ @@ -123,7 +124,7 @@ def openapi_types(cls) -> Dict[str, str]: "type": "(str,)", "api_id": "(str,)", "name": "(str,)", - "signer": "(str,)", + "signer": "(int, str,)", "x": "(int,)", "y": "(int,)", "width": "(int,)", 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 fd0e4c73e..5eb2cf39b 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 @@ -25,6 +25,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class TemplateResponseDocumentFormFieldRadio(TemplateResponseDocumentFormFieldBase): """ @@ -124,7 +125,7 @@ def openapi_types(cls) -> Dict[str, str]: "group": "(str,)", "api_id": "(str,)", "name": "(str,)", - "signer": "(str,)", + "signer": "(int, str,)", "x": "(int,)", "y": "(int,)", "width": "(int,)", 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 f2862e52b..94741f855 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 @@ -25,6 +25,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class TemplateResponseDocumentFormFieldSignature(TemplateResponseDocumentFormFieldBase): """ @@ -123,7 +124,7 @@ def openapi_types(cls) -> Dict[str, str]: "type": "(str,)", "api_id": "(str,)", "name": "(str,)", - "signer": "(str,)", + "signer": "(int, str,)", "x": "(int,)", "y": "(int,)", "width": "(int,)", 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 9666c4946..617885ec8 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 @@ -26,6 +26,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class TemplateResponseDocumentFormFieldText(TemplateResponseDocumentFormFieldBase): """ @@ -152,7 +153,7 @@ def openapi_types(cls) -> Dict[str, str]: "validation_type": "(str,)", "api_id": "(str,)", "name": "(str,)", - "signer": "(str,)", + "signer": "(int, str,)", "x": "(int,)", "y": "(int,)", "width": "(int,)", 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 266985ee4..c0a530881 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 @@ -25,6 +25,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union from typing import TYPE_CHECKING if TYPE_CHECKING: 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 3af7e2e83..855f4a22f 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 @@ -25,6 +25,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class TemplateResponseDocumentStaticFieldCheckbox(TemplateResponseDocumentStaticFieldBase): """ 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 9c3ad86ae..8006e779d 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 @@ -25,6 +25,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class TemplateResponseDocumentStaticFieldDateSigned(TemplateResponseDocumentStaticFieldBase): """ 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 1ef1988c0..efb9e4846 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 @@ -25,6 +25,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class TemplateResponseDocumentStaticFieldDropdown(TemplateResponseDocumentStaticFieldBase): """ 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 2b773aea9..d84e5571c 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 @@ -25,6 +25,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class TemplateResponseDocumentStaticFieldHyperlink(TemplateResponseDocumentStaticFieldBase): """ 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 3819dc91a..e06d73931 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 @@ -25,6 +25,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class TemplateResponseDocumentStaticFieldInitials(TemplateResponseDocumentStaticFieldBase): """ 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 b3351376f..6a509ef24 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 @@ -25,6 +25,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class TemplateResponseDocumentStaticFieldRadio(TemplateResponseDocumentStaticFieldBase): """ 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 e74d7b148..08aaaaffc 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 @@ -25,6 +25,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class TemplateResponseDocumentStaticFieldSignature(TemplateResponseDocumentStaticFieldBase): """ 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 58749c297..380a7d54b 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 @@ -25,6 +25,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class TemplateResponseDocumentStaticFieldText(TemplateResponseDocumentStaticFieldBase): """ 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 b835362a2..c53c9b253 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 @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class TemplateResponseFieldAvgTextLength(BaseModel): """ 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 f15ec1964..45b77bbf6 100644 --- a/sdks/python/dropbox_sign/models/template_response_signer_role.py +++ b/sdks/python/dropbox_sign/models/template_response_signer_role.py @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class TemplateResponseSignerRole(BaseModel): """ 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 c8348b4a2..476e09b96 100644 --- a/sdks/python/dropbox_sign/models/template_update_files_request.py +++ b/sdks/python/dropbox_sign/models/template_update_files_request.py @@ -25,6 +25,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class TemplateUpdateFilesRequest(BaseModel): """ 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 9aef5b5e1..7a1fa7dec 100644 --- a/sdks/python/dropbox_sign/models/template_update_files_response.py +++ b/sdks/python/dropbox_sign/models/template_update_files_response.py @@ -25,6 +25,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class TemplateUpdateFilesResponse(BaseModel): """ 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 e2c5c5281..0add592b7 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 @@ -25,6 +25,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class TemplateUpdateFilesResponseTemplate(BaseModel): """ 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 8ca4b45ab..187b4c10e 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 @@ -34,6 +34,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class UnclaimedDraftCreateEmbeddedRequest(BaseModel): """ 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 ab3753602..1b9dd8bf0 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 @@ -31,6 +31,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class UnclaimedDraftCreateEmbeddedWithTemplateRequest(BaseModel): """ 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 aada57194..c685111e5 100644 --- a/sdks/python/dropbox_sign/models/unclaimed_draft_create_request.py +++ b/sdks/python/dropbox_sign/models/unclaimed_draft_create_request.py @@ -33,6 +33,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class UnclaimedDraftCreateRequest(BaseModel): """ 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 c749665f1..fd0440912 100644 --- a/sdks/python/dropbox_sign/models/unclaimed_draft_create_response.py +++ b/sdks/python/dropbox_sign/models/unclaimed_draft_create_response.py @@ -26,6 +26,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class UnclaimedDraftCreateResponse(BaseModel): """ 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 cce251393..615828fbe 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 @@ -25,6 +25,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class UnclaimedDraftEditAndResendRequest(BaseModel): """ diff --git a/sdks/python/dropbox_sign/models/unclaimed_draft_response.py b/sdks/python/dropbox_sign/models/unclaimed_draft_response.py index ebde856d0..7f4c72adc 100644 --- a/sdks/python/dropbox_sign/models/unclaimed_draft_response.py +++ b/sdks/python/dropbox_sign/models/unclaimed_draft_response.py @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class UnclaimedDraftResponse(BaseModel): """ diff --git a/sdks/python/dropbox_sign/models/warning_response.py b/sdks/python/dropbox_sign/models/warning_response.py index 5138093ec..3524ace59 100644 --- a/sdks/python/dropbox_sign/models/warning_response.py +++ b/sdks/python/dropbox_sign/models/warning_response.py @@ -24,6 +24,7 @@ from typing_extensions import Self import io from pydantic import StrictBool +from typing import Union class WarningResponse(BaseModel): """ diff --git a/sdks/python/templates/model_generic.mustache b/sdks/python/templates/model_generic.mustache index 0a44c414a..6ffec5380 100644 --- a/sdks/python/templates/model_generic.mustache +++ b/sdks/python/templates/model_generic.mustache @@ -19,6 +19,7 @@ from typing_extensions import Self {{#useCustomTemplateCode}} import io from pydantic import StrictBool +from typing import Union {{/useCustomTemplateCode}} {{#hasChildren}} @@ -41,7 +42,7 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}} {{name}}: {{{vendorExtensions.x-py-typing}}} {{/useCustomTemplateCode}} {{#useCustomTemplateCode}} - {{name}}: {{#vendorExtensions.x-int-or-string}}Union[StrictStr, StrictInt]{{#description}} = Field(description="{{{description}}}"){{/description}}{{/vendorExtensions.x-int-or-string}}{{^vendorExtensions.x-int-or-string}}{{{vendorExtensions.x-py-typing}}}{{/vendorExtensions.x-int-or-string}} + {{name}}: {{#vendorExtensions.x-int-or-string}}Union[StrictStr, StrictInt{{#isNullable}}, None{{/isNullable}}]{{#description}} = Field(description="{{{description}}}"){{/description}}{{/vendorExtensions.x-int-or-string}}{{^vendorExtensions.x-int-or-string}}{{{vendorExtensions.x-py-typing}}}{{/vendorExtensions.x-int-or-string}} {{/useCustomTemplateCode}} {{/vars}} {{#isAdditionalPropertiesTrue}} From c385c8a8c659b5a22f393b9cb718d3e3ac0d5723 Mon Sep 17 00:00:00 2001 From: Juan Treminio Date: Wed, 4 Sep 2024 08:06:41 -0500 Subject: [PATCH 10/10] Finalize tests --- .../python/tests/test_signature_request.py | 81 ++++++++++++++++++- sdks/python/dropbox_sign/exceptions.py | 3 +- sdks/python/templates/exceptions.mustache | 8 ++ 3 files changed, 87 insertions(+), 5 deletions(-) diff --git a/sandbox/python/tests/test_signature_request.py b/sandbox/python/tests/test_signature_request.py index c12b90cf0..93bdf203c 100644 --- a/sandbox/python/tests/test_signature_request.py +++ b/sandbox/python/tests/test_signature_request.py @@ -2,17 +2,17 @@ import os import unittest -from dropbox_sign import ApiClient, Configuration, apis, models +from dropbox_sign import ApiClient, Configuration, apis, models, ApiException class TestSignatureRequest(unittest.TestCase): def setUp(self): self.base_path = os.path.dirname(os.path.abspath(__file__)) + "/.." - config_merged = self.get_config() + self.config_merged = self.get_config() self.configuration = Configuration( - username=config_merged["API_KEY"], - host=config_merged["BASE_URL"], + username=self.config_merged["API_KEY"], + host=self.config_merged["BASE_URL"], ) def get_config(self): @@ -46,6 +46,79 @@ def test_send(self): send_response.signature_request.custom_fields[0].api_id, ) + self.assertEqual( + send_request.signers[0].email_address, + send_response.signature_request.signatures[0].signer_email_address, + ) + self.assertEqual( + send_request.signers[1].email_address, + send_response.signature_request.signatures[1].signer_email_address, + ) + self.assertEqual( + send_request.signers[2].email_address, + send_response.signature_request.signatures[2].signer_email_address, + ) + + get_response = signature_request_api.signature_request_get( + send_response.signature_request.signature_request_id, + ) + + self.assertEqual( + send_response.signature_request.signature_request_id, + get_response.signature_request.signature_request_id, + ) + + def test_create_embedded(self): + api_client = ApiClient(self.configuration) + signature_request_api = apis.SignatureRequestApi(api_client) + + file = open(f'{self.base_path}/test_fixtures/SignatureRequestCreateEmbeddedRequest.json', 'r') + data = json.load(file) + data["client_id"] = self.config_merged["CLIENT_ID"] + file.close() + + send_request = models.SignatureRequestCreateEmbeddedRequest.init(data) + send_request.files = [open(f'{self.base_path}/test_fixtures/pdf-sample.pdf', 'rb')] + + send_response = signature_request_api.signature_request_create_embedded(send_request) + + self.assertEqual( + send_request.signers[0].email_address, + send_response.signature_request.signatures[0].signer_email_address, + ) + self.assertEqual( + send_request.signers[1].email_address, + send_response.signature_request.signatures[1].signer_email_address, + ) + self.assertEqual( + send_request.signers[2].email_address, + send_response.signature_request.signatures[2].signer_email_address, + ) + + embedded_api = apis.EmbeddedApi(api_client) + + get_response = embedded_api.embedded_sign_url( + send_response.signature_request.signatures[0].signature_id + ) + + self.assertNotEquals("", get_response.embedded.sign_url) + + def test_send_without_file_error(self): + api_client = ApiClient(self.configuration) + signature_request_api = apis.SignatureRequestApi(api_client) + + file = open(f'{self.base_path}/test_fixtures/SignatureRequestSendRequest.json', 'r') + data = json.load(file) + file.close() + + send_request = models.SignatureRequestSendRequest.init(data) + + try: + signature_request_api.signature_request_send(send_request) + self.assertFalse(True) + except ApiException as e: + self.assertEqual("file", e.data.error.error_path) + if __name__ == '__main__': unittest.main() diff --git a/sdks/python/dropbox_sign/exceptions.py b/sdks/python/dropbox_sign/exceptions.py index 33d13477a..ba101a20f 100644 --- a/sdks/python/dropbox_sign/exceptions.py +++ b/sdks/python/dropbox_sign/exceptions.py @@ -14,6 +14,7 @@ from typing import Any, Optional from typing_extensions import Self +from dropbox_sign.models.error_response import ErrorResponse class OpenApiException(Exception): """The base exception class for all OpenAPIExceptions""" @@ -116,7 +117,7 @@ def __init__( self.status = status self.reason = reason self.body = body - self.data = data + self.data: ErrorResponse = data self.headers = None if http_resp: diff --git a/sdks/python/templates/exceptions.mustache b/sdks/python/templates/exceptions.mustache index a690ceb92..65781d4c2 100644 --- a/sdks/python/templates/exceptions.mustache +++ b/sdks/python/templates/exceptions.mustache @@ -3,6 +3,9 @@ {{>partial_header}} from typing import Any, Optional from typing_extensions import Self +{{#useCustomTemplateCode}} +from dropbox_sign.models.error_response import ErrorResponse +{{/useCustomTemplateCode}} class OpenApiException(Exception): """The base exception class for all OpenAPIExceptions""" @@ -105,7 +108,12 @@ class ApiException(OpenApiException): self.status = status self.reason = reason self.body = body +{{^useCustomTemplateCode}} self.data = data +{{/useCustomTemplateCode}} +{{#useCustomTemplateCode}} + self.data: ErrorResponse = data +{{/useCustomTemplateCode}} self.headers = None if http_resp: