From 48811397a9020fc6e33172a1e20a90dc128dd8d9 Mon Sep 17 00:00:00 2001 From: Juan Treminio Date: Thu, 15 May 2025 11:19:54 -0500 Subject: [PATCH 1/2] Release 1.9.0 --- README.md | 46 +- VERSION | 2 +- bin/copy-constants.php | 64 + docs/Api/AccountApi.md | 107 +- docs/Api/ApiAppApi.md | 175 +- docs/Api/BulkSendJobApi.md | 56 +- docs/Api/EmbeddedApi.md | 62 +- docs/Api/FaxApi.md | 144 +- docs/Api/FaxLineApi.md | 193 +- docs/Api/OAuthApi.md | 58 +- docs/Api/ReportApi.md | 26 +- docs/Api/SignatureRequestApi.md | 1169 +++- docs/Api/TeamApi.md | 258 +- docs/Api/TemplateApi.md | 446 +- docs/Api/UnclaimedDraftApi.md | 184 +- docs/Model/FaxLineAddUserRequest.md | 2 +- docs/Model/FaxLineCreateRequest.md | 8 +- docs/Model/FaxLineDeleteRequest.md | 2 +- docs/Model/FaxLineRemoveUserRequest.md | 6 +- docs/Model/FaxSendRequest.md | 10 +- .../SignatureRequestEditEmbeddedRequest.md | 34 + ...eRequestEditEmbeddedWithTemplateRequest.md | 25 + docs/Model/SignatureRequestEditRequest.md | 35 + ...SignatureRequestEditWithTemplateRequest.md | 26 + examples/AccountCreate.php | 25 - examples/AccountCreateExample.php | 25 + examples/AccountCreateOauthExample.php | 27 + examples/AccountGet.php | 22 - examples/AccountGetExample.php | 20 + examples/AccountUpdate.php | 25 - examples/AccountUpdateExample.php | 26 + examples/AccountVerify.php | 25 - examples/AccountVerifyExample.php | 25 + examples/ApiAppCreate.php | 42 - examples/ApiAppCreateExample.php | 42 + examples/ApiAppDelete.php | 23 - examples/ApiAppDeleteExample.php | 20 + examples/ApiAppGet.php | 24 - examples/ApiAppGetExample.php | 22 + examples/ApiAppList.php | 25 - examples/ApiAppListExample.php | 23 + examples/ApiAppUpdate.php | 36 - examples/ApiAppUpdateExample.php | 44 + examples/BulkSendJobGet.php | 24 - examples/BulkSendJobGetExample.php | 24 + examples/BulkSendJobList.php | 25 - examples/BulkSendJobListExample.php | 23 + examples/EmbeddedEditUrl.php | 28 - examples/EmbeddedEditUrlExample.php | 32 + examples/EmbeddedSignUrl.php | 24 - examples/EmbeddedSignUrlExample.php | 22 + ...tCallback.php => EventCallbackExample.php} | 6 +- examples/FaxDelete.php | 18 - examples/FaxDeleteExample.php | 19 + examples/FaxFiles.php | 21 - examples/FaxFilesExample.php | 21 + examples/FaxGet.php | 21 - examples/FaxGetExample.php | 21 + examples/FaxLineAddUser.php | 23 - examples/FaxLineAddUserExample.php | 25 + examples/FaxLineAreaCodeGet.php | 19 - examples/FaxLineAreaCodeGetExample.php | 21 + examples/FaxLineCreate.php | 23 - examples/FaxLineCreateExample.php | 25 + examples/FaxLineDelete.php | 21 - examples/FaxLineDeleteExample.php | 22 + examples/FaxLineGet.php | 19 - examples/FaxLineGetExample.php | 21 + examples/FaxLineList.php | 19 - examples/FaxLineListExample.php | 23 + examples/FaxLineRemoveUser.php | 23 - examples/FaxLineRemoveUserExample.php | 25 + examples/FaxList.php | 22 - examples/FaxListExample.php | 22 + examples/FaxSend.php | 29 - examples/FaxSendExample.php | 32 + examples/OauthTokenGenerate.php | 22 - examples/OauthTokenGenerateExample.php | 27 + examples/OauthTokenRefresh.php | 19 - examples/OauthTokenRefreshExample.php | 24 + examples/ReportCreate.php | 27 - examples/ReportCreateExample.php | 29 + ...eRequestBulkCreateEmbeddedWithTemplate.php | 60 - ...tBulkCreateEmbeddedWithTemplateExample.php | 89 + .../SignatureRequestBulkSendWithTemplate.php | 62 - ...tureRequestBulkSendWithTemplateExample.php | 89 + examples/SignatureRequestCancel.php | 23 - examples/SignatureRequestCancelExample.php | 20 + examples/SignatureRequestCreateEmbedded.php | 53 - .../SignatureRequestCreateEmbeddedExample.php | 59 + ...estCreateEmbeddedGroupedSignersExample.php | 86 + ...atureRequestCreateEmbeddedWithTemplate.php | 43 - ...questCreateEmbeddedWithTemplateExample.php | 49 + examples/SignatureRequestEdit.php | 62 - examples/SignatureRequestEditEmbedded.php | 58 - .../SignatureRequestEditEmbeddedExample.php | 60 + ...questEditEmbeddedGroupedSignersExample.php | 87 + ...gnatureRequestEditEmbeddedWithTemplate.php | 48 - ...RequestEditEmbeddedWithTemplateExample.php | 50 + examples/SignatureRequestEditExample.php | 69 + ...natureRequestEditGroupedSignersExample.php | 96 + examples/SignatureRequestEditWithTemplate.php | 56 - ...ignatureRequestEditWithTemplateExample.php | 69 + examples/SignatureRequestFiles.php | 25 - examples/SignatureRequestFilesAsDataUri.php | 24 - .../SignatureRequestFilesAsDataUriExample.php | 22 + examples/SignatureRequestFilesAsFileUrl.php | 24 - .../SignatureRequestFilesAsFileUrlExample.php | 23 + examples/SignatureRequestFilesExample.php | 23 + examples/SignatureRequestGet.php | 24 - examples/SignatureRequestGetExample.php | 22 + examples/SignatureRequestList.php | 25 - examples/SignatureRequestListExample.php | 23 + examples/SignatureRequestReleaseHold.php | 24 - .../SignatureRequestReleaseHoldExample.php | 22 + examples/SignatureRequestRemind.php | 27 - examples/SignatureRequestRemindExample.php | 26 + examples/SignatureRequestRemove.php | 20 - examples/SignatureRequestRemoveExample.php | 19 + examples/SignatureRequestSend.php | 60 - examples/SignatureRequestSendExample.php | 68 + ...natureRequestSendGroupedSignersExample.php | 95 + examples/SignatureRequestSendWithTemplate.php | 54 - ...ignatureRequestSendWithTemplateExample.php | 68 + examples/SignatureRequestUpdate.php | 28 - examples/SignatureRequestUpdateExample.php | 27 + examples/TeamAddMember.php | 25 - examples/TeamAddMemberAccountIdExample.php | 26 + examples/TeamAddMemberExample.php | 26 + examples/TeamCreate.php | 25 - examples/TeamCreateExample.php | 25 + examples/TeamDelete.php | 21 - examples/TeamDeleteExample.php | 18 + examples/TeamGet.php | 22 - examples/TeamGetExample.php | 20 + examples/TeamInfo.php | 22 - examples/TeamInfoExample.php | 22 + examples/TeamInvites.php | 24 - examples/TeamInvitesExample.php | 20 + examples/TeamMembers.php | 24 - examples/TeamMembersExample.php | 24 + examples/TeamRemoveMember.php | 26 - examples/TeamRemoveMemberAccountIdExample.php | 25 + examples/TeamRemoveMemberExample.php | 26 + examples/TeamSubTeams.php | 24 - examples/TeamSubTeamsExample.php | 24 + examples/TeamUpdate.php | 25 - examples/TeamUpdateExample.php | 25 + examples/TemplateAddUser.php | 27 - examples/TemplateAddUserExample.php | 26 + examples/TemplateCreate.php | 53 - examples/TemplateCreateEmbeddedDraft.php | 53 - .../TemplateCreateEmbeddedDraftExample.php | 66 + ...ateEmbeddedDraftFormFieldGroupsExample.php | 113 + ...eateEmbeddedDraftFormFieldRulesExample.php | 129 + ...eddedDraftFormFieldsPerDocumentExample.php | 101 + examples/TemplateCreateExample.php | 100 + .../TemplateCreateFormFieldGroupsExample.php | 113 + .../TemplateCreateFormFieldRulesExample.php | 129 + ...lateCreateFormFieldsPerDocumentExample.php | 101 + examples/TemplateDelete.php | 23 - examples/TemplateDeleteExample.php | 20 + examples/TemplateFiles.php | 25 - examples/TemplateFilesAsDataUri.php | 24 - examples/TemplateFilesAsDataUriExample.php | 22 + examples/TemplateFilesAsFileUrl.php | 24 - examples/TemplateFilesAsFileUrlExample.php | 23 + examples/TemplateFilesExample.php | 22 + examples/TemplateGet.php | 24 - examples/TemplateGetExample.php | 22 + examples/TemplateList.php | 24 - examples/TemplateListExample.php | 23 + examples/TemplateRemoveUser.php | 27 - examples/TemplateRemoveUserExample.php | 26 + examples/TemplateUpdateFiles.php | 27 - examples/TemplateUpdateFilesExample.php | 27 + examples/UnclaimedDraftCreate.php | 60 - examples/UnclaimedDraftCreateEmbedded.php | 28 - .../UnclaimedDraftCreateEmbeddedExample.php | 29 + ...ftCreateEmbeddedFormFieldGroupsExample.php | 76 + ...aftCreateEmbeddedFormFieldRulesExample.php | 92 + ...teEmbeddedFormFieldsPerDocumentExample.php | 64 + ...claimedDraftCreateEmbeddedWithTemplate.php | 39 - ...DraftCreateEmbeddedWithTemplateExample.php | 49 + examples/UnclaimedDraftCreateExample.php | 38 + ...aimedDraftCreateFormFieldGroupsExample.php | 75 + ...laimedDraftCreateFormFieldRulesExample.php | 91 + ...raftCreateFormFieldsPerDocumentExample.php | 63 + examples/UnclaimedDraftEditAndResend.php | 28 - .../UnclaimedDraftEditAndResendExample.php | 27 + openapi-config.yaml | 10 +- openapi-sdk.yaml | 6034 +++++++++-------- run-build | 5 +- src/Api/AccountApi.php | 150 +- src/Api/ApiAppApi.php | 163 +- src/Api/BulkSendJobApi.php | 146 +- src/Api/EmbeddedApi.php | 60 +- src/Api/FaxApi.php | 171 +- src/Api/FaxLineApi.php | 303 +- src/Api/OAuthApi.php | 60 +- src/Api/ReportApi.php | 34 +- src/Api/SignatureRequestApi.php | 2012 +++++- src/Api/TeamApi.php | 427 +- src/Api/TemplateApi.php | 415 +- src/Api/UnclaimedDraftApi.php | 112 +- src/ApiException.php | 2 +- src/Configuration.php | 8 +- src/EventCallbackHelper.php | 2 +- src/HeaderSelector.php | 26 +- src/Model/AccountCreateRequest.php | 8 +- src/Model/AccountCreateResponse.php | 8 +- src/Model/AccountGetResponse.php | 8 +- src/Model/AccountResponse.php | 8 +- src/Model/AccountResponseQuotas.php | 8 +- src/Model/AccountResponseUsage.php | 8 +- src/Model/AccountUpdateRequest.php | 8 +- src/Model/AccountVerifyRequest.php | 8 +- src/Model/AccountVerifyResponse.php | 8 +- src/Model/AccountVerifyResponseAccount.php | 8 +- src/Model/ApiAppCreateRequest.php | 8 +- src/Model/ApiAppGetResponse.php | 8 +- src/Model/ApiAppListResponse.php | 8 +- src/Model/ApiAppResponse.php | 8 +- src/Model/ApiAppResponseOAuth.php | 8 +- src/Model/ApiAppResponseOptions.php | 8 +- src/Model/ApiAppResponseOwnerAccount.php | 8 +- .../ApiAppResponseWhiteLabelingOptions.php | 8 +- src/Model/ApiAppUpdateRequest.php | 8 +- src/Model/BulkSendJobGetResponse.php | 8 +- ...ulkSendJobGetResponseSignatureRequests.php | 8 +- src/Model/BulkSendJobListResponse.php | 8 +- src/Model/BulkSendJobResponse.php | 8 +- src/Model/BulkSendJobSendResponse.php | 8 +- src/Model/EmbeddedEditUrlRequest.php | 8 +- src/Model/EmbeddedEditUrlResponse.php | 8 +- src/Model/EmbeddedEditUrlResponseEmbedded.php | 8 +- src/Model/EmbeddedSignUrlResponse.php | 8 +- src/Model/EmbeddedSignUrlResponseEmbedded.php | 8 +- src/Model/ErrorResponse.php | 8 +- src/Model/ErrorResponseError.php | 8 +- src/Model/EventCallbackRequest.php | 8 +- src/Model/EventCallbackRequestEvent.php | 8 +- .../EventCallbackRequestEventMetadata.php | 8 +- src/Model/FaxGetResponse.php | 8 +- src/Model/FaxLineAddUserRequest.php | 10 +- src/Model/FaxLineAreaCodeGetCountryEnum.php | 2 +- src/Model/FaxLineAreaCodeGetProvinceEnum.php | 2 +- src/Model/FaxLineAreaCodeGetResponse.php | 8 +- src/Model/FaxLineAreaCodeGetStateEnum.php | 2 +- src/Model/FaxLineCreateRequest.php | 16 +- src/Model/FaxLineDeleteRequest.php | 10 +- src/Model/FaxLineListResponse.php | 8 +- src/Model/FaxLineRemoveUserRequest.php | 14 +- src/Model/FaxLineResponse.php | 8 +- src/Model/FaxLineResponseFaxLine.php | 8 +- src/Model/FaxListResponse.php | 8 +- src/Model/FaxResponse.php | 8 +- src/Model/FaxResponseTransmission.php | 8 +- src/Model/FaxSendRequest.php | 18 +- src/Model/FileResponse.php | 8 +- src/Model/FileResponseDataUri.php | 8 +- src/Model/ListInfoResponse.php | 8 +- src/Model/ModelInterface.php | 2 +- src/Model/OAuthTokenGenerateRequest.php | 8 +- src/Model/OAuthTokenRefreshRequest.php | 8 +- src/Model/OAuthTokenResponse.php | 8 +- src/Model/ReportCreateRequest.php | 8 +- src/Model/ReportCreateResponse.php | 8 +- src/Model/ReportResponse.php | 8 +- ...tBulkCreateEmbeddedWithTemplateRequest.php | 8 +- ...tureRequestBulkSendWithTemplateRequest.php | 8 +- .../SignatureRequestCreateEmbeddedRequest.php | 8 +- ...questCreateEmbeddedWithTemplateRequest.php | 8 +- .../SignatureRequestEditEmbeddedRequest.php | 1231 ++++ ...RequestEditEmbeddedWithTemplateRequest.php | 924 +++ src/Model/SignatureRequestEditRequest.php | 1262 ++++ ...ignatureRequestEditWithTemplateRequest.php | 956 +++ src/Model/SignatureRequestGetResponse.php | 8 +- src/Model/SignatureRequestListResponse.php | 8 +- src/Model/SignatureRequestRemindRequest.php | 8 +- src/Model/SignatureRequestResponse.php | 8 +- .../SignatureRequestResponseAttachment.php | 8 +- ...ignatureRequestResponseCustomFieldBase.php | 8 +- ...tureRequestResponseCustomFieldCheckbox.php | 8 +- ...ignatureRequestResponseCustomFieldText.php | 8 +- ...tureRequestResponseCustomFieldTypeEnum.php | 2 +- .../SignatureRequestResponseDataBase.php | 8 +- .../SignatureRequestResponseDataTypeEnum.php | 2 +- ...natureRequestResponseDataValueCheckbox.php | 8 +- ...eRequestResponseDataValueCheckboxMerge.php | 8 +- ...tureRequestResponseDataValueDateSigned.php | 8 +- ...natureRequestResponseDataValueDropdown.php | 8 +- ...natureRequestResponseDataValueInitials.php | 8 +- ...SignatureRequestResponseDataValueRadio.php | 8 +- ...atureRequestResponseDataValueSignature.php | 8 +- .../SignatureRequestResponseDataValueText.php | 8 +- ...atureRequestResponseDataValueTextMerge.php | 8 +- .../SignatureRequestResponseSignatures.php | 8 +- src/Model/SignatureRequestSendRequest.php | 8 +- ...ignatureRequestSendWithTemplateRequest.php | 8 +- src/Model/SignatureRequestUpdateRequest.php | 8 +- src/Model/SubAttachment.php | 8 +- src/Model/SubBulkSignerList.php | 8 +- src/Model/SubBulkSignerListCustomField.php | 8 +- src/Model/SubCC.php | 8 +- src/Model/SubCustomField.php | 8 +- src/Model/SubEditorOptions.php | 8 +- src/Model/SubFieldOptions.php | 8 +- src/Model/SubFormFieldGroup.php | 8 +- src/Model/SubFormFieldRule.php | 8 +- src/Model/SubFormFieldRuleAction.php | 18 +- src/Model/SubFormFieldRuleTrigger.php | 8 +- src/Model/SubFormFieldsPerDocumentBase.php | 8 +- .../SubFormFieldsPerDocumentCheckbox.php | 8 +- .../SubFormFieldsPerDocumentCheckboxMerge.php | 8 +- .../SubFormFieldsPerDocumentDateSigned.php | 8 +- .../SubFormFieldsPerDocumentDropdown.php | 8 +- .../SubFormFieldsPerDocumentFontEnum.php | 2 +- .../SubFormFieldsPerDocumentHyperlink.php | 8 +- .../SubFormFieldsPerDocumentInitials.php | 8 +- src/Model/SubFormFieldsPerDocumentRadio.php | 8 +- .../SubFormFieldsPerDocumentSignature.php | 8 +- src/Model/SubFormFieldsPerDocumentText.php | 8 +- .../SubFormFieldsPerDocumentTextMerge.php | 8 +- .../SubFormFieldsPerDocumentTypeEnum.php | 2 +- src/Model/SubMergeField.php | 8 +- src/Model/SubOAuth.php | 8 +- src/Model/SubOptions.php | 8 +- .../SubSignatureRequestGroupedSigners.php | 8 +- src/Model/SubSignatureRequestSigner.php | 8 +- .../SubSignatureRequestTemplateSigner.php | 8 +- src/Model/SubSigningOptions.php | 8 +- src/Model/SubTeamResponse.php | 8 +- src/Model/SubTemplateRole.php | 8 +- src/Model/SubUnclaimedDraftSigner.php | 8 +- src/Model/SubUnclaimedDraftTemplateSigner.php | 8 +- src/Model/SubWhiteLabelingOptions.php | 8 +- src/Model/TeamAddMemberRequest.php | 8 +- src/Model/TeamCreateRequest.php | 8 +- src/Model/TeamGetInfoResponse.php | 8 +- src/Model/TeamGetResponse.php | 8 +- src/Model/TeamInfoResponse.php | 8 +- src/Model/TeamInviteResponse.php | 8 +- src/Model/TeamInvitesResponse.php | 8 +- src/Model/TeamMemberResponse.php | 8 +- src/Model/TeamMembersResponse.php | 8 +- src/Model/TeamParentResponse.php | 8 +- src/Model/TeamRemoveMemberRequest.php | 8 +- src/Model/TeamResponse.php | 8 +- src/Model/TeamSubTeamsResponse.php | 8 +- src/Model/TeamUpdateRequest.php | 8 +- src/Model/TemplateAddUserRequest.php | 8 +- .../TemplateCreateEmbeddedDraftRequest.php | 8 +- .../TemplateCreateEmbeddedDraftResponse.php | 8 +- ...ateCreateEmbeddedDraftResponseTemplate.php | 8 +- src/Model/TemplateCreateRequest.php | 8 +- src/Model/TemplateCreateResponse.php | 8 +- src/Model/TemplateCreateResponseTemplate.php | 8 +- src/Model/TemplateEditResponse.php | 8 +- src/Model/TemplateGetResponse.php | 8 +- src/Model/TemplateListResponse.php | 8 +- src/Model/TemplateRemoveUserRequest.php | 8 +- src/Model/TemplateResponse.php | 8 +- src/Model/TemplateResponseAccount.php | 8 +- src/Model/TemplateResponseAccountQuota.php | 8 +- src/Model/TemplateResponseCCRole.php | 8 +- src/Model/TemplateResponseDocument.php | 8 +- ...emplateResponseDocumentCustomFieldBase.php | 8 +- ...ateResponseDocumentCustomFieldCheckbox.php | 8 +- ...emplateResponseDocumentCustomFieldText.php | 8 +- .../TemplateResponseDocumentFieldGroup.php | 8 +- ...TemplateResponseDocumentFieldGroupRule.php | 8 +- .../TemplateResponseDocumentFormFieldBase.php | 8 +- ...plateResponseDocumentFormFieldCheckbox.php | 8 +- ...ateResponseDocumentFormFieldDateSigned.php | 8 +- ...plateResponseDocumentFormFieldDropdown.php | 8 +- ...lateResponseDocumentFormFieldHyperlink.php | 8 +- ...plateResponseDocumentFormFieldInitials.php | 8 +- ...TemplateResponseDocumentFormFieldRadio.php | 8 +- ...lateResponseDocumentFormFieldSignature.php | 8 +- .../TemplateResponseDocumentFormFieldText.php | 8 +- ...emplateResponseDocumentStaticFieldBase.php | 8 +- ...ateResponseDocumentStaticFieldCheckbox.php | 8 +- ...eResponseDocumentStaticFieldDateSigned.php | 8 +- ...ateResponseDocumentStaticFieldDropdown.php | 8 +- ...teResponseDocumentStaticFieldHyperlink.php | 8 +- ...ateResponseDocumentStaticFieldInitials.php | 8 +- ...mplateResponseDocumentStaticFieldRadio.php | 8 +- ...teResponseDocumentStaticFieldSignature.php | 8 +- ...emplateResponseDocumentStaticFieldText.php | 8 +- .../TemplateResponseFieldAvgTextLength.php | 8 +- src/Model/TemplateResponseSignerRole.php | 8 +- src/Model/TemplateUpdateFilesRequest.php | 8 +- src/Model/TemplateUpdateFilesResponse.php | 8 +- .../TemplateUpdateFilesResponseTemplate.php | 8 +- .../UnclaimedDraftCreateEmbeddedRequest.php | 8 +- ...DraftCreateEmbeddedWithTemplateRequest.php | 8 +- src/Model/UnclaimedDraftCreateRequest.php | 8 +- src/Model/UnclaimedDraftCreateResponse.php | 8 +- .../UnclaimedDraftEditAndResendRequest.php | 8 +- src/Model/UnclaimedDraftResponse.php | 8 +- src/Model/WarningResponse.php | 8 +- src/ObjectSerializer.php | 16 +- templates/Configuration.mustache | 2 +- templates/HeaderSelector.mustache | 30 +- templates/ObjectSerializer.mustache | 10 +- templates/api.mustache | 59 +- .../libraries/psr-18/ApiException.mustache | 8 +- templates/libraries/psr-18/api.mustache | 28 +- templates/model_enum.mustache | 9 +- templates/model_generic.mustache | 9 +- 411 files changed, 17203 insertions(+), 8266 deletions(-) create mode 100755 bin/copy-constants.php create mode 100644 docs/Model/SignatureRequestEditEmbeddedRequest.md create mode 100644 docs/Model/SignatureRequestEditEmbeddedWithTemplateRequest.md create mode 100644 docs/Model/SignatureRequestEditRequest.md create mode 100644 docs/Model/SignatureRequestEditWithTemplateRequest.md delete mode 100644 examples/AccountCreate.php create mode 100644 examples/AccountCreateExample.php create mode 100644 examples/AccountCreateOauthExample.php delete mode 100644 examples/AccountGet.php create mode 100644 examples/AccountGetExample.php delete mode 100644 examples/AccountUpdate.php create mode 100644 examples/AccountUpdateExample.php delete mode 100644 examples/AccountVerify.php create mode 100644 examples/AccountVerifyExample.php delete mode 100644 examples/ApiAppCreate.php create mode 100644 examples/ApiAppCreateExample.php delete mode 100644 examples/ApiAppDelete.php create mode 100644 examples/ApiAppDeleteExample.php delete mode 100644 examples/ApiAppGet.php create mode 100644 examples/ApiAppGetExample.php delete mode 100644 examples/ApiAppList.php create mode 100644 examples/ApiAppListExample.php delete mode 100644 examples/ApiAppUpdate.php create mode 100644 examples/ApiAppUpdateExample.php delete mode 100644 examples/BulkSendJobGet.php create mode 100644 examples/BulkSendJobGetExample.php delete mode 100644 examples/BulkSendJobList.php create mode 100644 examples/BulkSendJobListExample.php delete mode 100644 examples/EmbeddedEditUrl.php create mode 100644 examples/EmbeddedEditUrlExample.php delete mode 100644 examples/EmbeddedSignUrl.php create mode 100644 examples/EmbeddedSignUrlExample.php rename examples/{EventCallback.php => EventCallbackExample.php} (91%) delete mode 100644 examples/FaxDelete.php create mode 100644 examples/FaxDeleteExample.php delete mode 100644 examples/FaxFiles.php create mode 100644 examples/FaxFilesExample.php delete mode 100644 examples/FaxGet.php create mode 100644 examples/FaxGetExample.php delete mode 100644 examples/FaxLineAddUser.php create mode 100644 examples/FaxLineAddUserExample.php delete mode 100644 examples/FaxLineAreaCodeGet.php create mode 100644 examples/FaxLineAreaCodeGetExample.php delete mode 100644 examples/FaxLineCreate.php create mode 100644 examples/FaxLineCreateExample.php delete mode 100644 examples/FaxLineDelete.php create mode 100644 examples/FaxLineDeleteExample.php delete mode 100644 examples/FaxLineGet.php create mode 100644 examples/FaxLineGetExample.php delete mode 100644 examples/FaxLineList.php create mode 100644 examples/FaxLineListExample.php delete mode 100644 examples/FaxLineRemoveUser.php create mode 100644 examples/FaxLineRemoveUserExample.php delete mode 100644 examples/FaxList.php create mode 100644 examples/FaxListExample.php delete mode 100644 examples/FaxSend.php create mode 100644 examples/FaxSendExample.php delete mode 100644 examples/OauthTokenGenerate.php create mode 100644 examples/OauthTokenGenerateExample.php delete mode 100644 examples/OauthTokenRefresh.php create mode 100644 examples/OauthTokenRefreshExample.php delete mode 100644 examples/ReportCreate.php create mode 100644 examples/ReportCreateExample.php delete mode 100644 examples/SignatureRequestBulkCreateEmbeddedWithTemplate.php create mode 100644 examples/SignatureRequestBulkCreateEmbeddedWithTemplateExample.php delete mode 100644 examples/SignatureRequestBulkSendWithTemplate.php create mode 100644 examples/SignatureRequestBulkSendWithTemplateExample.php delete mode 100644 examples/SignatureRequestCancel.php create mode 100644 examples/SignatureRequestCancelExample.php delete mode 100644 examples/SignatureRequestCreateEmbedded.php create mode 100644 examples/SignatureRequestCreateEmbeddedExample.php create mode 100644 examples/SignatureRequestCreateEmbeddedGroupedSignersExample.php delete mode 100644 examples/SignatureRequestCreateEmbeddedWithTemplate.php create mode 100644 examples/SignatureRequestCreateEmbeddedWithTemplateExample.php delete mode 100644 examples/SignatureRequestEdit.php delete mode 100644 examples/SignatureRequestEditEmbedded.php create mode 100644 examples/SignatureRequestEditEmbeddedExample.php create mode 100644 examples/SignatureRequestEditEmbeddedGroupedSignersExample.php delete mode 100644 examples/SignatureRequestEditEmbeddedWithTemplate.php create mode 100644 examples/SignatureRequestEditEmbeddedWithTemplateExample.php create mode 100644 examples/SignatureRequestEditExample.php create mode 100644 examples/SignatureRequestEditGroupedSignersExample.php delete mode 100644 examples/SignatureRequestEditWithTemplate.php create mode 100644 examples/SignatureRequestEditWithTemplateExample.php delete mode 100644 examples/SignatureRequestFiles.php delete mode 100644 examples/SignatureRequestFilesAsDataUri.php create mode 100644 examples/SignatureRequestFilesAsDataUriExample.php delete mode 100644 examples/SignatureRequestFilesAsFileUrl.php create mode 100644 examples/SignatureRequestFilesAsFileUrlExample.php create mode 100644 examples/SignatureRequestFilesExample.php delete mode 100644 examples/SignatureRequestGet.php create mode 100644 examples/SignatureRequestGetExample.php delete mode 100644 examples/SignatureRequestList.php create mode 100644 examples/SignatureRequestListExample.php delete mode 100644 examples/SignatureRequestReleaseHold.php create mode 100644 examples/SignatureRequestReleaseHoldExample.php delete mode 100644 examples/SignatureRequestRemind.php create mode 100644 examples/SignatureRequestRemindExample.php delete mode 100644 examples/SignatureRequestRemove.php create mode 100644 examples/SignatureRequestRemoveExample.php delete mode 100644 examples/SignatureRequestSend.php create mode 100644 examples/SignatureRequestSendExample.php create mode 100644 examples/SignatureRequestSendGroupedSignersExample.php delete mode 100644 examples/SignatureRequestSendWithTemplate.php create mode 100644 examples/SignatureRequestSendWithTemplateExample.php delete mode 100644 examples/SignatureRequestUpdate.php create mode 100644 examples/SignatureRequestUpdateExample.php delete mode 100644 examples/TeamAddMember.php create mode 100644 examples/TeamAddMemberAccountIdExample.php create mode 100644 examples/TeamAddMemberExample.php delete mode 100644 examples/TeamCreate.php create mode 100644 examples/TeamCreateExample.php delete mode 100644 examples/TeamDelete.php create mode 100644 examples/TeamDeleteExample.php delete mode 100644 examples/TeamGet.php create mode 100644 examples/TeamGetExample.php delete mode 100644 examples/TeamInfo.php create mode 100644 examples/TeamInfoExample.php delete mode 100644 examples/TeamInvites.php create mode 100644 examples/TeamInvitesExample.php delete mode 100644 examples/TeamMembers.php create mode 100644 examples/TeamMembersExample.php delete mode 100644 examples/TeamRemoveMember.php create mode 100644 examples/TeamRemoveMemberAccountIdExample.php create mode 100644 examples/TeamRemoveMemberExample.php delete mode 100644 examples/TeamSubTeams.php create mode 100644 examples/TeamSubTeamsExample.php delete mode 100644 examples/TeamUpdate.php create mode 100644 examples/TeamUpdateExample.php delete mode 100644 examples/TemplateAddUser.php create mode 100644 examples/TemplateAddUserExample.php delete mode 100644 examples/TemplateCreate.php delete mode 100644 examples/TemplateCreateEmbeddedDraft.php create mode 100644 examples/TemplateCreateEmbeddedDraftExample.php create mode 100644 examples/TemplateCreateEmbeddedDraftFormFieldGroupsExample.php create mode 100644 examples/TemplateCreateEmbeddedDraftFormFieldRulesExample.php create mode 100644 examples/TemplateCreateEmbeddedDraftFormFieldsPerDocumentExample.php create mode 100644 examples/TemplateCreateExample.php create mode 100644 examples/TemplateCreateFormFieldGroupsExample.php create mode 100644 examples/TemplateCreateFormFieldRulesExample.php create mode 100644 examples/TemplateCreateFormFieldsPerDocumentExample.php delete mode 100644 examples/TemplateDelete.php create mode 100644 examples/TemplateDeleteExample.php delete mode 100644 examples/TemplateFiles.php delete mode 100644 examples/TemplateFilesAsDataUri.php create mode 100644 examples/TemplateFilesAsDataUriExample.php delete mode 100644 examples/TemplateFilesAsFileUrl.php create mode 100644 examples/TemplateFilesAsFileUrlExample.php create mode 100644 examples/TemplateFilesExample.php delete mode 100644 examples/TemplateGet.php create mode 100644 examples/TemplateGetExample.php delete mode 100644 examples/TemplateList.php create mode 100644 examples/TemplateListExample.php delete mode 100644 examples/TemplateRemoveUser.php create mode 100644 examples/TemplateRemoveUserExample.php delete mode 100644 examples/TemplateUpdateFiles.php create mode 100644 examples/TemplateUpdateFilesExample.php delete mode 100644 examples/UnclaimedDraftCreate.php delete mode 100644 examples/UnclaimedDraftCreateEmbedded.php create mode 100644 examples/UnclaimedDraftCreateEmbeddedExample.php create mode 100644 examples/UnclaimedDraftCreateEmbeddedFormFieldGroupsExample.php create mode 100644 examples/UnclaimedDraftCreateEmbeddedFormFieldRulesExample.php create mode 100644 examples/UnclaimedDraftCreateEmbeddedFormFieldsPerDocumentExample.php delete mode 100644 examples/UnclaimedDraftCreateEmbeddedWithTemplate.php create mode 100644 examples/UnclaimedDraftCreateEmbeddedWithTemplateExample.php create mode 100644 examples/UnclaimedDraftCreateExample.php create mode 100644 examples/UnclaimedDraftCreateFormFieldGroupsExample.php create mode 100644 examples/UnclaimedDraftCreateFormFieldRulesExample.php create mode 100644 examples/UnclaimedDraftCreateFormFieldsPerDocumentExample.php delete mode 100644 examples/UnclaimedDraftEditAndResend.php create mode 100644 examples/UnclaimedDraftEditAndResendExample.php create mode 100644 src/Model/SignatureRequestEditEmbeddedRequest.php create mode 100644 src/Model/SignatureRequestEditEmbeddedWithTemplateRequest.php create mode 100644 src/Model/SignatureRequestEditRequest.php create mode 100644 src/Model/SignatureRequestEditWithTemplateRequest.php diff --git a/README.md b/README.md index 5d0f2f0..3eae3ac 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ To install the bindings via [Composer](https://getcomposer.org/), add the follow ```json { "require": { - "dropbox/sign": "^1.8.0" + "dropbox/sign": "^1.9.0" }, "minimum-stability": "dev" } @@ -64,7 +64,7 @@ Then run `composer install` Alternatively, install directly with ``` -composer require dropbox/sign:^1.8.0 +composer require dropbox/sign:^1.9.0 ``` ## Getting Started @@ -75,28 +75,28 @@ Please follow the [installation procedure](#installation--usage) and then run th ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$accountApi = new Dropbox\Sign\Api\AccountApi($config); - -$data = new Dropbox\Sign\Model\AccountCreateRequest(); -$data->setEmailAddress("newuser@dropboxsign.com"); +$account_create_request = (new Dropbox\Sign\Model\AccountCreateRequest()) + ->setEmailAddress("newuser@dropboxsign.com"); try { - $result = $accountApi->accountCreate($data); - print_r($result); + $response = (new Dropbox\Sign\Api\AccountApi(config: $config))->accountCreate( + account_create_request: $account_create_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling AccountApi#accountCreate: {$e->getMessage()}"; } ``` @@ -161,7 +161,7 @@ All URIs are relative to *https://api.hellosign.com/v3* | *EmbeddedApi* | [**embeddedEditUrl**](docs/Api/EmbeddedApi.md#embeddedediturl) | **POST** /embedded/edit_url/{template_id} | Get Embedded Template Edit URL | | *EmbeddedApi* | [**embeddedSignUrl**](docs/Api/EmbeddedApi.md#embeddedsignurl) | **GET** /embedded/sign_url/{signature_id} | Get Embedded Sign URL | | *FaxApi* | [**faxDelete**](docs/Api/FaxApi.md#faxdelete) | **DELETE** /fax/{fax_id} | Delete Fax | -| *FaxApi* | [**faxFiles**](docs/Api/FaxApi.md#faxfiles) | **GET** /fax/files/{fax_id} | List Fax Files | +| *FaxApi* | [**faxFiles**](docs/Api/FaxApi.md#faxfiles) | **GET** /fax/files/{fax_id} | Download Fax Files | | *FaxApi* | [**faxGet**](docs/Api/FaxApi.md#faxget) | **GET** /fax/{fax_id} | Get Fax | | *FaxApi* | [**faxList**](docs/Api/FaxApi.md#faxlist) | **GET** /fax/list | Lists Faxes | | *FaxApi* | [**faxSend**](docs/Api/FaxApi.md#faxsend) | **POST** /fax/send | Send Fax | @@ -180,6 +180,10 @@ All URIs are relative to *https://api.hellosign.com/v3* | *SignatureRequestApi* | [**signatureRequestCancel**](docs/Api/SignatureRequestApi.md#signaturerequestcancel) | **POST** /signature_request/cancel/{signature_request_id} | Cancel Incomplete Signature Request | | *SignatureRequestApi* | [**signatureRequestCreateEmbedded**](docs/Api/SignatureRequestApi.md#signaturerequestcreateembedded) | **POST** /signature_request/create_embedded | Create Embedded Signature Request | | *SignatureRequestApi* | [**signatureRequestCreateEmbeddedWithTemplate**](docs/Api/SignatureRequestApi.md#signaturerequestcreateembeddedwithtemplate) | **POST** /signature_request/create_embedded_with_template | Create Embedded Signature Request with Template | +| *SignatureRequestApi* | [**signatureRequestEdit**](docs/Api/SignatureRequestApi.md#signaturerequestedit) | **PUT** /signature_request/edit/{signature_request_id} | Edit Signature Request | +| *SignatureRequestApi* | [**signatureRequestEditEmbedded**](docs/Api/SignatureRequestApi.md#signaturerequesteditembedded) | **PUT** /signature_request/edit_embedded/{signature_request_id} | Edit Embedded Signature Request | +| *SignatureRequestApi* | [**signatureRequestEditEmbeddedWithTemplate**](docs/Api/SignatureRequestApi.md#signaturerequesteditembeddedwithtemplate) | **PUT** /signature_request/edit_embedded_with_template/{signature_request_id} | Edit Embedded Signature Request with Template | +| *SignatureRequestApi* | [**signatureRequestEditWithTemplate**](docs/Api/SignatureRequestApi.md#signaturerequesteditwithtemplate) | **PUT** /signature_request/edit_with_template/{signature_request_id} | Edit Signature Request With Template | | *SignatureRequestApi* | [**signatureRequestFiles**](docs/Api/SignatureRequestApi.md#signaturerequestfiles) | **GET** /signature_request/files/{signature_request_id} | Download Files | | *SignatureRequestApi* | [**signatureRequestFilesAsDataUri**](docs/Api/SignatureRequestApi.md#signaturerequestfilesasdatauri) | **GET** /signature_request/files_as_data_uri/{signature_request_id} | Download Files as Data Uri | | *SignatureRequestApi* | [**signatureRequestFilesAsFileUrl**](docs/Api/SignatureRequestApi.md#signaturerequestfilesasfileurl) | **GET** /signature_request/files_as_file_url/{signature_request_id} | Download Files as File Url | @@ -283,6 +287,10 @@ All URIs are relative to *https://api.hellosign.com/v3* - [SignatureRequestBulkSendWithTemplateRequest](docs/Model/SignatureRequestBulkSendWithTemplateRequest.md) - [SignatureRequestCreateEmbeddedRequest](docs/Model/SignatureRequestCreateEmbeddedRequest.md) - [SignatureRequestCreateEmbeddedWithTemplateRequest](docs/Model/SignatureRequestCreateEmbeddedWithTemplateRequest.md) +- [SignatureRequestEditEmbeddedRequest](docs/Model/SignatureRequestEditEmbeddedRequest.md) +- [SignatureRequestEditEmbeddedWithTemplateRequest](docs/Model/SignatureRequestEditEmbeddedWithTemplateRequest.md) +- [SignatureRequestEditRequest](docs/Model/SignatureRequestEditRequest.md) +- [SignatureRequestEditWithTemplateRequest](docs/Model/SignatureRequestEditWithTemplateRequest.md) - [SignatureRequestGetResponse](docs/Model/SignatureRequestGetResponse.md) - [SignatureRequestListResponse](docs/Model/SignatureRequestListResponse.md) - [SignatureRequestRemindRequest](docs/Model/SignatureRequestRemindRequest.md) @@ -439,6 +447,6 @@ apisupport@hellosign.com This PHP package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: `3.0.0` - - Package version: `1.8.0` - - Generator version: `7.8.0` + - Package version: `1.9.0` + - Generator version: `7.12.0` - Build package: `org.openapitools.codegen.languages.PhpClientCodegen` diff --git a/VERSION b/VERSION index 27f9cd3..f8e233b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.8.0 +1.9.0 diff --git a/bin/copy-constants.php b/bin/copy-constants.php new file mode 100755 index 0000000..f71f524 --- /dev/null +++ b/bin/copy-constants.php @@ -0,0 +1,64 @@ +#!/usr/bin/env php +run(); diff --git a/docs/Api/AccountApi.md b/docs/Api/AccountApi.md index 9c8e8c9..6d0f700 100644 --- a/docs/Api/AccountApi.md +++ b/docs/Api/AccountApi.md @@ -24,28 +24,28 @@ Creates a new Dropbox Sign Account that is associated with the specified `email_ ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$accountApi = new Dropbox\Sign\Api\AccountApi($config); - -$data = new Dropbox\Sign\Model\AccountCreateRequest(); -$data->setEmailAddress("newuser@dropboxsign.com"); +$account_create_request = (new Dropbox\Sign\Model\AccountCreateRequest()) + ->setEmailAddress("newuser@dropboxsign.com"); try { - $result = $accountApi->accountCreate($data); - print_r($result); + $response = (new Dropbox\Sign\Api\AccountApi(config: $config))->accountCreate( + account_create_request: $account_create_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling AccountApi#accountCreate: {$e->getMessage()}"; } ``` @@ -87,25 +87,23 @@ Returns the properties and settings of your Account. ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$accountApi = new Dropbox\Sign\Api\AccountApi($config); - try { - $result = $accountApi->accountGet(null, 'jack@example.com'); - print_r($result); + $response = (new Dropbox\Sign\Api\AccountApi(config: $config))->accountGet(); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling AccountApi#accountGet: {$e->getMessage()}"; } ``` @@ -148,28 +146,29 @@ Updates the properties and settings of your Account. Currently only allows for u ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$accountApi = new Dropbox\Sign\Api\AccountApi($config); - -$data = new Dropbox\Sign\Model\AccountUpdateRequest(); -$data->setCallbackUrl("https://www.example.com/callback"); +$account_update_request = (new Dropbox\Sign\Model\AccountUpdateRequest()) + ->setCallbackUrl("https://www.example.com/callback") + ->setLocale("en-US"); try { - $result = $accountApi->accountUpdate($data); - print_r($result); + $response = (new Dropbox\Sign\Api\AccountApi(config: $config))->accountUpdate( + account_update_request: $account_update_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling AccountApi#accountUpdate: {$e->getMessage()}"; } ``` @@ -211,28 +210,28 @@ Verifies whether an Dropbox Sign Account exists for the given email address. ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$accountApi = new Dropbox\Sign\Api\AccountApi($config); - -$data = new Dropbox\Sign\Model\AccountVerifyRequest(); -$data->setEmailAddress("some_user@dropboxsign.com"); +$account_verify_request = (new Dropbox\Sign\Model\AccountVerifyRequest()) + ->setEmailAddress("some_user@dropboxsign.com"); try { - $result = $accountApi->accountVerify($data); - print_r($result); + $response = (new Dropbox\Sign\Api\AccountApi(config: $config))->accountVerify( + account_verify_request: $account_verify_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling AccountApi#accountVerify: {$e->getMessage()}"; } ``` diff --git a/docs/Api/ApiAppApi.md b/docs/Api/ApiAppApi.md index a591601..eb5e933 100644 --- a/docs/Api/ApiAppApi.md +++ b/docs/Api/ApiAppApi.md @@ -25,45 +25,45 @@ Creates a new API App. ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$apiAppApi = new Dropbox\Sign\Api\ApiAppApi($config); - -$oauth = new Dropbox\Sign\Model\SubOAuth(); -$oauth->setCallbackUrl("https://example.com/oauth") +$oauth = (new Dropbox\Sign\Model\SubOAuth()) + ->setCallbackUrl("https://example.com/oauth") ->setScopes([ Dropbox\Sign\Model\SubOAuth::SCOPES_BASIC_ACCOUNT_INFO, Dropbox\Sign\Model\SubOAuth::SCOPES_REQUEST_SIGNATURE, ]); -$whiteLabelingOptions = new Dropbox\Sign\Model\SubWhiteLabelingOptions(); -$whiteLabelingOptions->setPrimaryButtonColor("#00b3e6") +$white_labeling_options = (new Dropbox\Sign\Model\SubWhiteLabelingOptions()) + ->setPrimaryButtonColor("#00b3e6") ->setPrimaryButtonTextColor("#ffffff"); -$customLogoFile = new SplFileObject(__DIR__ . "/CustomLogoFile.png"); - -$data = new Dropbox\Sign\Model\ApiAppCreateRequest(); -$data->setName("My Production App") - ->setDomains(["example.com"]) +$api_app_create_request = (new Dropbox\Sign\Model\ApiAppCreateRequest()) + ->setName("My Production App") + ->setDomains([ + "example.com", + ]) + ->setCustomLogoFile(new SplFileObject("CustomLogoFile.png")) ->setOauth($oauth) - ->setWhiteLabelingOptions($whiteLabelingOptions) - ->setCustomLogoFile($customLogoFile); + ->setWhiteLabelingOptions($white_labeling_options); try { - $result = $apiAppApi->apiAppCreate($data); - print_r($result); + $response = (new Dropbox\Sign\Api\ApiAppApi(config: $config))->apiAppCreate( + api_app_create_request: $api_app_create_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling ApiAppApi#apiAppCreate: {$e->getMessage()}"; } ``` @@ -105,26 +105,23 @@ Deletes an API App. Can only be invoked for apps you own. ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$apiAppApi = new Dropbox\Sign\Api\ApiAppApi($config); - -$clientId = "0dd3b823a682527788c4e40cb7b6f7e9"; - try { - $apiAppApi->apiAppDelete($clientId); + (new Dropbox\Sign\Api\ApiAppApi(config: $config))->apiAppDelete( + client_id: "0dd3b823a682527788c4e40cb7b6f7e9", + ); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling ApiAppApi#apiAppDelete: {$e->getMessage()}"; } ``` @@ -166,27 +163,25 @@ Returns an object with information about an API App. ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$apiAppApi = new Dropbox\Sign\Api\ApiAppApi($config); - -$clientId = "0dd3b823a682527788c4e40cb7b6f7e9"; - try { - $result = $apiAppApi->apiAppGet($clientId); - print_r($result); + $response = (new Dropbox\Sign\Api\ApiAppApi(config: $config))->apiAppGet( + client_id: "0dd3b823a682527788c4e40cb7b6f7e9", + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling ApiAppApi#apiAppGet: {$e->getMessage()}"; } ``` @@ -228,28 +223,26 @@ Returns a list of API Apps that are accessible by you. If you are on a team with ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$apiAppApi = new Dropbox\Sign\Api\ApiAppApi($config); - -$page = 1; -$pageSize = 2; - try { - $result = $apiAppApi->apiAppList($page, $pageSize); - print_r($result); + $response = (new Dropbox\Sign\Api\ApiAppApi(config: $config))->apiAppList( + page: 1, + page_size: 20, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling ApiAppApi#apiAppList: {$e->getMessage()}"; } ``` @@ -292,39 +285,47 @@ Updates an existing API App. Can only be invoked for apps you own. Only the fiel ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$apiAppApi = new Dropbox\Sign\Api\ApiAppApi($config); +$oauth = (new Dropbox\Sign\Model\SubOAuth()) + ->setCallbackUrl("https://example.com/oauth") + ->setScopes([ + Dropbox\Sign\Model\SubOAuth::SCOPES_BASIC_ACCOUNT_INFO, + Dropbox\Sign\Model\SubOAuth::SCOPES_REQUEST_SIGNATURE, + ]); -$whiteLabelingOptions = new Dropbox\Sign\Model\SubWhiteLabelingOptions(); -$whiteLabelingOptions->setPrimaryButtonColor("#00b3e6") +$white_labeling_options = (new Dropbox\Sign\Model\SubWhiteLabelingOptions()) + ->setPrimaryButtonColor("#00b3e6") ->setPrimaryButtonTextColor("#ffffff"); -$customLogoFile = new SplFileObject(__DIR__ . "/CustomLogoFile.png"); - -$data = new Dropbox\Sign\Model\ApiAppUpdateRequest(); -$data->setName("New Name") - ->setCallbackUrl("http://example.com/dropboxsign") - ->setWhiteLabelingOptions($whiteLabelingOptions) - ->setCustomLogoFile($customLogoFile); - -$clientId = "0dd3b823a682527788c4e40cb7b6f7e9"; +$api_app_update_request = (new Dropbox\Sign\Model\ApiAppUpdateRequest()) + ->setCallbackUrl("https://example.com/dropboxsign") + ->setName("New Name") + ->setDomains([ + "example.com", + ]) + ->setCustomLogoFile(new SplFileObject("CustomLogoFile.png")) + ->setOauth($oauth) + ->setWhiteLabelingOptions($white_labeling_options); try { - $result = $apiAppApi->apiAppUpdate($clientId, $data); - print_r($result); + $response = (new Dropbox\Sign\Api\ApiAppApi(config: $config))->apiAppUpdate( + client_id: "0dd3b823a682527788c4e40cb7b6f7e9", + api_app_update_request: $api_app_update_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling ApiAppApi#apiAppUpdate: {$e->getMessage()}"; } ``` diff --git a/docs/Api/BulkSendJobApi.md b/docs/Api/BulkSendJobApi.md index ede4f34..a58d634 100644 --- a/docs/Api/BulkSendJobApi.md +++ b/docs/Api/BulkSendJobApi.md @@ -22,27 +22,27 @@ Returns the status of the BulkSendJob and its SignatureRequests specified by the ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$bulkSendJobApi = new Dropbox\Sign\Api\BulkSendJobApi($config); - -$bulkSendJobId = "6e683bc0369ba3d5b6f43c2c22a8031dbf6bd174"; - try { - $result = $bulkSendJobApi->bulkSendJobGet($bulkSendJobId); - print_r($result); + $response = (new Dropbox\Sign\Api\BulkSendJobApi(config: $config))->bulkSendJobGet( + bulk_send_job_id: "6e683bc0369ba3d5b6f43c2c22a8031dbf6bd174", + page: 1, + page_size: 20, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling BulkSendJobApi#bulkSendJobGet: {$e->getMessage()}"; } ``` @@ -86,28 +86,26 @@ Returns a list of BulkSendJob that you can access. ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$bulkSendJobApi = new Dropbox\Sign\Api\BulkSendJobApi($config); - -$page = 1; -$pageSize = 20; - try { - $result = $bulkSendJobApi->bulkSendJobList($page, $pageSize); - print_r($result); + $response = (new Dropbox\Sign\Api\BulkSendJobApi(config: $config))->bulkSendJobList( + page: 1, + page_size: 20, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling BulkSendJobApi#bulkSendJobList: {$e->getMessage()}"; } ``` diff --git a/docs/Api/EmbeddedApi.md b/docs/Api/EmbeddedApi.md index 8b1acfb..c186d94 100644 --- a/docs/Api/EmbeddedApi.md +++ b/docs/Api/EmbeddedApi.md @@ -22,31 +22,35 @@ Retrieves an embedded object containing a template url that can be opened in an ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$embeddedApi = new Dropbox\Sign\Api\EmbeddedApi($config); +$merge_fields = [ +]; -$data = new Dropbox\Sign\Model\EmbeddedEditUrlRequest(); -$data->setCcRoles([""]) - ->setMergeFields([]); - -$templateId = "5de8179668f2033afac48da1868d0093bf133266"; +$embedded_edit_url_request = (new Dropbox\Sign\Model\EmbeddedEditUrlRequest()) + ->setCcRoles([ + "", + ]) + ->setMergeFields($merge_fields); try { - $result = $embeddedApi->embeddedEditUrl($templateId, $data); - print_r($result); + $response = (new Dropbox\Sign\Api\EmbeddedApi(config: $config))->embeddedEditUrl( + template_id: "f57db65d3f933b5316d398057a36176831451a35", + embedded_edit_url_request: $embedded_edit_url_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling EmbeddedApi#embeddedEditUrl: {$e->getMessage()}"; } ``` @@ -89,27 +93,25 @@ Retrieves an embedded object containing a signature url that can be opened in an ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$embeddedApi = new Dropbox\Sign\Api\EmbeddedApi($config); - -$signatureId = "50e3542f738adfa7ddd4cbd4c00d2a8ab6e4194b"; - try { - $result = $embeddedApi->embeddedSignUrl($signatureId); - print_r($result); + $response = (new Dropbox\Sign\Api\EmbeddedApi(config: $config))->embeddedSignUrl( + signature_id: "50e3542f738adfa7ddd4cbd4c00d2a8ab6e4194b", + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling EmbeddedApi#embeddedSignUrl: {$e->getMessage()}"; } ``` diff --git a/docs/Api/FaxApi.md b/docs/Api/FaxApi.md index 8b68458..aeb7a39 100644 --- a/docs/Api/FaxApi.md +++ b/docs/Api/FaxApi.md @@ -5,7 +5,7 @@ All URIs are relative to https://api.hellosign.com/v3. | Method | HTTP request | Description | | ------------- | ------------- | ------------- | | [**faxDelete()**](FaxApi.md#faxDelete) | **DELETE** /fax/{fax_id} | Delete Fax | -| [**faxFiles()**](FaxApi.md#faxFiles) | **GET** /fax/files/{fax_id} | List Fax Files | +| [**faxFiles()**](FaxApi.md#faxFiles) | **GET** /fax/files/{fax_id} | Download Fax Files | | [**faxGet()**](FaxApi.md#faxGet) | **GET** /fax/{fax_id} | Get Fax | | [**faxList()**](FaxApi.md#faxList) | **GET** /fax/list | Lists Faxes | | [**faxSend()**](FaxApi.md#faxSend) | **POST** /fax/send | Send Fax | @@ -18,28 +18,29 @@ faxDelete($fax_id) ``` Delete Fax -Deletes the specified Fax from the system. +Deletes the specified Fax from the system ### Example ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -$faxApi = new Dropbox\Sign\Api\FaxApi($config); +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); try { - $faxApi->faxDelete("fa5c8a0b0f492d768749333ad6fcc214c111e967"); + (new Dropbox\Sign\Api\FaxApi(config: $config))->faxDelete( + fax_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + ); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling FaxApi#faxDelete: {$e->getMessage()}"; } ``` @@ -72,33 +73,33 @@ void (empty response body) ```php faxFiles($fax_id): \SplFileObject ``` -List Fax Files +Download Fax Files -Returns list of fax files +Downloads files associated with a Fax ### Example ```php setUsername("YOUR_API_KEY"); +require_once __DIR__ . '/../vendor/autoload.php'; -$faxApi = new Dropbox\Sign\Api\FaxApi($config); +use SplFileObject; +use Dropbox; -$faxId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); try { - $result = $faxApi->faxFiles($faxId); - copy($result->getRealPath(), __DIR__ . '/file_response.pdf'); + $response = (new Dropbox\Sign\Api\FaxApi(config: $config))->faxFiles( + fax_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + ); + + copy($response->getRealPath(), __DIR__ . '/file_response'); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling FaxApi#faxFiles: {$e->getMessage()}"; } ``` @@ -133,31 +134,31 @@ faxGet($fax_id): \Dropbox\Sign\Model\FaxGetResponse ``` Get Fax -Returns information about fax +Returns information about a Fax ### Example ```php setUsername("YOUR_API_KEY"); +require_once __DIR__ . '/../vendor/autoload.php'; -$faxApi = new Dropbox\Sign\Api\FaxApi($config); +use SplFileObject; +use Dropbox; -$faxId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); try { - $result = $faxApi->faxGet($faxId); - print_r($result); + $response = (new Dropbox\Sign\Api\FaxApi(config: $config))->faxGet( + fax_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling FaxApi#faxGet: {$e->getMessage()}"; } ``` @@ -192,32 +193,32 @@ faxList($page, $page_size): \Dropbox\Sign\Model\FaxListResponse ``` Lists Faxes -Returns properties of multiple faxes +Returns properties of multiple Faxes ### Example ```php setUsername("YOUR_API_KEY"); +require_once __DIR__ . '/../vendor/autoload.php'; -$faxApi = new Dropbox\Sign\Api\FaxApi($config); +use SplFileObject; +use Dropbox; -$page = 1; -$pageSize = 2; +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); try { - $result = $faxApi->faxList($page, $pageSize); - print_r($result); + $response = (new Dropbox\Sign\Api\FaxApi(config: $config))->faxList( + page: 1, + page_size: 20, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling FaxApi#faxList: {$e->getMessage()}"; } ``` @@ -226,8 +227,8 @@ try { |Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **page** | **int**| Page | [optional] [default to 1] | -| **page_size** | **int**| Page size | [optional] [default to 20] | +| **page** | **int**| Which page number of the Fax 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 @@ -253,39 +254,42 @@ faxSend($fax_send_request): \Dropbox\Sign\Model\FaxGetResponse ``` Send Fax -Action to prepare and send a fax +Creates and sends a new Fax with the submitted file(s) ### Example ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -$faxApi = new Dropbox\Sign\Api\FaxApi($config); +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); -$data = new Dropbox\Sign\Model\FaxSendRequest(); -$data->setFiles([new SplFileObject(__DIR__ . "/example_signature_request.pdf")]) - ->setTestMode(true) +$fax_send_request = (new Dropbox\Sign\Model\FaxSendRequest()) ->setRecipient("16690000001") ->setSender("16690000000") + ->setTestMode(true) ->setCoverPageTo("Jill Fax") - ->setCoverPageMessage("I'm sending you a fax!") ->setCoverPageFrom("Faxer Faxerson") - ->setTitle("This is what the fax is about!"); + ->setCoverPageMessage("I'm sending you a fax!") + ->setTitle("This is what the fax is about!") + ->setFiles([ + ]); try { - $result = $faxApi->faxSend($data); - print_r($result); + $response = (new Dropbox\Sign\Api\FaxApi(config: $config))->faxSend( + fax_send_request: $fax_send_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling FaxApi#faxSend: {$e->getMessage()}"; } ``` diff --git a/docs/Api/FaxLineApi.md b/docs/Api/FaxLineApi.md index 1bb340d..123fd3c 100644 --- a/docs/Api/FaxLineApi.md +++ b/docs/Api/FaxLineApi.md @@ -27,26 +27,28 @@ Grants a user access to the specified Fax Line. ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -$faxLineApi = new Dropbox\Sign\Api\FaxLineApi($config); +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); -$data = new Dropbox\Sign\Model\FaxLineAddUserRequest(); -$data->setNumber("[FAX_NUMBER]") +$fax_line_add_user_request = (new Dropbox\Sign\Model\FaxLineAddUserRequest()) + ->setNumber("[FAX_NUMBER]") ->setEmailAddress("member@dropboxsign.com"); try { - $result = $faxLineApi->faxLineAddUser($data); - print_r($result); + $response = (new Dropbox\Sign\Api\FaxLineApi(config: $config))->faxLineAddUser( + fax_line_add_user_request: $fax_line_add_user_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling FaxLineApi#faxLineAddUser: {$e->getMessage()}"; } ``` @@ -81,29 +83,31 @@ faxLineAreaCodeGet($country, $state, $province, $city): \Dropbox\Sign\Model\FaxL ``` Get Available Fax Line Area Codes -Returns a response with the area codes available for a given state/provice and city. +Returns a list of available area codes for a given state/province and city ### Example ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -$faxLineApi = new Dropbox\Sign\Api\FaxLineApi($config); +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); try { - $result = $faxLineApi->faxLineAreaCodeGet("US", "CA"); - print_r($result); + $response = (new Dropbox\Sign\Api\FaxLineApi(config: $config))->faxLineAreaCodeGet( + country: "US", + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling FaxLineApi#faxLineAreaCodeGet: {$e->getMessage()}"; } ``` @@ -112,10 +116,10 @@ try { |Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **country** | **string**| Filter area codes by country. | | -| **state** | **string**| Filter area codes by state. | [optional] | -| **province** | **string**| Filter area codes by province. | [optional] | -| **city** | **string**| Filter area codes by city. | [optional] | +| **country** | **string**| Filter area codes by country | | +| **state** | **string**| Filter area codes by state | [optional] | +| **province** | **string**| Filter area codes by province | [optional] | +| **city** | **string**| Filter area codes by city | [optional] | ### Return type @@ -141,33 +145,35 @@ faxLineCreate($fax_line_create_request): \Dropbox\Sign\Model\FaxLineResponse ``` Purchase Fax Line -Purchases a new Fax Line. +Purchases a new Fax Line ### Example ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -$faxLineApi = new Dropbox\Sign\Api\FaxLineApi($config); +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); -$data = new Dropbox\Sign\Model\FaxLineCreateRequest(); -$data->setAreaCode(209) - ->setCountry("US"); +$fax_line_create_request = (new Dropbox\Sign\Model\FaxLineCreateRequest()) + ->setAreaCode(209) + ->setCountry(Dropbox\Sign\Model\FaxLineCreateRequest::COUNTRY_US); try { - $result = $faxLineApi->faxLineCreate($data); - print_r($result); + $response = (new Dropbox\Sign\Api\FaxLineApi(config: $config))->faxLineCreate( + fax_line_create_request: $fax_line_create_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling FaxLineApi#faxLineCreate: {$e->getMessage()}"; } ``` @@ -209,24 +215,25 @@ Deletes the specified Fax Line from the subscription. ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -$faxLineApi = new Dropbox\Sign\Api\FaxLineApi($config); +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); -$data = new Dropbox\Sign\Model\FaxLineDeleteRequest(); -$data->setNumber("[FAX_NUMBER]"); +$fax_line_delete_request = (new Dropbox\Sign\Model\FaxLineDeleteRequest()) + ->setNumber("[FAX_NUMBER]"); try { - $faxLineApi->faxLineDelete($data); + (new Dropbox\Sign\Api\FaxLineApi(config: $config))->faxLineDelete( + fax_line_delete_request: $fax_line_delete_request, + ); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling FaxLineApi#faxLineDelete: {$e->getMessage()}"; } ``` @@ -268,22 +275,24 @@ Returns the properties and settings of a Fax Line. ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -$faxLineApi = new Dropbox\Sign\Api\FaxLineApi($config); +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); try { - $result = $faxLineApi->faxLineGet("[FAX_NUMBER]"); - print_r($result); + $response = (new Dropbox\Sign\Api\FaxLineApi(config: $config))->faxLineGet( + number: "123-123-1234", + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling FaxLineApi#faxLineGet: {$e->getMessage()}"; } ``` @@ -292,7 +301,7 @@ try { |Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **number** | **string**| The Fax Line number. | | +| **number** | **string**| The Fax Line number | | ### Return type @@ -325,22 +334,26 @@ Returns the properties and settings of multiple Fax Lines. ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -$faxLineApi = new Dropbox\Sign\Api\FaxLineApi($config); +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); try { - $result = $faxLineApi->faxLineList(); - print_r($result); + $response = (new Dropbox\Sign\Api\FaxLineApi(config: $config))->faxLineList( + account_id: "ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97", + page: 1, + page_size: 20, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling FaxLineApi#faxLineList: {$e->getMessage()}"; } ``` @@ -350,9 +363,9 @@ try { |Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **account_id** | **string**| Account ID | [optional] | -| **page** | **int**| Page | [optional] [default to 1] | -| **page_size** | **int**| Page size | [optional] [default to 20] | -| **show_team_lines** | **bool**| Show team lines | [optional] | +| **page** | **int**| Which page number of the Fax Line 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] | +| **show_team_lines** | **bool**| Include Fax Lines belonging to team members in the list | [optional] | ### Return type @@ -378,33 +391,35 @@ faxLineRemoveUser($fax_line_remove_user_request): \Dropbox\Sign\Model\FaxLineRes ``` Remove Fax Line Access -Removes a user's access to the specified Fax Line. +Removes a user's access to the specified Fax Line ### Example ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -$faxLineApi = new Dropbox\Sign\Api\FaxLineApi($config); +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); -$data = new Dropbox\Sign\Model\FaxLineRemoveUserRequest(); -$data->setNumber("[FAX_NUMBER]") +$fax_line_remove_user_request = (new Dropbox\Sign\Model\FaxLineRemoveUserRequest()) + ->setNumber("[FAX_NUMBER]") ->setEmailAddress("member@dropboxsign.com"); try { - $result = $faxLineApi->faxLineRemoveUser($data); - print_r($result); + $response = (new Dropbox\Sign\Api\FaxLineApi(config: $config))->faxLineRemoveUser( + fax_line_remove_user_request: $fax_line_remove_user_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling FaxLineApi#faxLineRemoveUser: {$e->getMessage()}"; } ``` diff --git a/docs/Api/OAuthApi.md b/docs/Api/OAuthApi.md index 854b4b7..398664f 100644 --- a/docs/Api/OAuthApi.md +++ b/docs/Api/OAuthApi.md @@ -22,25 +22,30 @@ Once you have retrieved the code from the user callback, you will need to exchan ```php setState("900e06e2") - ->setCode("1b0d28d90c86c141") +use SplFileObject; +use Dropbox; + +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); + +$o_auth_token_generate_request = (new Dropbox\Sign\Model\OAuthTokenGenerateRequest()) ->setClientId("cc91c61d00f8bb2ece1428035716b") - ->setClientSecret("1d14434088507ffa390e6f5528465"); + ->setClientSecret("1d14434088507ffa390e6f5528465") + ->setCode("1b0d28d90c86c141") + ->setState("900e06e2") + ->setGrantType("authorization_code"); try { - $result = $oauthApi->oauthTokenGenerate($data); - print_r($result); + $response = (new Dropbox\Sign\Api\OAuthApi(config: $config))->oauthTokenGenerate( + o_auth_token_generate_request: $o_auth_token_generate_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling OAuthApi#oauthTokenGenerate: {$e->getMessage()}"; } ``` @@ -82,22 +87,27 @@ Access tokens are only valid for a given period of time (typically one hour) for ```php setRefreshToken("hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3"); +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); + +$o_auth_token_refresh_request = (new Dropbox\Sign\Model\OAuthTokenRefreshRequest()) + ->setGrantType("refresh_token") + ->setRefreshToken("hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3"); try { - $result = $oauthApi->oauthTokenRefresh($data); - print_r($result); + $response = (new Dropbox\Sign\Api\OAuthApi(config: $config))->oauthTokenRefresh( + o_auth_token_refresh_request: $o_auth_token_refresh_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling OAuthApi#oauthTokenRefresh: {$e->getMessage()}"; } ``` diff --git a/docs/Api/ReportApi.md b/docs/Api/ReportApi.md index 285a20e..2609a12 100644 --- a/docs/Api/ReportApi.md +++ b/docs/Api/ReportApi.md @@ -21,17 +21,18 @@ Request the creation of one or more report(s). When the report(s) have been gen ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -$reportApi = new Dropbox\Sign\Api\ReportApi($config); +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); -$data = new Dropbox\Sign\Model\ReportCreateRequest(); -$data->setStartDate("09/01/2020") +$report_create_request = (new Dropbox\Sign\Model\ReportCreateRequest()) + ->setStartDate("09/01/2020") ->setEndDate("09/01/2020") ->setReportType([ Dropbox\Sign\Model\ReportCreateRequest::REPORT_TYPE_USER_ACTIVITY, @@ -39,12 +40,13 @@ $data->setStartDate("09/01/2020") ]); try { - $result = $reportApi->reportCreate($data); - print_r($result); + $response = (new Dropbox\Sign\Api\ReportApi(config: $config))->reportCreate( + report_create_request: $report_create_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling ReportApi#reportCreate: {$e->getMessage()}"; } ``` diff --git a/docs/Api/SignatureRequestApi.md b/docs/Api/SignatureRequestApi.md index aa49790..72acdcc 100644 --- a/docs/Api/SignatureRequestApi.md +++ b/docs/Api/SignatureRequestApi.md @@ -9,6 +9,10 @@ All URIs are relative to https://api.hellosign.com/v3. | [**signatureRequestCancel()**](SignatureRequestApi.md#signatureRequestCancel) | **POST** /signature_request/cancel/{signature_request_id} | Cancel Incomplete Signature Request | | [**signatureRequestCreateEmbedded()**](SignatureRequestApi.md#signatureRequestCreateEmbedded) | **POST** /signature_request/create_embedded | Create Embedded Signature Request | | [**signatureRequestCreateEmbeddedWithTemplate()**](SignatureRequestApi.md#signatureRequestCreateEmbeddedWithTemplate) | **POST** /signature_request/create_embedded_with_template | Create Embedded Signature Request with Template | +| [**signatureRequestEdit()**](SignatureRequestApi.md#signatureRequestEdit) | **PUT** /signature_request/edit/{signature_request_id} | Edit Signature Request | +| [**signatureRequestEditEmbedded()**](SignatureRequestApi.md#signatureRequestEditEmbedded) | **PUT** /signature_request/edit_embedded/{signature_request_id} | Edit Embedded Signature Request | +| [**signatureRequestEditEmbeddedWithTemplate()**](SignatureRequestApi.md#signatureRequestEditEmbeddedWithTemplate) | **PUT** /signature_request/edit_embedded_with_template/{signature_request_id} | Edit Embedded Signature Request with Template | +| [**signatureRequestEditWithTemplate()**](SignatureRequestApi.md#signatureRequestEditWithTemplate) | **PUT** /signature_request/edit_with_template/{signature_request_id} | Edit Signature Request With Template | | [**signatureRequestFiles()**](SignatureRequestApi.md#signatureRequestFiles) | **GET** /signature_request/files/{signature_request_id} | Download Files | | [**signatureRequestFilesAsDataUri()**](SignatureRequestApi.md#signatureRequestFilesAsDataUri) | **GET** /signature_request/files_as_data_uri/{signature_request_id} | Download Files as Data Uri | | [**signatureRequestFilesAsFileUrl()**](SignatureRequestApi.md#signatureRequestFilesAsFileUrl) | **GET** /signature_request/files_as_file_url/{signature_request_id} | Download Files as File Url | @@ -36,63 +40,92 @@ Creates BulkSendJob which sends up to 250 SignatureRequests in bulk based off of ```php setUsername("YOUR_API_KEY"); -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); +$signer_list_2_custom_fields_1 = (new Dropbox\Sign\Model\SubBulkSignerListCustomField()) + ->setName("company") + ->setValue("123 LLC"); + +$signer_list_2_custom_fields = [ + $signer_list_2_custom_fields_1, +]; + +$signer_list_2_signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner()) + ->setRole("Client") + ->setName("Mary") + ->setEmailAddress("mary@example.com") + ->setPin("gd9as5b"); + +$signer_list_2_signers = [ + $signer_list_2_signers_1, +]; + +$signer_list_1_custom_fields_1 = (new Dropbox\Sign\Model\SubBulkSignerListCustomField()) + ->setName("company") + ->setValue("ABC Corp"); + +$signer_list_1_custom_fields = [ + $signer_list_1_custom_fields_1, +]; -$signerList1Signer = new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner(); -$signerList1Signer->setRole("Client") +$signer_list_1_signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner()) + ->setRole("Client") ->setName("George") ->setEmailAddress("george@example.com") ->setPin("d79a3td"); -$signerList1CustomFields = new Dropbox\Sign\Model\SubBulkSignerListCustomField(); -$signerList1CustomFields->setName("company") - ->setValue("ABC Corp"); +$signer_list_1_signers = [ + $signer_list_1_signers_1, +]; -$signerList1 = new Dropbox\Sign\Model\SubBulkSignerList(); -$signerList1->setSigners([$signerList1Signer]) - ->setCustomFields([$signerList1CustomFields]); +$signer_list_1 = (new Dropbox\Sign\Model\SubBulkSignerList()) + ->setCustomFields($signer_list_1_custom_fields) + ->setSigners($signer_list_1_signers); -$signerList2Signer = new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner(); -$signerList2Signer->setRole("Client") - ->setName("Mary") - ->setEmailAddress("mary@example.com") - ->setPin("gd9as5b"); +$signer_list_2 = (new Dropbox\Sign\Model\SubBulkSignerList()) + ->setCustomFields($signer_list_2_custom_fields) + ->setSigners($signer_list_2_signers); -$signerList2CustomFields = new Dropbox\Sign\Model\SubBulkSignerListCustomField(); -$signerList2CustomFields->setName("company") - ->setValue("123 LLC"); - -$signerList2 = new Dropbox\Sign\Model\SubBulkSignerList(); -$signerList2->setSigners([$signerList2Signer]) - ->setCustomFields([$signerList2CustomFields]); +$signer_list = [ + $signer_list_1, + $signer_list_2, +]; -$cc1 = new Dropbox\Sign\Model\SubCC(); -$cc1->setRole("Accounting") +$ccs_1 = (new Dropbox\Sign\Model\SubCC()) + ->setRole("Accounting") ->setEmailAddress("accounting@example.com"); -$data = new Dropbox\Sign\Model\SignatureRequestBulkCreateEmbeddedWithTemplateRequest(); -$data->setClientId("1a659d9ad95bccd307ecad78d72192f8") - ->setTemplateIds(["c26b8a16784a872da37ea946b9ddec7c1e11dff6"]) - ->setSubject("Purchase Order") +$ccs = [ + $ccs_1, +]; + +$signature_request_bulk_create_embedded_with_template_request = (new Dropbox\Sign\Model\SignatureRequestBulkCreateEmbeddedWithTemplateRequest()) + ->setClientId("1a659d9ad95bccd307ecad78d72192f8") + ->setTemplateIds([ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", + ]) ->setMessage("Glad we could come to an agreement.") - ->setSignerList([$signerList1, $signerList2]) - ->setCcs([$cc1]) - ->setTestMode(true); + ->setSubject("Purchase Order") + ->setTestMode(true) + ->setSignerList($signer_list) + ->setCcs($ccs); try { - $result = $signatureRequestApi->signatureRequestBulkCreateEmbeddedWithTemplate($data); - print_r($result); + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestBulkCreateEmbeddedWithTemplate( + signature_request_bulk_create_embedded_with_template_request: $signature_request_bulk_create_embedded_with_template_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling SignatureRequestApi#signatureRequestBulkCreateEmbeddedWithTemplate: {$e->getMessage()}"; } ``` @@ -134,65 +167,92 @@ Creates BulkSendJob which sends up to 250 SignatureRequests in bulk based off of ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); +$signer_list_2_custom_fields_1 = (new Dropbox\Sign\Model\SubBulkSignerListCustomField()) + ->setName("company") + ->setValue("123 LLC"); + +$signer_list_2_custom_fields = [ + $signer_list_2_custom_fields_1, +]; -$signerList1Signer = new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner(); -$signerList1Signer->setRole("Client") +$signer_list_2_signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner()) + ->setRole("Client") + ->setName("Mary") + ->setEmailAddress("mary@example.com") + ->setPin("gd9as5b"); + +$signer_list_2_signers = [ + $signer_list_2_signers_1, +]; + +$signer_list_1_custom_fields_1 = (new Dropbox\Sign\Model\SubBulkSignerListCustomField()) + ->setName("company") + ->setValue("ABC Corp"); + +$signer_list_1_custom_fields = [ + $signer_list_1_custom_fields_1, +]; + +$signer_list_1_signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner()) + ->setRole("Client") ->setName("George") ->setEmailAddress("george@example.com") ->setPin("d79a3td"); -$signerList1CustomFields = new Dropbox\Sign\Model\SubBulkSignerListCustomField(); -$signerList1CustomFields->setName("company") - ->setValue("ABC Corp"); - -$signerList1 = new Dropbox\Sign\Model\SubBulkSignerList(); -$signerList1->setSigners([$signerList1Signer]) - ->setCustomFields([$signerList1CustomFields]); +$signer_list_1_signers = [ + $signer_list_1_signers_1, +]; -$signerList2Signer = new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner(); -$signerList2Signer->setRole("Client") - ->setName("Mary") - ->setEmailAddress("mary@example.com") - ->setPin("gd9as5b"); +$signer_list_1 = (new Dropbox\Sign\Model\SubBulkSignerList()) + ->setCustomFields($signer_list_1_custom_fields) + ->setSigners($signer_list_1_signers); -$signerList2CustomFields = new Dropbox\Sign\Model\SubBulkSignerListCustomField(); -$signerList2CustomFields->setName("company") - ->setValue("123 LLC"); +$signer_list_2 = (new Dropbox\Sign\Model\SubBulkSignerList()) + ->setCustomFields($signer_list_2_custom_fields) + ->setSigners($signer_list_2_signers); -$signerList2 = new Dropbox\Sign\Model\SubBulkSignerList(); -$signerList2->setSigners([$signerList2Signer]) - ->setCustomFields([$signerList2CustomFields]); +$signer_list = [ + $signer_list_1, + $signer_list_2, +]; -$cc1 = new Dropbox\Sign\Model\SubCC(); -$cc1->setRole("Accounting") +$ccs_1 = (new Dropbox\Sign\Model\SubCC()) + ->setRole("Accounting") ->setEmailAddress("accounting@example.com"); -$data = new Dropbox\Sign\Model\SignatureRequestBulkSendWithTemplateRequest(); -$data->setTemplateIds(["c26b8a16784a872da37ea946b9ddec7c1e11dff6"]) - ->setSubject("Purchase Order") +$ccs = [ + $ccs_1, +]; + +$signature_request_bulk_send_with_template_request = (new Dropbox\Sign\Model\SignatureRequestBulkSendWithTemplateRequest()) + ->setTemplateIds([ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", + ]) ->setMessage("Glad we could come to an agreement.") - ->setSignerList([$signerList1, $signerList2]) - ->setCcs([$cc1]) - ->setTestMode(true); + ->setSubject("Purchase Order") + ->setTestMode(true) + ->setSignerList($signer_list) + ->setCcs($ccs); try { - $result = $signatureRequestApi->signatureRequestBulkSendWithTemplate($data); - print_r($result); + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestBulkSendWithTemplate( + signature_request_bulk_send_with_template_request: $signature_request_bulk_send_with_template_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling SignatureRequestApi#signatureRequestBulkSendWithTemplate: {$e->getMessage()}"; } ``` @@ -234,26 +294,23 @@ Cancels an incomplete signature request. This action is **not reversible**. The ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); - -$signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - try { - $signatureRequestApi->signatureRequestCancel($signatureRequestId); + (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestCancel( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + ); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling SignatureRequestApi#signatureRequestCancel: {$e->getMessage()}"; } ``` @@ -295,56 +352,62 @@ Creates a new SignatureRequest with the submitted documents to be signed in an e ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); +$signing_options = (new Dropbox\Sign\Model\SubSigningOptions()) + ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW) + ->setDraw(true) + ->setPhone(false) + ->setType(true) + ->setUpload(true); -$signer1 = new Dropbox\Sign\Model\SubSignatureRequestSigner(); -$signer1->setEmailAddress("jack@example.com") +$signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) ->setName("Jack") + ->setEmailAddress("jack@example.com") ->setOrder(0); -$signer2 = new Dropbox\Sign\Model\SubSignatureRequestSigner(); -$signer2->setEmailAddress("jill@example.com") +$signers_2 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) ->setName("Jill") + ->setEmailAddress("jill@example.com") ->setOrder(1); -$signingOptions = new Dropbox\Sign\Model\SubSigningOptions(); -$signingOptions->setDraw(true) - ->setType(true) - ->setUpload(true) - ->setPhone(true) - ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW); +$signers = [ + $signers_1, + $signers_2, +]; -$data = new Dropbox\Sign\Model\SignatureRequestCreateEmbeddedRequest(); -$data->setClientId("ec64a202072370a737edf4a0eb7f4437") - ->setTitle("NDA with Acme Co.") +$signature_request_create_embedded_request = (new Dropbox\Sign\Model\SignatureRequestCreateEmbeddedRequest()) + ->setClientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a") + ->setMessage("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.") ->setSubject("The NDA we talked about") - ->setMessage("Please sign this NDA and then we can discuss more. Let me know if you have any questions.") - ->setSigners([$signer1, $signer2]) + ->setTestMode(true) + ->setTitle("NDA with Acme Co.") ->setCcEmailAddresses([ "lawyer1@dropboxsign.com", "lawyer2@dropboxsign.com", ]) - ->setFiles([new SplFileObject(__DIR__ . "/example_signature_request.pdf")]) - ->setSigningOptions($signingOptions) - ->setTestMode(true); + ->setFiles([ + ]) + ->setSigningOptions($signing_options) + ->setSigners($signers); try { - $result = $signatureRequestApi->signatureRequestCreateEmbedded($data); - print_r($result); + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestCreateEmbedded( + signature_request_create_embedded_request: $signature_request_create_embedded_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling SignatureRequestApi#signatureRequestCreateEmbedded: {$e->getMessage()}"; } ``` @@ -386,46 +449,455 @@ Creates a new SignatureRequest based on the given Template(s) to be signed in an ```php setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$signing_options = (new Dropbox\Sign\Model\SubSigningOptions()) + ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW) + ->setDraw(true) + ->setPhone(false) + ->setType(true) + ->setUpload(true); + +$signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner()) + ->setRole("Client") + ->setName("George") + ->setEmailAddress("george@example.com"); + +$signers = [ + $signers_1, +]; + +$signature_request_create_embedded_with_template_request = (new Dropbox\Sign\Model\SignatureRequestCreateEmbeddedWithTemplateRequest()) + ->setClientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a") + ->setTemplateIds([ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", + ]) + ->setMessage("Glad we could come to an agreement.") + ->setSubject("Purchase Order") + ->setTestMode(true) + ->setSigningOptions($signing_options) + ->setSigners($signers); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestCreateEmbeddedWithTemplate( + signature_request_create_embedded_with_template_request: $signature_request_create_embedded_with_template_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestCreateEmbeddedWithTemplate: {$e->getMessage()}"; +} + +``` + +### Parameters + +|Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **signature_request_create_embedded_with_template_request** | [**\Dropbox\Sign\Model\SignatureRequestCreateEmbeddedWithTemplateRequest**](../Model/SignatureRequestCreateEmbeddedWithTemplateRequest.md)| | | + +### Return type + +[**\Dropbox\Sign\Model\SignatureRequestGetResponse**](../Model/SignatureRequestGetResponse.md) + +### Authorization + +[api_key](../../README.md#api_key), [oauth2](../../README.md#oauth2) + +### HTTP request headers -// or, configure Bearer (JWT) authorization: oauth2 +- **Content-Type**: `application/json`, `multipart/form-data` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `signatureRequestEdit()` + +```php +signatureRequestEdit($signature_request_id, $signature_request_edit_request): \Dropbox\Sign\Model\SignatureRequestGetResponse +``` +Edit Signature Request + +Edits and sends a 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. **NOTE:** Edit and resend will not deduct your signature request quota. + +### Example + +```php +setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); +$field_options = (new Dropbox\Sign\Model\SubFieldOptions()) + ->setDateFormat(Dropbox\Sign\Model\SubFieldOptions::DATE_FORMAT_DD_MM_YYYY); -$signer1 = new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner(); -$signer1->setRole("Client") - ->setEmailAddress("george@example.com") - ->setName("George"); +$signing_options = (new Dropbox\Sign\Model\SubSigningOptions()) + ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW) + ->setDraw(true) + ->setPhone(false) + ->setType(true) + ->setUpload(true); + +$signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Jack") + ->setEmailAddress("jack@example.com") + ->setOrder(0); + +$signers_2 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Jill") + ->setEmailAddress("jill@example.com") + ->setOrder(1); + +$signers = [ + $signers_1, + $signers_2, +]; + +$signature_request_edit_request = (new Dropbox\Sign\Model\SignatureRequestEditRequest()) + ->setMessage("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.") + ->setSubject("The NDA we talked about") + ->setTestMode(true) + ->setTitle("NDA with Acme Co.") + ->setCcEmailAddresses([ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ]) + ->setFiles([ + ]) + ->setMetadata(json_decode(<<<'EOD' + { + "custom_id": 1234, + "custom_text": "NDA #9" + } + EOD, true)) + ->setFieldOptions($field_options) + ->setSigningOptions($signing_options) + ->setSigners($signers); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestEdit( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + signature_request_edit_request: $signature_request_edit_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestEdit: {$e->getMessage()}"; +} + +``` + +### Parameters + +|Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **signature_request_id** | **string**| The id of the SignatureRequest to edit. | | +| **signature_request_edit_request** | [**\Dropbox\Sign\Model\SignatureRequestEditRequest**](../Model/SignatureRequestEditRequest.md)| | | + +### Return type + +[**\Dropbox\Sign\Model\SignatureRequestGetResponse**](../Model/SignatureRequestGetResponse.md) + +### Authorization + +[api_key](../../README.md#api_key), [oauth2](../../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: `application/json`, `multipart/form-data` +- **Accept**: `application/json` -$signingOptions = new Dropbox\Sign\Model\SubSigningOptions(); -$signingOptions->setDraw(true) +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `signatureRequestEditEmbedded()` + +```php +signatureRequestEditEmbedded($signature_request_id, $signature_request_edit_embedded_request): \Dropbox\Sign\Model\SignatureRequestGetResponse +``` +Edit Embedded Signature Request + +Edits a 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. + +### Example + +```php +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$signing_options = (new Dropbox\Sign\Model\SubSigningOptions()) + ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW) + ->setDraw(true) + ->setPhone(false) ->setType(true) - ->setUpload(true) + ->setUpload(true); + +$signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Jack") + ->setEmailAddress("jack@example.com") + ->setOrder(0); + +$signers_2 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Jill") + ->setEmailAddress("jill@example.com") + ->setOrder(1); + +$signers = [ + $signers_1, + $signers_2, +]; + +$signature_request_edit_embedded_request = (new Dropbox\Sign\Model\SignatureRequestEditEmbeddedRequest()) + ->setClientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a") + ->setMessage("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.") + ->setSubject("The NDA we talked about") + ->setTestMode(true) + ->setTitle("NDA with Acme Co.") + ->setCcEmailAddresses([ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ]) + ->setFiles([ + ]) + ->setSigningOptions($signing_options) + ->setSigners($signers); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestEditEmbedded( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + signature_request_edit_embedded_request: $signature_request_edit_embedded_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestEditEmbedded: {$e->getMessage()}"; +} + +``` + +### Parameters + +|Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **signature_request_id** | **string**| The id of the SignatureRequest to edit. | | +| **signature_request_edit_embedded_request** | [**\Dropbox\Sign\Model\SignatureRequestEditEmbeddedRequest**](../Model/SignatureRequestEditEmbeddedRequest.md)| | | + +### Return type + +[**\Dropbox\Sign\Model\SignatureRequestGetResponse**](../Model/SignatureRequestGetResponse.md) + +### Authorization + +[api_key](../../README.md#api_key), [oauth2](../../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: `application/json`, `multipart/form-data` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `signatureRequestEditEmbeddedWithTemplate()` + +```php +signatureRequestEditEmbeddedWithTemplate($signature_request_id, $signature_request_edit_embedded_with_template_request): \Dropbox\Sign\Model\SignatureRequestGetResponse +``` +Edit Embedded Signature Request with Template + +Edits a 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. + +### Example + +```php +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$signing_options = (new Dropbox\Sign\Model\SubSigningOptions()) + ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW) + ->setDraw(true) ->setPhone(false) - ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW); + ->setType(true) + ->setUpload(true); + +$signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner()) + ->setRole("Client") + ->setName("George") + ->setEmailAddress("george@example.com"); + +$signers = [ + $signers_1, +]; -$data = new Dropbox\Sign\Model\SignatureRequestCreateEmbeddedWithTemplateRequest(); -$data->setClientId("ec64a202072370a737edf4a0eb7f4437") - ->setTemplateIds(["c26b8a16784a872da37ea946b9ddec7c1e11dff6"]) +$signature_request_edit_embedded_with_template_request = (new Dropbox\Sign\Model\SignatureRequestEditEmbeddedWithTemplateRequest()) + ->setClientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a") + ->setTemplateIds([ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", + ]) + ->setMessage("Glad we could come to an agreement.") ->setSubject("Purchase Order") + ->setTestMode(true) + ->setSigningOptions($signing_options) + ->setSigners($signers); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestEditEmbeddedWithTemplate( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + signature_request_edit_embedded_with_template_request: $signature_request_edit_embedded_with_template_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestEditEmbeddedWithTemplate: {$e->getMessage()}"; +} + +``` + +### Parameters + +|Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **signature_request_id** | **string**| The id of the SignatureRequest to edit. | | +| **signature_request_edit_embedded_with_template_request** | [**\Dropbox\Sign\Model\SignatureRequestEditEmbeddedWithTemplateRequest**](../Model/SignatureRequestEditEmbeddedWithTemplateRequest.md)| | | + +### Return type + +[**\Dropbox\Sign\Model\SignatureRequestGetResponse**](../Model/SignatureRequestGetResponse.md) + +### Authorization + +[api_key](../../README.md#api_key), [oauth2](../../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: `application/json`, `multipart/form-data` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `signatureRequestEditWithTemplate()` + +```php +signatureRequestEditWithTemplate($signature_request_id, $signature_request_edit_with_template_request): \Dropbox\Sign\Model\SignatureRequestGetResponse +``` +Edit Signature Request With Template + +Edits and sends a SignatureRequest based off of the Template(s) specified with the template_ids parameter. **NOTE:** Edit and resend will not deduct your signature request quota. + +### Example + +```php +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$signing_options = (new Dropbox\Sign\Model\SubSigningOptions()) + ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW) + ->setDraw(true) + ->setPhone(false) + ->setType(true) + ->setUpload(true); + +$signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner()) + ->setRole("Client") + ->setName("George") + ->setEmailAddress("george@example.com"); + +$signers = [ + $signers_1, +]; + +$ccs_1 = (new Dropbox\Sign\Model\SubCC()) + ->setRole("Accounting") + ->setEmailAddress("accounting@example.com"); + +$ccs = [ + $ccs_1, +]; + +$custom_fields_1 = (new Dropbox\Sign\Model\SubCustomField()) + ->setName("Cost") + ->setEditor("Client") + ->setRequired(true) + ->setValue("\$20,000"); + +$custom_fields = [ + $custom_fields_1, +]; + +$signature_request_edit_with_template_request = (new Dropbox\Sign\Model\SignatureRequestEditWithTemplateRequest()) + ->setTemplateIds([ + "61a832ff0d8423f91d503e76bfbcc750f7417c78", + ]) ->setMessage("Glad we could come to an agreement.") - ->setSigners([$signer1]) - ->setSigningOptions($signingOptions) - ->setTestMode(true); + ->setSubject("Purchase Order") + ->setTestMode(true) + ->setSigningOptions($signing_options) + ->setSigners($signers) + ->setCcs($ccs) + ->setCustomFields($custom_fields); try { - $result = $signatureRequestApi->signatureRequestCreateEmbeddedWithTemplate($data); - print_r($result); + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestEditWithTemplate( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + signature_request_edit_with_template_request: $signature_request_edit_with_template_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling SignatureRequestApi#signatureRequestEditWithTemplate: {$e->getMessage()}"; } ``` @@ -434,7 +906,8 @@ try { |Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **signature_request_create_embedded_with_template_request** | [**\Dropbox\Sign\Model\SignatureRequestCreateEmbeddedWithTemplateRequest**](../Model/SignatureRequestCreateEmbeddedWithTemplateRequest.md)| | | +| **signature_request_id** | **string**| The id of the SignatureRequest to edit. | | +| **signature_request_edit_with_template_request** | [**\Dropbox\Sign\Model\SignatureRequestEditWithTemplateRequest**](../Model/SignatureRequestEditWithTemplateRequest.md)| | | ### Return type @@ -467,28 +940,26 @@ Obtain a copy of the current documents specified by the `signature_request_id` p ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); - -$signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; -$fileType = "pdf"; - try { - $result = $signatureRequestApi->signatureRequestFiles($signatureRequestId, $fileType); - copy($result->getRealPath(), __DIR__ . '/file_response.pdf'); + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestFiles( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + file_type: "pdf", + ); + + copy($response->getRealPath(), __DIR__ . '/file_response'); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling SignatureRequestApi#signatureRequestFiles: {$e->getMessage()}"; } ``` @@ -531,27 +1002,25 @@ Obtain a copy of the current documents specified by the `signature_request_id` p ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); - -$signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; - try { - $result = $signatureRequestApi->signatureRequestFilesAsDataUri($signatureRequestId); - print_r($result); + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestFilesAsDataUri( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling SignatureRequestApi#signatureRequestFilesAsDataUri: {$e->getMessage()}"; } ``` @@ -593,27 +1062,26 @@ Obtain a copy of the current documents specified by the `signature_request_id` p ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); - -$signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; - try { - $result = $signatureRequestApi->signatureRequestFilesAsFileUrl($signatureRequestId); - print_r($result); + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestFilesAsFileUrl( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + force_download: 1, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling SignatureRequestApi#signatureRequestFilesAsFileUrl: {$e->getMessage()}"; } ``` @@ -656,27 +1124,25 @@ Returns the status of the SignatureRequest specified by the `signature_request_i ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); - -$signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; - try { - $result = $signatureRequestApi->signatureRequestGet($signatureRequestId); - print_r($result); + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestGet( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling SignatureRequestApi#signatureRequestGet: {$e->getMessage()}"; } ``` @@ -718,28 +1184,26 @@ Returns a list of SignatureRequests that you can access. This includes Signature ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); - -$accountId = null; -$page = 1; - try { - $result = $signatureRequestApi->signatureRequestList($accountId, $page); - print_r($result); + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestList( + page: 1, + page_size: 20, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling SignatureRequestApi#signatureRequestList: {$e->getMessage()}"; } ``` @@ -784,27 +1248,25 @@ Releases a held SignatureRequest that was claimed and prepared from an [Unclaime ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); - -$signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - try { - $result = $signatureRequestApi->signatureRequestReleaseHold($signatureRequestId); - print_r($result); + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestReleaseHold( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling SignatureRequestApi#signatureRequestReleaseHold: {$e->getMessage()}"; } ``` @@ -846,30 +1308,29 @@ Sends an email to the signer reminding them to sign the signature request. You c ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); - -$data = new Dropbox\Sign\Model\SignatureRequestRemindRequest(); -$data->setEmailAddress("john@example.com"); - -$signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; +$signature_request_remind_request = (new Dropbox\Sign\Model\SignatureRequestRemindRequest()) + ->setEmailAddress("john@example.com"); try { - $result = $signatureRequestApi->signatureRequestRemind($signatureRequestId, $data); - print_r($result); + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestRemind( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + signature_request_remind_request: $signature_request_remind_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling SignatureRequestApi#signatureRequestRemind: {$e->getMessage()}"; } ``` @@ -912,23 +1373,22 @@ Removes your access to a completed signature request. This action is **not rever ```php setUsername("YOUR_API_KEY"); +require_once __DIR__ . '/../vendor/autoload.php'; -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); +use SplFileObject; +use Dropbox; -$signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); try { - $signatureRequestApi->signatureRequestRemove($signatureRequestId); + (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestRemove( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + ); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling SignatureRequestApi#signatureRequestRemove: {$e->getMessage()}"; } ``` @@ -970,63 +1430,71 @@ Creates and sends a new SignatureRequest with the submitted documents. If `form_ ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); +$field_options = (new Dropbox\Sign\Model\SubFieldOptions()) + ->setDateFormat(Dropbox\Sign\Model\SubFieldOptions::DATE_FORMAT_DD_MM_YYYY); -$signer1 = new Dropbox\Sign\Model\SubSignatureRequestSigner(); -$signer1->setEmailAddress("jack@example.com") +$signing_options = (new Dropbox\Sign\Model\SubSigningOptions()) + ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW) + ->setDraw(true) + ->setPhone(false) + ->setType(true) + ->setUpload(true); + +$signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) ->setName("Jack") + ->setEmailAddress("jack@example.com") ->setOrder(0); -$signer2 = new Dropbox\Sign\Model\SubSignatureRequestSigner(); -$signer2->setEmailAddress("jill@example.com") +$signers_2 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) ->setName("Jill") + ->setEmailAddress("jill@example.com") ->setOrder(1); -$signingOptions = new Dropbox\Sign\Model\SubSigningOptions(); -$signingOptions->setDraw(true) - ->setType(true) - ->setUpload(true) - ->setPhone(false) - ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW); - -$fieldOptions = new Dropbox\Sign\Model\SubFieldOptions(); -$fieldOptions->setDateFormat(Dropbox\Sign\Model\SubFieldOptions::DATE_FORMAT_DD_MM_YYYY); +$signers = [ + $signers_1, + $signers_2, +]; -$data = new Dropbox\Sign\Model\SignatureRequestSendRequest(); -$data->setTitle("NDA with Acme Co.") +$signature_request_send_request = (new Dropbox\Sign\Model\SignatureRequestSendRequest()) + ->setMessage("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.") ->setSubject("The NDA we talked about") - ->setMessage("Please sign this NDA and then we can discuss more. Let me know if you have any questions.") - ->setSigners([$signer1, $signer2]) + ->setTestMode(true) + ->setTitle("NDA with Acme Co.") ->setCcEmailAddresses([ "lawyer1@dropboxsign.com", "lawyer2@dropboxsign.com", ]) - ->setFiles([new SplFileObject(__DIR__ . "/example_signature_request.pdf")]) - ->setMetadata([ - "custom_id" => 1234, - "custom_text" => "NDA #9", + ->setFiles([ ]) - ->setSigningOptions($signingOptions) - ->setFieldOptions($fieldOptions) - ->setTestMode(true); + ->setMetadata(json_decode(<<<'EOD' + { + "custom_id": 1234, + "custom_text": "NDA #9" + } + EOD, true)) + ->setFieldOptions($field_options) + ->setSigningOptions($signing_options) + ->setSigners($signers); try { - $result = $signatureRequestApi->signatureRequestSend($data); - print_r($result); + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestSend( + signature_request_send_request: $signature_request_send_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling SignatureRequestApi#signatureRequestSend: {$e->getMessage()}"; } ``` @@ -1068,57 +1536,71 @@ Creates and sends a new SignatureRequest based off of the Template(s) specified ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); +$signing_options = (new Dropbox\Sign\Model\SubSigningOptions()) + ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW) + ->setDraw(true) + ->setPhone(false) + ->setType(true) + ->setUpload(true); -$signer1 = new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner(); -$signer1->setRole("Client") - ->setEmailAddress("george@example.com") - ->setName("George"); +$signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner()) + ->setRole("Client") + ->setName("George") + ->setEmailAddress("george@example.com"); -$cc1 = new Dropbox\Sign\Model\SubCC(); -$cc1->setRole("Accounting") +$signers = [ + $signers_1, +]; + +$ccs_1 = (new Dropbox\Sign\Model\SubCC()) + ->setRole("Accounting") ->setEmailAddress("accounting@example.com"); -$customField1 = new Dropbox\Sign\Model\SubCustomField(); -$customField1->setName("Cost") - ->setValue("$20,000") +$ccs = [ + $ccs_1, +]; + +$custom_fields_1 = (new Dropbox\Sign\Model\SubCustomField()) + ->setName("Cost") ->setEditor("Client") - ->setRequired(true); + ->setRequired(true) + ->setValue("\$20,000"); -$signingOptions = new Dropbox\Sign\Model\SubSigningOptions(); -$signingOptions->setDraw(true) - ->setType(true) - ->setUpload(true) - ->setPhone(false) - ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW); +$custom_fields = [ + $custom_fields_1, +]; -$data = new Dropbox\Sign\Model\SignatureRequestSendWithTemplateRequest(); -$data->setTemplateIds(["c26b8a16784a872da37ea946b9ddec7c1e11dff6"]) - ->setSubject("Purchase Order") +$signature_request_send_with_template_request = (new Dropbox\Sign\Model\SignatureRequestSendWithTemplateRequest()) + ->setTemplateIds([ + "61a832ff0d8423f91d503e76bfbcc750f7417c78", + ]) ->setMessage("Glad we could come to an agreement.") - ->setSigners([$signer1]) - ->setCcs([$cc1]) - ->setCustomFields([$customField1]) - ->setSigningOptions($signingOptions) - ->setTestMode(true); + ->setSubject("Purchase Order") + ->setTestMode(true) + ->setSigningOptions($signing_options) + ->setSigners($signers) + ->setCcs($ccs) + ->setCustomFields($custom_fields); try { - $result = $signatureRequestApi->signatureRequestSendWithTemplate($data); - print_r($result); + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestSendWithTemplate( + signature_request_send_with_template_request: $signature_request_send_with_template_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling SignatureRequestApi#signatureRequestSendWithTemplate: {$e->getMessage()}"; } ``` @@ -1160,31 +1642,30 @@ Updates the email address and/or the name for a given signer on a signature requ ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); - -$data = new Dropbox\Sign\Model\SignatureRequestUpdateRequest(); -$data->setEmailAddress("john@example.com") - ->setSignatureId("78caf2a1d01cd39cea2bc1cbb340dac3"); - -$signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; +$signature_request_update_request = (new Dropbox\Sign\Model\SignatureRequestUpdateRequest()) + ->setSignatureId("2f9781e1a8e2045224d808c153c2e1d3df6f8f2f") + ->setEmailAddress("john@example.com"); try { - $result = $signatureRequestApi->signatureRequestUpdate($signatureRequestId, $data); - print_r($result); + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestUpdate( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + signature_request_update_request: $signature_request_update_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling SignatureRequestApi#signatureRequestUpdate: {$e->getMessage()}"; } ``` diff --git a/docs/Api/TeamApi.md b/docs/Api/TeamApi.md index 1f46c6b..059036e 100644 --- a/docs/Api/TeamApi.md +++ b/docs/Api/TeamApi.md @@ -30,28 +30,29 @@ Invites a user (specified using the `email_address` parameter) to your Team. If ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$teamApi = new Dropbox\Sign\Api\TeamApi($config); - -$data = new Dropbox\Sign\Model\TeamAddMemberRequest(); -$data->setEmailAddress("george@example.com"); +$team_add_member_request = (new Dropbox\Sign\Model\TeamAddMemberRequest()) + ->setEmailAddress("george@example.com"); try { - $result = $teamApi->teamAddMember($data); - print_r($result); + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamAddMember( + team_add_member_request: $team_add_member_request, + team_id: "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling TeamApi#teamAddMember: {$e->getMessage()}"; } ``` @@ -94,28 +95,28 @@ Creates a new Team and makes you a member. You must not currently belong to a Te ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$teamApi = new Dropbox\Sign\Api\TeamApi($config); - -$data = new Dropbox\Sign\Model\TeamCreateRequest(); -$data->setName("New Team Name"); +$team_create_request = (new Dropbox\Sign\Model\TeamCreateRequest()) + ->setName("New Team Name"); try { - $result = $teamApi->teamCreate($data); - print_r($result); + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamCreate( + team_create_request: $team_create_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling TeamApi#teamCreate: {$e->getMessage()}"; } ``` @@ -157,24 +158,21 @@ Deletes your Team. Can only be invoked when you have a Team with only one member ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$teamApi = new Dropbox\Sign\Api\TeamApi($config); - try { - $teamApi->teamDelete(); + (new Dropbox\Sign\Api\TeamApi(config: $config))->teamDelete(); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling TeamApi#teamDelete: {$e->getMessage()}"; } ``` @@ -214,25 +212,23 @@ Returns information about your Team as well as a list of its members. If you do ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$teamApi = new Dropbox\Sign\Api\TeamApi($config); - try { - $result = $teamApi->teamGet(); - print_r($result); + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamGet(); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling TeamApi#teamGet: {$e->getMessage()}"; } ``` @@ -272,25 +268,25 @@ Provides information about a team. ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$teamApi = new Dropbox\Sign\Api\TeamApi($config); - try { - $result = $teamApi->teamInfo(); - print_r($result); + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamInfo( + team_id: "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling TeamApi#teamInfo: {$e->getMessage()}"; } ``` @@ -332,27 +328,23 @@ Provides a list of team invites (and their roles). ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$teamApi = new Dropbox\Sign\Api\TeamApi($config); - -$emailAddress = "user@dropboxsign.com"; - try { - $result = $teamApi->teamInvites($emailAddress); - print_r($result); + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamInvites(); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling TeamApi#teamInvites: {$e->getMessage()}"; } ``` @@ -394,27 +386,27 @@ Provides a paginated list of members (and their roles) that belong to a given te ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$teamApi = new Dropbox\Sign\Api\TeamApi($config); - -$teamId = "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c"; - try { - $result = $teamApi->teamMembers($teamId); - print_r($result); + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamMembers( + team_id: "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", + page: 1, + page_size: 20, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling TeamApi#teamMembers: {$e->getMessage()}"; } ``` @@ -458,29 +450,29 @@ Removes the provided user Account from your Team. If the Account had an outstand ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$teamApi = new Dropbox\Sign\Api\TeamApi($config); - -$data = new Dropbox\Sign\Model\TeamRemoveMemberRequest(); -$data->setEmailAddress("teammate@dropboxsign.com") +$team_remove_member_request = (new Dropbox\Sign\Model\TeamRemoveMemberRequest()) + ->setEmailAddress("teammate@dropboxsign.com") ->setNewOwnerEmailAddress("new_teammate@dropboxsign.com"); try { - $result = $teamApi->teamRemoveMember($data); - print_r($result); + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamRemoveMember( + team_remove_member_request: $team_remove_member_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling TeamApi#teamRemoveMember: {$e->getMessage()}"; } ``` @@ -522,27 +514,27 @@ Provides a paginated list of sub teams that belong to a given team. ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$teamApi = new Dropbox\Sign\Api\TeamApi($config); - -$teamId = "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c"; - try { - $result = $teamApi->teamSubTeams($teamId); - print_r($result); + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamSubTeams( + team_id: "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", + page: 1, + page_size: 20, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling TeamApi#teamSubTeams: {$e->getMessage()}"; } ``` @@ -586,28 +578,28 @@ Updates the name of your Team. ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$teamApi = new Dropbox\Sign\Api\TeamApi($config); - -$data = new Dropbox\Sign\Model\TeamUpdateRequest(); -$data->setName("New Team Name"); +$team_update_request = (new Dropbox\Sign\Model\TeamUpdateRequest()) + ->setName("New Team Name"); try { - $result = $teamApi->teamUpdate($data); - print_r($result); + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamUpdate( + team_update_request: $team_update_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling TeamApi#teamUpdate: {$e->getMessage()}"; } ``` diff --git a/docs/Api/TemplateApi.md b/docs/Api/TemplateApi.md index 5381a82..23d1d5a 100644 --- a/docs/Api/TemplateApi.md +++ b/docs/Api/TemplateApi.md @@ -31,30 +31,29 @@ Gives the specified Account access to the specified Template. The specified Acco ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$templateApi = new Dropbox\Sign\Api\TemplateApi($config); - -$data = new Dropbox\Sign\Model\TemplateAddUserRequest(); -$data->setEmailAddress("george@dropboxsign.com"); - -$templateId = "f57db65d3f933b5316d398057a36176831451a35"; +$template_add_user_request = (new Dropbox\Sign\Model\TemplateAddUserRequest()) + ->setEmailAddress("george@dropboxsign.com"); try { - $result = $templateApi->templateAddUser($templateId, $data); - print_r($result); + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateAddUser( + template_id: "f57db65d3f933b5316d398057a36176831451a35", + template_add_user_request: $template_add_user_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling TemplateApi#templateAddUser: {$e->getMessage()}"; } ``` @@ -97,56 +96,103 @@ Creates a template that can then be used. ```php setUsername('YOUR_API_KEY'); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$templateApi = new Dropbox\Sign\Api\TemplateApi($config); +$field_options = (new Dropbox\Sign\Model\SubFieldOptions()) + ->setDateFormat(Dropbox\Sign\Model\SubFieldOptions::DATE_FORMAT_DD_MM_YYYY); -$role1 = new Dropbox\Sign\Model\SubTemplateRole(); -$role1->setName('Client') +$signer_roles_1 = (new Dropbox\Sign\Model\SubTemplateRole()) + ->setName("Client") ->setOrder(0); -$role2 = new Dropbox\Sign\Model\SubTemplateRole(); -$role2->setName('Witness') +$signer_roles_2 = (new Dropbox\Sign\Model\SubTemplateRole()) + ->setName("Witness") ->setOrder(1); -$mergeField1 = new Dropbox\Sign\Model\SubMergeField(); -$mergeField1->setName('Full Name') +$signer_roles = [ + $signer_roles_1, + $signer_roles_2, +]; + +$form_fields_per_document_1 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentText()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_1") + ->setType("text") + ->setRequired(true) + ->setSigner("1") + ->setWidth(100) + ->setHeight(16) + ->setX(112) + ->setY(328) + ->setName("") + ->setPage(1) + ->setPlaceholder("") + ->setValidationType(Dropbox\Sign\Model\SubFormFieldsPerDocumentText::VALIDATION_TYPE_NUMBERS_ONLY); + +$form_fields_per_document_2 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentSignature()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_2") + ->setType("signature") + ->setRequired(true) + ->setSigner("0") + ->setWidth(120) + ->setHeight(30) + ->setX(530) + ->setY(415) + ->setName("") + ->setPage(1); + +$form_fields_per_document = [ + $form_fields_per_document_1, + $form_fields_per_document_2, +]; + +$merge_fields_1 = (new Dropbox\Sign\Model\SubMergeField()) + ->setName("Full Name") ->setType(Dropbox\Sign\Model\SubMergeField::TYPE_TEXT); -$mergeField2 = new Dropbox\Sign\Model\SubMergeField(); -$mergeField2->setName('Is Registered?') +$merge_fields_2 = (new Dropbox\Sign\Model\SubMergeField()) + ->setName("Is Registered?") ->setType(Dropbox\Sign\Model\SubMergeField::TYPE_CHECKBOX); -$fieldOptions = new Dropbox\Sign\Model\SubFieldOptions(); -$fieldOptions->setDateFormat(Dropbox\Sign\Model\SubFieldOptions::DATE_FORMAT_DD_MM_YYYY); - -$data = new Dropbox\Sign\Model\TemplateCreateRequest(); -$data->setClientId('37dee8d8440c66d54cfa05d92c160882') - ->setFiles([new SplFileObject(__DIR__ . '/example_signature_request.pdf')]) - ->setTitle('Test Template') - ->setSubject('Please sign this document') - ->setMessage('For your approval') - ->setSignerRoles([$role1, $role2]) - ->setCcRoles(['Manager']) - ->setMergeFields([$mergeField1, $mergeField2]) - ->setFieldOptions($fieldOptions) - ->setTestMode(true); +$merge_fields = [ + $merge_fields_1, + $merge_fields_2, +]; + +$template_create_request = (new Dropbox\Sign\Model\TemplateCreateRequest()) + ->setClientId("37dee8d8440c66d54cfa05d92c160882") + ->setMessage("For your approval") + ->setSubject("Please sign this document") + ->setTestMode(true) + ->setTitle("Test Template") + ->setCcRoles([ + "Manager", + ]) + ->setFiles([ + ]) + ->setFieldOptions($field_options) + ->setSignerRoles($signer_roles) + ->setFormFieldsPerDocument($form_fields_per_document) + ->setMergeFields($merge_fields); try { - $result = $templateApi->templateCreate($data); - print_r($result); + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateCreate( + template_create_request: $template_create_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo 'Exception when calling Dropbox Sign API: ' - . print_r($error->getError()); + echo "Exception when calling TemplateApi#templateCreate: {$e->getMessage()}"; } ``` @@ -188,56 +234,69 @@ The first step in an embedded template workflow. Creates a draft template that c ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$templateApi = new Dropbox\Sign\Api\TemplateApi($config); - -$role1 = new Dropbox\Sign\Model\SubTemplateRole(); -$role1->setName("Client") - ->setOrder(0); - -$role2 = new Dropbox\Sign\Model\SubTemplateRole(); -$role2->setName("Witness") - ->setOrder(1); +$field_options = (new Dropbox\Sign\Model\SubFieldOptions()) + ->setDateFormat(Dropbox\Sign\Model\SubFieldOptions::DATE_FORMAT_DD_MM_YYYY); -$mergeField1 = new Dropbox\Sign\Model\SubMergeField(); -$mergeField1->setName("Full Name") +$merge_fields_1 = (new Dropbox\Sign\Model\SubMergeField()) + ->setName("Full Name") ->setType(Dropbox\Sign\Model\SubMergeField::TYPE_TEXT); -$mergeField2 = new Dropbox\Sign\Model\SubMergeField(); -$mergeField2->setName("Is Registered?") +$merge_fields_2 = (new Dropbox\Sign\Model\SubMergeField()) + ->setName("Is Registered?") ->setType(Dropbox\Sign\Model\SubMergeField::TYPE_CHECKBOX); -$fieldOptions = new Dropbox\Sign\Model\SubFieldOptions(); -$fieldOptions->setDateFormat(Dropbox\Sign\Model\SubFieldOptions::DATE_FORMAT_DD_MM_YYYY); +$merge_fields = [ + $merge_fields_1, + $merge_fields_2, +]; -$data = new Dropbox\Sign\Model\TemplateCreateEmbeddedDraftRequest(); -$data->setClientId("37dee8d8440c66d54cfa05d92c160882") - ->setFiles([new SplFileObject(__DIR__ . "/example_signature_request.pdf")]) - ->setTitle("Test Template") - ->setSubject("Please sign this document") +$signer_roles_1 = (new Dropbox\Sign\Model\SubTemplateRole()) + ->setName("Client") + ->setOrder(0); + +$signer_roles_2 = (new Dropbox\Sign\Model\SubTemplateRole()) + ->setName("Witness") + ->setOrder(1); + +$signer_roles = [ + $signer_roles_1, + $signer_roles_2, +]; + +$template_create_embedded_draft_request = (new Dropbox\Sign\Model\TemplateCreateEmbeddedDraftRequest()) + ->setClientId("37dee8d8440c66d54cfa05d92c160882") ->setMessage("For your approval") - ->setSignerRoles([$role1, $role2]) - ->setCcRoles(["Manager"]) - ->setMergeFields([$mergeField1, $mergeField2]) - ->setFieldOptions($fieldOptions) - ->setTestMode(true); + ->setSubject("Please sign this document") + ->setTestMode(true) + ->setTitle("Test Template") + ->setCcRoles([ + "Manager", + ]) + ->setFiles([ + ]) + ->setFieldOptions($field_options) + ->setMergeFields($merge_fields) + ->setSignerRoles($signer_roles); try { - $result = $templateApi->templateCreateEmbeddedDraft($data); - print_r($result); + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateCreateEmbeddedDraft( + template_create_embedded_draft_request: $template_create_embedded_draft_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling TemplateApi#templateCreateEmbeddedDraft: {$e->getMessage()}"; } ``` @@ -279,26 +338,23 @@ Completely deletes the template specified from the account. ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$templateApi = new Dropbox\Sign\Api\TemplateApi($config); - -$templateId = "5de8179668f2033afac48da1868d0093bf133266"; - try { - $templateApi->templateDelete($templateId); + (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateDelete( + template_id: "f57db65d3f933b5316d398057a36176831451a35", + ); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling TemplateApi#templateDelete: {$e->getMessage()}"; } ``` @@ -340,28 +396,25 @@ Obtain a copy of the current documents specified by the `template_id` parameter. ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$templateApi = new Dropbox\Sign\Api\TemplateApi($config); - -$templateId = "5de8179668f2033afac48da1868d0093bf133266"; -$fileType = "pdf"; - try { - $result = $templateApi->templateFiles($templateId, $fileType); - copy($result->getRealPath(), __DIR__ . '/file_response.pdf'); + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateFiles( + template_id: "f57db65d3f933b5316d398057a36176831451a35", + ); + + copy($response->getRealPath(), __DIR__ . '/file_response'); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling TemplateApi#templateFiles: {$e->getMessage()}"; } ``` @@ -404,27 +457,25 @@ Obtain a copy of the current documents specified by the `template_id` parameter. ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$templateApi = new Dropbox\Sign\Api\TemplateApi($config); - -$templateId = "5de8179668f2033afac48da1868d0093bf133266"; - try { - $result = $templateApi->templateFilesAsDataUri($templateId); - print_r($result); + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateFilesAsDataUri( + template_id: "f57db65d3f933b5316d398057a36176831451a35", + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling TemplateApi#templateFilesAsDataUri: {$e->getMessage()}"; } ``` @@ -466,27 +517,26 @@ Obtain a copy of the current documents specified by the `template_id` parameter. ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$templateApi = new Dropbox\Sign\Api\TemplateApi($config); - -$templateId = "5de8179668f2033afac48da1868d0093bf133266"; - try { - $result = $templateApi->templateFilesAsFileUrl($templateId); - print_r($result); + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateFilesAsFileUrl( + template_id: "f57db65d3f933b5316d398057a36176831451a35", + force_download: 1, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling TemplateApi#templateFilesAsFileUrl: {$e->getMessage()}"; } ``` @@ -529,27 +579,25 @@ Returns the Template specified by the `template_id` parameter. ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$templateApi = new Dropbox\Sign\Api\TemplateApi($config); - -$templateId = "f57db65d3f933b5316d398057a36176831451a35"; - try { - $result = $templateApi->templateGet($templateId); - print_r($result); + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateGet( + template_id: "f57db65d3f933b5316d398057a36176831451a35", + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling TemplateApi#templateGet: {$e->getMessage()}"; } ``` @@ -591,27 +639,26 @@ Returns a list of the Templates that are accessible by you. Take a look at our ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$templateApi = new Dropbox\Sign\Api\TemplateApi($config); - -$accountId = "f57db65d3f933b5316d398057a36176831451a35"; - try { - $result = $templateApi->templateList($accountId); - print_r($result); + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateList( + page: 1, + page_size: 20, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling TemplateApi#templateList: {$e->getMessage()}"; } ``` @@ -656,30 +703,29 @@ Removes the specified Account's access to the specified Template. ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$templateApi = new Dropbox\Sign\Api\TemplateApi($config); - -$data = new Dropbox\Sign\Model\TemplateRemoveUserRequest(); -$data->setEmailAddress("george@dropboxsign.com"); - -$templateId = "21f920ec2b7f4b6bb64d3ed79f26303843046536"; +$template_remove_user_request = (new Dropbox\Sign\Model\TemplateRemoveUserRequest()) + ->setEmailAddress("george@dropboxsign.com"); try { - $result = $templateApi->templateRemoveUser($templateId, $data); - print_r($result); + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateRemoveUser( + template_id: "f57db65d3f933b5316d398057a36176831451a35", + template_remove_user_request: $template_remove_user_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling TemplateApi#templateRemoveUser: {$e->getMessage()}"; } ``` @@ -722,30 +768,30 @@ Overlays a new file with the overlay of an existing template. The new file(s) mu ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$templateApi = new Dropbox\Sign\Api\TemplateApi($config); - -$data = new Dropbox\Sign\Model\TemplateUpdateFilesRequest(); -$data->setFiles([new SplFileObject(__DIR__ . "/example_signature_request.pdf")]); - -$templateId = "5de8179668f2033afac48da1868d0093bf133266"; +$template_update_files_request = (new Dropbox\Sign\Model\TemplateUpdateFilesRequest()) + ->setFiles([ + ]); try { - $result = $templateApi->templateUpdateFiles($templateId, $data); - print_r($result); + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateUpdateFiles( + template_id: "f57db65d3f933b5316d398057a36176831451a35", + template_update_files_request: $template_update_files_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling TemplateApi#templateUpdateFiles: {$e->getMessage()}"; } ``` diff --git a/docs/Api/UnclaimedDraftApi.md b/docs/Api/UnclaimedDraftApi.md index a2b2f42..caf17af 100644 --- a/docs/Api/UnclaimedDraftApi.md +++ b/docs/Api/UnclaimedDraftApi.md @@ -24,63 +24,41 @@ Creates a new Draft that can be claimed using the claim URL. The first authentic ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$unclaimedDraftApi = new Dropbox\Sign\Api\UnclaimedDraftApi($config); - -$signer1 = new Dropbox\Sign\Model\SubUnclaimedDraftSigner(); -$signer1->setEmailAddress("jack@example.com") +$signers_1 = (new Dropbox\Sign\Model\SubUnclaimedDraftSigner()) ->setName("Jack") + ->setEmailAddress("jack@example.com") ->setOrder(0); -$signer2 = new Dropbox\Sign\Model\SubUnclaimedDraftSigner(); -$signer2->setEmailAddress("jill@example.com") - ->setName("Jill") - ->setOrder(1); - -$signingOptions = new Dropbox\Sign\Model\SubSigningOptions(); -$signingOptions->setDraw(true) - ->setType(true) - ->setUpload(true) - ->setPhone(false) - ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW); +$signers = [ + $signers_1, +]; -$fieldOptions = new Dropbox\Sign\Model\SubFieldOptions(); -$fieldOptions->setDateFormat(Dropbox\Sign\Model\SubFieldOptions::DATE_FORMAT_DD_MM_YYYY); - -$data = new Dropbox\Sign\Model\UnclaimedDraftCreateRequest(); -$data->setSubject("The NDA we talked about") +$unclaimed_draft_create_request = (new Dropbox\Sign\Model\UnclaimedDraftCreateRequest()) ->setType(Dropbox\Sign\Model\UnclaimedDraftCreateRequest::TYPE_REQUEST_SIGNATURE) - ->setMessage("Please sign this NDA and then we can discuss more. Let me know if you have any questions.") - ->setSigners([$signer1, $signer2]) - ->setCcEmailAddresses([ - "lawyer1@dropboxsign.com", - "lawyer2@dropboxsign.com", - ]) - ->setFiles([new SplFileObject(__DIR__ . "/example_signature_request.pdf")]) - ->setMetadata([ - "custom_id" => 1234, - "custom_text" => "NDA #9", + ->setTestMode(true) + ->setFiles([ ]) - ->setSigningOptions($signingOptions) - ->setFieldOptions($fieldOptions) - ->setTestMode(true); + ->setSigners($signers); try { - $result = $unclaimedDraftApi->unclaimedDraftCreate($data); - print_r($result); + $response = (new Dropbox\Sign\Api\UnclaimedDraftApi(config: $config))->unclaimedDraftCreate( + unclaimed_draft_create_request: $unclaimed_draft_create_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling UnclaimedDraftApi#unclaimedDraftCreate: {$e->getMessage()}"; } ``` @@ -122,31 +100,32 @@ Creates a new Draft that can be claimed and used in an embedded iFrame. The firs ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$unclaimedDraftApi = new Dropbox\Sign\Api\UnclaimedDraftApi($config); - -$data = new Dropbox\Sign\Model\UnclaimedDraftCreateEmbeddedRequest(); -$data->setClientId("ec64a202072370a737edf4a0eb7f4437") - ->setFiles([new SplFileObject(__DIR__ . "/example_signature_request.pdf")]) +$unclaimed_draft_create_embedded_request = (new Dropbox\Sign\Model\UnclaimedDraftCreateEmbeddedRequest()) + ->setClientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a") ->setRequesterEmailAddress("jack@dropboxsign.com") - ->setTestMode(true); + ->setTestMode(true) + ->setFiles([ + ]); try { - $result = $unclaimedDraftApi->unclaimedDraftCreateEmbedded($data); - print_r($result); + $response = (new Dropbox\Sign\Api\UnclaimedDraftApi(config: $config))->unclaimedDraftCreateEmbedded( + unclaimed_draft_create_embedded_request: $unclaimed_draft_create_embedded_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling UnclaimedDraftApi#unclaimedDraftCreateEmbedded: {$e->getMessage()}"; } ``` @@ -188,42 +167,52 @@ Creates a new Draft with a previously saved template(s) that can be claimed and ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$unclaimedDraftApi = new Dropbox\Sign\Api\UnclaimedDraftApi($config); +$ccs_1 = (new Dropbox\Sign\Model\SubCC()) + ->setRole("Accounting") + ->setEmailAddress("accounting@dropboxsign.com"); + +$ccs = [ + $ccs_1, +]; -$signer1 = new Dropbox\Sign\Model\SubUnclaimedDraftTemplateSigner(); -$signer1->setRole("Client") +$signers_1 = (new Dropbox\Sign\Model\SubUnclaimedDraftTemplateSigner()) + ->setRole("Client") ->setName("George") ->setEmailAddress("george@example.com"); -$cc1 = new Dropbox\Sign\Model\SubCC(); -$cc1->setRole("Accounting") - ->setEmailAddress("accounting@dropboxsign.com"); +$signers = [ + $signers_1, +]; -$data = new Dropbox\Sign\Model\UnclaimedDraftCreateEmbeddedWithTemplateRequest(); -$data->setClientId("ec64a202072370a737edf4a0eb7f4437") - ->setTemplateIds(["61a832ff0d8423f91d503e76bfbcc750f7417c78"]) +$unclaimed_draft_create_embedded_with_template_request = (new Dropbox\Sign\Model\UnclaimedDraftCreateEmbeddedWithTemplateRequest()) + ->setClientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a") ->setRequesterEmailAddress("jack@dropboxsign.com") - ->setSigners([$signer1]) - ->setCcs([$cc1]) - ->setTestMode(true); + ->setTemplateIds([ + "61a832ff0d8423f91d503e76bfbcc750f7417c78", + ]) + ->setTestMode(false) + ->setCcs($ccs) + ->setSigners($signers); try { - $result = $unclaimedDraftApi->unclaimedDraftCreateEmbeddedWithTemplate($data); - print_r($result); + $response = (new Dropbox\Sign\Api\UnclaimedDraftApi(config: $config))->unclaimedDraftCreateEmbeddedWithTemplate( + unclaimed_draft_create_embedded_with_template_request: $unclaimed_draft_create_embedded_with_template_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling UnclaimedDraftApi#unclaimedDraftCreateEmbeddedWithTemplate: {$e->getMessage()}"; } ``` @@ -265,31 +254,30 @@ Creates a new signature request from an embedded request that can be edited prio ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$unclaimedDraftApi = new Dropbox\Sign\Api\UnclaimedDraftApi($config); - -$data = new Dropbox\Sign\Model\UnclaimedDraftEditAndResendRequest(); -$data->setClientId("ec64a202072370a737edf4a0eb7f4437") - ->setTestMode(true); - -$signatureRequestId = "2f9781e1a83jdja934d808c153c2e1d3df6f8f2f"; +$unclaimed_draft_edit_and_resend_request = (new Dropbox\Sign\Model\UnclaimedDraftEditAndResendRequest()) + ->setClientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a") + ->setTestMode(false); try { - $result = $unclaimedDraftApi->unclaimedDraftEditAndResend($signatureRequestId, $data); - print_r($result); + $response = (new Dropbox\Sign\Api\UnclaimedDraftApi(config: $config))->unclaimedDraftEditAndResend( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + unclaimed_draft_edit_and_resend_request: $unclaimed_draft_edit_and_resend_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling UnclaimedDraftApi#unclaimedDraftEditAndResend: {$e->getMessage()}"; } ``` diff --git a/docs/Model/FaxLineAddUserRequest.md b/docs/Model/FaxLineAddUserRequest.md index aef875b..966ac61 100644 --- a/docs/Model/FaxLineAddUserRequest.md +++ b/docs/Model/FaxLineAddUserRequest.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `number`*_required_ | ```string``` | The Fax Line number. | | +| `number`*_required_ | ```string``` | The Fax Line number | | | `account_id` | ```string``` | Account ID | | | `email_address` | ```string``` | Email address | | diff --git a/docs/Model/FaxLineCreateRequest.md b/docs/Model/FaxLineCreateRequest.md index 6b599a3..3483d66 100644 --- a/docs/Model/FaxLineCreateRequest.md +++ b/docs/Model/FaxLineCreateRequest.md @@ -6,9 +6,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `area_code`*_required_ | ```int``` | Area code | | -| `country`*_required_ | ```string``` | Country | | -| `city` | ```string``` | City | | -| `account_id` | ```string``` | Account ID | | +| `area_code`*_required_ | ```int``` | Area code of the new Fax Line | | +| `country`*_required_ | ```string``` | Country of the area code | | +| `city` | ```string``` | City of the area code | | +| `account_id` | ```string``` | Account ID of the account that will be assigned this new Fax Line | | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/FaxLineDeleteRequest.md b/docs/Model/FaxLineDeleteRequest.md index a2112ed..fed4ee1 100644 --- a/docs/Model/FaxLineDeleteRequest.md +++ b/docs/Model/FaxLineDeleteRequest.md @@ -6,6 +6,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `number`*_required_ | ```string``` | The Fax Line number. | | +| `number`*_required_ | ```string``` | The Fax Line number | | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/FaxLineRemoveUserRequest.md b/docs/Model/FaxLineRemoveUserRequest.md index 6def010..d5b79ce 100644 --- a/docs/Model/FaxLineRemoveUserRequest.md +++ b/docs/Model/FaxLineRemoveUserRequest.md @@ -6,8 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `number`*_required_ | ```string``` | The Fax Line number. | | -| `account_id` | ```string``` | Account ID | | -| `email_address` | ```string``` | Email address | | +| `number`*_required_ | ```string``` | The Fax Line number | | +| `account_id` | ```string``` | Account ID of the user to remove access | | +| `email_address` | ```string``` | Email address of the user to remove access | | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/FaxSendRequest.md b/docs/Model/FaxSendRequest.md index dcbf730..432fd5e 100644 --- a/docs/Model/FaxSendRequest.md +++ b/docs/Model/FaxSendRequest.md @@ -6,13 +6,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `recipient`*_required_ | ```string``` | Fax Send To Recipient | | +| `recipient`*_required_ | ```string``` | Recipient of the fax Can be a phone number in E.164 format or email address | | | `sender` | ```string``` | Fax Send From Sender (used only with fax number) | | -| `files` | ```\SplFileObject[]``` | Fax File to Send | | -| `file_urls` | ```string[]``` | Fax File URL to Send | | +| `files` | ```\SplFileObject[]``` | Use `files[]` to indicate the uploaded file(s) to fax

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `file_urls` | ```string[]``` | Use `file_urls[]` to have Dropbox Fax download the file(s) to fax

This endpoint requires either **files** or **file_urls[]**, but not both. | | | `test_mode` | ```bool``` | API Test Mode Setting | [default to false] | -| `cover_page_to` | ```string``` | Fax Cover Page for Recipient | | -| `cover_page_from` | ```string``` | Fax Cover Page for Sender | | +| `cover_page_to` | ```string``` | Fax cover page recipient information | | +| `cover_page_from` | ```string``` | Fax cover page sender information | | | `cover_page_message` | ```string``` | Fax Cover Page Message | | | `title` | ```string``` | Fax Title | | diff --git a/docs/Model/SignatureRequestEditEmbeddedRequest.md b/docs/Model/SignatureRequestEditEmbeddedRequest.md new file mode 100644 index 0000000..b2567ac --- /dev/null +++ b/docs/Model/SignatureRequestEditEmbeddedRequest.md @@ -0,0 +1,34 @@ +# # SignatureRequestEditEmbeddedRequest + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `client_id`*_required_ | ```string``` | Client id of the app you're using to create this embedded signature request. Used for security purposes. | | +| `files` | ```\SplFileObject[]``` | 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` | ```string[]``` | 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` | [```\Dropbox\Sign\Model\SubSignatureRequestSigner[]```](SubSignatureRequestSigner.md) | Add Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | | +| `grouped_signers` | [```\Dropbox\Sign\Model\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` | [```\Dropbox\Sign\Model\SubAttachment[]```](SubAttachment.md) | A list describing the attachments | | +| `cc_email_addresses` | ```string[]``` | The email addresses that should be CCed. | | +| `custom_fields` | [```\Dropbox\Sign\Model\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` | [```\Dropbox\Sign\Model\SubFieldOptions```](SubFieldOptions.md) | | | +| `form_field_groups` | [```\Dropbox\Sign\Model\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` | [```\Dropbox\Sign\Model\SubFormFieldRule[]```](SubFormFieldRule.md) | Conditional Logic rules for fields defined in `form_fields_per_document`. | | +| `form_fields_per_document` | [```\Dropbox\Sign\Model\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` | ```string``` | The custom message in the email that will be sent to the signers. | | +| `metadata` | ```array``` | 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` | [```\Dropbox\Sign\Model\SubSigningOptions```](SubSigningOptions.md) | | | +| `subject` | ```string``` | 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` | ```string``` | 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#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SignatureRequestEditEmbeddedWithTemplateRequest.md b/docs/Model/SignatureRequestEditEmbeddedWithTemplateRequest.md new file mode 100644 index 0000000..3b9df4c --- /dev/null +++ b/docs/Model/SignatureRequestEditEmbeddedWithTemplateRequest.md @@ -0,0 +1,25 @@ +# # SignatureRequestEditEmbeddedWithTemplateRequest + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `template_ids`*_required_ | ```string[]``` | 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_ | ```string``` | Client id of the app you're using to create this embedded signature request. Used for security purposes. | | +| `signers`*_required_ | [```\Dropbox\Sign\Model\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` | [```\Dropbox\Sign\Model\SubCC[]```](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | | +| `custom_fields` | [```\Dropbox\Sign\Model\SubCustomField[]```](SubCustomField.md) | An array defining values and options for custom fields. Required when a custom field exists in the Template. | | +| `files` | ```\SplFileObject[]``` | 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` | ```string[]``` | 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` | ```string``` | The custom message in the email that will be sent to the signers. | | +| `metadata` | ```array``` | 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` | [```\Dropbox\Sign\Model\SubSigningOptions```](SubSigningOptions.md) | | | +| `subject` | ```string``` | 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` | ```string``` | 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#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SignatureRequestEditRequest.md b/docs/Model/SignatureRequestEditRequest.md new file mode 100644 index 0000000..0d3ca23 --- /dev/null +++ b/docs/Model/SignatureRequestEditRequest.md @@ -0,0 +1,35 @@ +# # SignatureRequestEditRequest + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `files` | ```\SplFileObject[]``` | 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` | ```string[]``` | 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` | [```\Dropbox\Sign\Model\SubSignatureRequestSigner[]```](SubSignatureRequestSigner.md) | Add Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | | +| `grouped_signers` | [```\Dropbox\Sign\Model\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` | [```\Dropbox\Sign\Model\SubAttachment[]```](SubAttachment.md) | A list describing the attachments | | +| `cc_email_addresses` | ```string[]``` | The email addresses that should be CCed. | | +| `client_id` | ```string``` | 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` | [```\Dropbox\Sign\Model\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` | [```\Dropbox\Sign\Model\SubFieldOptions```](SubFieldOptions.md) | | | +| `form_field_groups` | [```\Dropbox\Sign\Model\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` | [```\Dropbox\Sign\Model\SubFormFieldRule[]```](SubFormFieldRule.md) | Conditional Logic rules for fields defined in `form_fields_per_document`. | | +| `form_fields_per_document` | [```\Dropbox\Sign\Model\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_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` | ```string``` | The custom message in the email that will be sent to the signers. | | +| `metadata` | ```array``` | 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` | [```\Dropbox\Sign\Model\SubSigningOptions```](SubSigningOptions.md) | | | +| `signing_redirect_url` | ```string``` | The URL you want signers redirected to after they successfully sign. | | +| `subject` | ```string``` | 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` | ```string``` | 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#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SignatureRequestEditWithTemplateRequest.md b/docs/Model/SignatureRequestEditWithTemplateRequest.md new file mode 100644 index 0000000..072fdc0 --- /dev/null +++ b/docs/Model/SignatureRequestEditWithTemplateRequest.md @@ -0,0 +1,26 @@ +# # SignatureRequestEditWithTemplateRequest + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `template_ids`*_required_ | ```string[]``` | Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. | | +| `signers`*_required_ | [```\Dropbox\Sign\Model\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` | [```\Dropbox\Sign\Model\SubCC[]```](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | | +| `client_id` | ```string``` | 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` | [```\Dropbox\Sign\Model\SubCustomField[]```](SubCustomField.md) | An array defining values and options for custom fields. Required when a custom field exists in the Template. | | +| `files` | ```\SplFileObject[]``` | 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` | ```string[]``` | 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_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` | ```string``` | The custom message in the email that will be sent to the signers. | | +| `metadata` | ```array``` | 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` | [```\Dropbox\Sign\Model\SubSigningOptions```](SubSigningOptions.md) | | | +| `signing_redirect_url` | ```string``` | The URL you want signers redirected to after they successfully sign. | | +| `subject` | ```string``` | 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` | ```string``` | The title you want to assign to the SignatureRequest. | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/AccountCreate.php b/examples/AccountCreate.php deleted file mode 100644 index 73176d1..0000000 --- a/examples/AccountCreate.php +++ /dev/null @@ -1,25 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$accountApi = new Dropbox\Sign\Api\AccountApi($config); - -$data = new Dropbox\Sign\Model\AccountCreateRequest(); -$data->setEmailAddress("newuser@dropboxsign.com"); - -try { - $result = $accountApi->accountCreate($data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/AccountCreateExample.php b/examples/AccountCreateExample.php new file mode 100644 index 0000000..736fb3c --- /dev/null +++ b/examples/AccountCreateExample.php @@ -0,0 +1,25 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$account_create_request = (new Dropbox\Sign\Model\AccountCreateRequest()) + ->setEmailAddress("newuser@dropboxsign.com"); + +try { + $response = (new Dropbox\Sign\Api\AccountApi(config: $config))->accountCreate( + account_create_request: $account_create_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling AccountApi#accountCreate: {$e->getMessage()}"; +} diff --git a/examples/AccountCreateOauthExample.php b/examples/AccountCreateOauthExample.php new file mode 100644 index 0000000..0c4898b --- /dev/null +++ b/examples/AccountCreateOauthExample.php @@ -0,0 +1,27 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$account_create_request = (new Dropbox\Sign\Model\AccountCreateRequest()) + ->setEmailAddress("newuser@dropboxsign.com") + ->setClientId("cc91c61d00f8bb2ece1428035716b") + ->setClientSecret("1d14434088507ffa390e6f5528465"); + +try { + $response = (new Dropbox\Sign\Api\AccountApi(config: $config))->accountCreate( + account_create_request: $account_create_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling AccountApi#accountCreate: {$e->getMessage()}"; +} diff --git a/examples/AccountGet.php b/examples/AccountGet.php deleted file mode 100644 index 25ac7fb..0000000 --- a/examples/AccountGet.php +++ /dev/null @@ -1,22 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$accountApi = new Dropbox\Sign\Api\AccountApi($config); - -try { - $result = $accountApi->accountGet(null, 'jack@example.com'); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/AccountGetExample.php b/examples/AccountGetExample.php new file mode 100644 index 0000000..96b594d --- /dev/null +++ b/examples/AccountGetExample.php @@ -0,0 +1,20 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\AccountApi(config: $config))->accountGet(); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling AccountApi#accountGet: {$e->getMessage()}"; +} diff --git a/examples/AccountUpdate.php b/examples/AccountUpdate.php deleted file mode 100644 index b94dae2..0000000 --- a/examples/AccountUpdate.php +++ /dev/null @@ -1,25 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$accountApi = new Dropbox\Sign\Api\AccountApi($config); - -$data = new Dropbox\Sign\Model\AccountUpdateRequest(); -$data->setCallbackUrl("https://www.example.com/callback"); - -try { - $result = $accountApi->accountUpdate($data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/AccountUpdateExample.php b/examples/AccountUpdateExample.php new file mode 100644 index 0000000..64a1ad3 --- /dev/null +++ b/examples/AccountUpdateExample.php @@ -0,0 +1,26 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$account_update_request = (new Dropbox\Sign\Model\AccountUpdateRequest()) + ->setCallbackUrl("https://www.example.com/callback") + ->setLocale("en-US"); + +try { + $response = (new Dropbox\Sign\Api\AccountApi(config: $config))->accountUpdate( + account_update_request: $account_update_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling AccountApi#accountUpdate: {$e->getMessage()}"; +} diff --git a/examples/AccountVerify.php b/examples/AccountVerify.php deleted file mode 100644 index 12a0371..0000000 --- a/examples/AccountVerify.php +++ /dev/null @@ -1,25 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$accountApi = new Dropbox\Sign\Api\AccountApi($config); - -$data = new Dropbox\Sign\Model\AccountVerifyRequest(); -$data->setEmailAddress("some_user@dropboxsign.com"); - -try { - $result = $accountApi->accountVerify($data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/AccountVerifyExample.php b/examples/AccountVerifyExample.php new file mode 100644 index 0000000..acdee34 --- /dev/null +++ b/examples/AccountVerifyExample.php @@ -0,0 +1,25 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$account_verify_request = (new Dropbox\Sign\Model\AccountVerifyRequest()) + ->setEmailAddress("some_user@dropboxsign.com"); + +try { + $response = (new Dropbox\Sign\Api\AccountApi(config: $config))->accountVerify( + account_verify_request: $account_verify_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling AccountApi#accountVerify: {$e->getMessage()}"; +} diff --git a/examples/ApiAppCreate.php b/examples/ApiAppCreate.php deleted file mode 100644 index 8686c98..0000000 --- a/examples/ApiAppCreate.php +++ /dev/null @@ -1,42 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$apiAppApi = new Dropbox\Sign\Api\ApiAppApi($config); - -$oauth = new Dropbox\Sign\Model\SubOAuth(); -$oauth->setCallbackUrl("https://example.com/oauth") - ->setScopes([ - Dropbox\Sign\Model\SubOAuth::SCOPES_BASIC_ACCOUNT_INFO, - Dropbox\Sign\Model\SubOAuth::SCOPES_REQUEST_SIGNATURE, - ]); - -$whiteLabelingOptions = new Dropbox\Sign\Model\SubWhiteLabelingOptions(); -$whiteLabelingOptions->setPrimaryButtonColor("#00b3e6") - ->setPrimaryButtonTextColor("#ffffff"); - -$customLogoFile = new SplFileObject(__DIR__ . "/CustomLogoFile.png"); - -$data = new Dropbox\Sign\Model\ApiAppCreateRequest(); -$data->setName("My Production App") - ->setDomains(["example.com"]) - ->setOauth($oauth) - ->setWhiteLabelingOptions($whiteLabelingOptions) - ->setCustomLogoFile($customLogoFile); - -try { - $result = $apiAppApi->apiAppCreate($data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/ApiAppCreateExample.php b/examples/ApiAppCreateExample.php new file mode 100644 index 0000000..7ec68a6 --- /dev/null +++ b/examples/ApiAppCreateExample.php @@ -0,0 +1,42 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$oauth = (new Dropbox\Sign\Model\SubOAuth()) + ->setCallbackUrl("https://example.com/oauth") + ->setScopes([ + Dropbox\Sign\Model\SubOAuth::SCOPES_BASIC_ACCOUNT_INFO, + Dropbox\Sign\Model\SubOAuth::SCOPES_REQUEST_SIGNATURE, + ]); + +$white_labeling_options = (new Dropbox\Sign\Model\SubWhiteLabelingOptions()) + ->setPrimaryButtonColor("#00b3e6") + ->setPrimaryButtonTextColor("#ffffff"); + +$api_app_create_request = (new Dropbox\Sign\Model\ApiAppCreateRequest()) + ->setName("My Production App") + ->setDomains([ + "example.com", + ]) + ->setCustomLogoFile(new SplFileObject("CustomLogoFile.png")) + ->setOauth($oauth) + ->setWhiteLabelingOptions($white_labeling_options); + +try { + $response = (new Dropbox\Sign\Api\ApiAppApi(config: $config))->apiAppCreate( + api_app_create_request: $api_app_create_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling ApiAppApi#apiAppCreate: {$e->getMessage()}"; +} diff --git a/examples/ApiAppDelete.php b/examples/ApiAppDelete.php deleted file mode 100644 index d53477b..0000000 --- a/examples/ApiAppDelete.php +++ /dev/null @@ -1,23 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$apiAppApi = new Dropbox\Sign\Api\ApiAppApi($config); - -$clientId = "0dd3b823a682527788c4e40cb7b6f7e9"; - -try { - $apiAppApi->apiAppDelete($clientId); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/ApiAppDeleteExample.php b/examples/ApiAppDeleteExample.php new file mode 100644 index 0000000..0734efa --- /dev/null +++ b/examples/ApiAppDeleteExample.php @@ -0,0 +1,20 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + (new Dropbox\Sign\Api\ApiAppApi(config: $config))->apiAppDelete( + client_id: "0dd3b823a682527788c4e40cb7b6f7e9", + ); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling ApiAppApi#apiAppDelete: {$e->getMessage()}"; +} diff --git a/examples/ApiAppGet.php b/examples/ApiAppGet.php deleted file mode 100644 index 4372cd6..0000000 --- a/examples/ApiAppGet.php +++ /dev/null @@ -1,24 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$apiAppApi = new Dropbox\Sign\Api\ApiAppApi($config); - -$clientId = "0dd3b823a682527788c4e40cb7b6f7e9"; - -try { - $result = $apiAppApi->apiAppGet($clientId); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/ApiAppGetExample.php b/examples/ApiAppGetExample.php new file mode 100644 index 0000000..f4dcc57 --- /dev/null +++ b/examples/ApiAppGetExample.php @@ -0,0 +1,22 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\ApiAppApi(config: $config))->apiAppGet( + client_id: "0dd3b823a682527788c4e40cb7b6f7e9", + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling ApiAppApi#apiAppGet: {$e->getMessage()}"; +} diff --git a/examples/ApiAppList.php b/examples/ApiAppList.php deleted file mode 100644 index 9fb6cca..0000000 --- a/examples/ApiAppList.php +++ /dev/null @@ -1,25 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$apiAppApi = new Dropbox\Sign\Api\ApiAppApi($config); - -$page = 1; -$pageSize = 2; - -try { - $result = $apiAppApi->apiAppList($page, $pageSize); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/ApiAppListExample.php b/examples/ApiAppListExample.php new file mode 100644 index 0000000..6e9a8e5 --- /dev/null +++ b/examples/ApiAppListExample.php @@ -0,0 +1,23 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\ApiAppApi(config: $config))->apiAppList( + page: 1, + page_size: 20, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling ApiAppApi#apiAppList: {$e->getMessage()}"; +} diff --git a/examples/ApiAppUpdate.php b/examples/ApiAppUpdate.php deleted file mode 100644 index 2e96f9e..0000000 --- a/examples/ApiAppUpdate.php +++ /dev/null @@ -1,36 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$apiAppApi = new Dropbox\Sign\Api\ApiAppApi($config); - -$whiteLabelingOptions = new Dropbox\Sign\Model\SubWhiteLabelingOptions(); -$whiteLabelingOptions->setPrimaryButtonColor("#00b3e6") - ->setPrimaryButtonTextColor("#ffffff"); - -$customLogoFile = new SplFileObject(__DIR__ . "/CustomLogoFile.png"); - -$data = new Dropbox\Sign\Model\ApiAppUpdateRequest(); -$data->setName("New Name") - ->setCallbackUrl("http://example.com/dropboxsign") - ->setWhiteLabelingOptions($whiteLabelingOptions) - ->setCustomLogoFile($customLogoFile); - -$clientId = "0dd3b823a682527788c4e40cb7b6f7e9"; - -try { - $result = $apiAppApi->apiAppUpdate($clientId, $data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/ApiAppUpdateExample.php b/examples/ApiAppUpdateExample.php new file mode 100644 index 0000000..30c22c4 --- /dev/null +++ b/examples/ApiAppUpdateExample.php @@ -0,0 +1,44 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$oauth = (new Dropbox\Sign\Model\SubOAuth()) + ->setCallbackUrl("https://example.com/oauth") + ->setScopes([ + Dropbox\Sign\Model\SubOAuth::SCOPES_BASIC_ACCOUNT_INFO, + Dropbox\Sign\Model\SubOAuth::SCOPES_REQUEST_SIGNATURE, + ]); + +$white_labeling_options = (new Dropbox\Sign\Model\SubWhiteLabelingOptions()) + ->setPrimaryButtonColor("#00b3e6") + ->setPrimaryButtonTextColor("#ffffff"); + +$api_app_update_request = (new Dropbox\Sign\Model\ApiAppUpdateRequest()) + ->setCallbackUrl("https://example.com/dropboxsign") + ->setName("New Name") + ->setDomains([ + "example.com", + ]) + ->setCustomLogoFile(new SplFileObject("CustomLogoFile.png")) + ->setOauth($oauth) + ->setWhiteLabelingOptions($white_labeling_options); + +try { + $response = (new Dropbox\Sign\Api\ApiAppApi(config: $config))->apiAppUpdate( + client_id: "0dd3b823a682527788c4e40cb7b6f7e9", + api_app_update_request: $api_app_update_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling ApiAppApi#apiAppUpdate: {$e->getMessage()}"; +} diff --git a/examples/BulkSendJobGet.php b/examples/BulkSendJobGet.php deleted file mode 100644 index 3b93304..0000000 --- a/examples/BulkSendJobGet.php +++ /dev/null @@ -1,24 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$bulkSendJobApi = new Dropbox\Sign\Api\BulkSendJobApi($config); - -$bulkSendJobId = "6e683bc0369ba3d5b6f43c2c22a8031dbf6bd174"; - -try { - $result = $bulkSendJobApi->bulkSendJobGet($bulkSendJobId); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/BulkSendJobGetExample.php b/examples/BulkSendJobGetExample.php new file mode 100644 index 0000000..8b74043 --- /dev/null +++ b/examples/BulkSendJobGetExample.php @@ -0,0 +1,24 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\BulkSendJobApi(config: $config))->bulkSendJobGet( + bulk_send_job_id: "6e683bc0369ba3d5b6f43c2c22a8031dbf6bd174", + page: 1, + page_size: 20, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling BulkSendJobApi#bulkSendJobGet: {$e->getMessage()}"; +} diff --git a/examples/BulkSendJobList.php b/examples/BulkSendJobList.php deleted file mode 100644 index 9e6639a..0000000 --- a/examples/BulkSendJobList.php +++ /dev/null @@ -1,25 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$bulkSendJobApi = new Dropbox\Sign\Api\BulkSendJobApi($config); - -$page = 1; -$pageSize = 20; - -try { - $result = $bulkSendJobApi->bulkSendJobList($page, $pageSize); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/BulkSendJobListExample.php b/examples/BulkSendJobListExample.php new file mode 100644 index 0000000..9a566d5 --- /dev/null +++ b/examples/BulkSendJobListExample.php @@ -0,0 +1,23 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\BulkSendJobApi(config: $config))->bulkSendJobList( + page: 1, + page_size: 20, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling BulkSendJobApi#bulkSendJobList: {$e->getMessage()}"; +} diff --git a/examples/EmbeddedEditUrl.php b/examples/EmbeddedEditUrl.php deleted file mode 100644 index 452afd3..0000000 --- a/examples/EmbeddedEditUrl.php +++ /dev/null @@ -1,28 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$embeddedApi = new Dropbox\Sign\Api\EmbeddedApi($config); - -$data = new Dropbox\Sign\Model\EmbeddedEditUrlRequest(); -$data->setCcRoles([""]) - ->setMergeFields([]); - -$templateId = "5de8179668f2033afac48da1868d0093bf133266"; - -try { - $result = $embeddedApi->embeddedEditUrl($templateId, $data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/EmbeddedEditUrlExample.php b/examples/EmbeddedEditUrlExample.php new file mode 100644 index 0000000..cae4929 --- /dev/null +++ b/examples/EmbeddedEditUrlExample.php @@ -0,0 +1,32 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$merge_fields = [ +]; + +$embedded_edit_url_request = (new Dropbox\Sign\Model\EmbeddedEditUrlRequest()) + ->setCcRoles([ + "", + ]) + ->setMergeFields($merge_fields); + +try { + $response = (new Dropbox\Sign\Api\EmbeddedApi(config: $config))->embeddedEditUrl( + template_id: "f57db65d3f933b5316d398057a36176831451a35", + embedded_edit_url_request: $embedded_edit_url_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling EmbeddedApi#embeddedEditUrl: {$e->getMessage()}"; +} diff --git a/examples/EmbeddedSignUrl.php b/examples/EmbeddedSignUrl.php deleted file mode 100644 index 7b838a1..0000000 --- a/examples/EmbeddedSignUrl.php +++ /dev/null @@ -1,24 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$embeddedApi = new Dropbox\Sign\Api\EmbeddedApi($config); - -$signatureId = "50e3542f738adfa7ddd4cbd4c00d2a8ab6e4194b"; - -try { - $result = $embeddedApi->embeddedSignUrl($signatureId); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/EmbeddedSignUrlExample.php b/examples/EmbeddedSignUrlExample.php new file mode 100644 index 0000000..b055ac6 --- /dev/null +++ b/examples/EmbeddedSignUrlExample.php @@ -0,0 +1,22 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\EmbeddedApi(config: $config))->embeddedSignUrl( + signature_id: "50e3542f738adfa7ddd4cbd4c00d2a8ab6e4194b", + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling EmbeddedApi#embeddedSignUrl: {$e->getMessage()}"; +} diff --git a/examples/EventCallback.php b/examples/EventCallbackExample.php similarity index 91% rename from examples/EventCallback.php rename to examples/EventCallbackExample.php index 68ce654..4a21d5c 100644 --- a/examples/EventCallback.php +++ b/examples/EventCallbackExample.php @@ -1,6 +1,10 @@ setUsername("YOUR_API_KEY"); - -$faxApi = new Dropbox\Sign\Api\FaxApi($config); - -try { - $faxApi->faxDelete("fa5c8a0b0f492d768749333ad6fcc214c111e967"); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/FaxDeleteExample.php b/examples/FaxDeleteExample.php new file mode 100644 index 0000000..96ba3c0 --- /dev/null +++ b/examples/FaxDeleteExample.php @@ -0,0 +1,19 @@ +setUsername("YOUR_API_KEY"); + +try { + (new Dropbox\Sign\Api\FaxApi(config: $config))->faxDelete( + fax_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + ); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling FaxApi#faxDelete: {$e->getMessage()}"; +} diff --git a/examples/FaxFiles.php b/examples/FaxFiles.php deleted file mode 100644 index d543eea..0000000 --- a/examples/FaxFiles.php +++ /dev/null @@ -1,21 +0,0 @@ -setUsername("YOUR_API_KEY"); - -$faxApi = new Dropbox\Sign\Api\FaxApi($config); - -$faxId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; - -try { - $result = $faxApi->faxFiles($faxId); - copy($result->getRealPath(), __DIR__ . '/file_response.pdf'); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/FaxFilesExample.php b/examples/FaxFilesExample.php new file mode 100644 index 0000000..01322d7 --- /dev/null +++ b/examples/FaxFilesExample.php @@ -0,0 +1,21 @@ +setUsername("YOUR_API_KEY"); + +try { + $response = (new Dropbox\Sign\Api\FaxApi(config: $config))->faxFiles( + fax_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + ); + + copy($response->getRealPath(), __DIR__ . '/file_response'); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling FaxApi#faxFiles: {$e->getMessage()}"; +} diff --git a/examples/FaxGet.php b/examples/FaxGet.php deleted file mode 100644 index 43b7a1f..0000000 --- a/examples/FaxGet.php +++ /dev/null @@ -1,21 +0,0 @@ -setUsername("YOUR_API_KEY"); - -$faxApi = new Dropbox\Sign\Api\FaxApi($config); - -$faxId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; - -try { - $result = $faxApi->faxGet($faxId); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/FaxGetExample.php b/examples/FaxGetExample.php new file mode 100644 index 0000000..50bb7c8 --- /dev/null +++ b/examples/FaxGetExample.php @@ -0,0 +1,21 @@ +setUsername("YOUR_API_KEY"); + +try { + $response = (new Dropbox\Sign\Api\FaxApi(config: $config))->faxGet( + fax_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling FaxApi#faxGet: {$e->getMessage()}"; +} diff --git a/examples/FaxLineAddUser.php b/examples/FaxLineAddUser.php deleted file mode 100644 index 8fb6c0f..0000000 --- a/examples/FaxLineAddUser.php +++ /dev/null @@ -1,23 +0,0 @@ -setUsername("YOUR_API_KEY"); - -$faxLineApi = new Dropbox\Sign\Api\FaxLineApi($config); - -$data = new Dropbox\Sign\Model\FaxLineAddUserRequest(); -$data->setNumber("[FAX_NUMBER]") - ->setEmailAddress("member@dropboxsign.com"); - -try { - $result = $faxLineApi->faxLineAddUser($data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/FaxLineAddUserExample.php b/examples/FaxLineAddUserExample.php new file mode 100644 index 0000000..cca56e7 --- /dev/null +++ b/examples/FaxLineAddUserExample.php @@ -0,0 +1,25 @@ +setUsername("YOUR_API_KEY"); + +$fax_line_add_user_request = (new Dropbox\Sign\Model\FaxLineAddUserRequest()) + ->setNumber("[FAX_NUMBER]") + ->setEmailAddress("member@dropboxsign.com"); + +try { + $response = (new Dropbox\Sign\Api\FaxLineApi(config: $config))->faxLineAddUser( + fax_line_add_user_request: $fax_line_add_user_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling FaxLineApi#faxLineAddUser: {$e->getMessage()}"; +} diff --git a/examples/FaxLineAreaCodeGet.php b/examples/FaxLineAreaCodeGet.php deleted file mode 100644 index c19f9e1..0000000 --- a/examples/FaxLineAreaCodeGet.php +++ /dev/null @@ -1,19 +0,0 @@ -setUsername("YOUR_API_KEY"); - -$faxLineApi = new Dropbox\Sign\Api\FaxLineApi($config); - -try { - $result = $faxLineApi->faxLineAreaCodeGet("US", "CA"); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/FaxLineAreaCodeGetExample.php b/examples/FaxLineAreaCodeGetExample.php new file mode 100644 index 0000000..f8d4e71 --- /dev/null +++ b/examples/FaxLineAreaCodeGetExample.php @@ -0,0 +1,21 @@ +setUsername("YOUR_API_KEY"); + +try { + $response = (new Dropbox\Sign\Api\FaxLineApi(config: $config))->faxLineAreaCodeGet( + country: "US", + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling FaxLineApi#faxLineAreaCodeGet: {$e->getMessage()}"; +} diff --git a/examples/FaxLineCreate.php b/examples/FaxLineCreate.php deleted file mode 100644 index 27a0d2b..0000000 --- a/examples/FaxLineCreate.php +++ /dev/null @@ -1,23 +0,0 @@ -setUsername("YOUR_API_KEY"); - -$faxLineApi = new Dropbox\Sign\Api\FaxLineApi($config); - -$data = new Dropbox\Sign\Model\FaxLineCreateRequest(); -$data->setAreaCode(209) - ->setCountry("US"); - -try { - $result = $faxLineApi->faxLineCreate($data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/FaxLineCreateExample.php b/examples/FaxLineCreateExample.php new file mode 100644 index 0000000..0a5ef5e --- /dev/null +++ b/examples/FaxLineCreateExample.php @@ -0,0 +1,25 @@ +setUsername("YOUR_API_KEY"); + +$fax_line_create_request = (new Dropbox\Sign\Model\FaxLineCreateRequest()) + ->setAreaCode(209) + ->setCountry(Dropbox\Sign\Model\FaxLineCreateRequest::COUNTRY_US); + +try { + $response = (new Dropbox\Sign\Api\FaxLineApi(config: $config))->faxLineCreate( + fax_line_create_request: $fax_line_create_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling FaxLineApi#faxLineCreate: {$e->getMessage()}"; +} diff --git a/examples/FaxLineDelete.php b/examples/FaxLineDelete.php deleted file mode 100644 index 8cc4ee0..0000000 --- a/examples/FaxLineDelete.php +++ /dev/null @@ -1,21 +0,0 @@ -setUsername("YOUR_API_KEY"); - -$faxLineApi = new Dropbox\Sign\Api\FaxLineApi($config); - -$data = new Dropbox\Sign\Model\FaxLineDeleteRequest(); -$data->setNumber("[FAX_NUMBER]"); - -try { - $faxLineApi->faxLineDelete($data); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/FaxLineDeleteExample.php b/examples/FaxLineDeleteExample.php new file mode 100644 index 0000000..080db29 --- /dev/null +++ b/examples/FaxLineDeleteExample.php @@ -0,0 +1,22 @@ +setUsername("YOUR_API_KEY"); + +$fax_line_delete_request = (new Dropbox\Sign\Model\FaxLineDeleteRequest()) + ->setNumber("[FAX_NUMBER]"); + +try { + (new Dropbox\Sign\Api\FaxLineApi(config: $config))->faxLineDelete( + fax_line_delete_request: $fax_line_delete_request, + ); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling FaxLineApi#faxLineDelete: {$e->getMessage()}"; +} diff --git a/examples/FaxLineGet.php b/examples/FaxLineGet.php deleted file mode 100644 index 75dd77b..0000000 --- a/examples/FaxLineGet.php +++ /dev/null @@ -1,19 +0,0 @@ -setUsername("YOUR_API_KEY"); - -$faxLineApi = new Dropbox\Sign\Api\FaxLineApi($config); - -try { - $result = $faxLineApi->faxLineGet("[FAX_NUMBER]"); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/FaxLineGetExample.php b/examples/FaxLineGetExample.php new file mode 100644 index 0000000..7000494 --- /dev/null +++ b/examples/FaxLineGetExample.php @@ -0,0 +1,21 @@ +setUsername("YOUR_API_KEY"); + +try { + $response = (new Dropbox\Sign\Api\FaxLineApi(config: $config))->faxLineGet( + number: "123-123-1234", + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling FaxLineApi#faxLineGet: {$e->getMessage()}"; +} diff --git a/examples/FaxLineList.php b/examples/FaxLineList.php deleted file mode 100644 index 6056a24..0000000 --- a/examples/FaxLineList.php +++ /dev/null @@ -1,19 +0,0 @@ -setUsername("YOUR_API_KEY"); - -$faxLineApi = new Dropbox\Sign\Api\FaxLineApi($config); - -try { - $result = $faxLineApi->faxLineList(); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/FaxLineListExample.php b/examples/FaxLineListExample.php new file mode 100644 index 0000000..c759934 --- /dev/null +++ b/examples/FaxLineListExample.php @@ -0,0 +1,23 @@ +setUsername("YOUR_API_KEY"); + +try { + $response = (new Dropbox\Sign\Api\FaxLineApi(config: $config))->faxLineList( + account_id: "ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97", + page: 1, + page_size: 20, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling FaxLineApi#faxLineList: {$e->getMessage()}"; +} diff --git a/examples/FaxLineRemoveUser.php b/examples/FaxLineRemoveUser.php deleted file mode 100644 index 60132fe..0000000 --- a/examples/FaxLineRemoveUser.php +++ /dev/null @@ -1,23 +0,0 @@ -setUsername("YOUR_API_KEY"); - -$faxLineApi = new Dropbox\Sign\Api\FaxLineApi($config); - -$data = new Dropbox\Sign\Model\FaxLineRemoveUserRequest(); -$data->setNumber("[FAX_NUMBER]") - ->setEmailAddress("member@dropboxsign.com"); - -try { - $result = $faxLineApi->faxLineRemoveUser($data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/FaxLineRemoveUserExample.php b/examples/FaxLineRemoveUserExample.php new file mode 100644 index 0000000..95d1179 --- /dev/null +++ b/examples/FaxLineRemoveUserExample.php @@ -0,0 +1,25 @@ +setUsername("YOUR_API_KEY"); + +$fax_line_remove_user_request = (new Dropbox\Sign\Model\FaxLineRemoveUserRequest()) + ->setNumber("[FAX_NUMBER]") + ->setEmailAddress("member@dropboxsign.com"); + +try { + $response = (new Dropbox\Sign\Api\FaxLineApi(config: $config))->faxLineRemoveUser( + fax_line_remove_user_request: $fax_line_remove_user_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling FaxLineApi#faxLineRemoveUser: {$e->getMessage()}"; +} diff --git a/examples/FaxList.php b/examples/FaxList.php deleted file mode 100644 index d2a513c..0000000 --- a/examples/FaxList.php +++ /dev/null @@ -1,22 +0,0 @@ -setUsername("YOUR_API_KEY"); - -$faxApi = new Dropbox\Sign\Api\FaxApi($config); - -$page = 1; -$pageSize = 2; - -try { - $result = $faxApi->faxList($page, $pageSize); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/FaxListExample.php b/examples/FaxListExample.php new file mode 100644 index 0000000..c0d4323 --- /dev/null +++ b/examples/FaxListExample.php @@ -0,0 +1,22 @@ +setUsername("YOUR_API_KEY"); + +try { + $response = (new Dropbox\Sign\Api\FaxApi(config: $config))->faxList( + page: 1, + page_size: 20, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling FaxApi#faxList: {$e->getMessage()}"; +} diff --git a/examples/FaxSend.php b/examples/FaxSend.php deleted file mode 100644 index 2dd42d3..0000000 --- a/examples/FaxSend.php +++ /dev/null @@ -1,29 +0,0 @@ -setUsername("YOUR_API_KEY"); - -$faxApi = new Dropbox\Sign\Api\FaxApi($config); - -$data = new Dropbox\Sign\Model\FaxSendRequest(); -$data->setFiles([new SplFileObject(__DIR__ . "/example_signature_request.pdf")]) - ->setTestMode(true) - ->setRecipient("16690000001") - ->setSender("16690000000") - ->setCoverPageTo("Jill Fax") - ->setCoverPageMessage("I'm sending you a fax!") - ->setCoverPageFrom("Faxer Faxerson") - ->setTitle("This is what the fax is about!"); - -try { - $result = $faxApi->faxSend($data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/FaxSendExample.php b/examples/FaxSendExample.php new file mode 100644 index 0000000..707e8ce --- /dev/null +++ b/examples/FaxSendExample.php @@ -0,0 +1,32 @@ +setUsername("YOUR_API_KEY"); + +$fax_send_request = (new Dropbox\Sign\Model\FaxSendRequest()) + ->setRecipient("16690000001") + ->setSender("16690000000") + ->setTestMode(true) + ->setCoverPageTo("Jill Fax") + ->setCoverPageFrom("Faxer Faxerson") + ->setCoverPageMessage("I'm sending you a fax!") + ->setTitle("This is what the fax is about!") + ->setFiles([ + ]); + +try { + $response = (new Dropbox\Sign\Api\FaxApi(config: $config))->faxSend( + fax_send_request: $fax_send_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling FaxApi#faxSend: {$e->getMessage()}"; +} diff --git a/examples/OauthTokenGenerate.php b/examples/OauthTokenGenerate.php deleted file mode 100644 index d90201e..0000000 --- a/examples/OauthTokenGenerate.php +++ /dev/null @@ -1,22 +0,0 @@ -setState("900e06e2") - ->setCode("1b0d28d90c86c141") - ->setClientId("cc91c61d00f8bb2ece1428035716b") - ->setClientSecret("1d14434088507ffa390e6f5528465"); - -try { - $result = $oauthApi->oauthTokenGenerate($data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/OauthTokenGenerateExample.php b/examples/OauthTokenGenerateExample.php new file mode 100644 index 0000000..9b2df4a --- /dev/null +++ b/examples/OauthTokenGenerateExample.php @@ -0,0 +1,27 @@ +setClientId("cc91c61d00f8bb2ece1428035716b") + ->setClientSecret("1d14434088507ffa390e6f5528465") + ->setCode("1b0d28d90c86c141") + ->setState("900e06e2") + ->setGrantType("authorization_code"); + +try { + $response = (new Dropbox\Sign\Api\OAuthApi(config: $config))->oauthTokenGenerate( + o_auth_token_generate_request: $o_auth_token_generate_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling OAuthApi#oauthTokenGenerate: {$e->getMessage()}"; +} diff --git a/examples/OauthTokenRefresh.php b/examples/OauthTokenRefresh.php deleted file mode 100644 index ad3e7ad..0000000 --- a/examples/OauthTokenRefresh.php +++ /dev/null @@ -1,19 +0,0 @@ -setRefreshToken("hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3"); - -try { - $result = $oauthApi->oauthTokenRefresh($data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/OauthTokenRefreshExample.php b/examples/OauthTokenRefreshExample.php new file mode 100644 index 0000000..519db72 --- /dev/null +++ b/examples/OauthTokenRefreshExample.php @@ -0,0 +1,24 @@ +setGrantType("refresh_token") + ->setRefreshToken("hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3"); + +try { + $response = (new Dropbox\Sign\Api\OAuthApi(config: $config))->oauthTokenRefresh( + o_auth_token_refresh_request: $o_auth_token_refresh_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling OAuthApi#oauthTokenRefresh: {$e->getMessage()}"; +} diff --git a/examples/ReportCreate.php b/examples/ReportCreate.php deleted file mode 100644 index 1f030f6..0000000 --- a/examples/ReportCreate.php +++ /dev/null @@ -1,27 +0,0 @@ -setUsername("YOUR_API_KEY"); - -$reportApi = new Dropbox\Sign\Api\ReportApi($config); - -$data = new Dropbox\Sign\Model\ReportCreateRequest(); -$data->setStartDate("09/01/2020") - ->setEndDate("09/01/2020") - ->setReportType([ - Dropbox\Sign\Model\ReportCreateRequest::REPORT_TYPE_USER_ACTIVITY, - Dropbox\Sign\Model\ReportCreateRequest::REPORT_TYPE_DOCUMENT_STATUS, - ]); - -try { - $result = $reportApi->reportCreate($data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/ReportCreateExample.php b/examples/ReportCreateExample.php new file mode 100644 index 0000000..18d8d09 --- /dev/null +++ b/examples/ReportCreateExample.php @@ -0,0 +1,29 @@ +setUsername("YOUR_API_KEY"); + +$report_create_request = (new Dropbox\Sign\Model\ReportCreateRequest()) + ->setStartDate("09/01/2020") + ->setEndDate("09/01/2020") + ->setReportType([ + Dropbox\Sign\Model\ReportCreateRequest::REPORT_TYPE_USER_ACTIVITY, + Dropbox\Sign\Model\ReportCreateRequest::REPORT_TYPE_DOCUMENT_STATUS, + ]); + +try { + $response = (new Dropbox\Sign\Api\ReportApi(config: $config))->reportCreate( + report_create_request: $report_create_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling ReportApi#reportCreate: {$e->getMessage()}"; +} diff --git a/examples/SignatureRequestBulkCreateEmbeddedWithTemplate.php b/examples/SignatureRequestBulkCreateEmbeddedWithTemplate.php deleted file mode 100644 index 6c3de5c..0000000 --- a/examples/SignatureRequestBulkCreateEmbeddedWithTemplate.php +++ /dev/null @@ -1,60 +0,0 @@ -setUsername("YOUR_API_KEY"); - -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); - -$signerList1Signer = new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner(); -$signerList1Signer->setRole("Client") - ->setName("George") - ->setEmailAddress("george@example.com") - ->setPin("d79a3td"); - -$signerList1CustomFields = new Dropbox\Sign\Model\SubBulkSignerListCustomField(); -$signerList1CustomFields->setName("company") - ->setValue("ABC Corp"); - -$signerList1 = new Dropbox\Sign\Model\SubBulkSignerList(); -$signerList1->setSigners([$signerList1Signer]) - ->setCustomFields([$signerList1CustomFields]); - -$signerList2Signer = new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner(); -$signerList2Signer->setRole("Client") - ->setName("Mary") - ->setEmailAddress("mary@example.com") - ->setPin("gd9as5b"); - -$signerList2CustomFields = new Dropbox\Sign\Model\SubBulkSignerListCustomField(); -$signerList2CustomFields->setName("company") - ->setValue("123 LLC"); - -$signerList2 = new Dropbox\Sign\Model\SubBulkSignerList(); -$signerList2->setSigners([$signerList2Signer]) - ->setCustomFields([$signerList2CustomFields]); - -$cc1 = new Dropbox\Sign\Model\SubCC(); -$cc1->setRole("Accounting") - ->setEmailAddress("accounting@example.com"); - -$data = new Dropbox\Sign\Model\SignatureRequestBulkCreateEmbeddedWithTemplateRequest(); -$data->setClientId("1a659d9ad95bccd307ecad78d72192f8") - ->setTemplateIds(["c26b8a16784a872da37ea946b9ddec7c1e11dff6"]) - ->setSubject("Purchase Order") - ->setMessage("Glad we could come to an agreement.") - ->setSignerList([$signerList1, $signerList2]) - ->setCcs([$cc1]) - ->setTestMode(true); - -try { - $result = $signatureRequestApi->signatureRequestBulkCreateEmbeddedWithTemplate($data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/SignatureRequestBulkCreateEmbeddedWithTemplateExample.php b/examples/SignatureRequestBulkCreateEmbeddedWithTemplateExample.php new file mode 100644 index 0000000..1727df3 --- /dev/null +++ b/examples/SignatureRequestBulkCreateEmbeddedWithTemplateExample.php @@ -0,0 +1,89 @@ +setUsername("YOUR_API_KEY"); + +$signer_list_2_custom_fields_1 = (new Dropbox\Sign\Model\SubBulkSignerListCustomField()) + ->setName("company") + ->setValue("123 LLC"); + +$signer_list_2_custom_fields = [ + $signer_list_2_custom_fields_1, +]; + +$signer_list_2_signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner()) + ->setRole("Client") + ->setName("Mary") + ->setEmailAddress("mary@example.com") + ->setPin("gd9as5b"); + +$signer_list_2_signers = [ + $signer_list_2_signers_1, +]; + +$signer_list_1_custom_fields_1 = (new Dropbox\Sign\Model\SubBulkSignerListCustomField()) + ->setName("company") + ->setValue("ABC Corp"); + +$signer_list_1_custom_fields = [ + $signer_list_1_custom_fields_1, +]; + +$signer_list_1_signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner()) + ->setRole("Client") + ->setName("George") + ->setEmailAddress("george@example.com") + ->setPin("d79a3td"); + +$signer_list_1_signers = [ + $signer_list_1_signers_1, +]; + +$signer_list_1 = (new Dropbox\Sign\Model\SubBulkSignerList()) + ->setCustomFields($signer_list_1_custom_fields) + ->setSigners($signer_list_1_signers); + +$signer_list_2 = (new Dropbox\Sign\Model\SubBulkSignerList()) + ->setCustomFields($signer_list_2_custom_fields) + ->setSigners($signer_list_2_signers); + +$signer_list = [ + $signer_list_1, + $signer_list_2, +]; + +$ccs_1 = (new Dropbox\Sign\Model\SubCC()) + ->setRole("Accounting") + ->setEmailAddress("accounting@example.com"); + +$ccs = [ + $ccs_1, +]; + +$signature_request_bulk_create_embedded_with_template_request = (new Dropbox\Sign\Model\SignatureRequestBulkCreateEmbeddedWithTemplateRequest()) + ->setClientId("1a659d9ad95bccd307ecad78d72192f8") + ->setTemplateIds([ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", + ]) + ->setMessage("Glad we could come to an agreement.") + ->setSubject("Purchase Order") + ->setTestMode(true) + ->setSignerList($signer_list) + ->setCcs($ccs); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestBulkCreateEmbeddedWithTemplate( + signature_request_bulk_create_embedded_with_template_request: $signature_request_bulk_create_embedded_with_template_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestBulkCreateEmbeddedWithTemplate: {$e->getMessage()}"; +} diff --git a/examples/SignatureRequestBulkSendWithTemplate.php b/examples/SignatureRequestBulkSendWithTemplate.php deleted file mode 100644 index 0b147a7..0000000 --- a/examples/SignatureRequestBulkSendWithTemplate.php +++ /dev/null @@ -1,62 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); - -$signerList1Signer = new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner(); -$signerList1Signer->setRole("Client") - ->setName("George") - ->setEmailAddress("george@example.com") - ->setPin("d79a3td"); - -$signerList1CustomFields = new Dropbox\Sign\Model\SubBulkSignerListCustomField(); -$signerList1CustomFields->setName("company") - ->setValue("ABC Corp"); - -$signerList1 = new Dropbox\Sign\Model\SubBulkSignerList(); -$signerList1->setSigners([$signerList1Signer]) - ->setCustomFields([$signerList1CustomFields]); - -$signerList2Signer = new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner(); -$signerList2Signer->setRole("Client") - ->setName("Mary") - ->setEmailAddress("mary@example.com") - ->setPin("gd9as5b"); - -$signerList2CustomFields = new Dropbox\Sign\Model\SubBulkSignerListCustomField(); -$signerList2CustomFields->setName("company") - ->setValue("123 LLC"); - -$signerList2 = new Dropbox\Sign\Model\SubBulkSignerList(); -$signerList2->setSigners([$signerList2Signer]) - ->setCustomFields([$signerList2CustomFields]); - -$cc1 = new Dropbox\Sign\Model\SubCC(); -$cc1->setRole("Accounting") - ->setEmailAddress("accounting@example.com"); - -$data = new Dropbox\Sign\Model\SignatureRequestBulkSendWithTemplateRequest(); -$data->setTemplateIds(["c26b8a16784a872da37ea946b9ddec7c1e11dff6"]) - ->setSubject("Purchase Order") - ->setMessage("Glad we could come to an agreement.") - ->setSignerList([$signerList1, $signerList2]) - ->setCcs([$cc1]) - ->setTestMode(true); - -try { - $result = $signatureRequestApi->signatureRequestBulkSendWithTemplate($data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/SignatureRequestBulkSendWithTemplateExample.php b/examples/SignatureRequestBulkSendWithTemplateExample.php new file mode 100644 index 0000000..7574361 --- /dev/null +++ b/examples/SignatureRequestBulkSendWithTemplateExample.php @@ -0,0 +1,89 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$signer_list_2_custom_fields_1 = (new Dropbox\Sign\Model\SubBulkSignerListCustomField()) + ->setName("company") + ->setValue("123 LLC"); + +$signer_list_2_custom_fields = [ + $signer_list_2_custom_fields_1, +]; + +$signer_list_2_signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner()) + ->setRole("Client") + ->setName("Mary") + ->setEmailAddress("mary@example.com") + ->setPin("gd9as5b"); + +$signer_list_2_signers = [ + $signer_list_2_signers_1, +]; + +$signer_list_1_custom_fields_1 = (new Dropbox\Sign\Model\SubBulkSignerListCustomField()) + ->setName("company") + ->setValue("ABC Corp"); + +$signer_list_1_custom_fields = [ + $signer_list_1_custom_fields_1, +]; + +$signer_list_1_signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner()) + ->setRole("Client") + ->setName("George") + ->setEmailAddress("george@example.com") + ->setPin("d79a3td"); + +$signer_list_1_signers = [ + $signer_list_1_signers_1, +]; + +$signer_list_1 = (new Dropbox\Sign\Model\SubBulkSignerList()) + ->setCustomFields($signer_list_1_custom_fields) + ->setSigners($signer_list_1_signers); + +$signer_list_2 = (new Dropbox\Sign\Model\SubBulkSignerList()) + ->setCustomFields($signer_list_2_custom_fields) + ->setSigners($signer_list_2_signers); + +$signer_list = [ + $signer_list_1, + $signer_list_2, +]; + +$ccs_1 = (new Dropbox\Sign\Model\SubCC()) + ->setRole("Accounting") + ->setEmailAddress("accounting@example.com"); + +$ccs = [ + $ccs_1, +]; + +$signature_request_bulk_send_with_template_request = (new Dropbox\Sign\Model\SignatureRequestBulkSendWithTemplateRequest()) + ->setTemplateIds([ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", + ]) + ->setMessage("Glad we could come to an agreement.") + ->setSubject("Purchase Order") + ->setTestMode(true) + ->setSignerList($signer_list) + ->setCcs($ccs); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestBulkSendWithTemplate( + signature_request_bulk_send_with_template_request: $signature_request_bulk_send_with_template_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestBulkSendWithTemplate: {$e->getMessage()}"; +} diff --git a/examples/SignatureRequestCancel.php b/examples/SignatureRequestCancel.php deleted file mode 100644 index 154dbab..0000000 --- a/examples/SignatureRequestCancel.php +++ /dev/null @@ -1,23 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); - -$signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -try { - $signatureRequestApi->signatureRequestCancel($signatureRequestId); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/SignatureRequestCancelExample.php b/examples/SignatureRequestCancelExample.php new file mode 100644 index 0000000..969a676 --- /dev/null +++ b/examples/SignatureRequestCancelExample.php @@ -0,0 +1,20 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestCancel( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + ); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestCancel: {$e->getMessage()}"; +} diff --git a/examples/SignatureRequestCreateEmbedded.php b/examples/SignatureRequestCreateEmbedded.php deleted file mode 100644 index 9b41691..0000000 --- a/examples/SignatureRequestCreateEmbedded.php +++ /dev/null @@ -1,53 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); - -$signer1 = new Dropbox\Sign\Model\SubSignatureRequestSigner(); -$signer1->setEmailAddress("jack@example.com") - ->setName("Jack") - ->setOrder(0); - -$signer2 = new Dropbox\Sign\Model\SubSignatureRequestSigner(); -$signer2->setEmailAddress("jill@example.com") - ->setName("Jill") - ->setOrder(1); - -$signingOptions = new Dropbox\Sign\Model\SubSigningOptions(); -$signingOptions->setDraw(true) - ->setType(true) - ->setUpload(true) - ->setPhone(true) - ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW); - -$data = new Dropbox\Sign\Model\SignatureRequestCreateEmbeddedRequest(); -$data->setClientId("ec64a202072370a737edf4a0eb7f4437") - ->setTitle("NDA with Acme Co.") - ->setSubject("The NDA we talked about") - ->setMessage("Please sign this NDA and then we can discuss more. Let me know if you have any questions.") - ->setSigners([$signer1, $signer2]) - ->setCcEmailAddresses([ - "lawyer1@dropboxsign.com", - "lawyer2@dropboxsign.com", - ]) - ->setFiles([new SplFileObject(__DIR__ . "/example_signature_request.pdf")]) - ->setSigningOptions($signingOptions) - ->setTestMode(true); - -try { - $result = $signatureRequestApi->signatureRequestCreateEmbedded($data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/SignatureRequestCreateEmbeddedExample.php b/examples/SignatureRequestCreateEmbeddedExample.php new file mode 100644 index 0000000..61d7404 --- /dev/null +++ b/examples/SignatureRequestCreateEmbeddedExample.php @@ -0,0 +1,59 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$signing_options = (new Dropbox\Sign\Model\SubSigningOptions()) + ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW) + ->setDraw(true) + ->setPhone(false) + ->setType(true) + ->setUpload(true); + +$signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Jack") + ->setEmailAddress("jack@example.com") + ->setOrder(0); + +$signers_2 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Jill") + ->setEmailAddress("jill@example.com") + ->setOrder(1); + +$signers = [ + $signers_1, + $signers_2, +]; + +$signature_request_create_embedded_request = (new Dropbox\Sign\Model\SignatureRequestCreateEmbeddedRequest()) + ->setClientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a") + ->setMessage("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.") + ->setSubject("The NDA we talked about") + ->setTestMode(true) + ->setTitle("NDA with Acme Co.") + ->setCcEmailAddresses([ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ]) + ->setFiles([ + ]) + ->setSigningOptions($signing_options) + ->setSigners($signers); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestCreateEmbedded( + signature_request_create_embedded_request: $signature_request_create_embedded_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestCreateEmbedded: {$e->getMessage()}"; +} diff --git a/examples/SignatureRequestCreateEmbeddedGroupedSignersExample.php b/examples/SignatureRequestCreateEmbeddedGroupedSignersExample.php new file mode 100644 index 0000000..f7ea5d3 --- /dev/null +++ b/examples/SignatureRequestCreateEmbeddedGroupedSignersExample.php @@ -0,0 +1,86 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$grouped_signers_2_signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Bob") + ->setEmailAddress("bob@example.com"); + +$grouped_signers_2_signers_2 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Charlie") + ->setEmailAddress("charlie@example.com"); + +$grouped_signers_2_signers = [ + $grouped_signers_2_signers_1, + $grouped_signers_2_signers_2, +]; + +$grouped_signers_1_signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Jack") + ->setEmailAddress("jack@example.com"); + +$grouped_signers_1_signers_2 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Jill") + ->setEmailAddress("jill@example.com"); + +$grouped_signers_1_signers = [ + $grouped_signers_1_signers_1, + $grouped_signers_1_signers_2, +]; + +$signing_options = (new Dropbox\Sign\Model\SubSigningOptions()) + ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW) + ->setDraw(true) + ->setPhone(false) + ->setType(true) + ->setUpload(true); + +$grouped_signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestGroupedSigners()) + ->setGroup("Group #1") + ->setOrder(0) + ->setSigners($grouped_signers_1_signers); + +$grouped_signers_2 = (new Dropbox\Sign\Model\SubSignatureRequestGroupedSigners()) + ->setGroup("Group #2") + ->setOrder(1) + ->setSigners($grouped_signers_2_signers); + +$grouped_signers = [ + $grouped_signers_1, + $grouped_signers_2, +]; + +$signature_request_create_embedded_request = (new Dropbox\Sign\Model\SignatureRequestCreateEmbeddedRequest()) + ->setClientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a") + ->setMessage("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.") + ->setSubject("The NDA we talked about") + ->setTestMode(true) + ->setTitle("NDA with Acme Co.") + ->setFileUrls([ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ]) + ->setCcEmailAddresses([ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ]) + ->setSigningOptions($signing_options) + ->setGroupedSigners($grouped_signers); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestCreateEmbedded( + signature_request_create_embedded_request: $signature_request_create_embedded_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestCreateEmbedded: {$e->getMessage()}"; +} diff --git a/examples/SignatureRequestCreateEmbeddedWithTemplate.php b/examples/SignatureRequestCreateEmbeddedWithTemplate.php deleted file mode 100644 index 3ff087e..0000000 --- a/examples/SignatureRequestCreateEmbeddedWithTemplate.php +++ /dev/null @@ -1,43 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); - -$signer1 = new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner(); -$signer1->setRole("Client") - ->setEmailAddress("george@example.com") - ->setName("George"); - -$signingOptions = new Dropbox\Sign\Model\SubSigningOptions(); -$signingOptions->setDraw(true) - ->setType(true) - ->setUpload(true) - ->setPhone(false) - ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW); - -$data = new Dropbox\Sign\Model\SignatureRequestCreateEmbeddedWithTemplateRequest(); -$data->setClientId("ec64a202072370a737edf4a0eb7f4437") - ->setTemplateIds(["c26b8a16784a872da37ea946b9ddec7c1e11dff6"]) - ->setSubject("Purchase Order") - ->setMessage("Glad we could come to an agreement.") - ->setSigners([$signer1]) - ->setSigningOptions($signingOptions) - ->setTestMode(true); - -try { - $result = $signatureRequestApi->signatureRequestCreateEmbeddedWithTemplate($data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/SignatureRequestCreateEmbeddedWithTemplateExample.php b/examples/SignatureRequestCreateEmbeddedWithTemplateExample.php new file mode 100644 index 0000000..3ff0454 --- /dev/null +++ b/examples/SignatureRequestCreateEmbeddedWithTemplateExample.php @@ -0,0 +1,49 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$signing_options = (new Dropbox\Sign\Model\SubSigningOptions()) + ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW) + ->setDraw(true) + ->setPhone(false) + ->setType(true) + ->setUpload(true); + +$signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner()) + ->setRole("Client") + ->setName("George") + ->setEmailAddress("george@example.com"); + +$signers = [ + $signers_1, +]; + +$signature_request_create_embedded_with_template_request = (new Dropbox\Sign\Model\SignatureRequestCreateEmbeddedWithTemplateRequest()) + ->setClientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a") + ->setTemplateIds([ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", + ]) + ->setMessage("Glad we could come to an agreement.") + ->setSubject("Purchase Order") + ->setTestMode(true) + ->setSigningOptions($signing_options) + ->setSigners($signers); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestCreateEmbeddedWithTemplate( + signature_request_create_embedded_with_template_request: $signature_request_create_embedded_with_template_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestCreateEmbeddedWithTemplate: {$e->getMessage()}"; +} diff --git a/examples/SignatureRequestEdit.php b/examples/SignatureRequestEdit.php deleted file mode 100644 index 67b7c92..0000000 --- a/examples/SignatureRequestEdit.php +++ /dev/null @@ -1,62 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); - -$signer1 = new Dropbox\Sign\Model\SubSignatureRequestSigner(); -$signer1->setEmailAddress("jack@example.com") - ->setName("Jack") - ->setOrder(0); - -$signer2 = new Dropbox\Sign\Model\SubSignatureRequestSigner(); -$signer2->setEmailAddress("jill@example.com") - ->setName("Jill") - ->setOrder(1); - -$signingOptions = new Dropbox\Sign\Model\SubSigningOptions(); -$signingOptions->setDraw(true) - ->setType(true) - ->setUpload(true) - ->setPhone(false) - ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW); - -$fieldOptions = new Dropbox\Sign\Model\SubFieldOptions(); -$fieldOptions->setDateFormat(Dropbox\Sign\Model\SubFieldOptions::DATE_FORMAT_DD_MM_YYYY); - -$data = new Dropbox\Sign\Model\SignatureRequestEditRequest(); -$data->setTitle("NDA with Acme Co.") - ->setSubject("The NDA we talked about") - ->setMessage("Please sign this NDA and then we can discuss more. Let me know if you have any questions.") - ->setSigners([$signer1, $signer2]) - ->setCcEmailAddresses([ - "lawyer1@dropboxsign.com", - "lawyer2@dropboxsign.com", - ]) - ->setFiles([new SplFileObject(__DIR__ . "/example_signature_request.pdf")]) - ->setMetadata([ - "custom_id" => 1234, - "custom_text" => "NDA #9", - ]) - ->setSigningOptions($signingOptions) - ->setFieldOptions($fieldOptions) - ->setTestMode(true); - -$signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -try { - $result = $signatureRequestApi->signatureRequestEdit($signatureRequestId, $data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/SignatureRequestEditEmbedded.php b/examples/SignatureRequestEditEmbedded.php deleted file mode 100644 index 7af9b39..0000000 --- a/examples/SignatureRequestEditEmbedded.php +++ /dev/null @@ -1,58 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); - -$signer1 = new Dropbox\Sign\Model\SubSignatureRequestSigner(); -$signer1->setEmailAddress("jack@example.com") - ->setName("Jack") - ->setOrder(0); - -$signer2 = new Dropbox\Sign\Model\SubSignatureRequestSigner(); -$signer2->setEmailAddress("jill@example.com") - ->setName("Jill") - ->setOrder(1); - -$signingOptions = new Dropbox\Sign\Model\SubSigningOptions(); -$signingOptions->setDraw(true) - ->setType(true) - ->setUpload(true) - ->setPhone(true) - ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW); - -$data = new Dropbox\Sign\Model\SignatureRequestEditEmbeddedRequest(); -$data->setClientId("ec64a202072370a737edf4a0eb7f4437") - ->setTitle("NDA with Acme Co.") - ->setSubject("The NDA we talked about") - ->setMessage("Please sign this NDA and then we can discuss more. Let me know if you have any questions.") - ->setSigners([$signer1, $signer2]) - ->setCcEmailAddresses([ - "lawyer1@dropboxsign.com", - "lawyer2@dropboxsign.com", - ]) - ->setFiles([new SplFileObject(__DIR__ . "/example_signature_request.pdf")]) - ->setSigningOptions($signingOptions) - ->setTestMode(true); - -$signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -try { - $result = $signatureRequestApi->signatureRequestEditEmbedded( - $signatureRequestId, - $data - ); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/SignatureRequestEditEmbeddedExample.php b/examples/SignatureRequestEditEmbeddedExample.php new file mode 100644 index 0000000..868c625 --- /dev/null +++ b/examples/SignatureRequestEditEmbeddedExample.php @@ -0,0 +1,60 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$signing_options = (new Dropbox\Sign\Model\SubSigningOptions()) + ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW) + ->setDraw(true) + ->setPhone(false) + ->setType(true) + ->setUpload(true); + +$signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Jack") + ->setEmailAddress("jack@example.com") + ->setOrder(0); + +$signers_2 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Jill") + ->setEmailAddress("jill@example.com") + ->setOrder(1); + +$signers = [ + $signers_1, + $signers_2, +]; + +$signature_request_edit_embedded_request = (new Dropbox\Sign\Model\SignatureRequestEditEmbeddedRequest()) + ->setClientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a") + ->setMessage("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.") + ->setSubject("The NDA we talked about") + ->setTestMode(true) + ->setTitle("NDA with Acme Co.") + ->setCcEmailAddresses([ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ]) + ->setFiles([ + ]) + ->setSigningOptions($signing_options) + ->setSigners($signers); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestEditEmbedded( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + signature_request_edit_embedded_request: $signature_request_edit_embedded_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestEditEmbedded: {$e->getMessage()}"; +} diff --git a/examples/SignatureRequestEditEmbeddedGroupedSignersExample.php b/examples/SignatureRequestEditEmbeddedGroupedSignersExample.php new file mode 100644 index 0000000..08ebeac --- /dev/null +++ b/examples/SignatureRequestEditEmbeddedGroupedSignersExample.php @@ -0,0 +1,87 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$grouped_signers_2_signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Bob") + ->setEmailAddress("bob@example.com"); + +$grouped_signers_2_signers_2 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Charlie") + ->setEmailAddress("charlie@example.com"); + +$grouped_signers_2_signers = [ + $grouped_signers_2_signers_1, + $grouped_signers_2_signers_2, +]; + +$grouped_signers_1_signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Jack") + ->setEmailAddress("jack@example.com"); + +$grouped_signers_1_signers_2 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Jill") + ->setEmailAddress("jill@example.com"); + +$grouped_signers_1_signers = [ + $grouped_signers_1_signers_1, + $grouped_signers_1_signers_2, +]; + +$signing_options = (new Dropbox\Sign\Model\SubSigningOptions()) + ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW) + ->setDraw(true) + ->setPhone(false) + ->setType(true) + ->setUpload(true); + +$grouped_signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestGroupedSigners()) + ->setGroup("Group #1") + ->setOrder(0) + ->setSigners($grouped_signers_1_signers); + +$grouped_signers_2 = (new Dropbox\Sign\Model\SubSignatureRequestGroupedSigners()) + ->setGroup("Group #2") + ->setOrder(1) + ->setSigners($grouped_signers_2_signers); + +$grouped_signers = [ + $grouped_signers_1, + $grouped_signers_2, +]; + +$signature_request_edit_embedded_request = (new Dropbox\Sign\Model\SignatureRequestEditEmbeddedRequest()) + ->setClientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a") + ->setMessage("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.") + ->setSubject("The NDA we talked about") + ->setTestMode(true) + ->setTitle("NDA with Acme Co.") + ->setFileUrls([ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ]) + ->setCcEmailAddresses([ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ]) + ->setSigningOptions($signing_options) + ->setGroupedSigners($grouped_signers); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestEditEmbedded( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + signature_request_edit_embedded_request: $signature_request_edit_embedded_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestEditEmbedded: {$e->getMessage()}"; +} diff --git a/examples/SignatureRequestEditEmbeddedWithTemplate.php b/examples/SignatureRequestEditEmbeddedWithTemplate.php deleted file mode 100644 index 2ab8d47..0000000 --- a/examples/SignatureRequestEditEmbeddedWithTemplate.php +++ /dev/null @@ -1,48 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); - -$signer1 = new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner(); -$signer1->setRole("Client") - ->setEmailAddress("george@example.com") - ->setName("George"); - -$signingOptions = new Dropbox\Sign\Model\SubSigningOptions(); -$signingOptions->setDraw(true) - ->setType(true) - ->setUpload(true) - ->setPhone(false) - ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW); - -$data = new Dropbox\Sign\Model\SignatureRequestEditEmbeddedWithTemplateRequest(); -$data->setClientId("ec64a202072370a737edf4a0eb7f4437") - ->setTemplateIds(["c26b8a16784a872da37ea946b9ddec7c1e11dff6"]) - ->setSubject("Purchase Order") - ->setMessage("Glad we could come to an agreement.") - ->setSigners([$signer1]) - ->setSigningOptions($signingOptions) - ->setTestMode(true); - -$signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -try { - $result = $signatureRequestApi->signatureRequestEditEmbeddedWithTemplate( - $signatureRequestId, - $data - ); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/SignatureRequestEditEmbeddedWithTemplateExample.php b/examples/SignatureRequestEditEmbeddedWithTemplateExample.php new file mode 100644 index 0000000..640f35d --- /dev/null +++ b/examples/SignatureRequestEditEmbeddedWithTemplateExample.php @@ -0,0 +1,50 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$signing_options = (new Dropbox\Sign\Model\SubSigningOptions()) + ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW) + ->setDraw(true) + ->setPhone(false) + ->setType(true) + ->setUpload(true); + +$signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner()) + ->setRole("Client") + ->setName("George") + ->setEmailAddress("george@example.com"); + +$signers = [ + $signers_1, +]; + +$signature_request_edit_embedded_with_template_request = (new Dropbox\Sign\Model\SignatureRequestEditEmbeddedWithTemplateRequest()) + ->setClientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a") + ->setTemplateIds([ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", + ]) + ->setMessage("Glad we could come to an agreement.") + ->setSubject("Purchase Order") + ->setTestMode(true) + ->setSigningOptions($signing_options) + ->setSigners($signers); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestEditEmbeddedWithTemplate( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + signature_request_edit_embedded_with_template_request: $signature_request_edit_embedded_with_template_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestEditEmbeddedWithTemplate: {$e->getMessage()}"; +} diff --git a/examples/SignatureRequestEditExample.php b/examples/SignatureRequestEditExample.php new file mode 100644 index 0000000..92d3747 --- /dev/null +++ b/examples/SignatureRequestEditExample.php @@ -0,0 +1,69 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$field_options = (new Dropbox\Sign\Model\SubFieldOptions()) + ->setDateFormat(Dropbox\Sign\Model\SubFieldOptions::DATE_FORMAT_DD_MM_YYYY); + +$signing_options = (new Dropbox\Sign\Model\SubSigningOptions()) + ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW) + ->setDraw(true) + ->setPhone(false) + ->setType(true) + ->setUpload(true); + +$signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Jack") + ->setEmailAddress("jack@example.com") + ->setOrder(0); + +$signers_2 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Jill") + ->setEmailAddress("jill@example.com") + ->setOrder(1); + +$signers = [ + $signers_1, + $signers_2, +]; + +$signature_request_edit_request = (new Dropbox\Sign\Model\SignatureRequestEditRequest()) + ->setMessage("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.") + ->setSubject("The NDA we talked about") + ->setTestMode(true) + ->setTitle("NDA with Acme Co.") + ->setCcEmailAddresses([ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ]) + ->setFiles([ + ]) + ->setMetadata(json_decode(<<<'EOD' + { + "custom_id": 1234, + "custom_text": "NDA #9" + } + EOD, true)) + ->setFieldOptions($field_options) + ->setSigningOptions($signing_options) + ->setSigners($signers); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestEdit( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + signature_request_edit_request: $signature_request_edit_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestEdit: {$e->getMessage()}"; +} diff --git a/examples/SignatureRequestEditGroupedSignersExample.php b/examples/SignatureRequestEditGroupedSignersExample.php new file mode 100644 index 0000000..af25d63 --- /dev/null +++ b/examples/SignatureRequestEditGroupedSignersExample.php @@ -0,0 +1,96 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$grouped_signers_2_signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Bob") + ->setEmailAddress("bob@example.com"); + +$grouped_signers_2_signers_2 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Charlie") + ->setEmailAddress("charlie@example.com"); + +$grouped_signers_2_signers = [ + $grouped_signers_2_signers_1, + $grouped_signers_2_signers_2, +]; + +$grouped_signers_1_signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Jack") + ->setEmailAddress("jack@example.com"); + +$grouped_signers_1_signers_2 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Jill") + ->setEmailAddress("jill@example.com"); + +$grouped_signers_1_signers = [ + $grouped_signers_1_signers_1, + $grouped_signers_1_signers_2, +]; + +$field_options = (new Dropbox\Sign\Model\SubFieldOptions()) + ->setDateFormat(Dropbox\Sign\Model\SubFieldOptions::DATE_FORMAT_DD_MM_YYYY); + +$signing_options = (new Dropbox\Sign\Model\SubSigningOptions()) + ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW) + ->setDraw(true) + ->setPhone(false) + ->setType(true) + ->setUpload(true); + +$grouped_signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestGroupedSigners()) + ->setGroup("Group #1") + ->setOrder(0) + ->setSigners($grouped_signers_1_signers); + +$grouped_signers_2 = (new Dropbox\Sign\Model\SubSignatureRequestGroupedSigners()) + ->setGroup("Group #2") + ->setOrder(1) + ->setSigners($grouped_signers_2_signers); + +$grouped_signers = [ + $grouped_signers_1, + $grouped_signers_2, +]; + +$signature_request_edit_request = (new Dropbox\Sign\Model\SignatureRequestEditRequest()) + ->setMessage("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.") + ->setSubject("The NDA we talked about") + ->setTestMode(true) + ->setTitle("NDA with Acme Co.") + ->setFileUrls([ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ]) + ->setCcEmailAddresses([ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ]) + ->setMetadata(json_decode(<<<'EOD' + { + "custom_id": 1234, + "custom_text": "NDA #9" + } + EOD, true)) + ->setFieldOptions($field_options) + ->setSigningOptions($signing_options) + ->setGroupedSigners($grouped_signers); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestEdit( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + signature_request_edit_request: $signature_request_edit_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestEdit: {$e->getMessage()}"; +} diff --git a/examples/SignatureRequestEditWithTemplate.php b/examples/SignatureRequestEditWithTemplate.php deleted file mode 100644 index d9fe64d..0000000 --- a/examples/SignatureRequestEditWithTemplate.php +++ /dev/null @@ -1,56 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); - -$signer1 = new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner(); -$signer1->setRole("Client") - ->setEmailAddress("george@example.com") - ->setName("George"); - -$cc1 = new Dropbox\Sign\Model\SubCC(); -$cc1->setRole("Accounting") - ->setEmailAddress("accounting@example.com"); - -$customField1 = new Dropbox\Sign\Model\SubCustomField(); -$customField1->setName("Cost") - ->setValue("$20,000") - ->setEditor("Client") - ->setRequired(true); - -$signingOptions = new Dropbox\Sign\Model\SubSigningOptions(); -$signingOptions->setDraw(true) - ->setType(true) - ->setUpload(true) - ->setPhone(false) - ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW); - -$data = new Dropbox\Sign\Model\SignatureRequestEditWithTemplateRequest(); -$data->setTemplateIds(["c26b8a16784a872da37ea946b9ddec7c1e11dff6"]) - ->setSubject("Purchase Order") - ->setMessage("Glad we could come to an agreement.") - ->setSigners([$signer1]) - ->setCcs([$cc1]) - ->setCustomFields([$customField1]) - ->setSigningOptions($signingOptions) - ->setTestMode(true); - -$signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -try { - $result = $signatureRequestApi->signatureRequestEditWithTemplate($signatureRequestId, $data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/SignatureRequestEditWithTemplateExample.php b/examples/SignatureRequestEditWithTemplateExample.php new file mode 100644 index 0000000..a6f2c9f --- /dev/null +++ b/examples/SignatureRequestEditWithTemplateExample.php @@ -0,0 +1,69 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$signing_options = (new Dropbox\Sign\Model\SubSigningOptions()) + ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW) + ->setDraw(true) + ->setPhone(false) + ->setType(true) + ->setUpload(true); + +$signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner()) + ->setRole("Client") + ->setName("George") + ->setEmailAddress("george@example.com"); + +$signers = [ + $signers_1, +]; + +$ccs_1 = (new Dropbox\Sign\Model\SubCC()) + ->setRole("Accounting") + ->setEmailAddress("accounting@example.com"); + +$ccs = [ + $ccs_1, +]; + +$custom_fields_1 = (new Dropbox\Sign\Model\SubCustomField()) + ->setName("Cost") + ->setEditor("Client") + ->setRequired(true) + ->setValue("\$20,000"); + +$custom_fields = [ + $custom_fields_1, +]; + +$signature_request_edit_with_template_request = (new Dropbox\Sign\Model\SignatureRequestEditWithTemplateRequest()) + ->setTemplateIds([ + "61a832ff0d8423f91d503e76bfbcc750f7417c78", + ]) + ->setMessage("Glad we could come to an agreement.") + ->setSubject("Purchase Order") + ->setTestMode(true) + ->setSigningOptions($signing_options) + ->setSigners($signers) + ->setCcs($ccs) + ->setCustomFields($custom_fields); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestEditWithTemplate( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + signature_request_edit_with_template_request: $signature_request_edit_with_template_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestEditWithTemplate: {$e->getMessage()}"; +} diff --git a/examples/SignatureRequestFiles.php b/examples/SignatureRequestFiles.php deleted file mode 100644 index 9fc70c7..0000000 --- a/examples/SignatureRequestFiles.php +++ /dev/null @@ -1,25 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); - -$signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; -$fileType = "pdf"; - -try { - $result = $signatureRequestApi->signatureRequestFiles($signatureRequestId, $fileType); - copy($result->getRealPath(), __DIR__ . '/file_response.pdf'); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/SignatureRequestFilesAsDataUri.php b/examples/SignatureRequestFilesAsDataUri.php deleted file mode 100644 index 7ae6b9d..0000000 --- a/examples/SignatureRequestFilesAsDataUri.php +++ /dev/null @@ -1,24 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); - -$signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; - -try { - $result = $signatureRequestApi->signatureRequestFilesAsDataUri($signatureRequestId); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/SignatureRequestFilesAsDataUriExample.php b/examples/SignatureRequestFilesAsDataUriExample.php new file mode 100644 index 0000000..0d8d719 --- /dev/null +++ b/examples/SignatureRequestFilesAsDataUriExample.php @@ -0,0 +1,22 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestFilesAsDataUri( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestFilesAsDataUri: {$e->getMessage()}"; +} diff --git a/examples/SignatureRequestFilesAsFileUrl.php b/examples/SignatureRequestFilesAsFileUrl.php deleted file mode 100644 index 91af0a4..0000000 --- a/examples/SignatureRequestFilesAsFileUrl.php +++ /dev/null @@ -1,24 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); - -$signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; - -try { - $result = $signatureRequestApi->signatureRequestFilesAsFileUrl($signatureRequestId); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/SignatureRequestFilesAsFileUrlExample.php b/examples/SignatureRequestFilesAsFileUrlExample.php new file mode 100644 index 0000000..feb6ac0 --- /dev/null +++ b/examples/SignatureRequestFilesAsFileUrlExample.php @@ -0,0 +1,23 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestFilesAsFileUrl( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + force_download: 1, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestFilesAsFileUrl: {$e->getMessage()}"; +} diff --git a/examples/SignatureRequestFilesExample.php b/examples/SignatureRequestFilesExample.php new file mode 100644 index 0000000..b11f5ae --- /dev/null +++ b/examples/SignatureRequestFilesExample.php @@ -0,0 +1,23 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestFiles( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + file_type: "pdf", + ); + + copy($response->getRealPath(), __DIR__ . '/file_response'); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestFiles: {$e->getMessage()}"; +} diff --git a/examples/SignatureRequestGet.php b/examples/SignatureRequestGet.php deleted file mode 100644 index a7eed1b..0000000 --- a/examples/SignatureRequestGet.php +++ /dev/null @@ -1,24 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); - -$signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; - -try { - $result = $signatureRequestApi->signatureRequestGet($signatureRequestId); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/SignatureRequestGetExample.php b/examples/SignatureRequestGetExample.php new file mode 100644 index 0000000..dfb79ed --- /dev/null +++ b/examples/SignatureRequestGetExample.php @@ -0,0 +1,22 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestGet( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestGet: {$e->getMessage()}"; +} diff --git a/examples/SignatureRequestList.php b/examples/SignatureRequestList.php deleted file mode 100644 index 16ef230..0000000 --- a/examples/SignatureRequestList.php +++ /dev/null @@ -1,25 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); - -$accountId = null; -$page = 1; - -try { - $result = $signatureRequestApi->signatureRequestList($accountId, $page); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/SignatureRequestListExample.php b/examples/SignatureRequestListExample.php new file mode 100644 index 0000000..9cf737c --- /dev/null +++ b/examples/SignatureRequestListExample.php @@ -0,0 +1,23 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestList( + page: 1, + page_size: 20, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestList: {$e->getMessage()}"; +} diff --git a/examples/SignatureRequestReleaseHold.php b/examples/SignatureRequestReleaseHold.php deleted file mode 100644 index cfaf110..0000000 --- a/examples/SignatureRequestReleaseHold.php +++ /dev/null @@ -1,24 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); - -$signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -try { - $result = $signatureRequestApi->signatureRequestReleaseHold($signatureRequestId); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/SignatureRequestReleaseHoldExample.php b/examples/SignatureRequestReleaseHoldExample.php new file mode 100644 index 0000000..dcbbd1b --- /dev/null +++ b/examples/SignatureRequestReleaseHoldExample.php @@ -0,0 +1,22 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestReleaseHold( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestReleaseHold: {$e->getMessage()}"; +} diff --git a/examples/SignatureRequestRemind.php b/examples/SignatureRequestRemind.php deleted file mode 100644 index 0598031..0000000 --- a/examples/SignatureRequestRemind.php +++ /dev/null @@ -1,27 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); - -$data = new Dropbox\Sign\Model\SignatureRequestRemindRequest(); -$data->setEmailAddress("john@example.com"); - -$signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -try { - $result = $signatureRequestApi->signatureRequestRemind($signatureRequestId, $data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/SignatureRequestRemindExample.php b/examples/SignatureRequestRemindExample.php new file mode 100644 index 0000000..10b5086 --- /dev/null +++ b/examples/SignatureRequestRemindExample.php @@ -0,0 +1,26 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$signature_request_remind_request = (new Dropbox\Sign\Model\SignatureRequestRemindRequest()) + ->setEmailAddress("john@example.com"); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestRemind( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + signature_request_remind_request: $signature_request_remind_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestRemind: {$e->getMessage()}"; +} diff --git a/examples/SignatureRequestRemove.php b/examples/SignatureRequestRemove.php deleted file mode 100644 index ad60276..0000000 --- a/examples/SignatureRequestRemove.php +++ /dev/null @@ -1,20 +0,0 @@ -setUsername("YOUR_API_KEY"); - -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); - -$signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -try { - $signatureRequestApi->signatureRequestRemove($signatureRequestId); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/SignatureRequestRemoveExample.php b/examples/SignatureRequestRemoveExample.php new file mode 100644 index 0000000..87ecc7e --- /dev/null +++ b/examples/SignatureRequestRemoveExample.php @@ -0,0 +1,19 @@ +setUsername("YOUR_API_KEY"); + +try { + (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestRemove( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + ); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestRemove: {$e->getMessage()}"; +} diff --git a/examples/SignatureRequestSend.php b/examples/SignatureRequestSend.php deleted file mode 100644 index 419d7ac..0000000 --- a/examples/SignatureRequestSend.php +++ /dev/null @@ -1,60 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); - -$signer1 = new Dropbox\Sign\Model\SubSignatureRequestSigner(); -$signer1->setEmailAddress("jack@example.com") - ->setName("Jack") - ->setOrder(0); - -$signer2 = new Dropbox\Sign\Model\SubSignatureRequestSigner(); -$signer2->setEmailAddress("jill@example.com") - ->setName("Jill") - ->setOrder(1); - -$signingOptions = new Dropbox\Sign\Model\SubSigningOptions(); -$signingOptions->setDraw(true) - ->setType(true) - ->setUpload(true) - ->setPhone(false) - ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW); - -$fieldOptions = new Dropbox\Sign\Model\SubFieldOptions(); -$fieldOptions->setDateFormat(Dropbox\Sign\Model\SubFieldOptions::DATE_FORMAT_DD_MM_YYYY); - -$data = new Dropbox\Sign\Model\SignatureRequestSendRequest(); -$data->setTitle("NDA with Acme Co.") - ->setSubject("The NDA we talked about") - ->setMessage("Please sign this NDA and then we can discuss more. Let me know if you have any questions.") - ->setSigners([$signer1, $signer2]) - ->setCcEmailAddresses([ - "lawyer1@dropboxsign.com", - "lawyer2@dropboxsign.com", - ]) - ->setFiles([new SplFileObject(__DIR__ . "/example_signature_request.pdf")]) - ->setMetadata([ - "custom_id" => 1234, - "custom_text" => "NDA #9", - ]) - ->setSigningOptions($signingOptions) - ->setFieldOptions($fieldOptions) - ->setTestMode(true); - -try { - $result = $signatureRequestApi->signatureRequestSend($data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/SignatureRequestSendExample.php b/examples/SignatureRequestSendExample.php new file mode 100644 index 0000000..f922a57 --- /dev/null +++ b/examples/SignatureRequestSendExample.php @@ -0,0 +1,68 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$field_options = (new Dropbox\Sign\Model\SubFieldOptions()) + ->setDateFormat(Dropbox\Sign\Model\SubFieldOptions::DATE_FORMAT_DD_MM_YYYY); + +$signing_options = (new Dropbox\Sign\Model\SubSigningOptions()) + ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW) + ->setDraw(true) + ->setPhone(false) + ->setType(true) + ->setUpload(true); + +$signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Jack") + ->setEmailAddress("jack@example.com") + ->setOrder(0); + +$signers_2 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Jill") + ->setEmailAddress("jill@example.com") + ->setOrder(1); + +$signers = [ + $signers_1, + $signers_2, +]; + +$signature_request_send_request = (new Dropbox\Sign\Model\SignatureRequestSendRequest()) + ->setMessage("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.") + ->setSubject("The NDA we talked about") + ->setTestMode(true) + ->setTitle("NDA with Acme Co.") + ->setCcEmailAddresses([ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ]) + ->setFiles([ + ]) + ->setMetadata(json_decode(<<<'EOD' + { + "custom_id": 1234, + "custom_text": "NDA #9" + } + EOD, true)) + ->setFieldOptions($field_options) + ->setSigningOptions($signing_options) + ->setSigners($signers); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestSend( + signature_request_send_request: $signature_request_send_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestSend: {$e->getMessage()}"; +} diff --git a/examples/SignatureRequestSendGroupedSignersExample.php b/examples/SignatureRequestSendGroupedSignersExample.php new file mode 100644 index 0000000..bec0368 --- /dev/null +++ b/examples/SignatureRequestSendGroupedSignersExample.php @@ -0,0 +1,95 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$grouped_signers_2_signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Bob") + ->setEmailAddress("bob@example.com"); + +$grouped_signers_2_signers_2 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Charlie") + ->setEmailAddress("charlie@example.com"); + +$grouped_signers_2_signers = [ + $grouped_signers_2_signers_1, + $grouped_signers_2_signers_2, +]; + +$grouped_signers_1_signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Jack") + ->setEmailAddress("jack@example.com"); + +$grouped_signers_1_signers_2 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Jill") + ->setEmailAddress("jill@example.com"); + +$grouped_signers_1_signers = [ + $grouped_signers_1_signers_1, + $grouped_signers_1_signers_2, +]; + +$field_options = (new Dropbox\Sign\Model\SubFieldOptions()) + ->setDateFormat(Dropbox\Sign\Model\SubFieldOptions::DATE_FORMAT_DD_MM_YYYY); + +$signing_options = (new Dropbox\Sign\Model\SubSigningOptions()) + ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW) + ->setDraw(true) + ->setPhone(false) + ->setType(true) + ->setUpload(true); + +$grouped_signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestGroupedSigners()) + ->setGroup("Group #1") + ->setOrder(0) + ->setSigners($grouped_signers_1_signers); + +$grouped_signers_2 = (new Dropbox\Sign\Model\SubSignatureRequestGroupedSigners()) + ->setGroup("Group #2") + ->setOrder(1) + ->setSigners($grouped_signers_2_signers); + +$grouped_signers = [ + $grouped_signers_1, + $grouped_signers_2, +]; + +$signature_request_send_request = (new Dropbox\Sign\Model\SignatureRequestSendRequest()) + ->setMessage("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.") + ->setSubject("The NDA we talked about") + ->setTestMode(true) + ->setTitle("NDA with Acme Co.") + ->setFileUrls([ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ]) + ->setCcEmailAddresses([ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ]) + ->setMetadata(json_decode(<<<'EOD' + { + "custom_id": 1234, + "custom_text": "NDA #9" + } + EOD, true)) + ->setFieldOptions($field_options) + ->setSigningOptions($signing_options) + ->setGroupedSigners($grouped_signers); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestSend( + signature_request_send_request: $signature_request_send_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestSend: {$e->getMessage()}"; +} diff --git a/examples/SignatureRequestSendWithTemplate.php b/examples/SignatureRequestSendWithTemplate.php deleted file mode 100644 index 6651057..0000000 --- a/examples/SignatureRequestSendWithTemplate.php +++ /dev/null @@ -1,54 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); - -$signer1 = new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner(); -$signer1->setRole("Client") - ->setEmailAddress("george@example.com") - ->setName("George"); - -$cc1 = new Dropbox\Sign\Model\SubCC(); -$cc1->setRole("Accounting") - ->setEmailAddress("accounting@example.com"); - -$customField1 = new Dropbox\Sign\Model\SubCustomField(); -$customField1->setName("Cost") - ->setValue("$20,000") - ->setEditor("Client") - ->setRequired(true); - -$signingOptions = new Dropbox\Sign\Model\SubSigningOptions(); -$signingOptions->setDraw(true) - ->setType(true) - ->setUpload(true) - ->setPhone(false) - ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW); - -$data = new Dropbox\Sign\Model\SignatureRequestSendWithTemplateRequest(); -$data->setTemplateIds(["c26b8a16784a872da37ea946b9ddec7c1e11dff6"]) - ->setSubject("Purchase Order") - ->setMessage("Glad we could come to an agreement.") - ->setSigners([$signer1]) - ->setCcs([$cc1]) - ->setCustomFields([$customField1]) - ->setSigningOptions($signingOptions) - ->setTestMode(true); - -try { - $result = $signatureRequestApi->signatureRequestSendWithTemplate($data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/SignatureRequestSendWithTemplateExample.php b/examples/SignatureRequestSendWithTemplateExample.php new file mode 100644 index 0000000..d682053 --- /dev/null +++ b/examples/SignatureRequestSendWithTemplateExample.php @@ -0,0 +1,68 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$signing_options = (new Dropbox\Sign\Model\SubSigningOptions()) + ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW) + ->setDraw(true) + ->setPhone(false) + ->setType(true) + ->setUpload(true); + +$signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner()) + ->setRole("Client") + ->setName("George") + ->setEmailAddress("george@example.com"); + +$signers = [ + $signers_1, +]; + +$ccs_1 = (new Dropbox\Sign\Model\SubCC()) + ->setRole("Accounting") + ->setEmailAddress("accounting@example.com"); + +$ccs = [ + $ccs_1, +]; + +$custom_fields_1 = (new Dropbox\Sign\Model\SubCustomField()) + ->setName("Cost") + ->setEditor("Client") + ->setRequired(true) + ->setValue("\$20,000"); + +$custom_fields = [ + $custom_fields_1, +]; + +$signature_request_send_with_template_request = (new Dropbox\Sign\Model\SignatureRequestSendWithTemplateRequest()) + ->setTemplateIds([ + "61a832ff0d8423f91d503e76bfbcc750f7417c78", + ]) + ->setMessage("Glad we could come to an agreement.") + ->setSubject("Purchase Order") + ->setTestMode(true) + ->setSigningOptions($signing_options) + ->setSigners($signers) + ->setCcs($ccs) + ->setCustomFields($custom_fields); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestSendWithTemplate( + signature_request_send_with_template_request: $signature_request_send_with_template_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestSendWithTemplate: {$e->getMessage()}"; +} diff --git a/examples/SignatureRequestUpdate.php b/examples/SignatureRequestUpdate.php deleted file mode 100644 index eda22b7..0000000 --- a/examples/SignatureRequestUpdate.php +++ /dev/null @@ -1,28 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); - -$data = new Dropbox\Sign\Model\SignatureRequestUpdateRequest(); -$data->setEmailAddress("john@example.com") - ->setSignatureId("78caf2a1d01cd39cea2bc1cbb340dac3"); - -$signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -try { - $result = $signatureRequestApi->signatureRequestUpdate($signatureRequestId, $data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/SignatureRequestUpdateExample.php b/examples/SignatureRequestUpdateExample.php new file mode 100644 index 0000000..818add5 --- /dev/null +++ b/examples/SignatureRequestUpdateExample.php @@ -0,0 +1,27 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$signature_request_update_request = (new Dropbox\Sign\Model\SignatureRequestUpdateRequest()) + ->setSignatureId("2f9781e1a8e2045224d808c153c2e1d3df6f8f2f") + ->setEmailAddress("john@example.com"); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestUpdate( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + signature_request_update_request: $signature_request_update_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestUpdate: {$e->getMessage()}"; +} diff --git a/examples/TeamAddMember.php b/examples/TeamAddMember.php deleted file mode 100644 index 7247c83..0000000 --- a/examples/TeamAddMember.php +++ /dev/null @@ -1,25 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$teamApi = new Dropbox\Sign\Api\TeamApi($config); - -$data = new Dropbox\Sign\Model\TeamAddMemberRequest(); -$data->setEmailAddress("george@example.com"); - -try { - $result = $teamApi->teamAddMember($data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/TeamAddMemberAccountIdExample.php b/examples/TeamAddMemberAccountIdExample.php new file mode 100644 index 0000000..f864f44 --- /dev/null +++ b/examples/TeamAddMemberAccountIdExample.php @@ -0,0 +1,26 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$team_add_member_request = (new Dropbox\Sign\Model\TeamAddMemberRequest()) + ->setAccountId("f57db65d3f933b5316d398057a36176831451a35"); + +try { + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamAddMember( + team_add_member_request: $team_add_member_request, + team_id: "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TeamApi#teamAddMember: {$e->getMessage()}"; +} diff --git a/examples/TeamAddMemberExample.php b/examples/TeamAddMemberExample.php new file mode 100644 index 0000000..441e34d --- /dev/null +++ b/examples/TeamAddMemberExample.php @@ -0,0 +1,26 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$team_add_member_request = (new Dropbox\Sign\Model\TeamAddMemberRequest()) + ->setEmailAddress("george@example.com"); + +try { + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamAddMember( + team_add_member_request: $team_add_member_request, + team_id: "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TeamApi#teamAddMember: {$e->getMessage()}"; +} diff --git a/examples/TeamCreate.php b/examples/TeamCreate.php deleted file mode 100644 index 3abdac1..0000000 --- a/examples/TeamCreate.php +++ /dev/null @@ -1,25 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$teamApi = new Dropbox\Sign\Api\TeamApi($config); - -$data = new Dropbox\Sign\Model\TeamCreateRequest(); -$data->setName("New Team Name"); - -try { - $result = $teamApi->teamCreate($data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/TeamCreateExample.php b/examples/TeamCreateExample.php new file mode 100644 index 0000000..aabcac0 --- /dev/null +++ b/examples/TeamCreateExample.php @@ -0,0 +1,25 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$team_create_request = (new Dropbox\Sign\Model\TeamCreateRequest()) + ->setName("New Team Name"); + +try { + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamCreate( + team_create_request: $team_create_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TeamApi#teamCreate: {$e->getMessage()}"; +} diff --git a/examples/TeamDelete.php b/examples/TeamDelete.php deleted file mode 100644 index 327fec0..0000000 --- a/examples/TeamDelete.php +++ /dev/null @@ -1,21 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$teamApi = new Dropbox\Sign\Api\TeamApi($config); - -try { - $teamApi->teamDelete(); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/TeamDeleteExample.php b/examples/TeamDeleteExample.php new file mode 100644 index 0000000..9c429b7 --- /dev/null +++ b/examples/TeamDeleteExample.php @@ -0,0 +1,18 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + (new Dropbox\Sign\Api\TeamApi(config: $config))->teamDelete(); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TeamApi#teamDelete: {$e->getMessage()}"; +} diff --git a/examples/TeamGet.php b/examples/TeamGet.php deleted file mode 100644 index ccd714d..0000000 --- a/examples/TeamGet.php +++ /dev/null @@ -1,22 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$teamApi = new Dropbox\Sign\Api\TeamApi($config); - -try { - $result = $teamApi->teamGet(); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/TeamGetExample.php b/examples/TeamGetExample.php new file mode 100644 index 0000000..79c6e05 --- /dev/null +++ b/examples/TeamGetExample.php @@ -0,0 +1,20 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamGet(); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TeamApi#teamGet: {$e->getMessage()}"; +} diff --git a/examples/TeamInfo.php b/examples/TeamInfo.php deleted file mode 100644 index e43c06b..0000000 --- a/examples/TeamInfo.php +++ /dev/null @@ -1,22 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$teamApi = new Dropbox\Sign\Api\TeamApi($config); - -try { - $result = $teamApi->teamInfo(); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/TeamInfoExample.php b/examples/TeamInfoExample.php new file mode 100644 index 0000000..c908d51 --- /dev/null +++ b/examples/TeamInfoExample.php @@ -0,0 +1,22 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamInfo( + team_id: "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TeamApi#teamInfo: {$e->getMessage()}"; +} diff --git a/examples/TeamInvites.php b/examples/TeamInvites.php deleted file mode 100644 index 2cda146..0000000 --- a/examples/TeamInvites.php +++ /dev/null @@ -1,24 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$teamApi = new Dropbox\Sign\Api\TeamApi($config); - -$emailAddress = "user@dropboxsign.com"; - -try { - $result = $teamApi->teamInvites($emailAddress); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/TeamInvitesExample.php b/examples/TeamInvitesExample.php new file mode 100644 index 0000000..db94593 --- /dev/null +++ b/examples/TeamInvitesExample.php @@ -0,0 +1,20 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamInvites(); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TeamApi#teamInvites: {$e->getMessage()}"; +} diff --git a/examples/TeamMembers.php b/examples/TeamMembers.php deleted file mode 100644 index 60128aa..0000000 --- a/examples/TeamMembers.php +++ /dev/null @@ -1,24 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$teamApi = new Dropbox\Sign\Api\TeamApi($config); - -$teamId = "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c"; - -try { - $result = $teamApi->teamMembers($teamId); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/TeamMembersExample.php b/examples/TeamMembersExample.php new file mode 100644 index 0000000..79c0343 --- /dev/null +++ b/examples/TeamMembersExample.php @@ -0,0 +1,24 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamMembers( + team_id: "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", + page: 1, + page_size: 20, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TeamApi#teamMembers: {$e->getMessage()}"; +} diff --git a/examples/TeamRemoveMember.php b/examples/TeamRemoveMember.php deleted file mode 100644 index 73ec2ae..0000000 --- a/examples/TeamRemoveMember.php +++ /dev/null @@ -1,26 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$teamApi = new Dropbox\Sign\Api\TeamApi($config); - -$data = new Dropbox\Sign\Model\TeamRemoveMemberRequest(); -$data->setEmailAddress("teammate@dropboxsign.com") - ->setNewOwnerEmailAddress("new_teammate@dropboxsign.com"); - -try { - $result = $teamApi->teamRemoveMember($data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/TeamRemoveMemberAccountIdExample.php b/examples/TeamRemoveMemberAccountIdExample.php new file mode 100644 index 0000000..90d9026 --- /dev/null +++ b/examples/TeamRemoveMemberAccountIdExample.php @@ -0,0 +1,25 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$team_remove_member_request = (new Dropbox\Sign\Model\TeamRemoveMemberRequest()) + ->setAccountId("f57db65d3f933b5316d398057a36176831451a35"); + +try { + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamRemoveMember( + team_remove_member_request: $team_remove_member_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TeamApi#teamRemoveMember: {$e->getMessage()}"; +} diff --git a/examples/TeamRemoveMemberExample.php b/examples/TeamRemoveMemberExample.php new file mode 100644 index 0000000..3212aa3 --- /dev/null +++ b/examples/TeamRemoveMemberExample.php @@ -0,0 +1,26 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$team_remove_member_request = (new Dropbox\Sign\Model\TeamRemoveMemberRequest()) + ->setEmailAddress("teammate@dropboxsign.com") + ->setNewOwnerEmailAddress("new_teammate@dropboxsign.com"); + +try { + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamRemoveMember( + team_remove_member_request: $team_remove_member_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TeamApi#teamRemoveMember: {$e->getMessage()}"; +} diff --git a/examples/TeamSubTeams.php b/examples/TeamSubTeams.php deleted file mode 100644 index 8daf498..0000000 --- a/examples/TeamSubTeams.php +++ /dev/null @@ -1,24 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$teamApi = new Dropbox\Sign\Api\TeamApi($config); - -$teamId = "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c"; - -try { - $result = $teamApi->teamSubTeams($teamId); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/TeamSubTeamsExample.php b/examples/TeamSubTeamsExample.php new file mode 100644 index 0000000..ae7a990 --- /dev/null +++ b/examples/TeamSubTeamsExample.php @@ -0,0 +1,24 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamSubTeams( + team_id: "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", + page: 1, + page_size: 20, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TeamApi#teamSubTeams: {$e->getMessage()}"; +} diff --git a/examples/TeamUpdate.php b/examples/TeamUpdate.php deleted file mode 100644 index 6bac87d..0000000 --- a/examples/TeamUpdate.php +++ /dev/null @@ -1,25 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$teamApi = new Dropbox\Sign\Api\TeamApi($config); - -$data = new Dropbox\Sign\Model\TeamUpdateRequest(); -$data->setName("New Team Name"); - -try { - $result = $teamApi->teamUpdate($data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/TeamUpdateExample.php b/examples/TeamUpdateExample.php new file mode 100644 index 0000000..3338af6 --- /dev/null +++ b/examples/TeamUpdateExample.php @@ -0,0 +1,25 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$team_update_request = (new Dropbox\Sign\Model\TeamUpdateRequest()) + ->setName("New Team Name"); + +try { + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamUpdate( + team_update_request: $team_update_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TeamApi#teamUpdate: {$e->getMessage()}"; +} diff --git a/examples/TemplateAddUser.php b/examples/TemplateAddUser.php deleted file mode 100644 index 2bbc318..0000000 --- a/examples/TemplateAddUser.php +++ /dev/null @@ -1,27 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$templateApi = new Dropbox\Sign\Api\TemplateApi($config); - -$data = new Dropbox\Sign\Model\TemplateAddUserRequest(); -$data->setEmailAddress("george@dropboxsign.com"); - -$templateId = "f57db65d3f933b5316d398057a36176831451a35"; - -try { - $result = $templateApi->templateAddUser($templateId, $data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/TemplateAddUserExample.php b/examples/TemplateAddUserExample.php new file mode 100644 index 0000000..a76613a --- /dev/null +++ b/examples/TemplateAddUserExample.php @@ -0,0 +1,26 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$template_add_user_request = (new Dropbox\Sign\Model\TemplateAddUserRequest()) + ->setEmailAddress("george@dropboxsign.com"); + +try { + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateAddUser( + template_id: "f57db65d3f933b5316d398057a36176831451a35", + template_add_user_request: $template_add_user_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TemplateApi#templateAddUser: {$e->getMessage()}"; +} diff --git a/examples/TemplateCreate.php b/examples/TemplateCreate.php deleted file mode 100644 index 7b1b866..0000000 --- a/examples/TemplateCreate.php +++ /dev/null @@ -1,53 +0,0 @@ -setUsername('YOUR_API_KEY'); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$templateApi = new Dropbox\Sign\Api\TemplateApi($config); - -$role1 = new Dropbox\Sign\Model\SubTemplateRole(); -$role1->setName('Client') - ->setOrder(0); - -$role2 = new Dropbox\Sign\Model\SubTemplateRole(); -$role2->setName('Witness') - ->setOrder(1); - -$mergeField1 = new Dropbox\Sign\Model\SubMergeField(); -$mergeField1->setName('Full Name') - ->setType(Dropbox\Sign\Model\SubMergeField::TYPE_TEXT); - -$mergeField2 = new Dropbox\Sign\Model\SubMergeField(); -$mergeField2->setName('Is Registered?') - ->setType(Dropbox\Sign\Model\SubMergeField::TYPE_CHECKBOX); - -$fieldOptions = new Dropbox\Sign\Model\SubFieldOptions(); -$fieldOptions->setDateFormat(Dropbox\Sign\Model\SubFieldOptions::DATE_FORMAT_DD_MM_YYYY); - -$data = new Dropbox\Sign\Model\TemplateCreateRequest(); -$data->setClientId('37dee8d8440c66d54cfa05d92c160882') - ->setFiles([new SplFileObject(__DIR__ . '/example_signature_request.pdf')]) - ->setTitle('Test Template') - ->setSubject('Please sign this document') - ->setMessage('For your approval') - ->setSignerRoles([$role1, $role2]) - ->setCcRoles(['Manager']) - ->setMergeFields([$mergeField1, $mergeField2]) - ->setFieldOptions($fieldOptions) - ->setTestMode(true); - -try { - $result = $templateApi->templateCreate($data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo 'Exception when calling Dropbox Sign API: ' - . print_r($error->getError()); -} diff --git a/examples/TemplateCreateEmbeddedDraft.php b/examples/TemplateCreateEmbeddedDraft.php deleted file mode 100644 index 4e1421b..0000000 --- a/examples/TemplateCreateEmbeddedDraft.php +++ /dev/null @@ -1,53 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$templateApi = new Dropbox\Sign\Api\TemplateApi($config); - -$role1 = new Dropbox\Sign\Model\SubTemplateRole(); -$role1->setName("Client") - ->setOrder(0); - -$role2 = new Dropbox\Sign\Model\SubTemplateRole(); -$role2->setName("Witness") - ->setOrder(1); - -$mergeField1 = new Dropbox\Sign\Model\SubMergeField(); -$mergeField1->setName("Full Name") - ->setType(Dropbox\Sign\Model\SubMergeField::TYPE_TEXT); - -$mergeField2 = new Dropbox\Sign\Model\SubMergeField(); -$mergeField2->setName("Is Registered?") - ->setType(Dropbox\Sign\Model\SubMergeField::TYPE_CHECKBOX); - -$fieldOptions = new Dropbox\Sign\Model\SubFieldOptions(); -$fieldOptions->setDateFormat(Dropbox\Sign\Model\SubFieldOptions::DATE_FORMAT_DD_MM_YYYY); - -$data = new Dropbox\Sign\Model\TemplateCreateEmbeddedDraftRequest(); -$data->setClientId("37dee8d8440c66d54cfa05d92c160882") - ->setFiles([new SplFileObject(__DIR__ . "/example_signature_request.pdf")]) - ->setTitle("Test Template") - ->setSubject("Please sign this document") - ->setMessage("For your approval") - ->setSignerRoles([$role1, $role2]) - ->setCcRoles(["Manager"]) - ->setMergeFields([$mergeField1, $mergeField2]) - ->setFieldOptions($fieldOptions) - ->setTestMode(true); - -try { - $result = $templateApi->templateCreateEmbeddedDraft($data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/TemplateCreateEmbeddedDraftExample.php b/examples/TemplateCreateEmbeddedDraftExample.php new file mode 100644 index 0000000..bf035f3 --- /dev/null +++ b/examples/TemplateCreateEmbeddedDraftExample.php @@ -0,0 +1,66 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$field_options = (new Dropbox\Sign\Model\SubFieldOptions()) + ->setDateFormat(Dropbox\Sign\Model\SubFieldOptions::DATE_FORMAT_DD_MM_YYYY); + +$merge_fields_1 = (new Dropbox\Sign\Model\SubMergeField()) + ->setName("Full Name") + ->setType(Dropbox\Sign\Model\SubMergeField::TYPE_TEXT); + +$merge_fields_2 = (new Dropbox\Sign\Model\SubMergeField()) + ->setName("Is Registered?") + ->setType(Dropbox\Sign\Model\SubMergeField::TYPE_CHECKBOX); + +$merge_fields = [ + $merge_fields_1, + $merge_fields_2, +]; + +$signer_roles_1 = (new Dropbox\Sign\Model\SubTemplateRole()) + ->setName("Client") + ->setOrder(0); + +$signer_roles_2 = (new Dropbox\Sign\Model\SubTemplateRole()) + ->setName("Witness") + ->setOrder(1); + +$signer_roles = [ + $signer_roles_1, + $signer_roles_2, +]; + +$template_create_embedded_draft_request = (new Dropbox\Sign\Model\TemplateCreateEmbeddedDraftRequest()) + ->setClientId("37dee8d8440c66d54cfa05d92c160882") + ->setMessage("For your approval") + ->setSubject("Please sign this document") + ->setTestMode(true) + ->setTitle("Test Template") + ->setCcRoles([ + "Manager", + ]) + ->setFiles([ + ]) + ->setFieldOptions($field_options) + ->setMergeFields($merge_fields) + ->setSignerRoles($signer_roles); + +try { + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateCreateEmbeddedDraft( + template_create_embedded_draft_request: $template_create_embedded_draft_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TemplateApi#templateCreateEmbeddedDraft: {$e->getMessage()}"; +} diff --git a/examples/TemplateCreateEmbeddedDraftFormFieldGroupsExample.php b/examples/TemplateCreateEmbeddedDraftFormFieldGroupsExample.php new file mode 100644 index 0000000..120c310 --- /dev/null +++ b/examples/TemplateCreateEmbeddedDraftFormFieldGroupsExample.php @@ -0,0 +1,113 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$field_options = (new Dropbox\Sign\Model\SubFieldOptions()) + ->setDateFormat(Dropbox\Sign\Model\SubFieldOptions::DATE_FORMAT_DD_MM_YYYY); + +$form_field_groups_1 = (new Dropbox\Sign\Model\SubFormFieldGroup()) + ->setGroupId("RadioItemGroup1") + ->setGroupLabel("Radio Item Group 1") + ->setRequirement("require_0-1"); + +$form_field_groups = [ + $form_field_groups_1, +]; + +$form_fields_per_document_1 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentRadio()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_1") + ->setType("radio") + ->setRequired(false) + ->setSigner("0") + ->setWidth(18) + ->setHeight(18) + ->setX(112) + ->setY(328) + ->setGroup("RadioItemGroup1") + ->setIsChecked(true) + ->setName("") + ->setPage(1); + +$form_fields_per_document_2 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentRadio()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_2") + ->setType("radio") + ->setRequired(false) + ->setSigner("0") + ->setWidth(18) + ->setHeight(18) + ->setX(112) + ->setY(370) + ->setGroup("RadioItemGroup1") + ->setIsChecked(false) + ->setName("") + ->setPage(1); + +$form_fields_per_document = [ + $form_fields_per_document_1, + $form_fields_per_document_2, +]; + +$merge_fields_1 = (new Dropbox\Sign\Model\SubMergeField()) + ->setName("Full Name") + ->setType(Dropbox\Sign\Model\SubMergeField::TYPE_TEXT); + +$merge_fields_2 = (new Dropbox\Sign\Model\SubMergeField()) + ->setName("Is Registered?") + ->setType(Dropbox\Sign\Model\SubMergeField::TYPE_CHECKBOX); + +$merge_fields = [ + $merge_fields_1, + $merge_fields_2, +]; + +$signer_roles_1 = (new Dropbox\Sign\Model\SubTemplateRole()) + ->setName("Client") + ->setOrder(0); + +$signer_roles_2 = (new Dropbox\Sign\Model\SubTemplateRole()) + ->setName("Witness") + ->setOrder(1); + +$signer_roles = [ + $signer_roles_1, + $signer_roles_2, +]; + +$template_create_embedded_draft_request = (new Dropbox\Sign\Model\TemplateCreateEmbeddedDraftRequest()) + ->setClientId("37dee8d8440c66d54cfa05d92c160882") + ->setMessage("For your approval") + ->setSubject("Please sign this document") + ->setTestMode(true) + ->setTitle("Test Template") + ->setFileUrls([ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ]) + ->setCcRoles([ + "Manager", + ]) + ->setFieldOptions($field_options) + ->setFormFieldGroups($form_field_groups) + ->setFormFieldsPerDocument($form_fields_per_document) + ->setMergeFields($merge_fields) + ->setSignerRoles($signer_roles); + +try { + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateCreateEmbeddedDraft( + template_create_embedded_draft_request: $template_create_embedded_draft_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TemplateApi#templateCreateEmbeddedDraft: {$e->getMessage()}"; +} diff --git a/examples/TemplateCreateEmbeddedDraftFormFieldRulesExample.php b/examples/TemplateCreateEmbeddedDraftFormFieldRulesExample.php new file mode 100644 index 0000000..3997bcd --- /dev/null +++ b/examples/TemplateCreateEmbeddedDraftFormFieldRulesExample.php @@ -0,0 +1,129 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$form_field_rules_1_triggers_1 = (new Dropbox\Sign\Model\SubFormFieldRuleTrigger()) + ->setId("uniqueIdHere_1") + ->setOperator(Dropbox\Sign\Model\SubFormFieldRuleTrigger::OPERATOR_IS) + ->setValue("foo"); + +$form_field_rules_1_triggers = [ + $form_field_rules_1_triggers_1, +]; + +$form_field_rules_1_actions_1 = (new Dropbox\Sign\Model\SubFormFieldRuleAction()) + ->setHidden(true) + ->setType(Dropbox\Sign\Model\SubFormFieldRuleAction::TYPE_CHANGE_FIELD_VISIBILITY) + ->setFieldId("uniqueIdHere_2"); + +$form_field_rules_1_actions = [ + $form_field_rules_1_actions_1, +]; + +$field_options = (new Dropbox\Sign\Model\SubFieldOptions()) + ->setDateFormat(Dropbox\Sign\Model\SubFieldOptions::DATE_FORMAT_DD_MM_YYYY); + +$form_field_rules_1 = (new Dropbox\Sign\Model\SubFormFieldRule()) + ->setId("rule_1") + ->setTriggerOperator("AND") + ->setTriggers($form_field_rules_1_triggers) + ->setActions($form_field_rules_1_actions); + +$form_field_rules = [ + $form_field_rules_1, +]; + +$form_fields_per_document_1 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentText()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_1") + ->setType("text") + ->setRequired(true) + ->setSigner("0") + ->setWidth(100) + ->setHeight(16) + ->setX(112) + ->setY(328) + ->setName("") + ->setPage(1) + ->setValidationType(Dropbox\Sign\Model\SubFormFieldsPerDocumentText::VALIDATION_TYPE_NUMBERS_ONLY); + +$form_fields_per_document_2 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentSignature()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_2") + ->setType("signature") + ->setRequired(true) + ->setSigner("0") + ->setWidth(120) + ->setHeight(30) + ->setX(530) + ->setY(415) + ->setName("") + ->setPage(1); + +$form_fields_per_document = [ + $form_fields_per_document_1, + $form_fields_per_document_2, +]; + +$merge_fields_1 = (new Dropbox\Sign\Model\SubMergeField()) + ->setName("Full Name") + ->setType(Dropbox\Sign\Model\SubMergeField::TYPE_TEXT); + +$merge_fields_2 = (new Dropbox\Sign\Model\SubMergeField()) + ->setName("Is Registered?") + ->setType(Dropbox\Sign\Model\SubMergeField::TYPE_CHECKBOX); + +$merge_fields = [ + $merge_fields_1, + $merge_fields_2, +]; + +$signer_roles_1 = (new Dropbox\Sign\Model\SubTemplateRole()) + ->setName("Client") + ->setOrder(0); + +$signer_roles_2 = (new Dropbox\Sign\Model\SubTemplateRole()) + ->setName("Witness") + ->setOrder(1); + +$signer_roles = [ + $signer_roles_1, + $signer_roles_2, +]; + +$template_create_embedded_draft_request = (new Dropbox\Sign\Model\TemplateCreateEmbeddedDraftRequest()) + ->setClientId("37dee8d8440c66d54cfa05d92c160882") + ->setMessage("For your approval") + ->setSubject("Please sign this document") + ->setTestMode(true) + ->setTitle("Test Template") + ->setFileUrls([ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ]) + ->setCcRoles([ + "Manager", + ]) + ->setFieldOptions($field_options) + ->setFormFieldRules($form_field_rules) + ->setFormFieldsPerDocument($form_fields_per_document) + ->setMergeFields($merge_fields) + ->setSignerRoles($signer_roles); + +try { + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateCreateEmbeddedDraft( + template_create_embedded_draft_request: $template_create_embedded_draft_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TemplateApi#templateCreateEmbeddedDraft: {$e->getMessage()}"; +} diff --git a/examples/TemplateCreateEmbeddedDraftFormFieldsPerDocumentExample.php b/examples/TemplateCreateEmbeddedDraftFormFieldsPerDocumentExample.php new file mode 100644 index 0000000..6dc4c93 --- /dev/null +++ b/examples/TemplateCreateEmbeddedDraftFormFieldsPerDocumentExample.php @@ -0,0 +1,101 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$field_options = (new Dropbox\Sign\Model\SubFieldOptions()) + ->setDateFormat(Dropbox\Sign\Model\SubFieldOptions::DATE_FORMAT_DD_MM_YYYY); + +$form_fields_per_document_1 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentText()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_1") + ->setType("text") + ->setRequired(true) + ->setSigner("1") + ->setWidth(100) + ->setHeight(16) + ->setX(112) + ->setY(328) + ->setName("") + ->setPage(1) + ->setPlaceholder("") + ->setValidationType(Dropbox\Sign\Model\SubFormFieldsPerDocumentText::VALIDATION_TYPE_NUMBERS_ONLY); + +$form_fields_per_document_2 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentSignature()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_2") + ->setType("signature") + ->setRequired(true) + ->setSigner("0") + ->setWidth(120) + ->setHeight(30) + ->setX(530) + ->setY(415) + ->setName("") + ->setPage(1); + +$form_fields_per_document = [ + $form_fields_per_document_1, + $form_fields_per_document_2, +]; + +$merge_fields_1 = (new Dropbox\Sign\Model\SubMergeField()) + ->setName("Full Name") + ->setType(Dropbox\Sign\Model\SubMergeField::TYPE_TEXT); + +$merge_fields_2 = (new Dropbox\Sign\Model\SubMergeField()) + ->setName("Is Registered?") + ->setType(Dropbox\Sign\Model\SubMergeField::TYPE_CHECKBOX); + +$merge_fields = [ + $merge_fields_1, + $merge_fields_2, +]; + +$signer_roles_1 = (new Dropbox\Sign\Model\SubTemplateRole()) + ->setName("Client") + ->setOrder(0); + +$signer_roles_2 = (new Dropbox\Sign\Model\SubTemplateRole()) + ->setName("Witness") + ->setOrder(1); + +$signer_roles = [ + $signer_roles_1, + $signer_roles_2, +]; + +$template_create_embedded_draft_request = (new Dropbox\Sign\Model\TemplateCreateEmbeddedDraftRequest()) + ->setClientId("37dee8d8440c66d54cfa05d92c160882") + ->setMessage("For your approval") + ->setSubject("Please sign this document") + ->setTestMode(true) + ->setTitle("Test Template") + ->setFileUrls([ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ]) + ->setCcRoles([ + "Manager", + ]) + ->setFieldOptions($field_options) + ->setFormFieldsPerDocument($form_fields_per_document) + ->setMergeFields($merge_fields) + ->setSignerRoles($signer_roles); + +try { + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateCreateEmbeddedDraft( + template_create_embedded_draft_request: $template_create_embedded_draft_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TemplateApi#templateCreateEmbeddedDraft: {$e->getMessage()}"; +} diff --git a/examples/TemplateCreateExample.php b/examples/TemplateCreateExample.php new file mode 100644 index 0000000..93b6ded --- /dev/null +++ b/examples/TemplateCreateExample.php @@ -0,0 +1,100 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$field_options = (new Dropbox\Sign\Model\SubFieldOptions()) + ->setDateFormat(Dropbox\Sign\Model\SubFieldOptions::DATE_FORMAT_DD_MM_YYYY); + +$signer_roles_1 = (new Dropbox\Sign\Model\SubTemplateRole()) + ->setName("Client") + ->setOrder(0); + +$signer_roles_2 = (new Dropbox\Sign\Model\SubTemplateRole()) + ->setName("Witness") + ->setOrder(1); + +$signer_roles = [ + $signer_roles_1, + $signer_roles_2, +]; + +$form_fields_per_document_1 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentText()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_1") + ->setType("text") + ->setRequired(true) + ->setSigner("1") + ->setWidth(100) + ->setHeight(16) + ->setX(112) + ->setY(328) + ->setName("") + ->setPage(1) + ->setPlaceholder("") + ->setValidationType(Dropbox\Sign\Model\SubFormFieldsPerDocumentText::VALIDATION_TYPE_NUMBERS_ONLY); + +$form_fields_per_document_2 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentSignature()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_2") + ->setType("signature") + ->setRequired(true) + ->setSigner("0") + ->setWidth(120) + ->setHeight(30) + ->setX(530) + ->setY(415) + ->setName("") + ->setPage(1); + +$form_fields_per_document = [ + $form_fields_per_document_1, + $form_fields_per_document_2, +]; + +$merge_fields_1 = (new Dropbox\Sign\Model\SubMergeField()) + ->setName("Full Name") + ->setType(Dropbox\Sign\Model\SubMergeField::TYPE_TEXT); + +$merge_fields_2 = (new Dropbox\Sign\Model\SubMergeField()) + ->setName("Is Registered?") + ->setType(Dropbox\Sign\Model\SubMergeField::TYPE_CHECKBOX); + +$merge_fields = [ + $merge_fields_1, + $merge_fields_2, +]; + +$template_create_request = (new Dropbox\Sign\Model\TemplateCreateRequest()) + ->setClientId("37dee8d8440c66d54cfa05d92c160882") + ->setMessage("For your approval") + ->setSubject("Please sign this document") + ->setTestMode(true) + ->setTitle("Test Template") + ->setCcRoles([ + "Manager", + ]) + ->setFiles([ + ]) + ->setFieldOptions($field_options) + ->setSignerRoles($signer_roles) + ->setFormFieldsPerDocument($form_fields_per_document) + ->setMergeFields($merge_fields); + +try { + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateCreate( + template_create_request: $template_create_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TemplateApi#templateCreate: {$e->getMessage()}"; +} diff --git a/examples/TemplateCreateFormFieldGroupsExample.php b/examples/TemplateCreateFormFieldGroupsExample.php new file mode 100644 index 0000000..1c0e020 --- /dev/null +++ b/examples/TemplateCreateFormFieldGroupsExample.php @@ -0,0 +1,113 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$field_options = (new Dropbox\Sign\Model\SubFieldOptions()) + ->setDateFormat(Dropbox\Sign\Model\SubFieldOptions::DATE_FORMAT_DD_MM_YYYY); + +$signer_roles_1 = (new Dropbox\Sign\Model\SubTemplateRole()) + ->setName("Client") + ->setOrder(0); + +$signer_roles_2 = (new Dropbox\Sign\Model\SubTemplateRole()) + ->setName("Witness") + ->setOrder(1); + +$signer_roles = [ + $signer_roles_1, + $signer_roles_2, +]; + +$form_fields_per_document_1 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentRadio()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_1") + ->setType("radio") + ->setRequired(false) + ->setSigner("0") + ->setWidth(18) + ->setHeight(18) + ->setX(112) + ->setY(328) + ->setGroup("RadioItemGroup1") + ->setIsChecked(true) + ->setName("") + ->setPage(1); + +$form_fields_per_document_2 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentRadio()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_2") + ->setType("radio") + ->setRequired(false) + ->setSigner("0") + ->setWidth(18) + ->setHeight(18) + ->setX(112) + ->setY(370) + ->setGroup("RadioItemGroup1") + ->setIsChecked(false) + ->setName("") + ->setPage(1); + +$form_fields_per_document = [ + $form_fields_per_document_1, + $form_fields_per_document_2, +]; + +$form_field_groups_1 = (new Dropbox\Sign\Model\SubFormFieldGroup()) + ->setGroupId("RadioItemGroup1") + ->setGroupLabel("Radio Item Group 1") + ->setRequirement("require_0-1"); + +$form_field_groups = [ + $form_field_groups_1, +]; + +$merge_fields_1 = (new Dropbox\Sign\Model\SubMergeField()) + ->setName("Full Name") + ->setType(Dropbox\Sign\Model\SubMergeField::TYPE_TEXT); + +$merge_fields_2 = (new Dropbox\Sign\Model\SubMergeField()) + ->setName("Is Registered?") + ->setType(Dropbox\Sign\Model\SubMergeField::TYPE_CHECKBOX); + +$merge_fields = [ + $merge_fields_1, + $merge_fields_2, +]; + +$template_create_request = (new Dropbox\Sign\Model\TemplateCreateRequest()) + ->setClientId("37dee8d8440c66d54cfa05d92c160882") + ->setMessage("For your approval") + ->setSubject("Please sign this document") + ->setTestMode(true) + ->setTitle("Test Template") + ->setFileUrls([ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ]) + ->setCcRoles([ + "Manager", + ]) + ->setFieldOptions($field_options) + ->setSignerRoles($signer_roles) + ->setFormFieldsPerDocument($form_fields_per_document) + ->setFormFieldGroups($form_field_groups) + ->setMergeFields($merge_fields); + +try { + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateCreate( + template_create_request: $template_create_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TemplateApi#templateCreate: {$e->getMessage()}"; +} diff --git a/examples/TemplateCreateFormFieldRulesExample.php b/examples/TemplateCreateFormFieldRulesExample.php new file mode 100644 index 0000000..1b27524 --- /dev/null +++ b/examples/TemplateCreateFormFieldRulesExample.php @@ -0,0 +1,129 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$form_field_rules_1_triggers_1 = (new Dropbox\Sign\Model\SubFormFieldRuleTrigger()) + ->setId("uniqueIdHere_1") + ->setOperator(Dropbox\Sign\Model\SubFormFieldRuleTrigger::OPERATOR_IS) + ->setValue("foo"); + +$form_field_rules_1_triggers = [ + $form_field_rules_1_triggers_1, +]; + +$form_field_rules_1_actions_1 = (new Dropbox\Sign\Model\SubFormFieldRuleAction()) + ->setHidden(true) + ->setType(Dropbox\Sign\Model\SubFormFieldRuleAction::TYPE_CHANGE_FIELD_VISIBILITY) + ->setFieldId("uniqueIdHere_2"); + +$form_field_rules_1_actions = [ + $form_field_rules_1_actions_1, +]; + +$field_options = (new Dropbox\Sign\Model\SubFieldOptions()) + ->setDateFormat(Dropbox\Sign\Model\SubFieldOptions::DATE_FORMAT_DD_MM_YYYY); + +$signer_roles_1 = (new Dropbox\Sign\Model\SubTemplateRole()) + ->setName("Client") + ->setOrder(0); + +$signer_roles_2 = (new Dropbox\Sign\Model\SubTemplateRole()) + ->setName("Witness") + ->setOrder(1); + +$signer_roles = [ + $signer_roles_1, + $signer_roles_2, +]; + +$form_fields_per_document_1 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentText()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_1") + ->setType("text") + ->setRequired(true) + ->setSigner("0") + ->setWidth(100) + ->setHeight(16) + ->setX(112) + ->setY(328) + ->setName("") + ->setPage(1) + ->setValidationType(Dropbox\Sign\Model\SubFormFieldsPerDocumentText::VALIDATION_TYPE_NUMBERS_ONLY); + +$form_fields_per_document_2 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentSignature()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_2") + ->setType("signature") + ->setRequired(true) + ->setSigner("0") + ->setWidth(120) + ->setHeight(30) + ->setX(530) + ->setY(415) + ->setName("") + ->setPage(1); + +$form_fields_per_document = [ + $form_fields_per_document_1, + $form_fields_per_document_2, +]; + +$form_field_rules_1 = (new Dropbox\Sign\Model\SubFormFieldRule()) + ->setId("rule_1") + ->setTriggerOperator("AND") + ->setTriggers($form_field_rules_1_triggers) + ->setActions($form_field_rules_1_actions); + +$form_field_rules = [ + $form_field_rules_1, +]; + +$merge_fields_1 = (new Dropbox\Sign\Model\SubMergeField()) + ->setName("Full Name") + ->setType(Dropbox\Sign\Model\SubMergeField::TYPE_TEXT); + +$merge_fields_2 = (new Dropbox\Sign\Model\SubMergeField()) + ->setName("Is Registered?") + ->setType(Dropbox\Sign\Model\SubMergeField::TYPE_CHECKBOX); + +$merge_fields = [ + $merge_fields_1, + $merge_fields_2, +]; + +$template_create_request = (new Dropbox\Sign\Model\TemplateCreateRequest()) + ->setClientId("37dee8d8440c66d54cfa05d92c160882") + ->setMessage("For your approval") + ->setSubject("Please sign this document") + ->setTestMode(true) + ->setTitle("Test Template") + ->setFileUrls([ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ]) + ->setCcRoles([ + "Manager", + ]) + ->setFieldOptions($field_options) + ->setSignerRoles($signer_roles) + ->setFormFieldsPerDocument($form_fields_per_document) + ->setFormFieldRules($form_field_rules) + ->setMergeFields($merge_fields); + +try { + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateCreate( + template_create_request: $template_create_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TemplateApi#templateCreate: {$e->getMessage()}"; +} diff --git a/examples/TemplateCreateFormFieldsPerDocumentExample.php b/examples/TemplateCreateFormFieldsPerDocumentExample.php new file mode 100644 index 0000000..a4f60e9 --- /dev/null +++ b/examples/TemplateCreateFormFieldsPerDocumentExample.php @@ -0,0 +1,101 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$field_options = (new Dropbox\Sign\Model\SubFieldOptions()) + ->setDateFormat(Dropbox\Sign\Model\SubFieldOptions::DATE_FORMAT_DD_MM_YYYY); + +$signer_roles_1 = (new Dropbox\Sign\Model\SubTemplateRole()) + ->setName("Client") + ->setOrder(0); + +$signer_roles_2 = (new Dropbox\Sign\Model\SubTemplateRole()) + ->setName("Witness") + ->setOrder(1); + +$signer_roles = [ + $signer_roles_1, + $signer_roles_2, +]; + +$form_fields_per_document_1 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentText()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_1") + ->setType("text") + ->setRequired(true) + ->setSigner("1") + ->setWidth(100) + ->setHeight(16) + ->setX(112) + ->setY(328) + ->setName("") + ->setPage(1) + ->setPlaceholder("") + ->setValidationType(Dropbox\Sign\Model\SubFormFieldsPerDocumentText::VALIDATION_TYPE_NUMBERS_ONLY); + +$form_fields_per_document_2 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentSignature()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_2") + ->setType("signature") + ->setRequired(true) + ->setSigner("0") + ->setWidth(120) + ->setHeight(30) + ->setX(530) + ->setY(415) + ->setName("") + ->setPage(1); + +$form_fields_per_document = [ + $form_fields_per_document_1, + $form_fields_per_document_2, +]; + +$merge_fields_1 = (new Dropbox\Sign\Model\SubMergeField()) + ->setName("Full Name") + ->setType(Dropbox\Sign\Model\SubMergeField::TYPE_TEXT); + +$merge_fields_2 = (new Dropbox\Sign\Model\SubMergeField()) + ->setName("Is Registered?") + ->setType(Dropbox\Sign\Model\SubMergeField::TYPE_CHECKBOX); + +$merge_fields = [ + $merge_fields_1, + $merge_fields_2, +]; + +$template_create_request = (new Dropbox\Sign\Model\TemplateCreateRequest()) + ->setClientId("37dee8d8440c66d54cfa05d92c160882") + ->setMessage("For your approval") + ->setSubject("Please sign this document") + ->setTestMode(true) + ->setTitle("Test Template") + ->setFileUrls([ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ]) + ->setCcRoles([ + "Manager", + ]) + ->setFieldOptions($field_options) + ->setSignerRoles($signer_roles) + ->setFormFieldsPerDocument($form_fields_per_document) + ->setMergeFields($merge_fields); + +try { + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateCreate( + template_create_request: $template_create_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TemplateApi#templateCreate: {$e->getMessage()}"; +} diff --git a/examples/TemplateDelete.php b/examples/TemplateDelete.php deleted file mode 100644 index 3858b75..0000000 --- a/examples/TemplateDelete.php +++ /dev/null @@ -1,23 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$templateApi = new Dropbox\Sign\Api\TemplateApi($config); - -$templateId = "5de8179668f2033afac48da1868d0093bf133266"; - -try { - $templateApi->templateDelete($templateId); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/TemplateDeleteExample.php b/examples/TemplateDeleteExample.php new file mode 100644 index 0000000..63c7a6a --- /dev/null +++ b/examples/TemplateDeleteExample.php @@ -0,0 +1,20 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateDelete( + template_id: "f57db65d3f933b5316d398057a36176831451a35", + ); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TemplateApi#templateDelete: {$e->getMessage()}"; +} diff --git a/examples/TemplateFiles.php b/examples/TemplateFiles.php deleted file mode 100644 index e3e7341..0000000 --- a/examples/TemplateFiles.php +++ /dev/null @@ -1,25 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$templateApi = new Dropbox\Sign\Api\TemplateApi($config); - -$templateId = "5de8179668f2033afac48da1868d0093bf133266"; -$fileType = "pdf"; - -try { - $result = $templateApi->templateFiles($templateId, $fileType); - copy($result->getRealPath(), __DIR__ . '/file_response.pdf'); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/TemplateFilesAsDataUri.php b/examples/TemplateFilesAsDataUri.php deleted file mode 100644 index f52cc28..0000000 --- a/examples/TemplateFilesAsDataUri.php +++ /dev/null @@ -1,24 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$templateApi = new Dropbox\Sign\Api\TemplateApi($config); - -$templateId = "5de8179668f2033afac48da1868d0093bf133266"; - -try { - $result = $templateApi->templateFilesAsDataUri($templateId); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/TemplateFilesAsDataUriExample.php b/examples/TemplateFilesAsDataUriExample.php new file mode 100644 index 0000000..df19ef8 --- /dev/null +++ b/examples/TemplateFilesAsDataUriExample.php @@ -0,0 +1,22 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateFilesAsDataUri( + template_id: "f57db65d3f933b5316d398057a36176831451a35", + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TemplateApi#templateFilesAsDataUri: {$e->getMessage()}"; +} diff --git a/examples/TemplateFilesAsFileUrl.php b/examples/TemplateFilesAsFileUrl.php deleted file mode 100644 index 36a061b..0000000 --- a/examples/TemplateFilesAsFileUrl.php +++ /dev/null @@ -1,24 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$templateApi = new Dropbox\Sign\Api\TemplateApi($config); - -$templateId = "5de8179668f2033afac48da1868d0093bf133266"; - -try { - $result = $templateApi->templateFilesAsFileUrl($templateId); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/TemplateFilesAsFileUrlExample.php b/examples/TemplateFilesAsFileUrlExample.php new file mode 100644 index 0000000..d4fb8f5 --- /dev/null +++ b/examples/TemplateFilesAsFileUrlExample.php @@ -0,0 +1,23 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateFilesAsFileUrl( + template_id: "f57db65d3f933b5316d398057a36176831451a35", + force_download: 1, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TemplateApi#templateFilesAsFileUrl: {$e->getMessage()}"; +} diff --git a/examples/TemplateFilesExample.php b/examples/TemplateFilesExample.php new file mode 100644 index 0000000..2e2f46f --- /dev/null +++ b/examples/TemplateFilesExample.php @@ -0,0 +1,22 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateFiles( + template_id: "f57db65d3f933b5316d398057a36176831451a35", + ); + + copy($response->getRealPath(), __DIR__ . '/file_response'); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TemplateApi#templateFiles: {$e->getMessage()}"; +} diff --git a/examples/TemplateGet.php b/examples/TemplateGet.php deleted file mode 100644 index b6e4697..0000000 --- a/examples/TemplateGet.php +++ /dev/null @@ -1,24 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$templateApi = new Dropbox\Sign\Api\TemplateApi($config); - -$templateId = "f57db65d3f933b5316d398057a36176831451a35"; - -try { - $result = $templateApi->templateGet($templateId); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/TemplateGetExample.php b/examples/TemplateGetExample.php new file mode 100644 index 0000000..3625ff5 --- /dev/null +++ b/examples/TemplateGetExample.php @@ -0,0 +1,22 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateGet( + template_id: "f57db65d3f933b5316d398057a36176831451a35", + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TemplateApi#templateGet: {$e->getMessage()}"; +} diff --git a/examples/TemplateList.php b/examples/TemplateList.php deleted file mode 100644 index 1a2ea5b..0000000 --- a/examples/TemplateList.php +++ /dev/null @@ -1,24 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$templateApi = new Dropbox\Sign\Api\TemplateApi($config); - -$accountId = "f57db65d3f933b5316d398057a36176831451a35"; - -try { - $result = $templateApi->templateList($accountId); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/TemplateListExample.php b/examples/TemplateListExample.php new file mode 100644 index 0000000..eafde32 --- /dev/null +++ b/examples/TemplateListExample.php @@ -0,0 +1,23 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateList( + page: 1, + page_size: 20, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TemplateApi#templateList: {$e->getMessage()}"; +} diff --git a/examples/TemplateRemoveUser.php b/examples/TemplateRemoveUser.php deleted file mode 100644 index 8e7aa9a..0000000 --- a/examples/TemplateRemoveUser.php +++ /dev/null @@ -1,27 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$templateApi = new Dropbox\Sign\Api\TemplateApi($config); - -$data = new Dropbox\Sign\Model\TemplateRemoveUserRequest(); -$data->setEmailAddress("george@dropboxsign.com"); - -$templateId = "21f920ec2b7f4b6bb64d3ed79f26303843046536"; - -try { - $result = $templateApi->templateRemoveUser($templateId, $data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/TemplateRemoveUserExample.php b/examples/TemplateRemoveUserExample.php new file mode 100644 index 0000000..ecd5770 --- /dev/null +++ b/examples/TemplateRemoveUserExample.php @@ -0,0 +1,26 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$template_remove_user_request = (new Dropbox\Sign\Model\TemplateRemoveUserRequest()) + ->setEmailAddress("george@dropboxsign.com"); + +try { + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateRemoveUser( + template_id: "f57db65d3f933b5316d398057a36176831451a35", + template_remove_user_request: $template_remove_user_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TemplateApi#templateRemoveUser: {$e->getMessage()}"; +} diff --git a/examples/TemplateUpdateFiles.php b/examples/TemplateUpdateFiles.php deleted file mode 100644 index c9e3fbe..0000000 --- a/examples/TemplateUpdateFiles.php +++ /dev/null @@ -1,27 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$templateApi = new Dropbox\Sign\Api\TemplateApi($config); - -$data = new Dropbox\Sign\Model\TemplateUpdateFilesRequest(); -$data->setFiles([new SplFileObject(__DIR__ . "/example_signature_request.pdf")]); - -$templateId = "5de8179668f2033afac48da1868d0093bf133266"; - -try { - $result = $templateApi->templateUpdateFiles($templateId, $data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/TemplateUpdateFilesExample.php b/examples/TemplateUpdateFilesExample.php new file mode 100644 index 0000000..26470da --- /dev/null +++ b/examples/TemplateUpdateFilesExample.php @@ -0,0 +1,27 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$template_update_files_request = (new Dropbox\Sign\Model\TemplateUpdateFilesRequest()) + ->setFiles([ + ]); + +try { + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateUpdateFiles( + template_id: "f57db65d3f933b5316d398057a36176831451a35", + template_update_files_request: $template_update_files_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TemplateApi#templateUpdateFiles: {$e->getMessage()}"; +} diff --git a/examples/UnclaimedDraftCreate.php b/examples/UnclaimedDraftCreate.php deleted file mode 100644 index e9d7bee..0000000 --- a/examples/UnclaimedDraftCreate.php +++ /dev/null @@ -1,60 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$unclaimedDraftApi = new Dropbox\Sign\Api\UnclaimedDraftApi($config); - -$signer1 = new Dropbox\Sign\Model\SubUnclaimedDraftSigner(); -$signer1->setEmailAddress("jack@example.com") - ->setName("Jack") - ->setOrder(0); - -$signer2 = new Dropbox\Sign\Model\SubUnclaimedDraftSigner(); -$signer2->setEmailAddress("jill@example.com") - ->setName("Jill") - ->setOrder(1); - -$signingOptions = new Dropbox\Sign\Model\SubSigningOptions(); -$signingOptions->setDraw(true) - ->setType(true) - ->setUpload(true) - ->setPhone(false) - ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW); - -$fieldOptions = new Dropbox\Sign\Model\SubFieldOptions(); -$fieldOptions->setDateFormat(Dropbox\Sign\Model\SubFieldOptions::DATE_FORMAT_DD_MM_YYYY); - -$data = new Dropbox\Sign\Model\UnclaimedDraftCreateRequest(); -$data->setSubject("The NDA we talked about") - ->setType(Dropbox\Sign\Model\UnclaimedDraftCreateRequest::TYPE_REQUEST_SIGNATURE) - ->setMessage("Please sign this NDA and then we can discuss more. Let me know if you have any questions.") - ->setSigners([$signer1, $signer2]) - ->setCcEmailAddresses([ - "lawyer1@dropboxsign.com", - "lawyer2@dropboxsign.com", - ]) - ->setFiles([new SplFileObject(__DIR__ . "/example_signature_request.pdf")]) - ->setMetadata([ - "custom_id" => 1234, - "custom_text" => "NDA #9", - ]) - ->setSigningOptions($signingOptions) - ->setFieldOptions($fieldOptions) - ->setTestMode(true); - -try { - $result = $unclaimedDraftApi->unclaimedDraftCreate($data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/UnclaimedDraftCreateEmbedded.php b/examples/UnclaimedDraftCreateEmbedded.php deleted file mode 100644 index b163ca8..0000000 --- a/examples/UnclaimedDraftCreateEmbedded.php +++ /dev/null @@ -1,28 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$unclaimedDraftApi = new Dropbox\Sign\Api\UnclaimedDraftApi($config); - -$data = new Dropbox\Sign\Model\UnclaimedDraftCreateEmbeddedRequest(); -$data->setClientId("ec64a202072370a737edf4a0eb7f4437") - ->setFiles([new SplFileObject(__DIR__ . "/example_signature_request.pdf")]) - ->setRequesterEmailAddress("jack@dropboxsign.com") - ->setTestMode(true); - -try { - $result = $unclaimedDraftApi->unclaimedDraftCreateEmbedded($data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/UnclaimedDraftCreateEmbeddedExample.php b/examples/UnclaimedDraftCreateEmbeddedExample.php new file mode 100644 index 0000000..4ad74cf --- /dev/null +++ b/examples/UnclaimedDraftCreateEmbeddedExample.php @@ -0,0 +1,29 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$unclaimed_draft_create_embedded_request = (new Dropbox\Sign\Model\UnclaimedDraftCreateEmbeddedRequest()) + ->setClientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a") + ->setRequesterEmailAddress("jack@dropboxsign.com") + ->setTestMode(true) + ->setFiles([ + ]); + +try { + $response = (new Dropbox\Sign\Api\UnclaimedDraftApi(config: $config))->unclaimedDraftCreateEmbedded( + unclaimed_draft_create_embedded_request: $unclaimed_draft_create_embedded_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling UnclaimedDraftApi#unclaimedDraftCreateEmbedded: {$e->getMessage()}"; +} diff --git a/examples/UnclaimedDraftCreateEmbeddedFormFieldGroupsExample.php b/examples/UnclaimedDraftCreateEmbeddedFormFieldGroupsExample.php new file mode 100644 index 0000000..c567199 --- /dev/null +++ b/examples/UnclaimedDraftCreateEmbeddedFormFieldGroupsExample.php @@ -0,0 +1,76 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$form_field_groups_1 = (new Dropbox\Sign\Model\SubFormFieldGroup()) + ->setGroupId("RadioItemGroup1") + ->setGroupLabel("Radio Item Group 1") + ->setRequirement("require_0-1"); + +$form_field_groups = [ + $form_field_groups_1, +]; + +$form_fields_per_document_1 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentRadio()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_1") + ->setType("radio") + ->setRequired(false) + ->setSigner("0") + ->setWidth(18) + ->setHeight(18) + ->setX(112) + ->setY(328) + ->setGroup("RadioItemGroup1") + ->setIsChecked(true) + ->setName("") + ->setPage(1); + +$form_fields_per_document_2 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentRadio()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_2") + ->setType("radio") + ->setRequired(false) + ->setSigner("0") + ->setWidth(18) + ->setHeight(18) + ->setX(112) + ->setY(370) + ->setGroup("RadioItemGroup1") + ->setIsChecked(false) + ->setName("") + ->setPage(1); + +$form_fields_per_document = [ + $form_fields_per_document_1, + $form_fields_per_document_2, +]; + +$unclaimed_draft_create_embedded_request = (new Dropbox\Sign\Model\UnclaimedDraftCreateEmbeddedRequest()) + ->setClientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a") + ->setRequesterEmailAddress("jack@dropboxsign.com") + ->setTestMode(false) + ->setFileUrls([ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ]) + ->setFormFieldGroups($form_field_groups) + ->setFormFieldsPerDocument($form_fields_per_document); + +try { + $response = (new Dropbox\Sign\Api\UnclaimedDraftApi(config: $config))->unclaimedDraftCreateEmbedded( + unclaimed_draft_create_embedded_request: $unclaimed_draft_create_embedded_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling UnclaimedDraftApi#unclaimedDraftCreateEmbedded: {$e->getMessage()}"; +} diff --git a/examples/UnclaimedDraftCreateEmbeddedFormFieldRulesExample.php b/examples/UnclaimedDraftCreateEmbeddedFormFieldRulesExample.php new file mode 100644 index 0000000..49f7d49 --- /dev/null +++ b/examples/UnclaimedDraftCreateEmbeddedFormFieldRulesExample.php @@ -0,0 +1,92 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$form_field_rules_1_triggers_1 = (new Dropbox\Sign\Model\SubFormFieldRuleTrigger()) + ->setId("uniqueIdHere_1") + ->setOperator(Dropbox\Sign\Model\SubFormFieldRuleTrigger::OPERATOR_IS) + ->setValue("foo"); + +$form_field_rules_1_triggers = [ + $form_field_rules_1_triggers_1, +]; + +$form_field_rules_1_actions_1 = (new Dropbox\Sign\Model\SubFormFieldRuleAction()) + ->setHidden(true) + ->setType(Dropbox\Sign\Model\SubFormFieldRuleAction::TYPE_CHANGE_FIELD_VISIBILITY) + ->setFieldId("uniqueIdHere_2"); + +$form_field_rules_1_actions = [ + $form_field_rules_1_actions_1, +]; + +$form_field_rules_1 = (new Dropbox\Sign\Model\SubFormFieldRule()) + ->setId("rule_1") + ->setTriggerOperator("AND") + ->setTriggers($form_field_rules_1_triggers) + ->setActions($form_field_rules_1_actions); + +$form_field_rules = [ + $form_field_rules_1, +]; + +$form_fields_per_document_1 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentText()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_1") + ->setType("text") + ->setRequired(true) + ->setSigner("0") + ->setWidth(100) + ->setHeight(16) + ->setX(112) + ->setY(328) + ->setName("") + ->setPage(1) + ->setValidationType(Dropbox\Sign\Model\SubFormFieldsPerDocumentText::VALIDATION_TYPE_NUMBERS_ONLY); + +$form_fields_per_document_2 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentSignature()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_2") + ->setType("signature") + ->setRequired(true) + ->setSigner("0") + ->setWidth(120) + ->setHeight(30) + ->setX(530) + ->setY(415) + ->setName("") + ->setPage(1); + +$form_fields_per_document = [ + $form_fields_per_document_1, + $form_fields_per_document_2, +]; + +$unclaimed_draft_create_embedded_request = (new Dropbox\Sign\Model\UnclaimedDraftCreateEmbeddedRequest()) + ->setClientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a") + ->setRequesterEmailAddress("jack@dropboxsign.com") + ->setTestMode(false) + ->setFileUrls([ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ]) + ->setFormFieldRules($form_field_rules) + ->setFormFieldsPerDocument($form_fields_per_document); + +try { + $response = (new Dropbox\Sign\Api\UnclaimedDraftApi(config: $config))->unclaimedDraftCreateEmbedded( + unclaimed_draft_create_embedded_request: $unclaimed_draft_create_embedded_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling UnclaimedDraftApi#unclaimedDraftCreateEmbedded: {$e->getMessage()}"; +} diff --git a/examples/UnclaimedDraftCreateEmbeddedFormFieldsPerDocumentExample.php b/examples/UnclaimedDraftCreateEmbeddedFormFieldsPerDocumentExample.php new file mode 100644 index 0000000..249c7ea --- /dev/null +++ b/examples/UnclaimedDraftCreateEmbeddedFormFieldsPerDocumentExample.php @@ -0,0 +1,64 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$form_fields_per_document_1 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentText()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_1") + ->setType("text") + ->setRequired(true) + ->setSigner("1") + ->setWidth(100) + ->setHeight(16) + ->setX(112) + ->setY(328) + ->setName("") + ->setPage(1) + ->setPlaceholder("") + ->setValidationType(Dropbox\Sign\Model\SubFormFieldsPerDocumentText::VALIDATION_TYPE_NUMBERS_ONLY); + +$form_fields_per_document_2 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentSignature()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_2") + ->setType("signature") + ->setRequired(true) + ->setSigner("0") + ->setWidth(120) + ->setHeight(30) + ->setX(530) + ->setY(415) + ->setName("") + ->setPage(1); + +$form_fields_per_document = [ + $form_fields_per_document_1, + $form_fields_per_document_2, +]; + +$unclaimed_draft_create_embedded_request = (new Dropbox\Sign\Model\UnclaimedDraftCreateEmbeddedRequest()) + ->setClientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a") + ->setRequesterEmailAddress("jack@dropboxsign.com") + ->setTestMode(false) + ->setFileUrls([ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ]) + ->setFormFieldsPerDocument($form_fields_per_document); + +try { + $response = (new Dropbox\Sign\Api\UnclaimedDraftApi(config: $config))->unclaimedDraftCreateEmbedded( + unclaimed_draft_create_embedded_request: $unclaimed_draft_create_embedded_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling UnclaimedDraftApi#unclaimedDraftCreateEmbedded: {$e->getMessage()}"; +} diff --git a/examples/UnclaimedDraftCreateEmbeddedWithTemplate.php b/examples/UnclaimedDraftCreateEmbeddedWithTemplate.php deleted file mode 100644 index 7d870ac..0000000 --- a/examples/UnclaimedDraftCreateEmbeddedWithTemplate.php +++ /dev/null @@ -1,39 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$unclaimedDraftApi = new Dropbox\Sign\Api\UnclaimedDraftApi($config); - -$signer1 = new Dropbox\Sign\Model\SubUnclaimedDraftTemplateSigner(); -$signer1->setRole("Client") - ->setName("George") - ->setEmailAddress("george@example.com"); - -$cc1 = new Dropbox\Sign\Model\SubCC(); -$cc1->setRole("Accounting") - ->setEmailAddress("accounting@dropboxsign.com"); - -$data = new Dropbox\Sign\Model\UnclaimedDraftCreateEmbeddedWithTemplateRequest(); -$data->setClientId("ec64a202072370a737edf4a0eb7f4437") - ->setTemplateIds(["61a832ff0d8423f91d503e76bfbcc750f7417c78"]) - ->setRequesterEmailAddress("jack@dropboxsign.com") - ->setSigners([$signer1]) - ->setCcs([$cc1]) - ->setTestMode(true); - -try { - $result = $unclaimedDraftApi->unclaimedDraftCreateEmbeddedWithTemplate($data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/UnclaimedDraftCreateEmbeddedWithTemplateExample.php b/examples/UnclaimedDraftCreateEmbeddedWithTemplateExample.php new file mode 100644 index 0000000..d51e60e --- /dev/null +++ b/examples/UnclaimedDraftCreateEmbeddedWithTemplateExample.php @@ -0,0 +1,49 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$ccs_1 = (new Dropbox\Sign\Model\SubCC()) + ->setRole("Accounting") + ->setEmailAddress("accounting@dropboxsign.com"); + +$ccs = [ + $ccs_1, +]; + +$signers_1 = (new Dropbox\Sign\Model\SubUnclaimedDraftTemplateSigner()) + ->setRole("Client") + ->setName("George") + ->setEmailAddress("george@example.com"); + +$signers = [ + $signers_1, +]; + +$unclaimed_draft_create_embedded_with_template_request = (new Dropbox\Sign\Model\UnclaimedDraftCreateEmbeddedWithTemplateRequest()) + ->setClientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a") + ->setRequesterEmailAddress("jack@dropboxsign.com") + ->setTemplateIds([ + "61a832ff0d8423f91d503e76bfbcc750f7417c78", + ]) + ->setTestMode(false) + ->setCcs($ccs) + ->setSigners($signers); + +try { + $response = (new Dropbox\Sign\Api\UnclaimedDraftApi(config: $config))->unclaimedDraftCreateEmbeddedWithTemplate( + unclaimed_draft_create_embedded_with_template_request: $unclaimed_draft_create_embedded_with_template_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling UnclaimedDraftApi#unclaimedDraftCreateEmbeddedWithTemplate: {$e->getMessage()}"; +} diff --git a/examples/UnclaimedDraftCreateExample.php b/examples/UnclaimedDraftCreateExample.php new file mode 100644 index 0000000..8aa132a --- /dev/null +++ b/examples/UnclaimedDraftCreateExample.php @@ -0,0 +1,38 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$signers_1 = (new Dropbox\Sign\Model\SubUnclaimedDraftSigner()) + ->setName("Jack") + ->setEmailAddress("jack@example.com") + ->setOrder(0); + +$signers = [ + $signers_1, +]; + +$unclaimed_draft_create_request = (new Dropbox\Sign\Model\UnclaimedDraftCreateRequest()) + ->setType(Dropbox\Sign\Model\UnclaimedDraftCreateRequest::TYPE_REQUEST_SIGNATURE) + ->setTestMode(true) + ->setFiles([ + ]) + ->setSigners($signers); + +try { + $response = (new Dropbox\Sign\Api\UnclaimedDraftApi(config: $config))->unclaimedDraftCreate( + unclaimed_draft_create_request: $unclaimed_draft_create_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling UnclaimedDraftApi#unclaimedDraftCreate: {$e->getMessage()}"; +} diff --git a/examples/UnclaimedDraftCreateFormFieldGroupsExample.php b/examples/UnclaimedDraftCreateFormFieldGroupsExample.php new file mode 100644 index 0000000..92ec35b --- /dev/null +++ b/examples/UnclaimedDraftCreateFormFieldGroupsExample.php @@ -0,0 +1,75 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$form_field_groups_1 = (new Dropbox\Sign\Model\SubFormFieldGroup()) + ->setGroupId("RadioItemGroup1") + ->setGroupLabel("Radio Item Group 1") + ->setRequirement("require_0-1"); + +$form_field_groups = [ + $form_field_groups_1, +]; + +$form_fields_per_document_1 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentRadio()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_1") + ->setType("radio") + ->setRequired(false) + ->setSigner("0") + ->setWidth(18) + ->setHeight(18) + ->setX(112) + ->setY(328) + ->setGroup("RadioItemGroup1") + ->setIsChecked(true) + ->setName("") + ->setPage(1); + +$form_fields_per_document_2 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentRadio()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_2") + ->setType("radio") + ->setRequired(false) + ->setSigner("0") + ->setWidth(18) + ->setHeight(18) + ->setX(112) + ->setY(370) + ->setGroup("RadioItemGroup1") + ->setIsChecked(false) + ->setName("") + ->setPage(1); + +$form_fields_per_document = [ + $form_fields_per_document_1, + $form_fields_per_document_2, +]; + +$unclaimed_draft_create_request = (new Dropbox\Sign\Model\UnclaimedDraftCreateRequest()) + ->setType(Dropbox\Sign\Model\UnclaimedDraftCreateRequest::TYPE_REQUEST_SIGNATURE) + ->setTestMode(false) + ->setFileUrls([ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ]) + ->setFormFieldGroups($form_field_groups) + ->setFormFieldsPerDocument($form_fields_per_document); + +try { + $response = (new Dropbox\Sign\Api\UnclaimedDraftApi(config: $config))->unclaimedDraftCreate( + unclaimed_draft_create_request: $unclaimed_draft_create_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling UnclaimedDraftApi#unclaimedDraftCreate: {$e->getMessage()}"; +} diff --git a/examples/UnclaimedDraftCreateFormFieldRulesExample.php b/examples/UnclaimedDraftCreateFormFieldRulesExample.php new file mode 100644 index 0000000..69bdb85 --- /dev/null +++ b/examples/UnclaimedDraftCreateFormFieldRulesExample.php @@ -0,0 +1,91 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$form_field_rules_1_triggers_1 = (new Dropbox\Sign\Model\SubFormFieldRuleTrigger()) + ->setId("uniqueIdHere_1") + ->setOperator(Dropbox\Sign\Model\SubFormFieldRuleTrigger::OPERATOR_IS) + ->setValue("foo"); + +$form_field_rules_1_triggers = [ + $form_field_rules_1_triggers_1, +]; + +$form_field_rules_1_actions_1 = (new Dropbox\Sign\Model\SubFormFieldRuleAction()) + ->setHidden(true) + ->setType(Dropbox\Sign\Model\SubFormFieldRuleAction::TYPE_CHANGE_FIELD_VISIBILITY) + ->setFieldId("uniqueIdHere_2"); + +$form_field_rules_1_actions = [ + $form_field_rules_1_actions_1, +]; + +$form_field_rules_1 = (new Dropbox\Sign\Model\SubFormFieldRule()) + ->setId("rule_1") + ->setTriggerOperator("AND") + ->setTriggers($form_field_rules_1_triggers) + ->setActions($form_field_rules_1_actions); + +$form_field_rules = [ + $form_field_rules_1, +]; + +$form_fields_per_document_1 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentText()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_1") + ->setType("text") + ->setRequired(true) + ->setSigner("0") + ->setWidth(100) + ->setHeight(16) + ->setX(112) + ->setY(328) + ->setName("") + ->setPage(1) + ->setValidationType(Dropbox\Sign\Model\SubFormFieldsPerDocumentText::VALIDATION_TYPE_NUMBERS_ONLY); + +$form_fields_per_document_2 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentSignature()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_2") + ->setType("signature") + ->setRequired(true) + ->setSigner("0") + ->setWidth(120) + ->setHeight(30) + ->setX(530) + ->setY(415) + ->setName("") + ->setPage(1); + +$form_fields_per_document = [ + $form_fields_per_document_1, + $form_fields_per_document_2, +]; + +$unclaimed_draft_create_request = (new Dropbox\Sign\Model\UnclaimedDraftCreateRequest()) + ->setType(Dropbox\Sign\Model\UnclaimedDraftCreateRequest::TYPE_REQUEST_SIGNATURE) + ->setTestMode(false) + ->setFileUrls([ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ]) + ->setFormFieldRules($form_field_rules) + ->setFormFieldsPerDocument($form_fields_per_document); + +try { + $response = (new Dropbox\Sign\Api\UnclaimedDraftApi(config: $config))->unclaimedDraftCreate( + unclaimed_draft_create_request: $unclaimed_draft_create_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling UnclaimedDraftApi#unclaimedDraftCreate: {$e->getMessage()}"; +} diff --git a/examples/UnclaimedDraftCreateFormFieldsPerDocumentExample.php b/examples/UnclaimedDraftCreateFormFieldsPerDocumentExample.php new file mode 100644 index 0000000..93e3b01 --- /dev/null +++ b/examples/UnclaimedDraftCreateFormFieldsPerDocumentExample.php @@ -0,0 +1,63 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$form_fields_per_document_1 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentText()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_1") + ->setType("text") + ->setRequired(true) + ->setSigner("1") + ->setWidth(100) + ->setHeight(16) + ->setX(112) + ->setY(328) + ->setName("") + ->setPage(1) + ->setPlaceholder("") + ->setValidationType(Dropbox\Sign\Model\SubFormFieldsPerDocumentText::VALIDATION_TYPE_NUMBERS_ONLY); + +$form_fields_per_document_2 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentSignature()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_2") + ->setType("signature") + ->setRequired(true) + ->setSigner("0") + ->setWidth(120) + ->setHeight(30) + ->setX(530) + ->setY(415) + ->setName("") + ->setPage(1); + +$form_fields_per_document = [ + $form_fields_per_document_1, + $form_fields_per_document_2, +]; + +$unclaimed_draft_create_request = (new Dropbox\Sign\Model\UnclaimedDraftCreateRequest()) + ->setType(Dropbox\Sign\Model\UnclaimedDraftCreateRequest::TYPE_REQUEST_SIGNATURE) + ->setTestMode(false) + ->setFileUrls([ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ]) + ->setFormFieldsPerDocument($form_fields_per_document); + +try { + $response = (new Dropbox\Sign\Api\UnclaimedDraftApi(config: $config))->unclaimedDraftCreate( + unclaimed_draft_create_request: $unclaimed_draft_create_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling UnclaimedDraftApi#unclaimedDraftCreate: {$e->getMessage()}"; +} diff --git a/examples/UnclaimedDraftEditAndResend.php b/examples/UnclaimedDraftEditAndResend.php deleted file mode 100644 index 5f985d8..0000000 --- a/examples/UnclaimedDraftEditAndResend.php +++ /dev/null @@ -1,28 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$unclaimedDraftApi = new Dropbox\Sign\Api\UnclaimedDraftApi($config); - -$data = new Dropbox\Sign\Model\UnclaimedDraftEditAndResendRequest(); -$data->setClientId("ec64a202072370a737edf4a0eb7f4437") - ->setTestMode(true); - -$signatureRequestId = "2f9781e1a83jdja934d808c153c2e1d3df6f8f2f"; - -try { - $result = $unclaimedDraftApi->unclaimedDraftEditAndResend($signatureRequestId, $data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/UnclaimedDraftEditAndResendExample.php b/examples/UnclaimedDraftEditAndResendExample.php new file mode 100644 index 0000000..f82ea49 --- /dev/null +++ b/examples/UnclaimedDraftEditAndResendExample.php @@ -0,0 +1,27 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$unclaimed_draft_edit_and_resend_request = (new Dropbox\Sign\Model\UnclaimedDraftEditAndResendRequest()) + ->setClientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a") + ->setTestMode(false); + +try { + $response = (new Dropbox\Sign\Api\UnclaimedDraftApi(config: $config))->unclaimedDraftEditAndResend( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + unclaimed_draft_edit_and_resend_request: $unclaimed_draft_edit_and_resend_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling UnclaimedDraftApi#unclaimedDraftEditAndResend: {$e->getMessage()}"; +} diff --git a/openapi-config.yaml b/openapi-config.yaml index a430249..5227ee1 100644 --- a/openapi-config.yaml +++ b/openapi-config.yaml @@ -1,8 +1,8 @@ generatorName: php additionalProperties: packageName: dropbox/sign - packageVersion: "^1.8.0" - artifactVersion: 1.8.0 + packageVersion: "^1.9.0" + artifactVersion: 1.9.0 invokerPackage: "Dropbox\\Sign" sortModelPropertiesByRequiredFlag: true srcBasePath: src @@ -15,6 +15,12 @@ additionalProperties: developerOrganizationEmail: "apisupport@hellosign.com" useCustomTemplateCode: true licenseCopyrightYear: 2024 + oseg.composerPackageName: dropbox/sign-sandbox + oseg.namespace: Dropbox\SignSandbox + oseg.autoloadLocation: "__DIR__ . '/../vendor/autoload.php'" + oseg.ignoreOptionalUnset: true + oseg.security.api_key.username: YOUR_API_KEY + oseg.security.oauth2.access_token: YOUR_ACCESS_TOKEN files: dropbox-EventCallbackHelper.mustache: templateType: SupportingFiles diff --git a/openapi-sdk.yaml b/openapi-sdk.yaml index 608b57d..2a95555 100644 --- a/openapi-sdk.yaml +++ b/openapi-sdk.yaml @@ -27,12 +27,12 @@ paths: schema: $ref: '#/components/schemas/AccountCreateRequest' examples: - default_example: - $ref: '#/components/examples/AccountCreateRequestDefaultExample' - oauth: - $ref: '#/components/examples/AccountCreateRequestOAuthExample' + example: + $ref: '#/components/examples/AccountCreateRequest' + oauth_example: + $ref: '#/components/examples/AccountCreateRequestOAuth' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -46,11 +46,11 @@ paths: schema: $ref: '#/components/schemas/AccountCreateResponse' examples: - default_example: - $ref: '#/components/examples/AccountCreateResponseExample' - oauth: - $ref: '#/components/examples/AccountCreateOAuthResponseExample' - 4XX: + example: + $ref: '#/components/examples/AccountCreateResponse' + oauth_example: + $ref: '#/components/examples/AccountCreateOAuthResponse' + '4XX': description: failed_operation content: application/json: @@ -58,15 +58,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -78,42 +78,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/AccountCreate.php + $ref: examples/AccountCreateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/AccountCreate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/AccountCreate.js + $ref: examples/AccountCreateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/AccountCreate.ts + $ref: examples/AccountCreateExample.ts - lang: Java label: Java source: - $ref: examples/AccountCreate.java + $ref: examples/AccountCreateExample.java - lang: Ruby label: Ruby source: - $ref: examples/AccountCreate.rb + $ref: examples/AccountCreateExample.rb - lang: Python label: Python source: - $ref: examples/AccountCreate.py + $ref: examples/AccountCreateExample.py - lang: cURL label: cURL source: - $ref: examples/AccountCreate.sh + $ref: examples/AccountCreateExample.sh x-meta: seo: title: 'Create Account | API Documentation | Dropbox Sign for Developers' @@ -147,7 +142,7 @@ paths: schema: type: string responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -161,9 +156,9 @@ paths: schema: $ref: '#/components/schemas/AccountGetResponse' examples: - default_example: - $ref: '#/components/examples/AccountGetResponseExample' - 4XX: + example: + $ref: '#/components/examples/AccountGetResponse' + '4XX': description: failed_operation content: application/json: @@ -171,15 +166,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -192,42 +187,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/AccountGet.php + $ref: examples/AccountGetExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/AccountGet.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/AccountGet.js + $ref: examples/AccountGetExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/AccountGet.ts + $ref: examples/AccountGetExample.ts - lang: Java label: Java source: - $ref: examples/AccountGet.java + $ref: examples/AccountGetExample.java - lang: Ruby label: Ruby source: - $ref: examples/AccountGet.rb + $ref: examples/AccountGetExample.rb - lang: Python label: Python source: - $ref: examples/AccountGet.py + $ref: examples/AccountGetExample.py - lang: cURL label: cURL source: - $ref: examples/AccountGet.sh + $ref: examples/AccountGetExample.sh x-meta: seo: title: 'Get Account | API Documentation | Dropbox Sign for Developers' @@ -245,10 +235,10 @@ paths: schema: $ref: '#/components/schemas/AccountUpdateRequest' examples: - default_example: - $ref: '#/components/examples/AccountUpdateRequestDefaultExample' + example: + $ref: '#/components/examples/AccountUpdateRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -262,9 +252,9 @@ paths: schema: $ref: '#/components/schemas/AccountGetResponse' examples: - default_example: - $ref: '#/components/examples/AccountUpdateResponseExample' - 4XX: + example: + $ref: '#/components/examples/AccountUpdateResponse' + '4XX': description: failed_operation content: application/json: @@ -272,17 +262,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -294,42 +284,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/AccountUpdate.php + $ref: examples/AccountUpdateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/AccountUpdate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/AccountUpdate.js + $ref: examples/AccountUpdateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/AccountUpdate.ts + $ref: examples/AccountUpdateExample.ts - lang: Java label: Java source: - $ref: examples/AccountUpdate.java + $ref: examples/AccountUpdateExample.java - lang: Ruby label: Ruby source: - $ref: examples/AccountUpdate.rb + $ref: examples/AccountUpdateExample.rb - lang: Python label: Python source: - $ref: examples/AccountUpdate.py + $ref: examples/AccountUpdateExample.py - lang: cURL label: cURL source: - $ref: examples/AccountUpdate.sh + $ref: examples/AccountUpdateExample.sh x-meta: seo: title: 'Update Account | API Documentation | Dropbox Sign for Developers' @@ -348,10 +333,10 @@ paths: schema: $ref: '#/components/schemas/AccountVerifyRequest' examples: - default_example: - $ref: '#/components/examples/AccountVerifyRequestDefaultExample' + example: + $ref: '#/components/examples/AccountVerifyRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -365,11 +350,11 @@ paths: schema: $ref: '#/components/schemas/AccountVerifyResponse' examples: - default_example: - $ref: '#/components/examples/AccountVerifyFoundResponseExample' - not_found: - $ref: '#/components/examples/AccountVerifyNotFoundResponseExample' - 4XX: + example: + $ref: '#/components/examples/AccountVerifyFoundResponse' + not_found_example: + $ref: '#/components/examples/AccountVerifyNotFoundResponse' + '4XX': description: failed_operation content: application/json: @@ -377,15 +362,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -397,42 +382,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/AccountVerify.php + $ref: examples/AccountVerifyExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/AccountVerify.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/AccountVerify.js + $ref: examples/AccountVerifyExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/AccountVerify.ts + $ref: examples/AccountVerifyExample.ts - lang: Java label: Java source: - $ref: examples/AccountVerify.java + $ref: examples/AccountVerifyExample.java - lang: Ruby label: Ruby source: - $ref: examples/AccountVerify.rb + $ref: examples/AccountVerifyExample.rb - lang: Python label: Python source: - $ref: examples/AccountVerify.py + $ref: examples/AccountVerifyExample.py - lang: cURL label: cURL source: - $ref: examples/AccountVerify.sh + $ref: examples/AccountVerifyExample.sh x-meta: seo: title: 'Verify Account | API Documentation | Dropbox Sign for Developers' @@ -451,13 +431,13 @@ paths: schema: $ref: '#/components/schemas/ApiAppCreateRequest' examples: - default_example: - $ref: '#/components/examples/ApiAppCreateRequestDefaultExample' + example: + $ref: '#/components/examples/ApiAppCreateRequest' multipart/form-data: schema: $ref: '#/components/schemas/ApiAppCreateRequest' responses: - 201: + '201': description: 'successful operation' headers: X-RateLimit-Limit: @@ -471,9 +451,9 @@ paths: schema: $ref: '#/components/schemas/ApiAppGetResponse' examples: - default_example: - $ref: '#/components/examples/ApiAppCreateResponseExample' - 4XX: + example: + $ref: '#/components/examples/ApiAppCreateResponse' + '4XX': description: failed_operation content: application/json: @@ -481,17 +461,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -503,42 +483,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/ApiAppCreate.php + $ref: examples/ApiAppCreateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/ApiAppCreate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/ApiAppCreate.js + $ref: examples/ApiAppCreateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/ApiAppCreate.ts + $ref: examples/ApiAppCreateExample.ts - lang: Java label: Java source: - $ref: examples/ApiAppCreate.java + $ref: examples/ApiAppCreateExample.java - lang: Ruby label: Ruby source: - $ref: examples/ApiAppCreate.rb + $ref: examples/ApiAppCreateExample.rb - lang: Python label: Python source: - $ref: examples/ApiAppCreate.py + $ref: examples/ApiAppCreateExample.py - lang: cURL label: cURL source: - $ref: examples/ApiAppCreate.sh + $ref: examples/ApiAppCreateExample.sh x-meta: seo: title: 'Create API App | API Documentation | Dropbox Sign for Developers' @@ -560,7 +535,7 @@ paths: type: string example: 0dd3b823a682527788c4e40cb7b6f7e9 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -574,9 +549,9 @@ paths: schema: $ref: '#/components/schemas/ApiAppGetResponse' examples: - default_example: - $ref: '#/components/examples/ApiAppGetResponseExample' - 4XX: + example: + $ref: '#/components/examples/ApiAppGetResponse' + '4XX': description: failed_operation content: application/json: @@ -584,19 +559,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -608,42 +583,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/ApiAppGet.php + $ref: examples/ApiAppGetExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/ApiAppGet.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/ApiAppGet.js + $ref: examples/ApiAppGetExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/ApiAppGet.ts + $ref: examples/ApiAppGetExample.ts - lang: Java label: Java source: - $ref: examples/ApiAppGet.java + $ref: examples/ApiAppGetExample.java - lang: Ruby label: Ruby source: - $ref: examples/ApiAppGet.rb + $ref: examples/ApiAppGetExample.rb - lang: Python label: Python source: - $ref: examples/ApiAppGet.py + $ref: examples/ApiAppGetExample.py - lang: cURL label: cURL source: - $ref: examples/ApiAppGet.sh + $ref: examples/ApiAppGetExample.sh x-meta: seo: title: 'Get API App | API Documentation | Dropbox Sign for Developers' @@ -670,13 +640,13 @@ paths: schema: $ref: '#/components/schemas/ApiAppUpdateRequest' examples: - default_example: - $ref: '#/components/examples/ApiAppUpdateRequestDefaultExample' + example: + $ref: '#/components/examples/ApiAppUpdateRequest' multipart/form-data: schema: $ref: '#/components/schemas/ApiAppUpdateRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -690,9 +660,9 @@ paths: schema: $ref: '#/components/schemas/ApiAppGetResponse' examples: - default_example: - $ref: '#/components/examples/ApiAppUpdateResponseExample' - 4XX: + example: + $ref: '#/components/examples/ApiAppUpdateResponse' + '4XX': description: failed_operation content: application/json: @@ -700,19 +670,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -724,42 +694,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/ApiAppUpdate.php + $ref: examples/ApiAppUpdateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/ApiAppUpdate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/ApiAppUpdate.js + $ref: examples/ApiAppUpdateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/ApiAppUpdate.ts + $ref: examples/ApiAppUpdateExample.ts - lang: Java label: Java source: - $ref: examples/ApiAppUpdate.java + $ref: examples/ApiAppUpdateExample.java - lang: Ruby label: Ruby source: - $ref: examples/ApiAppUpdate.rb + $ref: examples/ApiAppUpdateExample.rb - lang: Python label: Python source: - $ref: examples/ApiAppUpdate.py + $ref: examples/ApiAppUpdateExample.py - lang: cURL label: cURL source: - $ref: examples/ApiAppUpdate.sh + $ref: examples/ApiAppUpdateExample.sh x-meta: seo: title: 'Update API App | API Documentation | Dropbox Sign for Developers' @@ -780,7 +745,7 @@ paths: type: string example: 0dd3b823a682527788c4e40cb7b6f7e9 responses: - 204: + '204': description: 'successful operation' headers: X-RateLimit-Limit: @@ -789,7 +754,7 @@ paths: $ref: '#/components/headers/X-RateLimit-Remaining' X-Ratelimit-Reset: $ref: '#/components/headers/X-Ratelimit-Reset' - 4XX: + '4XX': description: failed_operation content: application/json: @@ -797,17 +762,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -819,42 +784,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/ApiAppDelete.php + $ref: examples/ApiAppDeleteExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/ApiAppDelete.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/ApiAppDelete.js + $ref: examples/ApiAppDeleteExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/ApiAppDelete.ts + $ref: examples/ApiAppDeleteExample.ts - lang: Java label: Java source: - $ref: examples/ApiAppDelete.java + $ref: examples/ApiAppDeleteExample.java - lang: Ruby label: Ruby source: - $ref: examples/ApiAppDelete.rb + $ref: examples/ApiAppDeleteExample.rb - lang: Python label: Python source: - $ref: examples/ApiAppDelete.py + $ref: examples/ApiAppDeleteExample.py - lang: cURL label: cURL source: - $ref: examples/ApiAppDelete.sh + $ref: examples/ApiAppDeleteExample.sh x-meta: seo: title: 'Delete API App | API Documentation | Dropbox Sign for Developers' @@ -882,7 +842,7 @@ paths: type: integer default: 20 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -896,9 +856,9 @@ paths: schema: $ref: '#/components/schemas/ApiAppListResponse' examples: - default_example: - $ref: '#/components/examples/ApiAppListResponseExample' - 4XX: + example: + $ref: '#/components/examples/ApiAppListResponse' + '4XX': description: failed_operation content: application/json: @@ -906,15 +866,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -926,42 +886,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/ApiAppList.php + $ref: examples/ApiAppListExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/ApiAppList.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/ApiAppList.js + $ref: examples/ApiAppListExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/ApiAppList.ts + $ref: examples/ApiAppListExample.ts - lang: Java label: Java source: - $ref: examples/ApiAppList.java + $ref: examples/ApiAppListExample.java - lang: Ruby label: Ruby source: - $ref: examples/ApiAppList.rb + $ref: examples/ApiAppListExample.rb - lang: Python label: Python source: - $ref: examples/ApiAppList.py + $ref: examples/ApiAppListExample.py - lang: cURL label: cURL source: - $ref: examples/ApiAppList.sh + $ref: examples/ApiAppListExample.sh x-meta: seo: title: 'List API Apps | API Documentation | Dropbox Sign for Developers' @@ -997,7 +952,7 @@ paths: type: integer default: 20 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -1011,9 +966,9 @@ paths: schema: $ref: '#/components/schemas/BulkSendJobGetResponse' examples: - default_example: - $ref: '#/components/examples/BulkSendJobGetResponseExample' - 4XX: + example: + $ref: '#/components/examples/BulkSendJobGetResponse' + '4XX': description: failed_operation content: application/json: @@ -1021,15 +976,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -1042,42 +997,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/BulkSendJobGet.php + $ref: examples/BulkSendJobGetExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/BulkSendJobGet.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/BulkSendJobGet.js + $ref: examples/BulkSendJobGetExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/BulkSendJobGet.ts + $ref: examples/BulkSendJobGetExample.ts - lang: Java label: Java source: - $ref: examples/BulkSendJobGet.java + $ref: examples/BulkSendJobGetExample.java - lang: Ruby label: Ruby source: - $ref: examples/BulkSendJobGet.rb + $ref: examples/BulkSendJobGetExample.rb - lang: Python label: Python source: - $ref: examples/BulkSendJobGet.py + $ref: examples/BulkSendJobGetExample.py - lang: cURL label: cURL source: - $ref: examples/BulkSendJobGet.sh + $ref: examples/BulkSendJobGetExample.sh x-meta: seo: title: 'Get Bulk Send Job | API Documentation | Dropbox Sign for Developers' @@ -1105,7 +1055,7 @@ paths: type: integer default: 20 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -1119,9 +1069,9 @@ paths: schema: $ref: '#/components/schemas/BulkSendJobListResponse' examples: - default_example: - $ref: '#/components/examples/BulkSendJobListResponseExample' - 4XX: + example: + $ref: '#/components/examples/BulkSendJobListResponse' + '4XX': description: failed_operation content: application/json: @@ -1129,15 +1079,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -1150,42 +1100,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/BulkSendJobList.php + $ref: examples/BulkSendJobListExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/BulkSendJobList.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/BulkSendJobList.js + $ref: examples/BulkSendJobListExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/BulkSendJobList.ts + $ref: examples/BulkSendJobListExample.ts - lang: Java label: Java source: - $ref: examples/BulkSendJobList.java + $ref: examples/BulkSendJobListExample.java - lang: Ruby label: Ruby source: - $ref: examples/BulkSendJobList.rb + $ref: examples/BulkSendJobListExample.rb - lang: Python label: Python source: - $ref: examples/BulkSendJobList.py + $ref: examples/BulkSendJobListExample.py - lang: cURL label: cURL source: - $ref: examples/BulkSendJobList.sh + $ref: examples/BulkSendJobListExample.sh x-meta: seo: title: 'List Bulk Send Jobs | Documentation | Dropbox Sign for Developers' @@ -1213,10 +1158,10 @@ paths: schema: $ref: '#/components/schemas/EmbeddedEditUrlRequest' examples: - default_example: - $ref: '#/components/examples/EmbeddedEditUrlRequestDefaultExample' + example: + $ref: '#/components/examples/EmbeddedEditUrlRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -1230,9 +1175,9 @@ paths: schema: $ref: '#/components/schemas/EmbeddedEditUrlResponse' examples: - default_example: - $ref: '#/components/examples/EmbeddedEditUrlResponseExample' - 4XX: + example: + $ref: '#/components/examples/EmbeddedEditUrlResponse' + '4XX': description: failed_operation content: application/json: @@ -1240,17 +1185,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -1262,42 +1207,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/EmbeddedEditUrl.php + $ref: examples/EmbeddedEditUrlExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/EmbeddedEditUrl.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/EmbeddedEditUrl.js + $ref: examples/EmbeddedEditUrlExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/EmbeddedEditUrl.ts + $ref: examples/EmbeddedEditUrlExample.ts - lang: Java label: Java source: - $ref: examples/EmbeddedEditUrl.java + $ref: examples/EmbeddedEditUrlExample.java - lang: Ruby label: Ruby source: - $ref: examples/EmbeddedEditUrl.rb + $ref: examples/EmbeddedEditUrlExample.rb - lang: Python label: Python source: - $ref: examples/EmbeddedEditUrl.py + $ref: examples/EmbeddedEditUrlExample.py - lang: cURL label: cURL source: - $ref: examples/EmbeddedEditUrl.sh + $ref: examples/EmbeddedEditUrlExample.sh x-meta: seo: title: 'Get Embedded Template URL | iFrame | Dropbox Sign for Developers' @@ -1319,7 +1259,7 @@ paths: type: string example: 50e3542f738adfa7ddd4cbd4c00d2a8ab6e4194b responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -1333,9 +1273,9 @@ paths: schema: $ref: '#/components/schemas/EmbeddedSignUrlResponse' examples: - default_example: - $ref: '#/components/examples/EmbeddedSignUrlResponseExample' - 4XX: + example: + $ref: '#/components/examples/EmbeddedSignUrlResponse' + '4XX': description: failed_operation content: application/json: @@ -1343,21 +1283,21 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -1369,42 +1309,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/EmbeddedSignUrl.php + $ref: examples/EmbeddedSignUrlExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/EmbeddedSignUrl.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/EmbeddedSignUrl.js + $ref: examples/EmbeddedSignUrlExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/EmbeddedSignUrl.ts + $ref: examples/EmbeddedSignUrlExample.ts - lang: Java label: Java source: - $ref: examples/EmbeddedSignUrl.java + $ref: examples/EmbeddedSignUrlExample.java - lang: Ruby label: Ruby source: - $ref: examples/EmbeddedSignUrl.rb + $ref: examples/EmbeddedSignUrlExample.rb - lang: Python label: Python source: - $ref: examples/EmbeddedSignUrl.py + $ref: examples/EmbeddedSignUrlExample.py - lang: cURL label: cURL source: - $ref: examples/EmbeddedSignUrl.sh + $ref: examples/EmbeddedSignUrlExample.sh x-meta: seo: title: 'Get Embedded Sign URL | iFrame | Dropbox Sign for Developers' @@ -1414,7 +1349,7 @@ paths: tags: - Fax summary: 'Get Fax' - description: 'Returns information about fax' + description: 'Returns information about a Fax' operationId: faxGet parameters: - @@ -1426,7 +1361,7 @@ paths: type: string example: fa5c8a0b0f492d768749333ad6fcc214c111e967 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -1440,9 +1375,9 @@ paths: schema: $ref: '#/components/schemas/FaxGetResponse' examples: - default_example: - $ref: '#/components/examples/FaxGetResponseExample' - 4XX: + example: + $ref: '#/components/examples/FaxGetResponse' + '4XX': description: failed_operation content: application/json: @@ -1450,19 +1385,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -1471,51 +1406,46 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxGet.php + $ref: examples/FaxGetExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxGet.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/FaxGet.js + $ref: examples/FaxGetExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/FaxGet.ts + $ref: examples/FaxGetExample.ts - lang: Java label: Java source: - $ref: examples/FaxGet.java + $ref: examples/FaxGetExample.java - lang: Ruby label: Ruby source: - $ref: examples/FaxGet.rb + $ref: examples/FaxGetExample.rb - lang: Python label: Python source: - $ref: examples/FaxGet.py + $ref: examples/FaxGetExample.py - lang: cURL label: cURL source: - $ref: examples/FaxGet.sh + $ref: examples/FaxGetExample.sh x-meta: seo: title: 'Get Fax | API Documentation | Dropbox Fax for Developers' - description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to retrieve a fax, click here.' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to retrieve properties of a fax, click here.' delete: tags: - Fax summary: 'Delete Fax' - description: 'Deletes the specified Fax from the system.' + description: 'Deletes the specified Fax from the system' operationId: faxDelete parameters: - @@ -1527,7 +1457,7 @@ paths: type: string example: fa5c8a0b0f492d768749333ad6fcc214c111e967 responses: - 204: + '204': description: 'successful operation' headers: X-RateLimit-Limit: @@ -1536,7 +1466,7 @@ paths: $ref: '#/components/headers/X-RateLimit-Remaining' X-Ratelimit-Reset: $ref: '#/components/headers/X-Ratelimit-Reset' - 4XX: + '4XX': description: failed_operation content: application/json: @@ -1544,19 +1474,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -1565,42 +1495,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxDelete.php + $ref: examples/FaxDeleteExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxDelete.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/FaxDelete.js + $ref: examples/FaxDeleteExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/FaxDelete.ts + $ref: examples/FaxDeleteExample.ts - lang: Java label: Java source: - $ref: examples/FaxDelete.java + $ref: examples/FaxDeleteExample.java - lang: Ruby label: Ruby source: - $ref: examples/FaxDelete.rb + $ref: examples/FaxDeleteExample.rb - lang: Python label: Python source: - $ref: examples/FaxDelete.py + $ref: examples/FaxDeleteExample.py - lang: cURL label: cURL source: - $ref: examples/FaxDelete.sh + $ref: examples/FaxDeleteExample.sh x-meta: seo: title: 'Delete Fax | API Documentation | Dropbox Fax for Developers' @@ -1609,8 +1534,8 @@ paths: get: tags: - Fax - summary: 'List Fax Files' - description: 'Returns list of fax files' + summary: 'Download Fax Files' + description: 'Downloads files associated with a Fax' operationId: faxFiles parameters: - @@ -1622,7 +1547,7 @@ paths: type: string example: fa5c8a0b0f492d768749333ad6fcc214c111e967 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -1636,7 +1561,7 @@ paths: schema: type: string format: binary - 4XX: + '4XX': description: failed_operation content: application/json: @@ -1644,21 +1569,21 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 410_example: - $ref: '#/components/examples/Error410ResponseExample' + $ref: '#/components/examples/Error410Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -1667,46 +1592,41 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxFiles.php + $ref: examples/FaxFilesExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxFiles.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/FaxFiles.js + $ref: examples/FaxFilesExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/FaxFiles.ts + $ref: examples/FaxFilesExample.ts - lang: Java label: Java source: - $ref: examples/FaxFiles.java + $ref: examples/FaxFilesExample.java - lang: Ruby label: Ruby source: - $ref: examples/FaxFiles.rb + $ref: examples/FaxFilesExample.rb - lang: Python label: Python source: - $ref: examples/FaxFiles.py + $ref: examples/FaxFilesExample.py - lang: cURL label: cURL source: - $ref: examples/FaxFiles.sh + $ref: examples/FaxFilesExample.sh x-meta: seo: title: 'Fax Files | API Documentation | Dropbox Fax for Developers' - description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to list fax files, click here.' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to list the files of a fax, click here.' /fax_line/add_user: put: tags: @@ -1721,10 +1641,10 @@ paths: schema: $ref: '#/components/schemas/FaxLineAddUserRequest' examples: - default_example: - $ref: '#/components/examples/FaxLineAddUserRequestExample' + example: + $ref: '#/components/examples/FaxLineAddUserRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -1738,9 +1658,9 @@ paths: schema: $ref: '#/components/schemas/FaxLineResponse' examples: - default_example: - $ref: '#/components/examples/FaxLineResponseExample' - 4XX: + example: + $ref: '#/components/examples/FaxLineResponse' + '4XX': description: failed_operation content: application/json: @@ -1748,17 +1668,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -1767,42 +1687,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxLineAddUser.php + $ref: examples/FaxLineAddUserExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxLineAddUser.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/FaxLineAddUser.js + $ref: examples/FaxLineAddUserExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/FaxLineAddUser.ts + $ref: examples/FaxLineAddUserExample.ts - lang: Java label: Java source: - $ref: examples/FaxLineAddUser.java + $ref: examples/FaxLineAddUserExample.java - lang: Ruby label: Ruby source: - $ref: examples/FaxLineAddUser.rb + $ref: examples/FaxLineAddUserExample.rb - lang: Python label: Python source: - $ref: examples/FaxLineAddUser.py + $ref: examples/FaxLineAddUserExample.py - lang: cURL label: cURL source: - $ref: examples/FaxLineAddUser.sh + $ref: examples/FaxLineAddUserExample.sh x-meta: seo: title: 'Fax Line Add User | API Documentation | Dropbox Fax for Developers' @@ -1812,13 +1727,13 @@ paths: tags: - 'Fax Line' summary: 'Get Available Fax Line Area Codes' - description: 'Returns a response with the area codes available for a given state/provice and city.' + description: 'Returns a list of available area codes for a given state/province and city' operationId: faxLineAreaCodeGet parameters: - name: country in: query - description: 'Filter area codes by country.' + description: 'Filter area codes by country' required: true schema: type: string @@ -1826,10 +1741,11 @@ paths: - CA - US - UK + example: US - name: state in: query - description: 'Filter area codes by state.' + description: 'Filter area codes by state' schema: type: string enum: @@ -1887,7 +1803,7 @@ paths: - name: province in: query - description: 'Filter area codes by province.' + description: 'Filter area codes by province' schema: type: string enum: @@ -1907,11 +1823,11 @@ paths: - name: city in: query - description: 'Filter area codes by city.' + description: 'Filter area codes by city' schema: type: string responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -1925,9 +1841,9 @@ paths: schema: $ref: '#/components/schemas/FaxLineAreaCodeGetResponse' examples: - default_example: - $ref: '#/components/examples/FaxLineAreaCodeGetResponseExample' - 4XX: + example: + $ref: '#/components/examples/FaxLineAreaCodeGetResponse' + '4XX': description: failed_operation content: application/json: @@ -1935,15 +1851,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -1952,52 +1868,47 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxLineAreaCodeGet.php + $ref: examples/FaxLineAreaCodeGetExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxLineAreaCodeGet.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/FaxLineAreaCodeGet.js + $ref: examples/FaxLineAreaCodeGetExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/FaxLineAreaCodeGet.ts + $ref: examples/FaxLineAreaCodeGetExample.ts - lang: Java label: Java source: - $ref: examples/FaxLineAreaCodeGet.java + $ref: examples/FaxLineAreaCodeGetExample.java - lang: Ruby label: Ruby source: - $ref: examples/FaxLineAreaCodeGet.rb + $ref: examples/FaxLineAreaCodeGetExample.rb - lang: Python label: Python source: - $ref: examples/FaxLineAreaCodeGet.py + $ref: examples/FaxLineAreaCodeGetExample.py - lang: cURL label: cURL source: - $ref: examples/FaxLineAreaCodeGet.sh + $ref: examples/FaxLineAreaCodeGetExample.sh x-meta: seo: title: 'Fax Line Get Area Codes | API Documentation | Dropbox Fax for Developers' - description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to purchase a new fax line, click here.' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out what area codes are available, click here.' /fax_line/create: post: tags: - 'Fax Line' summary: 'Purchase Fax Line' - description: 'Purchases a new Fax Line.' + description: 'Purchases a new Fax Line' operationId: faxLineCreate requestBody: required: true @@ -2006,10 +1917,10 @@ paths: schema: $ref: '#/components/schemas/FaxLineCreateRequest' examples: - default_example: - $ref: '#/components/examples/FaxLineCreateRequestExample' + example: + $ref: '#/components/examples/FaxLineCreateRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -2023,9 +1934,9 @@ paths: schema: $ref: '#/components/schemas/FaxLineResponse' examples: - default_example: - $ref: '#/components/examples/FaxLineResponseExample' - 4XX: + example: + $ref: '#/components/examples/FaxLineResponse' + '4XX': description: failed_operation content: application/json: @@ -2033,17 +1944,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -2052,42 +1963,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxLineCreate.php + $ref: examples/FaxLineCreateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxLineCreate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/FaxLineCreate.js + $ref: examples/FaxLineCreateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/FaxLineCreate.ts + $ref: examples/FaxLineCreateExample.ts - lang: Java label: Java source: - $ref: examples/FaxLineCreate.java + $ref: examples/FaxLineCreateExample.java - lang: Ruby label: Ruby source: - $ref: examples/FaxLineCreate.rb + $ref: examples/FaxLineCreateExample.rb - lang: Python label: Python source: - $ref: examples/FaxLineCreate.py + $ref: examples/FaxLineCreateExample.py - lang: cURL label: cURL source: - $ref: examples/FaxLineCreate.sh + $ref: examples/FaxLineCreateExample.sh x-meta: seo: title: 'Purchase Fax Line | API Documentation | Dropbox Fax for Developers' @@ -2103,12 +2009,13 @@ paths: - name: number in: query - description: 'The Fax Line number.' + description: 'The Fax Line number' required: true schema: type: string + example: 123-123-1234 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -2122,9 +2029,9 @@ paths: schema: $ref: '#/components/schemas/FaxLineResponse' examples: - default_example: - $ref: '#/components/examples/FaxLineResponseExample' - 4XX: + example: + $ref: '#/components/examples/FaxLineResponse' + '4XX': description: failed_operation content: application/json: @@ -2132,17 +2039,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -2151,46 +2058,41 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxLineGet.php + $ref: examples/FaxLineGetExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxLineGet.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/FaxLineGet.js + $ref: examples/FaxLineGetExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/FaxLineGet.ts + $ref: examples/FaxLineGetExample.ts - lang: Java label: Java source: - $ref: examples/FaxLineGet.java + $ref: examples/FaxLineGetExample.java - lang: Ruby label: Ruby source: - $ref: examples/FaxLineGet.rb + $ref: examples/FaxLineGetExample.rb - lang: Python label: Python source: - $ref: examples/FaxLineGet.py + $ref: examples/FaxLineGetExample.py - lang: cURL label: cURL source: - $ref: examples/FaxLineGet.sh + $ref: examples/FaxLineGetExample.sh x-meta: seo: title: 'Get Fax Line | API Documentation | Dropbox Fax for Developers' - description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to retrieve a fax line, click here.' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to retrieve the properties of a fax line, click here.' delete: tags: - 'Fax Line' @@ -2204,10 +2106,10 @@ paths: schema: $ref: '#/components/schemas/FaxLineDeleteRequest' examples: - default_example: - $ref: '#/components/examples/FaxLineDeleteRequestExample' + example: + $ref: '#/components/examples/FaxLineDeleteRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -2218,7 +2120,7 @@ paths: $ref: '#/components/headers/X-Ratelimit-Reset' content: application/json: {} - 4XX: + '4XX': description: failed_operation content: application/json: @@ -2226,17 +2128,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -2245,42 +2147,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxLineDelete.php + $ref: examples/FaxLineDeleteExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxLineDelete.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/FaxLineDelete.js + $ref: examples/FaxLineDeleteExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/FaxLineDelete.ts + $ref: examples/FaxLineDeleteExample.ts - lang: Java label: Java source: - $ref: examples/FaxLineDelete.java + $ref: examples/FaxLineDeleteExample.java - lang: Ruby label: Ruby source: - $ref: examples/FaxLineDelete.rb + $ref: examples/FaxLineDeleteExample.rb - lang: Python label: Python source: - $ref: examples/FaxLineDelete.py + $ref: examples/FaxLineDeleteExample.py - lang: cURL label: cURL source: - $ref: examples/FaxLineDelete.sh + $ref: examples/FaxLineDeleteExample.sh x-meta: seo: title: 'Delete Fax Line | API Documentation | Dropbox Fax for Developers' @@ -2299,31 +2196,31 @@ paths: description: 'Account ID' schema: type: string - example: ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97 + example: ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97 - name: page in: query - description: Page + description: 'Which page number of the Fax Line List to return. Defaults to `1`.' schema: type: integer default: 1 - example: 1 + example: 1 - name: page_size in: query - description: 'Page size' + description: 'Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.' schema: type: integer default: 20 - example: 20 + example: 20 - name: show_team_lines in: query - description: 'Show team lines' + description: 'Include Fax Lines belonging to team members in the list' schema: type: boolean responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -2337,9 +2234,9 @@ paths: schema: $ref: '#/components/schemas/FaxLineListResponse' examples: - default_example: - $ref: '#/components/examples/FaxLineListResponseExample' - 4XX: + example: + $ref: '#/components/examples/FaxLineListResponse' + '4XX': description: failed_operation content: application/json: @@ -2347,15 +2244,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -2364,42 +2261,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxLineList.php + $ref: examples/FaxLineListExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxLineList.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/FaxLineList.js + $ref: examples/FaxLineListExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/FaxLineList.ts + $ref: examples/FaxLineListExample.ts - lang: Java label: Java source: - $ref: examples/FaxLineList.java + $ref: examples/FaxLineListExample.java - lang: Ruby label: Ruby source: - $ref: examples/FaxLineList.rb + $ref: examples/FaxLineListExample.rb - lang: Python label: Python source: - $ref: examples/FaxLineList.py + $ref: examples/FaxLineListExample.py - lang: cURL label: cURL source: - $ref: examples/FaxLineList.sh + $ref: examples/FaxLineListExample.sh x-meta: seo: title: 'List Fax Lines | API Documentation | Dropbox Fax for Developers' @@ -2409,7 +2301,7 @@ paths: tags: - 'Fax Line' summary: 'Remove Fax Line Access' - description: 'Removes a user''s access to the specified Fax Line.' + description: 'Removes a user''s access to the specified Fax Line' operationId: faxLineRemoveUser requestBody: required: true @@ -2418,10 +2310,10 @@ paths: schema: $ref: '#/components/schemas/FaxLineRemoveUserRequest' examples: - default_example: - $ref: '#/components/examples/FaxLineRemoveUserRequestExample' + example: + $ref: '#/components/examples/FaxLineRemoveUserRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -2435,9 +2327,9 @@ paths: schema: $ref: '#/components/schemas/FaxLineResponse' examples: - default_example: - $ref: '#/components/examples/FaxLineResponseExample' - 4XX: + example: + $ref: '#/components/examples/FaxLineResponse' + '4XX': description: failed_operation content: application/json: @@ -2445,17 +2337,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -2464,42 +2356,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxLineRemoveUser.php + $ref: examples/FaxLineRemoveUserExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxLineRemoveUser.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/FaxLineRemoveUser.js + $ref: examples/FaxLineRemoveUserExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/FaxLineRemoveUser.ts + $ref: examples/FaxLineRemoveUserExample.ts - lang: Java label: Java source: - $ref: examples/FaxLineRemoveUser.java + $ref: examples/FaxLineRemoveUserExample.java - lang: Ruby label: Ruby source: - $ref: examples/FaxLineRemoveUser.rb + $ref: examples/FaxLineRemoveUserExample.rb - lang: Python label: Python source: - $ref: examples/FaxLineRemoveUser.py + $ref: examples/FaxLineRemoveUserExample.py - lang: cURL label: cURL source: - $ref: examples/FaxLineRemoveUser.sh + $ref: examples/FaxLineRemoveUserExample.sh x-meta: seo: title: 'Fax Line Remove User | API Documentation | Dropbox Fax for Developers' @@ -2509,13 +2396,13 @@ paths: tags: - Fax summary: 'Lists Faxes' - description: 'Returns properties of multiple faxes' + description: 'Returns properties of multiple Faxes' operationId: faxList parameters: - name: page in: query - description: Page + description: 'Which page number of the Fax List to return. Defaults to `1`.' schema: type: integer default: 1 @@ -2524,7 +2411,7 @@ paths: - name: page_size in: query - description: 'Page size' + description: 'Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.' schema: type: integer default: 20 @@ -2532,7 +2419,7 @@ paths: minimum: 1 example: 20 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -2546,9 +2433,9 @@ paths: schema: $ref: '#/components/schemas/FaxListResponse' examples: - default_example: - $ref: '#/components/examples/FaxListResponseExample' - 4XX: + example: + $ref: '#/components/examples/FaxListResponse' + '4XX': description: failed_operation content: application/json: @@ -2556,15 +2443,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -2573,42 +2460,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxList.php + $ref: examples/FaxListExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxList.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/FaxList.js + $ref: examples/FaxListExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/FaxList.ts + $ref: examples/FaxListExample.ts - lang: Java label: Java source: - $ref: examples/FaxList.java + $ref: examples/FaxListExample.java - lang: Ruby label: Ruby source: - $ref: examples/FaxList.rb + $ref: examples/FaxListExample.rb - lang: Python label: Python source: - $ref: examples/FaxList.py + $ref: examples/FaxListExample.py - lang: cURL label: cURL source: - $ref: examples/FaxList.sh + $ref: examples/FaxListExample.sh x-meta: seo: title: 'List Faxes | API Documentation | Dropbox Fax for Developers' @@ -2618,7 +2500,7 @@ paths: tags: - Fax summary: 'Send Fax' - description: 'Action to prepare and send a fax' + description: 'Creates and sends a new Fax with the submitted file(s)' operationId: faxSend requestBody: required: true @@ -2627,13 +2509,13 @@ paths: schema: $ref: '#/components/schemas/FaxSendRequest' examples: - default_example: - $ref: '#/components/examples/FaxSendRequestExample' + example: + $ref: '#/components/examples/FaxSendRequest' multipart/form-data: schema: $ref: '#/components/schemas/FaxSendRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -2647,9 +2529,9 @@ paths: schema: $ref: '#/components/schemas/FaxGetResponse' examples: - default_example: - $ref: '#/components/examples/FaxGetResponseExample' - 4XX: + example: + $ref: '#/components/examples/FaxGetResponse' + '4XX': description: failed_operation content: application/json: @@ -2657,19 +2539,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -2678,45 +2560,40 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxSend.php + $ref: examples/FaxSendExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxSend.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/FaxSend.js + $ref: examples/FaxSendExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/FaxSend.ts + $ref: examples/FaxSendExample.ts - lang: Java label: Java source: - $ref: examples/FaxSend.java + $ref: examples/FaxSendExample.java - lang: Ruby label: Ruby source: - $ref: examples/FaxSend.rb + $ref: examples/FaxSendExample.rb - lang: Python label: Python source: - $ref: examples/FaxSend.py + $ref: examples/FaxSendExample.py - lang: cURL label: cURL source: - $ref: examples/FaxSend.sh + $ref: examples/FaxSendExample.sh x-meta: seo: - title: 'Send Fax| API Documentation | Dropbox Fax for Developers' + title: 'Send Fax | API Documentation | Dropbox Fax for Developers' description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to send a fax, click here.' /oauth/token: post: @@ -2732,10 +2609,10 @@ paths: schema: $ref: '#/components/schemas/OAuthTokenGenerateRequest' examples: - default_example: - $ref: '#/components/examples/OAuthTokenGenerateRequestExample' + example: + $ref: '#/components/examples/OAuthTokenGenerateRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -2749,9 +2626,9 @@ paths: schema: $ref: '#/components/schemas/OAuthTokenResponse' examples: - default_example: - $ref: '#/components/examples/OAuthTokenGenerateResponseExample' - 4XX: + example: + $ref: '#/components/examples/OAuthTokenGenerateResponse' + '4XX': description: failed_operation content: application/json: @@ -2759,15 +2636,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: [] servers: - @@ -2777,42 +2654,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/OauthTokenGenerate.php + $ref: examples/OauthTokenGenerateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/OauthTokenGenerate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/OauthTokenGenerate.js + $ref: examples/OauthTokenGenerateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/OauthTokenGenerate.ts + $ref: examples/OauthTokenGenerateExample.ts - lang: Java label: Java source: - $ref: examples/OauthTokenGenerate.java + $ref: examples/OauthTokenGenerateExample.java - lang: Ruby label: Ruby source: - $ref: examples/OauthTokenGenerate.rb + $ref: examples/OauthTokenGenerateExample.rb - lang: Python label: Python source: - $ref: examples/OauthTokenGenerate.py + $ref: examples/OauthTokenGenerateExample.py - lang: cURL label: cURL source: - $ref: examples/OauthTokenGenerate.sh + $ref: examples/OauthTokenGenerateExample.sh x-meta: seo: title: 'Generate OAuth Token | Documentation | Dropbox Sign for Developers' @@ -2832,10 +2704,10 @@ paths: schema: $ref: '#/components/schemas/OAuthTokenRefreshRequest' examples: - default_example: - $ref: '#/components/examples/OAuthTokenRefreshRequestExample' + example: + $ref: '#/components/examples/OAuthTokenRefreshRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -2849,9 +2721,9 @@ paths: schema: $ref: '#/components/schemas/OAuthTokenResponse' examples: - default_example: - $ref: '#/components/examples/OAuthTokenRefreshResponseExample' - 4XX: + example: + $ref: '#/components/examples/OAuthTokenRefreshResponse' + '4XX': description: failed_operation content: application/json: @@ -2859,15 +2731,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: [] servers: - @@ -2877,42 +2749,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/OauthTokenRefresh.php + $ref: examples/OauthTokenRefreshExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/OauthTokenRefresh.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/OauthTokenRefresh.js + $ref: examples/OauthTokenRefreshExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/OauthTokenRefresh.ts + $ref: examples/OauthTokenRefreshExample.ts - lang: Java label: Java source: - $ref: examples/OauthTokenRefresh.java + $ref: examples/OauthTokenRefreshExample.java - lang: Ruby label: Ruby source: - $ref: examples/OauthTokenRefresh.rb + $ref: examples/OauthTokenRefreshExample.rb - lang: Python label: Python source: - $ref: examples/OauthTokenRefresh.py + $ref: examples/OauthTokenRefreshExample.py - lang: cURL label: cURL source: - $ref: examples/OauthTokenRefresh.sh + $ref: examples/OauthTokenRefreshExample.sh x-meta: seo: title: 'OAuth Token Refresh | Documentation | Dropbox Sign for Developers' @@ -2935,10 +2802,10 @@ paths: schema: $ref: '#/components/schemas/ReportCreateRequest' examples: - default_example: - $ref: '#/components/examples/ReportCreateRequestDefaultExample' + example: + $ref: '#/components/examples/ReportCreateRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -2952,9 +2819,9 @@ paths: schema: $ref: '#/components/schemas/ReportCreateResponse' examples: - default_example: - $ref: '#/components/examples/ReportCreateResponseExample' - 4XX: + example: + $ref: '#/components/examples/ReportCreateResponse' + '4XX': description: failed_operation content: application/json: @@ -2962,15 +2829,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -2979,42 +2846,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/ReportCreate.php + $ref: examples/ReportCreateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/ReportCreate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/ReportCreate.js + $ref: examples/ReportCreateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/ReportCreate.ts + $ref: examples/ReportCreateExample.ts - lang: Java label: Java source: - $ref: examples/ReportCreate.java + $ref: examples/ReportCreateExample.java - lang: Ruby label: Ruby source: - $ref: examples/ReportCreate.rb + $ref: examples/ReportCreateExample.rb - lang: Python label: Python source: - $ref: examples/ReportCreate.py + $ref: examples/ReportCreateExample.py - lang: cURL label: cURL source: - $ref: examples/ReportCreate.sh + $ref: examples/ReportCreateExample.sh x-meta: seo: title: 'Create Report | API Documentation | Dropbox Sign for Developers' @@ -3036,13 +2898,13 @@ paths: schema: $ref: '#/components/schemas/SignatureRequestBulkCreateEmbeddedWithTemplateRequest' examples: - default_example: - $ref: '#/components/examples/SignatureRequestBulkCreateEmbeddedWithTemplateRequestDefaultExample' + example: + $ref: '#/components/examples/SignatureRequestBulkCreateEmbeddedWithTemplateRequest' multipart/form-data: schema: $ref: '#/components/schemas/SignatureRequestBulkCreateEmbeddedWithTemplateRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -3056,9 +2918,9 @@ paths: schema: $ref: '#/components/schemas/BulkSendJobSendResponse' examples: - default_example: - $ref: '#/components/examples/SignatureRequestBulkCreateEmbeddedWithTemplateResponseExample' - 4XX: + example: + $ref: '#/components/examples/SignatureRequestBulkCreateEmbeddedWithTemplateResponse' + '4XX': description: failed_operation content: application/json: @@ -3066,21 +2928,21 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -3089,42 +2951,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplate.php + $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplate.js + $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplate.ts + $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplateExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplate.java + $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplateExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplate.rb + $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplateExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplate.py + $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplateExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplate.sh + $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplateExample.sh x-meta: seo: title: 'Embedded Bulk Send with Template | Dropbox Sign for Developers' @@ -3146,13 +3003,13 @@ paths: schema: $ref: '#/components/schemas/SignatureRequestBulkSendWithTemplateRequest' examples: - default_example: - $ref: '#/components/examples/SignatureRequestBulkSendWithTemplateRequestDefaultExample' + example: + $ref: '#/components/examples/SignatureRequestBulkSendWithTemplateRequest' multipart/form-data: schema: $ref: '#/components/schemas/SignatureRequestBulkSendWithTemplateRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -3166,9 +3023,9 @@ paths: schema: $ref: '#/components/schemas/BulkSendJobSendResponse' examples: - default_example: - $ref: '#/components/examples/SignatureRequestBulkSendWithTemplateResponseExample' - 4XX: + example: + $ref: '#/components/examples/SignatureRequestBulkSendWithTemplateResponse' + '4XX': description: failed_operation content: application/json: @@ -3176,17 +3033,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -3199,42 +3056,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestBulkSendWithTemplate.php + $ref: examples/SignatureRequestBulkSendWithTemplateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestBulkSendWithTemplate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestBulkSendWithTemplate.js + $ref: examples/SignatureRequestBulkSendWithTemplateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestBulkSendWithTemplate.ts + $ref: examples/SignatureRequestBulkSendWithTemplateExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestBulkSendWithTemplate.java + $ref: examples/SignatureRequestBulkSendWithTemplateExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestBulkSendWithTemplate.rb + $ref: examples/SignatureRequestBulkSendWithTemplateExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestBulkSendWithTemplate.py + $ref: examples/SignatureRequestBulkSendWithTemplateExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestBulkSendWithTemplate.sh + $ref: examples/SignatureRequestBulkSendWithTemplateExample.sh x-meta: seo: title: 'Bulk Send with Template | REST API | Dropbox Sign for Developers' @@ -3265,7 +3117,7 @@ paths: type: string example: fa5c8a0b0f492d768749333ad6fcc214c111e967 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -3276,7 +3128,7 @@ paths: $ref: '#/components/headers/X-Ratelimit-Reset' content: application/json: {} - 4XX: + '4XX': description: failed_operation content: application/json: @@ -3284,21 +3136,21 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 410_example: - $ref: '#/components/examples/Error410ResponseExample' + $ref: '#/components/examples/Error410Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -3311,42 +3163,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestCancel.php + $ref: examples/SignatureRequestCancelExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestCancel.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestCancel.js + $ref: examples/SignatureRequestCancelExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestCancel.ts + $ref: examples/SignatureRequestCancelExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestCancel.java + $ref: examples/SignatureRequestCancelExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestCancel.rb + $ref: examples/SignatureRequestCancelExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestCancel.py + $ref: examples/SignatureRequestCancelExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestCancel.sh + $ref: examples/SignatureRequestCancelExample.sh x-meta: seo: title: 'Cancel Incomplete Signature Request | Dropbox Sign for Developers' @@ -3365,15 +3212,15 @@ paths: schema: $ref: '#/components/schemas/SignatureRequestCreateEmbeddedRequest' examples: - default_example: - $ref: '#/components/examples/SignatureRequestCreateEmbeddedRequestDefaultExample' + example: + $ref: '#/components/examples/SignatureRequestCreateEmbeddedRequest' grouped_signers_example: - $ref: '#/components/examples/SignatureRequestCreateEmbeddedRequestGroupedSignersExample' + $ref: '#/components/examples/SignatureRequestCreateEmbeddedRequestGroupedSigners' multipart/form-data: schema: $ref: '#/components/schemas/SignatureRequestCreateEmbeddedRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -3387,9 +3234,9 @@ paths: schema: $ref: '#/components/schemas/SignatureRequestGetResponse' examples: - default_example: - $ref: '#/components/examples/SignatureRequestCreateEmbeddedResponseExample' - 4XX: + example: + $ref: '#/components/examples/SignatureRequestCreateEmbeddedResponse' + '4XX': description: failed_operation content: application/json: @@ -3397,19 +3244,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -3421,42 +3268,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestCreateEmbedded.php + $ref: examples/SignatureRequestCreateEmbeddedExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestCreateEmbedded.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestCreateEmbedded.js + $ref: examples/SignatureRequestCreateEmbeddedExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestCreateEmbedded.ts + $ref: examples/SignatureRequestCreateEmbeddedExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestCreateEmbedded.java + $ref: examples/SignatureRequestCreateEmbeddedExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestCreateEmbedded.rb + $ref: examples/SignatureRequestCreateEmbeddedExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestCreateEmbedded.py + $ref: examples/SignatureRequestCreateEmbeddedExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestCreateEmbedded.sh + $ref: examples/SignatureRequestCreateEmbeddedExample.sh x-meta: seo: title: 'Create Embedded Signature Request | Dropbox Sign for Developers' @@ -3475,13 +3317,13 @@ paths: schema: $ref: '#/components/schemas/SignatureRequestCreateEmbeddedWithTemplateRequest' examples: - default_example: - $ref: '#/components/examples/SignatureRequestCreateEmbeddedWithTemplateRequestDefaultExample' + example: + $ref: '#/components/examples/SignatureRequestCreateEmbeddedWithTemplateRequest' multipart/form-data: schema: $ref: '#/components/schemas/SignatureRequestCreateEmbeddedWithTemplateRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -3495,9 +3337,9 @@ paths: schema: $ref: '#/components/schemas/SignatureRequestGetResponse' examples: - default_example: - $ref: '#/components/examples/SignatureRequestCreateEmbeddedWithTemplateResponseExample' - 4XX: + example: + $ref: '#/components/examples/SignatureRequestCreateEmbeddedWithTemplateResponse' + '4XX': description: failed_operation content: application/json: @@ -3505,19 +3347,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -3529,77 +3371,76 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestCreateEmbeddedWithTemplate.php + $ref: examples/SignatureRequestCreateEmbeddedWithTemplateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestCreateEmbeddedWithTemplate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestCreateEmbeddedWithTemplate.js + $ref: examples/SignatureRequestCreateEmbeddedWithTemplateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestCreateEmbeddedWithTemplate.ts + $ref: examples/SignatureRequestCreateEmbeddedWithTemplateExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestCreateEmbeddedWithTemplate.java + $ref: examples/SignatureRequestCreateEmbeddedWithTemplateExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestCreateEmbeddedWithTemplate.rb + $ref: examples/SignatureRequestCreateEmbeddedWithTemplateExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestCreateEmbeddedWithTemplate.py + $ref: examples/SignatureRequestCreateEmbeddedWithTemplateExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestCreateEmbeddedWithTemplate.sh + $ref: examples/SignatureRequestCreateEmbeddedWithTemplateExample.sh x-meta: seo: title: 'Signature Request with Template | Dropbox Sign for Developers' description: 'The Dropbox Sign API allows you to build custom integrations. To find out how to create a new SignatureRequest based on the given Template, click here.' - '/signature_request/files/{signature_request_id}': - get: + '/signature_request/edit/{signature_request_id}': + put: tags: - 'Signature Request' - summary: 'Download Files' + summary: 'Edit Signature Request' description: |- - Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a PDF or ZIP file. + Edits and sends a 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. - If the files are currently being prepared, a status code of `409` will be returned instead. - operationId: signatureRequestFiles + **NOTE:** Edit and resend will not deduct your signature request quota. + operationId: signatureRequestEdit parameters: - name: signature_request_id in: path - description: 'The id of the SignatureRequest to retrieve.' + description: 'The id of the SignatureRequest to edit.' required: true schema: type: string example: fa5c8a0b0f492d768749333ad6fcc214c111e967 - - - name: file_type - in: query - description: 'Set to `pdf` for a single merged document or `zip` for a collection of individual documents.' - schema: - type: string - default: pdf - enum: - - pdf - - zip + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/SignatureRequestEditRequest' + examples: + example: + $ref: '#/components/examples/SignatureRequestEditRequest' + grouped_signers_example: + $ref: '#/components/examples/SignatureRequestEditRequestGroupedSigners' + multipart/form-data: + schema: + $ref: '#/components/schemas/SignatureRequestEditRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -3609,15 +3450,13 @@ paths: X-Ratelimit-Reset: $ref: '#/components/headers/X-Ratelimit-Reset' content: - application/pdf: - schema: - type: string - format: binary - application/zip: + application/json: schema: - type: string - format: binary - 4XX: + $ref: '#/components/schemas/SignatureRequestGetResponse' + examples: + example: + $ref: '#/components/examples/SignatureRequestEditResponse' + '4XX': description: failed_operation content: application/json: @@ -3625,23 +3464,21 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' - 410_example: - $ref: '#/components/examples/Error410ResponseExample' + $ref: '#/components/examples/Error409Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -3654,67 +3491,75 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestFiles.php + $ref: examples/SignatureRequestEditExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestFiles.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestFiles.js + $ref: examples/SignatureRequestEditExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestFiles.ts + $ref: examples/SignatureRequestEditExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestFiles.java + $ref: examples/SignatureRequestEditExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestFiles.rb + $ref: examples/SignatureRequestEditExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestFiles.py + $ref: examples/SignatureRequestEditExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestFiles.sh + $ref: examples/SignatureRequestEditExample.sh x-meta: seo: - title: 'Download Files | API Documentation | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API allows you to build custom integrations. To find out how to get the current documents specified by the parameters, click here' - '/signature_request/files_as_data_uri/{signature_request_id}': - get: + title: 'Edit Signature Request | REST API | Dropbox Sign for Developers' + description: 'Dropbox Sign API allows you to build custom integrations. To find out how to edit a SignatureRequest with the submitted documents, click here.' + x-hideOn: doc + x-beta: closed + '/signature_request/edit_embedded/{signature_request_id}': + put: tags: - 'Signature Request' - summary: 'Download Files as Data Uri' - description: |- - 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. - operationId: signatureRequestFilesAsDataUri + summary: 'Edit Embedded Signature Request' + description: 'Edits a 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.' + operationId: signatureRequestEditEmbedded parameters: - name: signature_request_id in: path - description: 'The id of the SignatureRequest to retrieve.' + description: 'The id of the SignatureRequest to edit.' required: true schema: type: string example: fa5c8a0b0f492d768749333ad6fcc214c111e967 + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/SignatureRequestEditEmbeddedRequest' + examples: + example: + $ref: '#/components/examples/SignatureRequestEditEmbeddedRequest' + grouped_signers_example: + $ref: '#/components/examples/SignatureRequestEditEmbeddedRequestGroupedSigners' + multipart/form-data: + schema: + $ref: '#/components/schemas/SignatureRequestEditEmbeddedRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -3726,11 +3571,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/FileResponseDataUri' + $ref: '#/components/schemas/SignatureRequestGetResponse' examples: - default_example: - $ref: '#/components/examples/SignatureRequestFilesResponseExample' - 4XX: + example: + $ref: '#/components/examples/SignatureRequestEditEmbeddedResponse' + '4XX': description: failed_operation content: application/json: @@ -3738,103 +3583,99 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' - 410_example: - $ref: '#/components/examples/Error410ResponseExample' + $ref: '#/components/examples/Error409Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] - oauth2: - - request_signature - signature_request_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/SignatureRequestFilesAsDataUri.php + $ref: examples/SignatureRequestEditEmbeddedExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestFilesAsDataUri.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestFilesAsDataUri.js + $ref: examples/SignatureRequestEditEmbeddedExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestFilesAsDataUri.ts + $ref: examples/SignatureRequestEditEmbeddedExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestFilesAsDataUri.java + $ref: examples/SignatureRequestEditEmbeddedExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestFilesAsDataUri.rb + $ref: examples/SignatureRequestEditEmbeddedExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestFilesAsDataUri.py + $ref: examples/SignatureRequestEditEmbeddedExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestFilesAsDataUri.sh + $ref: examples/SignatureRequestEditEmbeddedExample.sh x-meta: seo: - title: 'Download Files | API Documentation | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API allows you to build custom integrations. To find out how to get the current documents specified by the parameters, click here' - '/signature_request/files_as_file_url/{signature_request_id}': - get: + title: 'Edit Embedded Signature Request | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom integrations. To find out how to edit a SignatureRequest in an iFrame, click here.' + x-hideOn: doc + x-beta: closed + '/signature_request/edit_embedded_with_template/{signature_request_id}': + put: tags: - 'Signature Request' - summary: 'Download Files as File Url' - description: |- - 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. - operationId: signatureRequestFilesAsFileUrl + summary: 'Edit Embedded Signature Request with Template' + description: 'Edits a 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.' + operationId: signatureRequestEditEmbeddedWithTemplate parameters: - name: signature_request_id in: path - description: 'The id of the SignatureRequest to retrieve.' + description: 'The id of the SignatureRequest to edit.' required: true schema: type: string example: fa5c8a0b0f492d768749333ad6fcc214c111e967 - - - name: force_download - in: query - 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.' - schema: - type: integer - default: 1 + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/SignatureRequestEditEmbeddedWithTemplateRequest' + examples: + example: + $ref: '#/components/examples/SignatureRequestEditEmbeddedWithTemplateRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/SignatureRequestEditEmbeddedWithTemplateRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -3846,11 +3687,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/FileResponse' + $ref: '#/components/schemas/SignatureRequestGetResponse' examples: - default_example: - $ref: '#/components/examples/SignatureRequestFilesResponseExample' - 4XX: + example: + $ref: '#/components/examples/SignatureRequestEditEmbeddedWithTemplateResponse' + '4XX': description: failed_operation content: application/json: @@ -3858,93 +3699,102 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' - 410_example: - $ref: '#/components/examples/Error410ResponseExample' + $ref: '#/components/examples/Error409Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] - oauth2: - - request_signature - signature_request_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/SignatureRequestFilesAsFileUrl.php + $ref: examples/SignatureRequestEditEmbeddedWithTemplateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestFilesAsFileUrl.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestFilesAsFileUrl.js + $ref: examples/SignatureRequestEditEmbeddedWithTemplateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestFilesAsFileUrl.ts + $ref: examples/SignatureRequestEditEmbeddedWithTemplateExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestFilesAsFileUrl.java + $ref: examples/SignatureRequestEditEmbeddedWithTemplateExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestFilesAsFileUrl.rb + $ref: examples/SignatureRequestEditEmbeddedWithTemplateExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestFilesAsFileUrl.py + $ref: examples/SignatureRequestEditEmbeddedWithTemplateExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestFilesAsFileUrl.sh + $ref: examples/SignatureRequestEditEmbeddedWithTemplateExample.sh x-meta: seo: - title: 'Download Files | API Documentation | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API allows you to build custom integrations. To find out how to get the current documents specified by the parameters, click here' - '/signature_request/{signature_request_id}': - get: + title: 'Signature Request with Template | Dropbox Sign for Developers' + description: 'The Dropbox Sign API allows you to build custom integrations. To find out how to edit a SignatureRequest based on the given Template, click here.' + x-hideOn: doc + x-beta: closed + '/signature_request/edit_with_template/{signature_request_id}': + put: tags: - 'Signature Request' - summary: 'Get Signature Request' - description: 'Returns the status of the SignatureRequest specified by the `signature_request_id` parameter.' - operationId: signatureRequestGet + summary: 'Edit Signature Request With Template' + description: |- + Edits and sends a SignatureRequest based off of the Template(s) specified with the template_ids parameter. + + **NOTE:** Edit and resend will not deduct your signature request quota. + operationId: signatureRequestEditWithTemplate parameters: - name: signature_request_id in: path - description: 'The id of the SignatureRequest to retrieve.' + description: 'The id of the SignatureRequest to edit.' required: true schema: type: string example: fa5c8a0b0f492d768749333ad6fcc214c111e967 + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/SignatureRequestEditWithTemplateRequest' + examples: + example: + $ref: '#/components/examples/SignatureRequestEditWithTemplateRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/SignatureRequestEditWithTemplateRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -3958,9 +3808,9 @@ paths: schema: $ref: '#/components/schemas/SignatureRequestGetResponse' examples: - default_example: - $ref: '#/components/examples/SignatureRequestGetResponseExample' - 4XX: + example: + $ref: '#/components/examples/SignatureRequestEditWithTemplateResponse' + '4XX': description: failed_operation content: application/json: @@ -3968,19 +3818,21 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' - 410_example: - $ref: '#/components/examples/Error410ResponseExample' + $ref: '#/components/examples/Error404Response' + 409_example: + $ref: '#/components/examples/Error409Response' + 429_example: + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -3993,86 +3845,74 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestGet.php + $ref: examples/SignatureRequestEditWithTemplateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestGet.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestGet.js + $ref: examples/SignatureRequestEditWithTemplateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestGet.ts + $ref: examples/SignatureRequestEditWithTemplateExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestGet.java + $ref: examples/SignatureRequestEditWithTemplateExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestGet.rb + $ref: examples/SignatureRequestEditWithTemplateExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestGet.py + $ref: examples/SignatureRequestEditWithTemplateExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestGet.sh + $ref: examples/SignatureRequestEditWithTemplateExample.sh x-meta: seo: - title: 'Get Signature Request | Documentation | Dropbox Sign for Developers' - description: 'The Dropbox Sign API allows you to build custom integrations. To find out how to return the status of SignatureRequest specified by the parameters, click here.' - /signature_request/list: + title: 'Edit Signature Request with Template | API Documentation | Dropbox Sign for Developers' + description: 'Dropbox Sign API allows you to build custom integrations. To find out how to edit a SignatureRequest based off of the Template, click here.' + x-hideOn: doc + x-beta: closed + '/signature_request/files/{signature_request_id}': get: tags: - 'Signature Request' - summary: 'List Signature Requests' + summary: 'Download Files' description: |- - 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. + Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a PDF or ZIP file. - Take a look at our [search guide](/api/reference/search/) to learn more about querying signature requests. - operationId: signatureRequestList + If the files are currently being prepared, a status code of `409` will be returned instead. + operationId: signatureRequestFiles parameters: - - name: account_id - in: query - description: 'Which account to return SignatureRequests for. Must be a team member. Use `all` to indicate all team members. Defaults to your account.' + name: signature_request_id + in: path + description: 'The id of the SignatureRequest to retrieve.' + required: true schema: type: string + example: fa5c8a0b0f492d768749333ad6fcc214c111e967 - - name: page + name: file_type in: query - description: 'Which page number of the SignatureRequest List to return. Defaults to `1`.' - schema: - type: integer - default: 1 - example: 1 - - - name: page_size - in: query - description: 'Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.' - schema: - type: integer - default: 20 - - - name: query - in: query - description: 'String that includes search terms and/or fields to be used to filter the SignatureRequest objects.' + description: 'Set to `pdf` for a single merged document or `zip` for a collection of individual documents.' schema: type: string + default: pdf + enum: + - pdf + - zip responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -4082,13 +3922,15 @@ paths: X-Ratelimit-Reset: $ref: '#/components/headers/X-Ratelimit-Reset' content: - application/json: + application/pdf: schema: - $ref: '#/components/schemas/SignatureRequestListResponse' - examples: - default_example: - $ref: '#/components/examples/SignatureRequestListResponseExample' - 4XX: + type: string + format: binary + application/zip: + schema: + type: string + format: binary + '4XX': description: failed_operation content: application/json: @@ -4096,17 +3938,23 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' + 404_example: + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' + 410_example: + $ref: '#/components/examples/Error410Response' + 429_example: + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -4119,64 +3967,62 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestList.php + $ref: examples/SignatureRequestFilesExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestList.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestList.js + $ref: examples/SignatureRequestFilesExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestList.ts + $ref: examples/SignatureRequestFilesExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestList.java + $ref: examples/SignatureRequestFilesExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestList.rb + $ref: examples/SignatureRequestFilesExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestList.py + $ref: examples/SignatureRequestFilesExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestList.sh + $ref: examples/SignatureRequestFilesExample.sh x-meta: seo: - title: 'List Signature Requests | REST API | Dropbox Sign for Developers' - description: 'The Dropbox Sign API allows you to build custom integrations. To find out how to return a list of SignatureRequests that you can access, click here.' - '/signature_request/release_hold/{signature_request_id}': - post: + title: 'Download Files | API Documentation | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API allows you to build custom integrations. To find out how to get the current documents specified by the parameters, click here' + '/signature_request/files_as_data_uri/{signature_request_id}': + get: tags: - 'Signature Request' - summary: 'Release On-Hold Signature Request' - description: '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.' - operationId: signatureRequestReleaseHold + summary: 'Download Files as Data Uri' + description: |- + 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. + operationId: signatureRequestFilesAsDataUri parameters: - name: signature_request_id in: path - description: 'The id of the SignatureRequest to release.' + description: 'The id of the SignatureRequest to retrieve.' required: true schema: type: string example: fa5c8a0b0f492d768749333ad6fcc214c111e967 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -4188,11 +4034,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SignatureRequestGetResponse' + $ref: '#/components/schemas/FileResponseDataUri' examples: - default_example: - $ref: '#/components/examples/SignatureRequestReleaseHoldResponseExample' - 4XX: + example: + $ref: '#/components/examples/SignatureRequestFilesResponse' + '4XX': description: failed_operation content: application/json: @@ -4200,98 +4046,98 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' + 409_example: + $ref: '#/components/examples/Error409Response' + 410_example: + $ref: '#/components/examples/Error410Response' + 429_example: + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] - oauth2: + - request_signature - signature_request_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/SignatureRequestReleaseHold.php + $ref: examples/SignatureRequestFilesAsDataUriExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestReleaseHold.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestReleaseHold.js + $ref: examples/SignatureRequestFilesAsDataUriExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestReleaseHold.ts + $ref: examples/SignatureRequestFilesAsDataUriExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestReleaseHold.java + $ref: examples/SignatureRequestFilesAsDataUriExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestReleaseHold.rb + $ref: examples/SignatureRequestFilesAsDataUriExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestReleaseHold.py + $ref: examples/SignatureRequestFilesAsDataUriExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestReleaseHold.sh + $ref: examples/SignatureRequestFilesAsDataUriExample.sh x-meta: seo: - title: 'Release On-Hold Signature Request | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API allows you to build custom eSign integrations. To find out how to release an on-hold SignatureRequest, click here.' - '/signature_request/remind/{signature_request_id}': - post: + title: 'Download Files | API Documentation | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API allows you to build custom integrations. To find out how to get the current documents specified by the parameters, click here' + '/signature_request/files_as_file_url/{signature_request_id}': + get: tags: - 'Signature Request' - summary: 'Send Request Reminder' + summary: 'Download Files as File Url' description: |- - 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. + 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). - **NOTE:** This action can **not** be used with embedded signature requests. - operationId: signatureRequestRemind + If the files are currently being prepared, a status code of `409` will be returned instead. + operationId: signatureRequestFilesAsFileUrl parameters: - name: signature_request_id in: path - description: 'The id of the SignatureRequest to send a reminder for.' + description: 'The id of the SignatureRequest to retrieve.' required: true schema: type: string example: fa5c8a0b0f492d768749333ad6fcc214c111e967 - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/SignatureRequestRemindRequest' - examples: - default_example: - $ref: '#/components/examples/SignatureRequestRemindRequestDefaultExample' + - + name: force_download + in: query + 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.' + schema: + type: integer + default: 1 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -4303,11 +4149,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SignatureRequestGetResponse' + $ref: '#/components/schemas/FileResponse' examples: - default_example: - $ref: '#/components/examples/SignatureRequestRemindResponseExample' - 4XX: + example: + $ref: '#/components/examples/SignatureRequestFilesResponse' + '4XX': description: failed_operation content: application/json: @@ -4315,23 +4161,23 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 410_example: - $ref: '#/components/examples/Error410ResponseExample' + $ref: '#/components/examples/Error410Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -4344,69 +4190,59 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestRemind.php + $ref: examples/SignatureRequestFilesAsFileUrlExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestRemind.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestRemind.js + $ref: examples/SignatureRequestFilesAsFileUrlExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestRemind.ts + $ref: examples/SignatureRequestFilesAsFileUrlExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestRemind.java + $ref: examples/SignatureRequestFilesAsFileUrlExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestRemind.rb + $ref: examples/SignatureRequestFilesAsFileUrlExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestRemind.py + $ref: examples/SignatureRequestFilesAsFileUrlExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestRemind.sh + $ref: examples/SignatureRequestFilesAsFileUrlExample.sh x-meta: seo: - title: 'Send Request Reminder | REST API | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API allows you to build custom eSign integrations. To find out how to send an email reminder to the signer, click here.' - '/signature_request/remove/{signature_request_id}': - post: + title: 'Download Files | API Documentation | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API allows you to build custom integrations. To find out how to get the current documents specified by the parameters, click here' + '/signature_request/{signature_request_id}': + get: tags: - 'Signature Request' - summary: 'Remove Signature Request Access' - description: |- - 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. - operationId: signatureRequestRemove + summary: 'Get Signature Request' + description: 'Returns the status of the SignatureRequest specified by the `signature_request_id` parameter.' + operationId: signatureRequestGet parameters: - name: signature_request_id in: path - description: 'The id of the SignatureRequest to remove.' + description: 'The id of the SignatureRequest to retrieve.' required: true schema: type: string example: fa5c8a0b0f492d768749333ad6fcc214c111e967 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -4416,8 +4252,13 @@ paths: X-Ratelimit-Reset: $ref: '#/components/headers/X-Ratelimit-Reset' content: - application/json: {} - 4XX: + application/json: + schema: + $ref: '#/components/schemas/SignatureRequestGetResponse' + examples: + example: + $ref: '#/components/examples/SignatureRequestGetResponse' + '4XX': description: failed_operation content: application/json: @@ -4425,92 +4266,106 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' - 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error404Response' 410_example: - $ref: '#/components/examples/Error410ResponseExample' + $ref: '#/components/examples/Error410Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] + - + oauth2: + - request_signature + - signature_request_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/SignatureRequestRemove.php + $ref: examples/SignatureRequestGetExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestRemove.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestRemove.js + $ref: examples/SignatureRequestGetExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestRemove.ts + $ref: examples/SignatureRequestGetExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestRemove.java + $ref: examples/SignatureRequestGetExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestRemove.rb + $ref: examples/SignatureRequestGetExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestRemove.py + $ref: examples/SignatureRequestGetExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestRemove.sh + $ref: examples/SignatureRequestGetExample.sh x-meta: seo: - title: 'Remove Signature Request Access | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API allows you to build custom integrations. To find out how to remove your access to a completed signature request, click here.' - /signature_request/send: - post: + title: 'Get Signature Request | Documentation | Dropbox Sign for Developers' + description: 'The Dropbox Sign API allows you to build custom integrations. To find out how to return the status of SignatureRequest specified by the parameters, click here.' + /signature_request/list: + get: tags: - 'Signature Request' - summary: 'Send Signature Request' - description: '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.' - operationId: signatureRequestSend - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/SignatureRequestSendRequest' - examples: - default_example: - $ref: '#/components/examples/SignatureRequestSendRequestDefaultExample' - grouped_signers_example: - $ref: '#/components/examples/SignatureRequestSendRequestGroupedSignersExample' - multipart/form-data: - schema: - $ref: '#/components/schemas/SignatureRequestSendRequest' + summary: 'List Signature Requests' + description: |- + 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. + operationId: signatureRequestList + parameters: + - + name: account_id + in: query + description: 'Which account to return SignatureRequests for. Must be a team member. Use `all` to indicate all team members. Defaults to your account.' + schema: + type: string + - + name: page + in: query + description: 'Which page number of the SignatureRequest List to return. Defaults to `1`.' + schema: + type: integer + default: 1 + example: 1 + - + name: page_size + in: query + description: 'Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.' + schema: + type: integer + default: 20 + - + name: query + in: query + description: 'String that includes search terms and/or fields to be used to filter the SignatureRequest objects.' + schema: + type: string responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -4522,11 +4377,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SignatureRequestGetResponse' + $ref: '#/components/schemas/SignatureRequestListResponse' examples: - default_example: - $ref: '#/components/examples/SignatureRequestSendResponseExample' - 4XX: + example: + $ref: '#/components/examples/SignatureRequestListResponse' + '4XX': description: failed_operation content: application/json: @@ -4534,19 +4389,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' - 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error409Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -4559,67 +4412,59 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestSend.php + $ref: examples/SignatureRequestListExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestSend.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestSend.js + $ref: examples/SignatureRequestListExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestSend.ts + $ref: examples/SignatureRequestListExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestSend.java + $ref: examples/SignatureRequestListExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestSend.rb + $ref: examples/SignatureRequestListExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestSend.py + $ref: examples/SignatureRequestListExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestSend.sh + $ref: examples/SignatureRequestListExample.sh x-meta: seo: - title: 'Send Signature Request | REST API | Dropbox Sign for Developers' - description: 'Dropbox Sign API allows you to build custom integrations. To find out how to create and send new SignatureRequest with the submitted documents, click here.' - /signature_request/send_with_template: + title: 'List Signature Requests | REST API | Dropbox Sign for Developers' + description: 'The Dropbox Sign API allows you to build custom integrations. To find out how to return a list of SignatureRequests that you can access, click here.' + '/signature_request/release_hold/{signature_request_id}': post: tags: - 'Signature Request' - summary: 'Send with Template' - description: 'Creates and sends a new SignatureRequest based off of the Template(s) specified with the `template_ids` parameter.' - operationId: signatureRequestSendWithTemplate - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/SignatureRequestSendWithTemplateRequest' - examples: - default_example: - $ref: '#/components/examples/SignatureRequestSendWithTemplateRequestDefaultExample' - multipart/form-data: - schema: - $ref: '#/components/schemas/SignatureRequestSendWithTemplateRequest' + summary: 'Release On-Hold Signature Request' + description: '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.' + operationId: signatureRequestReleaseHold + parameters: + - + name: signature_request_id + in: path + description: 'The id of the SignatureRequest to release.' + required: true + schema: + type: string + example: fa5c8a0b0f492d768749333ad6fcc214c111e967 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -4633,9 +4478,9 @@ paths: schema: $ref: '#/components/schemas/SignatureRequestGetResponse' examples: - default_example: - $ref: '#/components/examples/SignatureRequestSendWithTemplateResponseExample' - 4XX: + example: + $ref: '#/components/examples/SignatureRequestReleaseHoldResponse' + '4XX': description: failed_operation content: application/json: @@ -4643,86 +4488,78 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' - 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error403Response' + 404_example: + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] - oauth2: - - request_signature - signature_request_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/SignatureRequestSendWithTemplate.php + $ref: examples/SignatureRequestReleaseHoldExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestSendWithTemplate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestSendWithTemplate.js + $ref: examples/SignatureRequestReleaseHoldExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestSendWithTemplate.ts + $ref: examples/SignatureRequestReleaseHoldExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestSendWithTemplate.java + $ref: examples/SignatureRequestReleaseHoldExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestSendWithTemplate.rb + $ref: examples/SignatureRequestReleaseHoldExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestSendWithTemplate.py + $ref: examples/SignatureRequestReleaseHoldExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestSendWithTemplate.sh + $ref: examples/SignatureRequestReleaseHoldExample.sh x-meta: seo: - title: 'Send with Template | API Documentation | Dropbox Sign for Developers' - description: 'Dropbox Sign API allows you to build custom integrations. To find out how to create and send a new SignatureRequest based off of the Template, click here.' - '/signature_request/update/{signature_request_id}': + title: 'Release On-Hold Signature Request | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API allows you to build custom eSign integrations. To find out how to release an on-hold SignatureRequest, click here.' + '/signature_request/remind/{signature_request_id}': post: tags: - 'Signature Request' - summary: 'Update Signature Request' + summary: 'Send Request Reminder' description: |- - 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. + 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 cannot be performed on a signature request with an appended signature page. - operationId: signatureRequestUpdate + **NOTE:** This action can **not** be used with embedded signature requests. + operationId: signatureRequestRemind parameters: - name: signature_request_id in: path - description: 'The id of the SignatureRequest to update.' + description: 'The id of the SignatureRequest to send a reminder for.' required: true schema: type: string @@ -4732,12 +4569,12 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SignatureRequestUpdateRequest' + $ref: '#/components/schemas/SignatureRequestRemindRequest' examples: - default_example: - $ref: '#/components/examples/SignatureRequestUpdateRequestDefaultExample' + example: + $ref: '#/components/examples/SignatureRequestRemindRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -4751,9 +4588,9 @@ paths: schema: $ref: '#/components/schemas/SignatureRequestGetResponse' examples: - default_example: - $ref: '#/components/examples/SignatureRequestUpdateResponseExample' - 4XX: + example: + $ref: '#/components/examples/SignatureRequestRemindResponse' + '4XX': description: failed_operation content: application/json: @@ -4761,97 +4598,93 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' - 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' - security: + $ref: '#/components/examples/Error404Response' + 409_example: + $ref: '#/components/examples/Error409Response' + 410_example: + $ref: '#/components/examples/Error410Response' + 429_example: + $ref: '#/components/examples/Error429Response' + 4XX_example: + $ref: '#/components/examples/Error4XXResponse' + security: - api_key: [] - oauth2: + - request_signature - signature_request_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/SignatureRequestUpdate.php + $ref: examples/SignatureRequestRemindExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestUpdate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestUpdate.js + $ref: examples/SignatureRequestRemindExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestUpdate.ts + $ref: examples/SignatureRequestRemindExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestUpdate.java + $ref: examples/SignatureRequestRemindExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestUpdate.rb + $ref: examples/SignatureRequestRemindExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestUpdate.py + $ref: examples/SignatureRequestRemindExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestUpdate.sh + $ref: examples/SignatureRequestRemindExample.sh x-meta: seo: - title: 'Update Signature Request | REST API | Dropbox Sign for Developers' - description: 'Dropbox Sign API allows you to build custom integrations. To find out how to update the email address/name for a signer on a signature request, click here.' - /team/add_member: - put: + title: 'Send Request Reminder | REST API | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API allows you to build custom eSign integrations. To find out how to send an email reminder to the signer, click here.' + '/signature_request/remove/{signature_request_id}': + post: tags: - - Team - summary: 'Add User to Team' - description: '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.' - operationId: teamAddMember + - 'Signature Request' + summary: 'Remove Signature Request Access' + description: |- + 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. + operationId: signatureRequestRemove parameters: - - name: team_id - in: query - description: 'The id of the team.' - required: false + name: signature_request_id + in: path + description: 'The id of the SignatureRequest to remove.' + required: true schema: type: string - example: 4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/TeamAddMemberRequest' - examples: - email_address: - $ref: '#/components/examples/TeamAddMemberRequestEmailAddressExample' - account_id: - $ref: '#/components/examples/TeamAddMemberRequestAccountIdExample' + example: fa5c8a0b0f492d768749333ad6fcc214c111e967 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -4861,13 +4694,8 @@ paths: X-Ratelimit-Reset: $ref: '#/components/headers/X-Ratelimit-Reset' content: - application/json: - schema: - $ref: '#/components/schemas/TeamGetResponse' - examples: - default_example: - $ref: '#/components/examples/TeamAddMemberResponseExample' - 4XX: + application/json: {} + '4XX': description: failed_operation content: application/json: @@ -4875,86 +4703,87 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' + 409_example: + $ref: '#/components/examples/Error409Response' + 410_example: + $ref: '#/components/examples/Error410Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] - - - oauth2: - - team_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/TeamAddMember.php + $ref: examples/SignatureRequestRemoveExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamAddMember.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TeamAddMember.js + $ref: examples/SignatureRequestRemoveExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TeamAddMember.ts + $ref: examples/SignatureRequestRemoveExample.ts - lang: Java label: Java source: - $ref: examples/TeamAddMember.java + $ref: examples/SignatureRequestRemoveExample.java - lang: Ruby label: Ruby source: - $ref: examples/TeamAddMember.rb + $ref: examples/SignatureRequestRemoveExample.rb - lang: Python label: Python source: - $ref: examples/TeamAddMember.py + $ref: examples/SignatureRequestRemoveExample.py - lang: cURL label: cURL source: - $ref: examples/TeamAddMember.sh + $ref: examples/SignatureRequestRemoveExample.sh x-meta: seo: - title: 'Add User to Team | API Documentation | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to invite a specified user to your Team, click here.' - /team/create: + title: 'Remove Signature Request Access | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API allows you to build custom integrations. To find out how to remove your access to a completed signature request, click here.' + /signature_request/send: post: tags: - - Team - summary: 'Create Team' - description: 'Creates a new Team and makes you a member. You must not currently belong to a Team to invoke.' - operationId: teamCreate + - 'Signature Request' + summary: 'Send Signature Request' + description: '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.' + operationId: signatureRequestSend requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/TeamCreateRequest' + $ref: '#/components/schemas/SignatureRequestSendRequest' examples: - default_example: - $ref: '#/components/examples/TeamCreateRequestDefaultExample' + example: + $ref: '#/components/examples/SignatureRequestSendRequest' + grouped_signers_example: + $ref: '#/components/examples/SignatureRequestSendRequestGroupedSigners' + multipart/form-data: + schema: + $ref: '#/components/schemas/SignatureRequestSendRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -4966,11 +4795,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TeamGetResponse' + $ref: '#/components/schemas/SignatureRequestGetResponse' examples: - default_example: - $ref: '#/components/examples/TeamCreateResponseExample' - 4XX: + example: + $ref: '#/components/examples/SignatureRequestSendResponse' + '4XX': description: failed_operation content: application/json: @@ -4978,75 +4807,87 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' + 409_example: + $ref: '#/components/examples/Error409Response' + 429_example: + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] - oauth2: - - team_access + - request_signature + - signature_request_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/TeamCreate.php + $ref: examples/SignatureRequestSendExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamCreate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TeamCreate.js + $ref: examples/SignatureRequestSendExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TeamCreate.ts + $ref: examples/SignatureRequestSendExample.ts - lang: Java label: Java source: - $ref: examples/TeamCreate.java + $ref: examples/SignatureRequestSendExample.java - lang: Ruby label: Ruby source: - $ref: examples/TeamCreate.rb + $ref: examples/SignatureRequestSendExample.rb - lang: Python label: Python source: - $ref: examples/TeamCreate.py + $ref: examples/SignatureRequestSendExample.py - lang: cURL label: cURL source: - $ref: examples/TeamCreate.sh + $ref: examples/SignatureRequestSendExample.sh x-meta: seo: - title: 'Create Team | REST API Documentation | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API allows you to build custom eSign integrations. To find out how to create a new team and make yourself a member, click here.' - /team/destroy: - delete: + title: 'Send Signature Request | REST API | Dropbox Sign for Developers' + description: 'Dropbox Sign API allows you to build custom integrations. To find out how to create and send new SignatureRequest with the submitted documents, click here.' + /signature_request/send_with_template: + post: tags: - - Team - summary: 'Delete Team' - description: 'Deletes your Team. Can only be invoked when you have a Team with only one member (yourself).' - operationId: teamDelete + - 'Signature Request' + summary: 'Send with Template' + description: 'Creates and sends a new SignatureRequest based off of the Template(s) specified with the `template_ids` parameter.' + operationId: signatureRequestSendWithTemplate + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/SignatureRequestSendWithTemplateRequest' + examples: + example: + $ref: '#/components/examples/SignatureRequestSendWithTemplateRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/SignatureRequestSendWithTemplateRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -5055,7 +4896,14 @@ paths: $ref: '#/components/headers/X-RateLimit-Remaining' X-Ratelimit-Reset: $ref: '#/components/headers/X-Ratelimit-Reset' - 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/SignatureRequestGetResponse' + examples: + example: + $ref: '#/components/examples/SignatureRequestSendWithTemplateResponse' + '4XX': description: failed_operation content: application/json: @@ -5063,75 +4911,96 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' + 429_example: + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] - oauth2: - - team_access + - request_signature + - signature_request_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/TeamDelete.php + $ref: examples/SignatureRequestSendWithTemplateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamDelete.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TeamDelete.js + $ref: examples/SignatureRequestSendWithTemplateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TeamDelete.ts + $ref: examples/SignatureRequestSendWithTemplateExample.ts - lang: Java label: Java source: - $ref: examples/TeamDelete.java + $ref: examples/SignatureRequestSendWithTemplateExample.java - lang: Ruby label: Ruby source: - $ref: examples/TeamDelete.rb + $ref: examples/SignatureRequestSendWithTemplateExample.rb - lang: Python label: Python source: - $ref: examples/TeamDelete.py + $ref: examples/SignatureRequestSendWithTemplateExample.py - lang: cURL label: cURL source: - $ref: examples/TeamDelete.sh + $ref: examples/SignatureRequestSendWithTemplateExample.sh x-meta: seo: - title: 'Delete Team | REST API Documentation | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to delete a team you are a member of, click here.' - /team: - get: + title: 'Send with Template | API Documentation | Dropbox Sign for Developers' + description: 'Dropbox Sign API allows you to build custom integrations. To find out how to create and send a new SignatureRequest based off of the Template, click here.' + '/signature_request/update/{signature_request_id}': + post: tags: - - Team - summary: 'Get Team' - description: '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.' - operationId: teamGet + - 'Signature Request' + summary: 'Update Signature Request' + description: |- + 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. + operationId: signatureRequestUpdate + parameters: + - + name: signature_request_id + in: path + description: 'The id of the SignatureRequest to update.' + required: true + schema: + type: string + example: fa5c8a0b0f492d768749333ad6fcc214c111e967 + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/SignatureRequestUpdateRequest' + examples: + example: + $ref: '#/components/examples/SignatureRequestUpdateRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -5143,11 +5012,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TeamGetResponse' + $ref: '#/components/schemas/SignatureRequestGetResponse' examples: - default_example: - $ref: '#/components/examples/TeamGetResponseExample' - 4XX: + example: + $ref: '#/components/examples/SignatureRequestUpdateResponse' + '4XX': description: failed_operation content: application/json: @@ -5155,85 +5024,92 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] - oauth2: - - team_access + - signature_request_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/TeamGet.php + $ref: examples/SignatureRequestUpdateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamGet.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TeamGet.js + $ref: examples/SignatureRequestUpdateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TeamGet.ts + $ref: examples/SignatureRequestUpdateExample.ts - lang: Java label: Java source: - $ref: examples/TeamGet.java + $ref: examples/SignatureRequestUpdateExample.java - lang: Ruby label: Ruby source: - $ref: examples/TeamGet.rb + $ref: examples/SignatureRequestUpdateExample.rb - lang: Python label: Python source: - $ref: examples/TeamGet.py + $ref: examples/SignatureRequestUpdateExample.py - lang: cURL label: cURL source: - $ref: examples/TeamGet.sh + $ref: examples/SignatureRequestUpdateExample.sh x-meta: seo: - title: 'Get Team | REST API Documentation | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to return information about your Team, click here.' + title: 'Update Signature Request | REST API | Dropbox Sign for Developers' + description: 'Dropbox Sign API allows you to build custom integrations. To find out how to update the email address/name for a signer on a signature request, click here.' + /team/add_member: put: tags: - Team - summary: 'Update Team' - description: 'Updates the name of your Team.' - operationId: teamUpdate + summary: 'Add User to Team' + description: '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.' + operationId: teamAddMember + parameters: + - + name: team_id + in: query + description: 'The id of the team.' + required: false + schema: + type: string + example: 4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/TeamUpdateRequest' + $ref: '#/components/schemas/TeamAddMemberRequest' examples: - default_example: - $ref: '#/components/examples/TeamUpdateRequestDefaultExample' + example: + $ref: '#/components/examples/TeamAddMemberRequest' + account_id_example: + $ref: '#/components/examples/TeamAddMemberRequestAccountId' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -5247,9 +5123,9 @@ paths: schema: $ref: '#/components/schemas/TeamGetResponse' examples: - default_example: - $ref: '#/components/examples/TeamUpdateResponseExample' - 4XX: + example: + $ref: '#/components/examples/TeamAddMemberResponse' + '4XX': description: failed_operation content: application/json: @@ -5257,15 +5133,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' + 404_example: + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -5277,64 +5155,59 @@ paths: lang: PHP label: PHP source: - $ref: examples/TeamUpdate.php + $ref: examples/TeamAddMemberExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamUpdate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TeamUpdate.js + $ref: examples/TeamAddMemberExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TeamUpdate.ts + $ref: examples/TeamAddMemberExample.ts - lang: Java label: Java source: - $ref: examples/TeamUpdate.java + $ref: examples/TeamAddMemberExample.java - lang: Ruby label: Ruby source: - $ref: examples/TeamUpdate.rb + $ref: examples/TeamAddMemberExample.rb - lang: Python label: Python source: - $ref: examples/TeamUpdate.py + $ref: examples/TeamAddMemberExample.py - lang: cURL label: cURL source: - $ref: examples/TeamUpdate.sh + $ref: examples/TeamAddMemberExample.sh x-meta: seo: - title: 'Update Team | API Documentation | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to update the name of your team, click here.' - /team/info: - get: + title: 'Add User to Team | API Documentation | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to invite a specified user to your Team, click here.' + /team/create: + post: tags: - Team - summary: 'Get Team Info' - description: 'Provides information about a team.' - operationId: teamInfo - parameters: - - - name: team_id - in: query - description: 'The id of the team.' - required: false - schema: - type: string - example: 4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c + summary: 'Create Team' + description: 'Creates a new Team and makes you a member. You must not currently belong to a Team to invoke.' + operationId: teamCreate + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TeamCreateRequest' + examples: + example: + $ref: '#/components/examples/TeamCreateRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -5346,11 +5219,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TeamGetInfoResponse' + $ref: '#/components/schemas/TeamGetResponse' examples: - default_example: - $ref: '#/components/examples/TeamGetInfoResponseExample' - 4XX: + example: + $ref: '#/components/examples/TeamCreateResponse' + '4XX': description: failed_operation content: application/json: @@ -5358,19 +5231,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' - 409_example: - $ref: '#/components/examples/Error409ResponseExample' - 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -5382,63 +5251,50 @@ paths: lang: PHP label: PHP source: - $ref: examples/TeamInfo.php + $ref: examples/TeamCreateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamInfo.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TeamInfo.js + $ref: examples/TeamCreateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TeamInfo.ts + $ref: examples/TeamCreateExample.ts - lang: Java label: Java source: - $ref: examples/TeamInfo.java + $ref: examples/TeamCreateExample.java - lang: Ruby label: Ruby source: - $ref: examples/TeamInfo.rb + $ref: examples/TeamCreateExample.rb - lang: Python label: Python source: - $ref: examples/TeamInfo.py + $ref: examples/TeamCreateExample.py - lang: cURL label: cURL source: - $ref: examples/TeamInfo.sh + $ref: examples/TeamCreateExample.sh x-meta: seo: - title: 'Get Team Info | Dropbox Sign for Developers' - description: 'The Dropbox Sign API allows you automate your team management. To find out how to get information about a specific team, click here.' - /team/invites: - get: + title: 'Create Team | REST API Documentation | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API allows you to build custom eSign integrations. To find out how to create a new team and make yourself a member, click here.' + /team/destroy: + delete: tags: - Team - summary: 'List Team Invites' - description: 'Provides a list of team invites (and their roles).' - operationId: teamInvites - parameters: - - - name: email_address - in: query - description: 'The email address for which to display the team invites.' - required: false - schema: - type: string + summary: 'Delete Team' + description: 'Deletes your Team. Can only be invoked when you have a Team with only one member (yourself).' + operationId: teamDelete responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -5447,14 +5303,7 @@ paths: $ref: '#/components/headers/X-RateLimit-Remaining' X-Ratelimit-Reset: $ref: '#/components/headers/X-Ratelimit-Reset' - content: - application/json: - schema: - $ref: '#/components/schemas/TeamInvitesResponse' - examples: - default_example: - $ref: '#/components/examples/TeamInvitesResponseExample' - 4XX: + '4XX': description: failed_operation content: application/json: @@ -5462,101 +5311,70 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] - oauth2: - - account_access - - basic_account_info + - team_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/TeamInvites.php + $ref: examples/TeamDeleteExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamInvites.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TeamInvites.js + $ref: examples/TeamDeleteExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TeamInvites.ts + $ref: examples/TeamDeleteExample.ts - lang: Java label: Java source: - $ref: examples/TeamInvites.java + $ref: examples/TeamDeleteExample.java - lang: Ruby label: Ruby source: - $ref: examples/TeamInvites.rb + $ref: examples/TeamDeleteExample.rb - lang: Python label: Python source: - $ref: examples/TeamInvites.py + $ref: examples/TeamDeleteExample.py - lang: cURL label: cURL source: - $ref: examples/TeamInvites.sh + $ref: examples/TeamDeleteExample.sh x-meta: seo: - title: 'List Team Invites | Dropbox Sign for Developers' - description: 'The Dropbox Sign API allows you automate your team management. To find out how to get a list of team invites (and their roles), click here.' - '/team/members/{team_id}': + title: 'Delete Team | REST API Documentation | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to delete a team you are a member of, click here.' + /team: get: tags: - Team - summary: 'List Team Members' - description: 'Provides a paginated list of members (and their roles) that belong to a given team.' - operationId: teamMembers - parameters: - - - name: team_id - in: path - description: 'The id of the team that a member list is being requested from.' - required: true - schema: - type: string - example: 4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c - - - name: page - in: query - description: 'Which page number of the team member list to return. Defaults to `1`.' - schema: - type: integer - default: 1 - - - name: page_size - in: query - description: 'Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.' - schema: - type: integer - default: 20 - maximum: 100 - minimum: 1 + summary: 'Get Team' + description: '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.' + operationId: teamGet responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -5568,11 +5386,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TeamMembersResponse' + $ref: '#/components/schemas/TeamGetResponse' examples: - default_example: - $ref: '#/components/examples/TeamMembersResponseExample' - 4XX: + example: + $ref: '#/components/examples/TeamGetResponse' + '4XX': description: failed_operation content: application/json: @@ -5580,19 +5398,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' - 409_example: - $ref: '#/components/examples/Error409ResponseExample' - 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error403Response' + 404_example: + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -5604,66 +5420,58 @@ paths: lang: PHP label: PHP source: - $ref: examples/TeamMembers.php + $ref: examples/TeamGetExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamMembers.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TeamMembers.js + $ref: examples/TeamGetExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TeamMembers.ts + $ref: examples/TeamGetExample.ts - lang: Java label: Java source: - $ref: examples/TeamMembers.java + $ref: examples/TeamGetExample.java - lang: Ruby label: Ruby source: - $ref: examples/TeamMembers.rb + $ref: examples/TeamGetExample.rb - lang: Python label: Python source: - $ref: examples/TeamMembers.py + $ref: examples/TeamGetExample.py - lang: cURL label: cURL source: - $ref: examples/TeamMembers.sh + $ref: examples/TeamGetExample.sh x-meta: seo: - title: 'List Team Members | Dropbox Sign for Developers' - description: 'The Dropbox Sign API allows you automate your team management. To find out how to get a list of team members and their roles for a specific team, click here.' - /team/remove_member: - post: + title: 'Get Team | REST API Documentation | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to return information about your Team, click here.' + put: tags: - Team - summary: 'Remove User from Team' - description: '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.' - operationId: teamRemoveMember + summary: 'Update Team' + description: 'Updates the name of your Team.' + operationId: teamUpdate requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/TeamRemoveMemberRequest' + $ref: '#/components/schemas/TeamUpdateRequest' examples: - email_address: - $ref: '#/components/examples/TeamRemoveMemberRequestEmailAddressExample' - account_id: - $ref: '#/components/examples/TeamRemoveMemberRequestAccountIdExample' + example: + $ref: '#/components/examples/TeamUpdateRequest' responses: - 201: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -5677,9 +5485,9 @@ paths: schema: $ref: '#/components/schemas/TeamGetResponse' examples: - default_example: - $ref: '#/components/examples/TeamRemoveMemberResponseExample' - 4XX: + example: + $ref: '#/components/examples/TeamUpdateResponse' + '4XX': description: failed_operation content: application/json: @@ -5687,17 +5495,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' - 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -5709,80 +5515,59 @@ paths: lang: PHP label: PHP source: - $ref: examples/TeamRemoveMember.php + $ref: examples/TeamUpdateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamRemoveMember.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TeamRemoveMember.js + $ref: examples/TeamUpdateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TeamRemoveMember.ts + $ref: examples/TeamUpdateExample.ts - lang: Java label: Java source: - $ref: examples/TeamRemoveMember.java + $ref: examples/TeamUpdateExample.java - lang: Ruby label: Ruby source: - $ref: examples/TeamRemoveMember.rb + $ref: examples/TeamUpdateExample.rb - lang: Python label: Python source: - $ref: examples/TeamRemoveMember.py + $ref: examples/TeamUpdateExample.py - lang: cURL label: cURL source: - $ref: examples/TeamRemoveMember.sh + $ref: examples/TeamUpdateExample.sh x-meta: seo: - title: 'Remove User from Team | REST API | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to remove a user Account from your Team, click here.' - '/team/sub_teams/{team_id}': + title: 'Update Team | API Documentation | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to update the name of your team, click here.' + /team/info: get: tags: - Team - summary: 'List Sub Teams' - description: 'Provides a paginated list of sub teams that belong to a given team.' - operationId: teamSubTeams + summary: 'Get Team Info' + description: 'Provides information about a team.' + operationId: teamInfo parameters: - name: team_id - in: path - description: 'The id of the parent Team.' - required: true + in: query + description: 'The id of the team.' + required: false schema: type: string example: 4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c - - - name: page - in: query - description: 'Which page number of the SubTeam List to return. Defaults to `1`.' - schema: - type: integer - default: 1 - - - name: page_size - in: query - description: 'Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.' - schema: - type: integer - default: 20 - maximum: 100 - minimum: 1 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -5794,11 +5579,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TeamSubTeamsResponse' + $ref: '#/components/schemas/TeamGetInfoResponse' examples: - default_example: - $ref: '#/components/examples/TeamSubTeamsResponseExample' - 4XX: + example: + $ref: '#/components/examples/TeamGetInfoResponse' + '4XX': description: failed_operation content: application/json: @@ -5806,19 +5591,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -5830,73 +5615,58 @@ paths: lang: PHP label: PHP source: - $ref: examples/TeamSubTeams.php + $ref: examples/TeamInfoExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamSubTeams.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TeamSubTeams.js + $ref: examples/TeamInfoExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TeamSubTeams.ts + $ref: examples/TeamInfoExample.ts - lang: Java label: Java source: - $ref: examples/TeamSubTeams.java + $ref: examples/TeamInfoExample.java - lang: Ruby label: Ruby source: - $ref: examples/TeamSubTeams.rb + $ref: examples/TeamInfoExample.rb - lang: Python label: Python source: - $ref: examples/TeamSubTeams.py + $ref: examples/TeamInfoExample.py - lang: cURL label: cURL source: - $ref: examples/TeamSubTeams.sh + $ref: examples/TeamInfoExample.sh x-meta: seo: - title: 'List Sub Teams | Dropbox Sign for Developers' - description: 'The Dropbox Sign API allows you automate your team management. To find out how to get a list of sub teams that exist for a given team, click here.' - '/template/add_user/{template_id}': - post: + title: 'Get Team Info | Dropbox Sign for Developers' + description: 'The Dropbox Sign API allows you automate your team management. To find out how to get information about a specific team, click here.' + /team/invites: + get: tags: - - Template - summary: 'Add User to Template' - description: 'Gives the specified Account access to the specified Template. The specified Account must be a part of your Team.' - operationId: templateAddUser + - Team + summary: 'List Team Invites' + description: 'Provides a list of team invites (and their roles).' + operationId: teamInvites parameters: - - name: template_id - in: path - description: 'The id of the Template to give the Account access to.' - required: true + name: email_address + in: query + description: 'The email address for which to display the team invites.' + required: false schema: type: string - example: f57db65d3f933b5316d398057a36176831451a35 - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/TemplateAddUserRequest' - examples: - default_example: - $ref: '#/components/examples/TemplateAddUserRequestDefaultExample' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -5908,11 +5678,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TemplateGetResponse' + $ref: '#/components/schemas/TeamInvitesResponse' examples: - default_example: - $ref: '#/components/examples/TemplateAddUserResponseExample' - 4XX: + example: + $ref: '#/components/examples/TeamInvitesResponse' + '4XX': description: failed_operation content: application/json: @@ -5920,95 +5690,96 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' - 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] - oauth2: - - template_access + - account_access + - basic_account_info x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/TemplateAddUser.php + $ref: examples/TeamInvitesExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateAddUser.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TemplateAddUser.js + $ref: examples/TeamInvitesExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateAddUser.ts + $ref: examples/TeamInvitesExample.ts - lang: Java label: Java source: - $ref: examples/TemplateAddUser.java + $ref: examples/TeamInvitesExample.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateAddUser.rb + $ref: examples/TeamInvitesExample.rb - lang: Python label: Python source: - $ref: examples/TemplateAddUser.py + $ref: examples/TeamInvitesExample.py - lang: cURL label: cURL source: - $ref: examples/TemplateAddUser.sh + $ref: examples/TeamInvitesExample.sh x-meta: seo: - title: 'Add User to Template | REST API | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to give an Account access to a Template, click here.' - /template/create: - post: + title: 'List Team Invites | Dropbox Sign for Developers' + description: 'The Dropbox Sign API allows you automate your team management. To find out how to get a list of team invites (and their roles), click here.' + '/team/members/{team_id}': + get: tags: - - Template - summary: 'Create Template' - description: 'Creates a template that can then be used.' - operationId: templateCreate - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/TemplateCreateRequest' - examples: - default_example: - $ref: '#/components/examples/TemplateCreateRequestDefaultExample' - form_fields_per_document: - $ref: '#/components/examples/TemplateCreateRequestFormFieldsPerDocumentExample' - form_field_groups: - $ref: '#/components/examples/TemplateCreateRequestFormFieldGroupsExample' - form_field_rules: - $ref: '#/components/examples/TemplateCreateRequestFormFieldRulesExample' - multipart/form-data: - schema: - $ref: '#/components/schemas/TemplateCreateRequest' + - Team + summary: 'List Team Members' + description: 'Provides a paginated list of members (and their roles) that belong to a given team.' + operationId: teamMembers + parameters: + - + name: team_id + in: path + description: 'The id of the team that a member list is being requested from.' + required: true + schema: + type: string + example: 4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c + - + name: page + in: query + description: 'Which page number of the team member list to return. Defaults to `1`.' + schema: + type: integer + default: 1 + - + name: page_size + in: query + description: 'Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.' + schema: + type: integer + default: 20 + maximum: 100 + minimum: 1 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -6020,11 +5791,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TemplateCreateResponse' + $ref: '#/components/schemas/TeamMembersResponse' examples: - default_example: - $ref: '#/components/examples/TemplateCreateResponseExample' - 4XX: + example: + $ref: '#/components/examples/TeamMembersResponse' + '4XX': description: failed_operation content: application/json: @@ -6032,97 +5803,85 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' - 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error403Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' + 429_example: + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] - oauth2: - - template_access + - team_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/TemplateCreate.php + $ref: examples/TeamMembersExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateCreate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TemplateCreate.js + $ref: examples/TeamMembersExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateCreate.ts + $ref: examples/TeamMembersExample.ts - lang: Java label: Java source: - $ref: examples/TemplateCreate.java + $ref: examples/TeamMembersExample.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateCreate.rb + $ref: examples/TeamMembersExample.rb - lang: Python label: Python source: - $ref: examples/TemplateCreate.py + $ref: examples/TeamMembersExample.py - lang: cURL label: cURL source: - $ref: examples/TemplateCreate.sh + $ref: examples/TeamMembersExample.sh x-meta: seo: - title: 'Create Template | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to create an template, click here.' - /template/create_embedded_draft: + title: 'List Team Members | Dropbox Sign for Developers' + description: 'The Dropbox Sign API allows you automate your team management. To find out how to get a list of team members and their roles for a specific team, click here.' + /team/remove_member: post: tags: - - Template - summary: 'Create Embedded Template Draft' - description: 'The first step in an embedded template workflow. Creates a draft template that can then be further set up in the template ''edit'' stage.' - operationId: templateCreateEmbeddedDraft + - Team + summary: 'Remove User from Team' + description: '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.' + operationId: teamRemoveMember requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/TemplateCreateEmbeddedDraftRequest' + $ref: '#/components/schemas/TeamRemoveMemberRequest' examples: - default_example: - $ref: '#/components/examples/TemplateCreateEmbeddedDraftRequestDefaultExample' - form_fields_per_document: - $ref: '#/components/examples/TemplateCreateEmbeddedDraftRequestFormFieldsPerDocumentExample' - form_field_groups: - $ref: '#/components/examples/TemplateCreateEmbeddedDraftRequestFormFieldGroupsExample' - form_field_rules: - $ref: '#/components/examples/TemplateCreateEmbeddedDraftRequestFormFieldRulesExample' - multipart/form-data: - schema: - $ref: '#/components/schemas/TemplateCreateEmbeddedDraftRequest' + example: + $ref: '#/components/examples/TeamRemoveMemberRequest' + account_id_example: + $ref: '#/components/examples/TeamRemoveMemberRequestAccountId' responses: - 200: + '201': description: 'successful operation' headers: X-RateLimit-Limit: @@ -6134,11 +5893,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TemplateCreateEmbeddedDraftResponse' + $ref: '#/components/schemas/TeamGetResponse' examples: - default_example: - $ref: '#/components/examples/TemplateCreateEmbeddedDraftResponseExample' - 4XX: + example: + $ref: '#/components/examples/TeamRemoveMemberResponse' + '4XX': description: failed_operation content: application/json: @@ -6146,88 +5905,97 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' - 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] - oauth2: - - template_access + - team_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/TemplateCreateEmbeddedDraft.php + $ref: examples/TeamRemoveMemberExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateCreateEmbeddedDraft.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TemplateCreateEmbeddedDraft.js + $ref: examples/TeamRemoveMemberExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateCreateEmbeddedDraft.ts + $ref: examples/TeamRemoveMemberExample.ts - lang: Java label: Java source: - $ref: examples/TemplateCreateEmbeddedDraft.java + $ref: examples/TeamRemoveMemberExample.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateCreateEmbeddedDraft.rb + $ref: examples/TeamRemoveMemberExample.rb - lang: Python label: Python source: - $ref: examples/TemplateCreateEmbeddedDraft.py + $ref: examples/TeamRemoveMemberExample.py - lang: cURL label: cURL source: - $ref: examples/TemplateCreateEmbeddedDraft.sh + $ref: examples/TeamRemoveMemberExample.sh x-meta: seo: - title: 'Create Embedded Template Draft | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to create an embedded draft template, click here.' - '/template/delete/{template_id}': - post: + title: 'Remove User from Team | REST API | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to remove a user Account from your Team, click here.' + '/team/sub_teams/{team_id}': + get: tags: - - Template - summary: 'Delete Template' - description: 'Completely deletes the template specified from the account.' - operationId: templateDelete - parameters: - - - name: template_id + - Team + summary: 'List Sub Teams' + description: 'Provides a paginated list of sub teams that belong to a given team.' + operationId: teamSubTeams + parameters: + - + name: team_id in: path - description: 'The id of the Template to delete.' + description: 'The id of the parent Team.' required: true schema: type: string - example: f57db65d3f933b5316d398057a36176831451a35 + example: 4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c + - + name: page + in: query + description: 'Which page number of the SubTeam List to return. Defaults to `1`.' + schema: + type: integer + default: 1 + - + name: page_size + in: query + description: 'Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.' + schema: + type: integer + default: 20 + maximum: 100 + minimum: 1 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -6237,8 +6005,13 @@ paths: X-Ratelimit-Reset: $ref: '#/components/headers/X-Ratelimit-Reset' content: - application/json: {} - 4XX: + application/json: + schema: + $ref: '#/components/schemas/TeamSubTeamsResponse' + examples: + example: + $ref: '#/components/examples/TeamSubTeamsResponse' + '4XX': description: failed_operation content: application/json: @@ -6246,100 +6019,92 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' - 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error403Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' + 429_example: + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] - oauth2: - - template_access + - team_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/TemplateDelete.php + $ref: examples/TeamSubTeamsExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateDelete.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TemplateDelete.js + $ref: examples/TeamSubTeamsExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateDelete.ts + $ref: examples/TeamSubTeamsExample.ts - lang: Java label: Java source: - $ref: examples/TemplateDelete.java + $ref: examples/TeamSubTeamsExample.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateDelete.rb + $ref: examples/TeamSubTeamsExample.rb - lang: Python label: Python source: - $ref: examples/TemplateDelete.py + $ref: examples/TeamSubTeamsExample.py - lang: cURL label: cURL source: - $ref: examples/TemplateDelete.sh + $ref: examples/TeamSubTeamsExample.sh x-meta: seo: - title: 'Delete Template | API Documentation | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom integrations. To find out how to completely delete a template from the account, click here.' - '/template/files/{template_id}': - get: + title: 'List Sub Teams | Dropbox Sign for Developers' + description: 'The Dropbox Sign API allows you automate your team management. To find out how to get a list of sub teams that exist for a given team, click here.' + '/template/add_user/{template_id}': + post: tags: - Template - summary: 'Get Template Files' - description: |- - 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. - operationId: templateFiles + summary: 'Add User to Template' + description: 'Gives the specified Account access to the specified Template. The specified Account must be a part of your Team.' + operationId: templateAddUser parameters: - name: template_id in: path - description: 'The id of the template files to retrieve.' + description: 'The id of the Template to give the Account access to.' required: true schema: type: string example: f57db65d3f933b5316d398057a36176831451a35 - - - name: file_type - in: query - description: 'Set to `pdf` for a single merged document or `zip` for a collection of individual documents.' - schema: - type: string - enum: - - pdf - - zip + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TemplateAddUserRequest' + examples: + example: + $ref: '#/components/examples/TemplateAddUserRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -6349,15 +6114,13 @@ paths: X-Ratelimit-Reset: $ref: '#/components/headers/X-Ratelimit-Reset' content: - application/pdf: - schema: - type: string - format: binary - application/zip: + application/json: schema: - type: string - format: binary - 4XX: + $ref: '#/components/schemas/TemplateGetResponse' + examples: + example: + $ref: '#/components/examples/TemplateAddUserResponse' + '4XX': description: failed_operation content: application/json: @@ -6365,23 +6128,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' - 409_example: - $ref: '#/components/examples/Error409ResponseExample' - 422_example: - $ref: '#/components/examples/Error422ResponseExample' - 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -6393,67 +6150,68 @@ paths: lang: PHP label: PHP source: - $ref: examples/TemplateFiles.php + $ref: examples/TemplateAddUserExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateFiles.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TemplateFiles.js + $ref: examples/TemplateAddUserExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateFiles.ts + $ref: examples/TemplateAddUserExample.ts - lang: Java label: Java source: - $ref: examples/TemplateFiles.java + $ref: examples/TemplateAddUserExample.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateFiles.rb + $ref: examples/TemplateAddUserExample.rb - lang: Python label: Python source: - $ref: examples/TemplateFiles.py + $ref: examples/TemplateAddUserExample.py - lang: cURL label: cURL source: - $ref: examples/TemplateFiles.sh + $ref: examples/TemplateAddUserExample.sh x-meta: seo: - title: 'Get Template Files | API Documentation | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom integrations. To find out how to get a copy of the current specified documents, click here.' - '/template/files_as_data_uri/{template_id}': - get: + title: 'Add User to Template | REST API | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to give an Account access to a Template, click here.' + /template/create: + post: tags: - Template - summary: 'Get Template Files as Data Uri' - description: |- - 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. - operationId: templateFilesAsDataUri - parameters: - - - name: template_id - in: path - description: 'The id of the template files to retrieve.' - required: true - schema: - type: string - example: f57db65d3f933b5316d398057a36176831451a35 + summary: 'Create Template' + description: 'Creates a template that can then be used.' + operationId: templateCreate + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TemplateCreateRequest' + examples: + example: + $ref: '#/components/examples/TemplateCreateRequest' + form_fields_per_document_example: + $ref: '#/components/examples/TemplateCreateRequestFormFieldsPerDocument' + form_field_groups_example: + $ref: '#/components/examples/TemplateCreateRequestFormFieldGroups' + form_field_rules_example: + $ref: '#/components/examples/TemplateCreateRequestFormFieldRules' + multipart/form-data: + schema: + $ref: '#/components/schemas/TemplateCreateRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -6465,11 +6223,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/FileResponseDataUri' + $ref: '#/components/schemas/TemplateCreateResponse' examples: - default_example: - $ref: '#/components/examples/TemplateFilesResponseExample' - 4XX: + example: + $ref: '#/components/examples/TemplateCreateResponse' + '4XX': description: failed_operation content: application/json: @@ -6477,23 +6235,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' - 422_example: - $ref: '#/components/examples/Error422ResponseExample' - 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error409Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -6505,74 +6259,68 @@ paths: lang: PHP label: PHP source: - $ref: examples/TemplateFilesAsDataUri.php + $ref: examples/TemplateCreateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateFilesAsDataUri.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TemplateFilesAsDataUri.js + $ref: examples/TemplateCreateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateFilesAsDataUri.ts + $ref: examples/TemplateCreateExample.ts - lang: Java label: Java source: - $ref: examples/TemplateFilesAsDataUri.java + $ref: examples/TemplateCreateExample.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateFilesAsDataUri.rb + $ref: examples/TemplateCreateExample.rb - lang: Python label: Python source: - $ref: examples/TemplateFilesAsDataUri.py + $ref: examples/TemplateCreateExample.py - lang: cURL label: cURL source: - $ref: examples/TemplateFilesAsDataUri.sh + $ref: examples/TemplateCreateExample.sh x-meta: seo: - title: 'Get Template Files | API Documentation | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom integrations. To find out how to get a copy of the current specified documents, click here.' - '/template/files_as_file_url/{template_id}': - get: + title: 'Create Template | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to create an template, click here.' + /template/create_embedded_draft: + post: tags: - Template - summary: 'Get Template Files as File Url' - description: |- - 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. - operationId: templateFilesAsFileUrl - parameters: - - - name: template_id - in: path - description: 'The id of the template files to retrieve.' - required: true - schema: - type: string - example: f57db65d3f933b5316d398057a36176831451a35 - - - name: force_download - in: query - 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.' - schema: - type: integer - default: 1 + summary: 'Create Embedded Template Draft' + description: 'The first step in an embedded template workflow. Creates a draft template that can then be further set up in the template ''edit'' stage.' + operationId: templateCreateEmbeddedDraft + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TemplateCreateEmbeddedDraftRequest' + examples: + example: + $ref: '#/components/examples/TemplateCreateEmbeddedDraftRequest' + form_fields_per_document_example: + $ref: '#/components/examples/TemplateCreateEmbeddedDraftRequestFormFieldsPerDocument' + form_field_groups_example: + $ref: '#/components/examples/TemplateCreateEmbeddedDraftRequestFormFieldGroups' + form_field_rules_example: + $ref: '#/components/examples/TemplateCreateEmbeddedDraftRequestFormFieldRules' + multipart/form-data: + schema: + $ref: '#/components/schemas/TemplateCreateEmbeddedDraftRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -6584,11 +6332,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/FileResponse' + $ref: '#/components/schemas/TemplateCreateEmbeddedDraftResponse' examples: - default_example: - $ref: '#/components/examples/TemplateFilesResponseExample' - 4XX: + example: + $ref: '#/components/examples/TemplateCreateEmbeddedDraftResponse' + '4XX': description: failed_operation content: application/json: @@ -6596,23 +6344,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' - 422_example: - $ref: '#/components/examples/Error422ResponseExample' - 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error409Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -6624,64 +6368,59 @@ paths: lang: PHP label: PHP source: - $ref: examples/TemplateFilesAsFileUrl.php + $ref: examples/TemplateCreateEmbeddedDraftExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateFilesAsFileUrl.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TemplateFilesAsFileUrl.js + $ref: examples/TemplateCreateEmbeddedDraftExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateFilesAsFileUrl.ts + $ref: examples/TemplateCreateEmbeddedDraftExample.ts - lang: Java label: Java source: - $ref: examples/TemplateFilesAsFileUrl.java + $ref: examples/TemplateCreateEmbeddedDraftExample.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateFilesAsFileUrl.rb + $ref: examples/TemplateCreateEmbeddedDraftExample.rb - lang: Python label: Python source: - $ref: examples/TemplateFilesAsFileUrl.py + $ref: examples/TemplateCreateEmbeddedDraftExample.py - lang: cURL label: cURL source: - $ref: examples/TemplateFilesAsFileUrl.sh + $ref: examples/TemplateCreateEmbeddedDraftExample.sh x-meta: seo: - title: 'Get Template Files | API Documentation | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom integrations. To find out how to get a copy of the current specified documents, click here.' - '/template/{template_id}': - get: + title: 'Create Embedded Template Draft | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to create an embedded draft template, click here.' + '/template/delete/{template_id}': + post: tags: - Template - summary: 'Get Template' - description: 'Returns the Template specified by the `template_id` parameter.' - operationId: templateGet + summary: 'Delete Template' + description: 'Completely deletes the template specified from the account.' + operationId: templateDelete parameters: - name: template_id in: path - description: 'The id of the Template to retrieve.' + description: 'The id of the Template to delete.' required: true schema: type: string example: f57db65d3f933b5316d398057a36176831451a35 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -6691,13 +6430,8 @@ paths: X-Ratelimit-Reset: $ref: '#/components/headers/X-Ratelimit-Reset' content: - application/json: - schema: - $ref: '#/components/schemas/TemplateGetResponse' - examples: - default_example: - $ref: '#/components/examples/TemplateGetResponseExample' - 4XX: + application/json: {} + '4XX': description: failed_operation content: application/json: @@ -6705,19 +6439,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' - 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error404Response' + 409_example: + $ref: '#/components/examples/Error409Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -6729,87 +6463,71 @@ paths: lang: PHP label: PHP source: - $ref: examples/TemplateGet.php + $ref: examples/TemplateDeleteExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateGet.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TemplateGet.js + $ref: examples/TemplateDeleteExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateGet.ts + $ref: examples/TemplateDeleteExample.ts - lang: Java label: Java source: - $ref: examples/TemplateGet.java + $ref: examples/TemplateDeleteExample.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateGet.rb + $ref: examples/TemplateDeleteExample.rb - lang: Python label: Python source: - $ref: examples/TemplateGet.py + $ref: examples/TemplateDeleteExample.py - lang: cURL label: cURL source: - $ref: examples/TemplateGet.sh + $ref: examples/TemplateDeleteExample.sh x-meta: seo: - title: 'Get Template | API Documentation | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom integrations. To find out how to return the Template specified by the `template_id` parameter, click here.' - /template/list: + title: 'Delete Template | API Documentation | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom integrations. To find out how to completely delete a template from the account, click here.' + '/template/files/{template_id}': get: tags: - Template - summary: 'List Templates' + summary: 'Get Template Files' description: |- - Returns a list of the Templates that are accessible by you. + Obtain a copy of the current documents specified by the `template_id` parameter. Returns a PDF or ZIP file. - Take a look at our [search guide](/api/reference/search/) to learn more about querying templates. - operationId: templateList + 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. + operationId: templateFiles parameters: - - name: account_id - in: query - description: 'Which account to return Templates for. Must be a team member. Use `all` to indicate all team members. Defaults to your account.' + name: template_id + in: path + description: 'The id of the template files to retrieve.' + required: true schema: type: string + example: f57db65d3f933b5316d398057a36176831451a35 - - name: page - in: query - description: 'Which page number of the Template List to return. Defaults to `1`.' - schema: - type: integer - default: 1 - - - name: page_size - in: query - description: 'Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.' - schema: - type: integer - default: 20 - maximum: 100 - minimum: 1 - - - name: query + name: file_type in: query - description: 'String that includes search terms and/or fields to be used to filter the Template objects.' + description: 'Set to `pdf` for a single merged document or `zip` for a collection of individual documents.' schema: type: string + enum: + - pdf + - zip responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -6819,13 +6537,15 @@ paths: X-Ratelimit-Reset: $ref: '#/components/headers/X-Ratelimit-Reset' content: - application/json: + application/pdf: schema: - $ref: '#/components/schemas/TemplateListResponse' - examples: - default_example: - $ref: '#/components/examples/TemplateListResponseExample' - 4XX: + type: string + format: binary + application/zip: + schema: + type: string + format: binary + '4XX': description: failed_operation content: application/json: @@ -6833,19 +6553,23 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' + 404_example: + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' + 422_example: + $ref: '#/components/examples/Error422Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -6857,73 +6581,62 @@ paths: lang: PHP label: PHP source: - $ref: examples/TemplateList.php + $ref: examples/TemplateFilesExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateList.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TemplateList.js + $ref: examples/TemplateFilesExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateList.ts + $ref: examples/TemplateFilesExample.ts - lang: Java label: Java source: - $ref: examples/TemplateList.java + $ref: examples/TemplateFilesExample.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateList.rb + $ref: examples/TemplateFilesExample.rb - lang: Python label: Python source: - $ref: examples/TemplateList.py + $ref: examples/TemplateFilesExample.py - lang: cURL label: cURL source: - $ref: examples/TemplateList.sh + $ref: examples/TemplateFilesExample.sh x-meta: seo: - title: 'List Templates | API Documentation | Dropbox Sign for Developers' - description: 'The Dropbox Sign API easily allows you to build custom integrations. To find out how to return a list of the Templates that can be accessed by you, click here.' - '/template/remove_user/{template_id}': - post: + title: 'Get Template Files | API Documentation | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom integrations. To find out how to get a copy of the current specified documents, click here.' + '/template/files_as_data_uri/{template_id}': + get: tags: - Template - summary: 'Remove User from Template' - description: 'Removes the specified Account''s access to the specified Template.' - operationId: templateRemoveUser + summary: 'Get Template Files as Data Uri' + description: |- + 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. + operationId: templateFilesAsDataUri parameters: - name: template_id in: path - description: 'The id of the Template to remove the Account''s access to.' + description: 'The id of the template files to retrieve.' required: true schema: type: string example: f57db65d3f933b5316d398057a36176831451a35 - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/TemplateRemoveUserRequest' - examples: - default_example: - $ref: '#/components/examples/TemplateRemoveUserRequestDefaultExample' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -6935,11 +6648,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TemplateGetResponse' + $ref: '#/components/schemas/FileResponseDataUri' examples: - default_example: - $ref: '#/components/examples/TemplateRemoveUserResponseExample' - 4XX: + example: + $ref: '#/components/examples/TemplateFilesResponse' + '4XX': description: failed_operation content: application/json: @@ -6947,17 +6660,23 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' + 409_example: + $ref: '#/components/examples/Error409Response' + 422_example: + $ref: '#/components/examples/Error422Response' + 429_example: + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -6969,88 +6688,69 @@ paths: lang: PHP label: PHP source: - $ref: examples/TemplateRemoveUser.php + $ref: examples/TemplateFilesAsDataUriExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateRemoveUser.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TemplateRemoveUser.js + $ref: examples/TemplateFilesAsDataUriExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateRemoveUser.ts + $ref: examples/TemplateFilesAsDataUriExample.ts - lang: Java label: Java source: - $ref: examples/TemplateRemoveUser.java + $ref: examples/TemplateFilesAsDataUriExample.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateRemoveUser.rb + $ref: examples/TemplateFilesAsDataUriExample.rb - lang: Python label: Python source: - $ref: examples/TemplateRemoveUser.py + $ref: examples/TemplateFilesAsDataUriExample.py - lang: cURL label: cURL source: - $ref: examples/TemplateRemoveUser.sh + $ref: examples/TemplateFilesAsDataUriExample.sh x-meta: seo: - title: 'Remove User from Template | REST API | Dropbox Sign for Developers' - description: 'The Dropbox Sign API easily allows you to build custom integrations. To find out how to remove a specified Account''s access to a Template, click here.' - '/template/update_files/{template_id}': - post: + title: 'Get Template Files | API Documentation | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom integrations. To find out how to get a copy of the current specified documents, click here.' + '/template/files_as_file_url/{template_id}': + get: tags: - Template - summary: 'Update Template Files' + summary: 'Get Template Files as File Url' description: |- - 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. + 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 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). - operationId: templateUpdateFiles + 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. + operationId: templateFilesAsFileUrl parameters: - name: template_id in: path - description: 'The ID of the template whose files to update.' + description: 'The id of the template files to retrieve.' required: true schema: type: string example: f57db65d3f933b5316d398057a36176831451a35 - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/TemplateUpdateFilesRequest' - examples: - default_example: - $ref: '#/components/examples/TemplateUpdateFilesRequestDefaultExample' - multipart/form-data: - schema: - $ref: '#/components/schemas/TemplateUpdateFilesRequest' + - + name: force_download + in: query + 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.' + schema: + type: integer + default: 1 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -7062,11 +6762,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TemplateUpdateFilesResponse' + $ref: '#/components/schemas/FileResponse' examples: - default_example: - $ref: '#/components/examples/TemplateUpdateFilesResponseExample' - 4XX: + example: + $ref: '#/components/examples/TemplateFilesResponse' + '4XX': description: failed_operation content: application/json: @@ -7074,21 +6774,23 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' + 422_example: + $ref: '#/components/examples/Error422Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -7100,73 +6802,59 @@ paths: lang: PHP label: PHP source: - $ref: examples/TemplateUpdateFiles.php + $ref: examples/TemplateFilesAsFileUrlExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateUpdateFiles.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TemplateUpdateFiles.js + $ref: examples/TemplateFilesAsFileUrlExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateUpdateFiles.ts + $ref: examples/TemplateFilesAsFileUrlExample.ts - lang: Java label: Java source: - $ref: examples/TemplateUpdateFiles.java + $ref: examples/TemplateFilesAsFileUrlExample.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateUpdateFiles.rb + $ref: examples/TemplateFilesAsFileUrlExample.rb - lang: Python label: Python source: - $ref: examples/TemplateUpdateFiles.py + $ref: examples/TemplateFilesAsFileUrlExample.py - lang: cURL label: cURL source: - $ref: examples/TemplateUpdateFiles.sh + $ref: examples/TemplateFilesAsFileUrlExample.sh x-meta: seo: - title: 'Update Template Files | REST API | Dropbox Sign for Developers' - description: 'Overlays a new file with the overlay of an existing template' - /unclaimed_draft/create: - post: + title: 'Get Template Files | API Documentation | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom integrations. To find out how to get a copy of the current specified documents, click here.' + '/template/{template_id}': + get: tags: - - 'Unclaimed Draft' - summary: 'Create Unclaimed Draft' - description: '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.' - operationId: unclaimedDraftCreate - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/UnclaimedDraftCreateRequest' - examples: - default_example: - $ref: '#/components/examples/UnclaimedDraftCreateRequestDefaultExample' - form_fields_per_document: - $ref: '#/components/examples/UnclaimedDraftCreateRequestFormFieldsPerDocumentExample' - form_field_groups: - $ref: '#/components/examples/UnclaimedDraftCreateRequestFormFieldGroupsExample' - form_field_rules: - $ref: '#/components/examples/UnclaimedDraftCreateRequestFormFieldRulesExample' - multipart/form-data: - schema: - $ref: '#/components/schemas/UnclaimedDraftCreateRequest' + - Template + summary: 'Get Template' + description: 'Returns the Template specified by the `template_id` parameter.' + operationId: templateGet + parameters: + - + name: template_id + in: path + description: 'The id of the Template to retrieve.' + required: true + schema: + type: string + example: f57db65d3f933b5316d398057a36176831451a35 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -7178,11 +6866,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/UnclaimedDraftCreateResponse' + $ref: '#/components/schemas/TemplateGetResponse' examples: - default_example: - $ref: '#/components/examples/UnclaimedDraftCreateResponseExample' - 4XX: + example: + $ref: '#/components/examples/TemplateGetResponse' + '4XX': description: failed_operation content: application/json: @@ -7190,96 +6878,106 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' + 404_example: + $ref: '#/components/examples/Error404Response' + 429_example: + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] - oauth2: - - signature_request_access + - template_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/UnclaimedDraftCreate.php + $ref: examples/TemplateGetExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/UnclaimedDraftCreate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/UnclaimedDraftCreate.js + $ref: examples/TemplateGetExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/UnclaimedDraftCreate.ts + $ref: examples/TemplateGetExample.ts - lang: Java label: Java source: - $ref: examples/UnclaimedDraftCreate.java + $ref: examples/TemplateGetExample.java - lang: Ruby label: Ruby source: - $ref: examples/UnclaimedDraftCreate.rb + $ref: examples/TemplateGetExample.rb - lang: Python label: Python source: - $ref: examples/UnclaimedDraftCreate.py + $ref: examples/TemplateGetExample.py - lang: cURL label: cURL source: - $ref: examples/UnclaimedDraftCreate.sh + $ref: examples/TemplateGetExample.sh x-meta: seo: - title: 'Create Unclaimed Draft | REST API | Dropbox Sign for Developers' - description: 'The Dropbox Sign API allows you to build eSign integrations. To find out how to create a new Signature Request Draft that can be claimed using the claim URL, click here.' - /unclaimed_draft/create_embedded: - post: + title: 'Get Template | API Documentation | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom integrations. To find out how to return the Template specified by the `template_id` parameter, click here.' + /template/list: + get: tags: - - 'Unclaimed Draft' - summary: 'Create Embedded Unclaimed Draft' + - Template + summary: 'List Templates' description: |- - 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. + Returns a list of the Templates that are accessible by you. - **NOTE:** Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. - operationId: unclaimedDraftCreateEmbedded - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/UnclaimedDraftCreateEmbeddedRequest' - examples: - default_example: - $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedRequestDefaultExample' - form_fields_per_document: - $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedRequestFormFieldsPerDocumentExample' - form_field_groups: - $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedRequestFormFieldGroupsExample' - form_field_rules: - $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedRequestFormFieldRulesExample' - multipart/form-data: - schema: - $ref: '#/components/schemas/UnclaimedDraftCreateEmbeddedRequest' + Take a look at our [search guide](/api/reference/search/) to learn more about querying templates. + operationId: templateList + parameters: + - + name: account_id + in: query + description: 'Which account to return Templates for. Must be a team member. Use `all` to indicate all team members. Defaults to your account.' + schema: + type: string + - + name: page + in: query + description: 'Which page number of the Template List to return. Defaults to `1`.' + schema: + type: integer + default: 1 + - + name: page_size + in: query + description: 'Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.' + schema: + type: integer + default: 20 + maximum: 100 + minimum: 1 + - + name: query + in: query + description: 'String that includes search terms and/or fields to be used to filter the Template objects.' + schema: + type: string responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -7291,11 +6989,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/UnclaimedDraftCreateResponse' + $ref: '#/components/schemas/TemplateListResponse' examples: - default_example: - $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedResponseExample' - 4XX: + example: + $ref: '#/components/examples/TemplateListResponse' + '4XX': description: failed_operation content: application/json: @@ -7303,95 +7001,92 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' - 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error403Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' + 429_example: + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] - oauth2: - - request_signature - - signature_request_access + - template_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/UnclaimedDraftCreateEmbedded.php + $ref: examples/TemplateListExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/UnclaimedDraftCreateEmbedded.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/UnclaimedDraftCreateEmbedded.js + $ref: examples/TemplateListExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/UnclaimedDraftCreateEmbedded.ts + $ref: examples/TemplateListExample.ts - lang: Java label: Java source: - $ref: examples/UnclaimedDraftCreateEmbedded.java + $ref: examples/TemplateListExample.java - lang: Ruby label: Ruby source: - $ref: examples/UnclaimedDraftCreateEmbedded.rb + $ref: examples/TemplateListExample.rb - lang: Python label: Python source: - $ref: examples/UnclaimedDraftCreateEmbedded.py + $ref: examples/TemplateListExample.py - lang: cURL label: cURL source: - $ref: examples/UnclaimedDraftCreateEmbedded.sh + $ref: examples/TemplateListExample.sh x-meta: seo: - title: 'Create Embedded Unclaimed Draft | Dropbox Sign for Developers' - description: 'The Dropbox Sign API allows you to build custom integrations. To find out how to create and embed a the creation of a Signature Request in an iFrame, click here.' - /unclaimed_draft/create_embedded_with_template: + title: 'List Templates | API Documentation | Dropbox Sign for Developers' + description: 'The Dropbox Sign API easily allows you to build custom integrations. To find out how to return a list of the Templates that can be accessed by you, click here.' + '/template/remove_user/{template_id}': post: tags: - - 'Unclaimed Draft' - summary: 'Create Embedded Unclaimed Draft with Template' - description: |- - 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. - operationId: unclaimedDraftCreateEmbeddedWithTemplate + - Template + summary: 'Remove User from Template' + description: 'Removes the specified Account''s access to the specified Template.' + operationId: templateRemoveUser + parameters: + - + name: template_id + in: path + description: 'The id of the Template to remove the Account''s access to.' + required: true + schema: + type: string + example: f57db65d3f933b5316d398057a36176831451a35 requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/UnclaimedDraftCreateEmbeddedWithTemplateRequest' + $ref: '#/components/schemas/TemplateRemoveUserRequest' examples: - default_example: - $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedWithTemplateRequestDefaultExample' - multipart/form-data: - schema: - $ref: '#/components/schemas/UnclaimedDraftCreateEmbeddedWithTemplateRequest' + example: + $ref: '#/components/examples/TemplateRemoveUserRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -7403,11 +7098,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/UnclaimedDraftCreateResponse' + $ref: '#/components/schemas/TemplateGetResponse' examples: - default_example: - $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedWithTemplateResponseExample' - 4XX: + example: + $ref: '#/components/examples/TemplateRemoveUserResponse' + '4XX': description: failed_operation content: application/json: @@ -7415,102 +7110,105 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' - 409_example: - $ref: '#/components/examples/Error409ResponseExample' - 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] - oauth2: - - signature_request_access + - template_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.php + $ref: examples/TemplateRemoveUserExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.js + $ref: examples/TemplateRemoveUserExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.ts + $ref: examples/TemplateRemoveUserExample.ts - lang: Java label: Java source: - $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.java + $ref: examples/TemplateRemoveUserExample.java - lang: Ruby label: Ruby source: - $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.rb + $ref: examples/TemplateRemoveUserExample.rb - lang: Python label: Python source: - $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.py + $ref: examples/TemplateRemoveUserExample.py - lang: cURL label: cURL source: - $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.sh + $ref: examples/TemplateRemoveUserExample.sh x-meta: seo: - title: 'Embed Unclaimed Draft with Template | Dropbox Sign for Developers' - description: 'The Dropbox Sign API easily allows you to build custom integrations. To find out how to create a new Draft with a previously saved template, click here.' - '/unclaimed_draft/edit_and_resend/{signature_request_id}': + title: 'Remove User from Template | REST API | Dropbox Sign for Developers' + description: 'The Dropbox Sign API easily allows you to build custom integrations. To find out how to remove a specified Account''s access to a Template, click here.' + '/template/update_files/{template_id}': post: tags: - - 'Unclaimed Draft' - summary: 'Edit and Resend Unclaimed Draft' + - Template + summary: 'Update Template Files' description: |- - 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. + Overlays a new file with the overlay of an existing template. The new file(s) must: - **NOTE:** Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. - operationId: unclaimedDraftEditAndResend + 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). + operationId: templateUpdateFiles parameters: - - name: signature_request_id + name: template_id in: path - description: 'The ID of the signature request to edit and resend.' + description: 'The ID of the template whose files to update.' required: true schema: type: string - example: fa5c8a0b0f492d768749333ad6fcc214c111e967 + example: f57db65d3f933b5316d398057a36176831451a35 requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/UnclaimedDraftEditAndResendRequest' + $ref: '#/components/schemas/TemplateUpdateFilesRequest' examples: - default_example: - $ref: '#/components/examples/UnclaimedDraftEditAndResendRequestDefaultExample' + example: + $ref: '#/components/examples/TemplateUpdateFilesRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/TemplateUpdateFilesRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -7522,11 +7220,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/UnclaimedDraftCreateResponse' + $ref: '#/components/schemas/TemplateUpdateFilesResponse' examples: - default_example: - $ref: '#/components/examples/UnclaimedDraftEditAndResendExample' - 4XX: + example: + $ref: '#/components/examples/TemplateUpdateFilesResponse' + '4XX': description: failed_operation content: application/json: @@ -7534,119 +7232,554 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' - 410_example: - $ref: '#/components/examples/Error410ResponseExample' + $ref: '#/components/examples/Error409Response' + 429_example: + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] - oauth2: - - request_signature - - signature_request_access + - template_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/UnclaimedDraftEditAndResend.php + $ref: examples/TemplateUpdateFilesExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/UnclaimedDraftEditAndResend.cs + $ref: examples/TemplateUpdateFilesExample.cs + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/TemplateUpdateFilesExample.ts + - + lang: Java + label: Java + source: + $ref: examples/TemplateUpdateFilesExample.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/TemplateUpdateFilesExample.rb + - + lang: Python + label: Python + source: + $ref: examples/TemplateUpdateFilesExample.py + - + lang: cURL + label: cURL + source: + $ref: examples/TemplateUpdateFilesExample.sh + x-meta: + seo: + title: 'Update Template Files | REST API | Dropbox Sign for Developers' + description: 'Overlays a new file with the overlay of an existing template' + /unclaimed_draft/create: + post: + tags: + - 'Unclaimed Draft' + summary: 'Create Unclaimed Draft' + description: '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.' + operationId: unclaimedDraftCreate + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UnclaimedDraftCreateRequest' + examples: + example: + $ref: '#/components/examples/UnclaimedDraftCreateRequest' + form_fields_per_document_example: + $ref: '#/components/examples/UnclaimedDraftCreateRequestFormFieldsPerDocument' + form_field_groups_example: + $ref: '#/components/examples/UnclaimedDraftCreateRequestFormFieldGroups' + form_field_rules_example: + $ref: '#/components/examples/UnclaimedDraftCreateRequestFormFieldRules' + multipart/form-data: + schema: + $ref: '#/components/schemas/UnclaimedDraftCreateRequest' + responses: + '200': + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/json: + schema: + $ref: '#/components/schemas/UnclaimedDraftCreateResponse' + examples: + example: + $ref: '#/components/examples/UnclaimedDraftCreateResponse' + '4XX': + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400Response' + 401_example: + $ref: '#/components/examples/Error401Response' + 402_example: + $ref: '#/components/examples/Error402Response' + 403_example: + $ref: '#/components/examples/Error403Response' + 4XX_example: + $ref: '#/components/examples/Error4XXResponse' + security: + - + api_key: [] + - + oauth2: + - signature_request_access + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/UnclaimedDraftCreateExample.php - - lang: JavaScript - label: JavaScript + lang: 'C#' + label: 'C#' source: - $ref: examples/UnclaimedDraftEditAndResend.js + $ref: examples/UnclaimedDraftCreateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/UnclaimedDraftEditAndResend.ts + $ref: examples/UnclaimedDraftCreateExample.ts - lang: Java label: Java source: - $ref: examples/UnclaimedDraftEditAndResend.java + $ref: examples/UnclaimedDraftCreateExample.java - lang: Ruby label: Ruby source: - $ref: examples/UnclaimedDraftEditAndResend.rb + $ref: examples/UnclaimedDraftCreateExample.rb - lang: Python label: Python source: - $ref: examples/UnclaimedDraftEditAndResend.py + $ref: examples/UnclaimedDraftCreateExample.py - lang: cURL label: cURL source: - $ref: examples/UnclaimedDraftEditAndResend.sh + $ref: examples/UnclaimedDraftCreateExample.sh x-meta: seo: - title: 'Edit and Resend Unclaimed Draft | Dropbox Sign for Developers' - description: 'The Dropbox Sign API easily allows you to build custom integrations. To find out how to create a new signature request from an embedded request, click here.' -components: - schemas: - AccountCreateRequest: - required: - - email_address - properties: - client_id: - description: |- - Used when creating a new account with OAuth authorization. + title: 'Create Unclaimed Draft | REST API | Dropbox Sign for Developers' + description: 'The Dropbox Sign API allows you to build eSign integrations. To find out how to create a new Signature Request Draft that can be claimed using the claim URL, click here.' + /unclaimed_draft/create_embedded: + post: + tags: + - 'Unclaimed Draft' + summary: 'Create Embedded Unclaimed Draft' + description: |- + 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. - See [OAuth 2.0 Authorization](https://app.hellosign.com/api/oauthWalkthrough#OAuthAuthorization) - type: string - client_secret: - description: |- - Used when creating a new account with OAuth authorization. + **NOTE:** Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. + operationId: unclaimedDraftCreateEmbedded + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UnclaimedDraftCreateEmbeddedRequest' + examples: + example: + $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedRequest' + form_fields_per_document_example: + $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedRequestFormFieldsPerDocument' + form_field_groups_example: + $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedRequestFormFieldGroups' + form_field_rules_example: + $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedRequestFormFieldRules' + multipart/form-data: + schema: + $ref: '#/components/schemas/UnclaimedDraftCreateEmbeddedRequest' + responses: + '200': + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/json: + schema: + $ref: '#/components/schemas/UnclaimedDraftCreateResponse' + examples: + example: + $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedResponse' + '4XX': + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400Response' + 401_example: + $ref: '#/components/examples/Error401Response' + 402_example: + $ref: '#/components/examples/Error402Response' + 403_example: + $ref: '#/components/examples/Error403Response' + 404_example: + $ref: '#/components/examples/Error404Response' + 409_example: + $ref: '#/components/examples/Error409Response' + 4XX_example: + $ref: '#/components/examples/Error4XXResponse' + security: + - + api_key: [] + - + oauth2: + - request_signature + - signature_request_access + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/UnclaimedDraftCreateEmbeddedExample.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/UnclaimedDraftCreateEmbeddedExample.cs + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/UnclaimedDraftCreateEmbeddedExample.ts + - + lang: Java + label: Java + source: + $ref: examples/UnclaimedDraftCreateEmbeddedExample.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/UnclaimedDraftCreateEmbeddedExample.rb + - + lang: Python + label: Python + source: + $ref: examples/UnclaimedDraftCreateEmbeddedExample.py + - + lang: cURL + label: cURL + source: + $ref: examples/UnclaimedDraftCreateEmbeddedExample.sh + x-meta: + seo: + title: 'Create Embedded Unclaimed Draft | Dropbox Sign for Developers' + description: 'The Dropbox Sign API allows you to build custom integrations. To find out how to create and embed a the creation of a Signature Request in an iFrame, click here.' + /unclaimed_draft/create_embedded_with_template: + post: + tags: + - 'Unclaimed Draft' + summary: 'Create Embedded Unclaimed Draft with Template' + description: |- + 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. - See [OAuth 2.0 Authorization](https://app.hellosign.com/api/oauthWalkthrough#OAuthAuthorization) - type: string - email_address: - description: 'The email address which will be associated with the new Account.' - type: string - format: email - locale: - 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.' - type: string - type: object - AccountUpdateRequest: - properties: - account_id: - description: 'The ID of the Account' - type: string - nullable: true - callback_url: - description: 'The URL that Dropbox Sign should POST events to.' - type: string - locale: - 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.' - type: string - type: object - AccountVerifyRequest: - required: - - email_address - properties: - email_address: - description: 'Email address to run the verification for.' - type: string + **NOTE:** Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. + operationId: unclaimedDraftCreateEmbeddedWithTemplate + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UnclaimedDraftCreateEmbeddedWithTemplateRequest' + examples: + example: + $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedWithTemplateRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/UnclaimedDraftCreateEmbeddedWithTemplateRequest' + responses: + '200': + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/json: + schema: + $ref: '#/components/schemas/UnclaimedDraftCreateResponse' + examples: + example: + $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedWithTemplateResponse' + '4XX': + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400Response' + 401_example: + $ref: '#/components/examples/Error401Response' + 402_example: + $ref: '#/components/examples/Error402Response' + 403_example: + $ref: '#/components/examples/Error403Response' + 404_example: + $ref: '#/components/examples/Error404Response' + 409_example: + $ref: '#/components/examples/Error409Response' + 429_example: + $ref: '#/components/examples/Error429Response' + 4XX_example: + $ref: '#/components/examples/Error4XXResponse' + security: + - + api_key: [] + - + oauth2: + - signature_request_access + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplateExample.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplateExample.cs + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplateExample.ts + - + lang: Java + label: Java + source: + $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplateExample.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplateExample.rb + - + lang: Python + label: Python + source: + $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplateExample.py + - + lang: cURL + label: cURL + source: + $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplateExample.sh + x-meta: + seo: + title: 'Embed Unclaimed Draft with Template | Dropbox Sign for Developers' + description: 'The Dropbox Sign API easily allows you to build custom integrations. To find out how to create a new Draft with a previously saved template, click here.' + '/unclaimed_draft/edit_and_resend/{signature_request_id}': + post: + tags: + - 'Unclaimed Draft' + summary: 'Edit and Resend Unclaimed Draft' + description: |- + 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. + operationId: unclaimedDraftEditAndResend + parameters: + - + name: signature_request_id + in: path + description: 'The ID of the signature request to edit and resend.' + required: true + schema: + type: string + example: fa5c8a0b0f492d768749333ad6fcc214c111e967 + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UnclaimedDraftEditAndResendRequest' + examples: + example: + $ref: '#/components/examples/UnclaimedDraftEditAndResendRequest' + responses: + '200': + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/json: + schema: + $ref: '#/components/schemas/UnclaimedDraftCreateResponse' + examples: + example: + $ref: '#/components/examples/UnclaimedDraftEditAndResend' + '4XX': + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400Response' + 401_example: + $ref: '#/components/examples/Error401Response' + 402_example: + $ref: '#/components/examples/Error402Response' + 403_example: + $ref: '#/components/examples/Error403Response' + 404_example: + $ref: '#/components/examples/Error404Response' + 409_example: + $ref: '#/components/examples/Error409Response' + 410_example: + $ref: '#/components/examples/Error410Response' + 4XX_example: + $ref: '#/components/examples/Error4XXResponse' + security: + - + api_key: [] + - + oauth2: + - request_signature + - signature_request_access + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/UnclaimedDraftEditAndResendExample.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/UnclaimedDraftEditAndResendExample.cs + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/UnclaimedDraftEditAndResendExample.ts + - + lang: Java + label: Java + source: + $ref: examples/UnclaimedDraftEditAndResendExample.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/UnclaimedDraftEditAndResendExample.rb + - + lang: Python + label: Python + source: + $ref: examples/UnclaimedDraftEditAndResendExample.py + - + lang: cURL + label: cURL + source: + $ref: examples/UnclaimedDraftEditAndResendExample.sh + x-meta: + seo: + title: 'Edit and Resend Unclaimed Draft | Dropbox Sign for Developers' + description: 'The Dropbox Sign API easily allows you to build custom integrations. To find out how to create a new signature request from an embedded request, click here.' +components: + schemas: + AccountCreateRequest: + required: + - email_address + properties: + client_id: + description: |- + Used when creating a new account with OAuth authorization. + + See [OAuth 2.0 Authorization](https://app.hellosign.com/api/oauthWalkthrough#OAuthAuthorization) + type: string + client_secret: + description: |- + Used when creating a new account with OAuth authorization. + + See [OAuth 2.0 Authorization](https://app.hellosign.com/api/oauthWalkthrough#OAuthAuthorization) + type: string + email_address: + description: 'The email address which will be associated with the new Account.' + type: string + format: email + locale: + 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.' + type: string + type: object + AccountUpdateRequest: + properties: + account_id: + description: 'The ID of the Account' + type: string + nullable: true + callback_url: + description: 'The URL that Dropbox Sign should POST events to.' + type: string + locale: + 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.' + type: string + type: object + AccountVerifyRequest: + required: + - email_address + properties: + email_address: + description: 'Email address to run the verification for.' + type: string format: email type: object ApiAppCreateRequest: @@ -7757,7 +7890,7 @@ components: - number properties: number: - description: 'The Fax Line number.' + description: 'The Fax Line number' type: string account_id: description: 'Account ID' @@ -7850,20 +7983,20 @@ components: - country properties: area_code: - description: 'Area code' + description: 'Area code of the new Fax Line' type: integer country: - description: Country + description: 'Country of the area code' type: string enum: - CA - US - UK city: - description: City + description: 'City of the area code' type: string account_id: - description: 'Account ID' + description: 'Account ID of the account that will be assigned this new Fax Line' type: string example: ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97 type: object @@ -7872,7 +8005,7 @@ components: - number properties: number: - description: 'The Fax Line number.' + description: 'The Fax Line number' type: string type: object FaxLineRemoveUserRequest: @@ -7880,14 +8013,14 @@ components: - number properties: number: - description: 'The Fax Line number.' + description: 'The Fax Line number' type: string account_id: - description: 'Account ID' + description: 'Account ID of the user to remove access' type: string example: ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97 email_address: - description: 'Email address' + description: 'Email address of the user to remove access' type: string format: email type: object @@ -7896,7 +8029,9 @@ components: - recipient properties: recipient: - description: 'Fax Send To Recipient' + description: |- + Recipient of the fax + Can be a phone number in E.164 format or email address type: string example: recipient@example.com sender: @@ -7904,13 +8039,19 @@ components: type: string example: sender@example.com files: - description: 'Fax File to Send' + description: |- + Use `files[]` to indicate the uploaded file(s) to fax + + This endpoint requires either **files** or **file_urls[]**, but not both. type: array items: type: string format: binary file_urls: - description: 'Fax File URL to Send' + description: |- + Use `file_urls[]` to have Dropbox Fax download the file(s) to fax + + This endpoint requires either **files** or **file_urls[]**, but not both. type: array items: type: string @@ -7919,11 +8060,11 @@ components: type: boolean default: false cover_page_to: - description: 'Fax Cover Page for Recipient' + description: 'Fax cover page recipient information' type: string example: 'Recipient Name' cover_page_from: - description: 'Fax Cover Page for Sender' + description: 'Fax cover page sender information' type: string example: 'Sender Name' cover_page_message: @@ -8119,27 +8260,361 @@ components: Example CSV: - ``` - name, email_address, pin, company_field - George, george@example.com, d79a3td, ABC Corp - Mary, mary@example.com, gd9as5b, 123 LLC - ``` - type: string - format: binary - signer_list: - 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.' + ``` + name, email_address, pin, company_field + George, george@example.com, d79a3td, ABC Corp + Mary, mary@example.com, gd9as5b, 123 LLC + ``` + type: string + format: binary + signer_list: + 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.' + type: array + items: + $ref: '#/components/schemas/SubBulkSignerList' + allow_decline: + description: 'Allows signers to decline to sign a document if `true`. Defaults to `false`.' + type: boolean + default: false + ccs: + description: 'Add CC email recipients. Required when a CC role exists for the Template.' + type: array + items: + $ref: '#/components/schemas/SubCC' + client_id: + 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.' + type: string + custom_fields: + 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. + type: array + items: + $ref: '#/components/schemas/SubCustomField' + message: + description: 'The custom message in the email that will be sent to the signers.' + type: string + maxLength: 5000 + metadata: + 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. + type: object + maxItems: 10 + additionalProperties: {} + signing_redirect_url: + description: 'The URL you want signers redirected to after they successfully sign.' + type: string + subject: + description: 'The subject in the email that will be sent to the signers.' + type: string + maxLength: 255 + test_mode: + description: 'Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.' + type: boolean + default: false + title: + description: 'The title you want to assign to the SignatureRequest.' + type: string + maxLength: 255 + type: object + SignatureRequestCreateEmbeddedRequest: + required: + - client_id + properties: + files: + description: |- + Use `files[]` to indicate the uploaded file(s) to send for signature. + + This endpoint requires either **files** or **file_urls[]**, but not both. + type: array + items: + type: string + format: binary + file_urls: + 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. + type: array + items: + type: string + signers: + description: |- + Add Signers to your Signature Request. + + This endpoint requires either **signers** or **grouped_signers**, but not both. + type: array + items: + $ref: '#/components/schemas/SubSignatureRequestSigner' + grouped_signers: + description: |- + Add Grouped Signers to your Signature Request. + + This endpoint requires either **signers** or **grouped_signers**, but not both. + type: array + items: + $ref: '#/components/schemas/SubSignatureRequestGroupedSigners' + allow_decline: + description: 'Allows signers to decline to sign a document if `true`. Defaults to `false`.' + type: boolean + default: false + allow_reassign: + description: |- + Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. + + **NOTE:** Only available for Premium plan. + type: boolean + default: false + attachments: + description: 'A list describing the attachments' + type: array + items: + $ref: '#/components/schemas/SubAttachment' + cc_email_addresses: + description: 'The email addresses that should be CCed.' + type: array + items: + type: string + format: email + client_id: + description: 'Client id of the app you''re using to create this embedded signature request. Used for security purposes.' + type: string + custom_fields: + 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. + type: array + items: + $ref: '#/components/schemas/SubCustomField' + field_options: + $ref: '#/components/schemas/SubFieldOptions' + form_field_groups: + 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`.' + type: array + items: + $ref: '#/components/schemas/SubFormFieldGroup' + form_field_rules: + description: 'Conditional Logic rules for fields defined in `form_fields_per_document`.' + type: array + items: + $ref: '#/components/schemas/SubFormFieldRule' + form_fields_per_document: + 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` + type: array + items: + $ref: '#/components/schemas/SubFormFieldsPerDocumentBase' + hide_text_tags: + 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. + type: boolean + default: false + message: + description: 'The custom message in the email that will be sent to the signers.' + type: string + maxLength: 5000 + metadata: + 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. + type: object + maxItems: 10 + additionalProperties: {} + signing_options: + $ref: '#/components/schemas/SubSigningOptions' + subject: + description: 'The subject in the email that will be sent to the signers.' + type: string + maxLength: 255 + test_mode: + description: 'Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.' + type: boolean + default: false + title: + description: 'The title you want to assign to the SignatureRequest.' + type: string + maxLength: 255 + use_text_tags: + 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`.' + type: boolean + default: false + populate_auto_fill_fields: + 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. + type: boolean + default: false + expires_at: + 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.' + type: integer + nullable: true + type: object + SignatureRequestCreateEmbeddedWithTemplateRequest: + required: + - client_id + - template_ids + - signers + properties: + template_ids: + description: 'Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used.' + type: array + items: + type: string + allow_decline: + description: 'Allows signers to decline to sign a document if `true`. Defaults to `false`.' + type: boolean + default: false + ccs: + description: 'Add CC email recipients. Required when a CC role exists for the Template.' + type: array + items: + $ref: '#/components/schemas/SubCC' + client_id: + description: 'Client id of the app you''re using to create this embedded signature request. Used for security purposes.' + type: string + custom_fields: + description: 'An array defining values and options for custom fields. Required when a custom field exists in the Template.' + type: array + items: + $ref: '#/components/schemas/SubCustomField' + files: + description: |- + Use `files[]` to indicate the uploaded file(s) to send for signature. + + This endpoint requires either **files** or **file_urls[]**, but not both. + type: array + items: + type: string + format: binary + file_urls: + 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. + type: array + items: + type: string + message: + description: 'The custom message in the email that will be sent to the signers.' + type: string + maxLength: 5000 + metadata: + 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. + type: object + maxItems: 10 + additionalProperties: {} + signers: + description: 'Add Signers to your Templated-based Signature Request.' + type: array + items: + $ref: '#/components/schemas/SubSignatureRequestTemplateSigner' + signing_options: + $ref: '#/components/schemas/SubSigningOptions' + subject: + description: 'The subject in the email that will be sent to the signers.' + type: string + maxLength: 255 + test_mode: + description: 'Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.' + type: boolean + default: false + title: + description: 'The title you want to assign to the SignatureRequest.' + type: string + maxLength: 255 + populate_auto_fill_fields: + 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. + type: boolean + default: false + type: object + SignatureRequestEditRequest: + properties: + files: + description: |- + Use `files[]` to indicate the uploaded file(s) to send for signature. + + This endpoint requires either **files** or **file_urls[]**, but not both. + type: array + items: + type: string + format: binary + file_urls: + 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. + type: array + items: + type: string + signers: + description: |- + Add Signers to your Signature Request. + + This endpoint requires either **signers** or **grouped_signers**, but not both. + type: array + items: + $ref: '#/components/schemas/SubSignatureRequestSigner' + grouped_signers: + description: |- + Add Grouped Signers to your Signature Request. + + This endpoint requires either **signers** or **grouped_signers**, but not both. type: array items: - $ref: '#/components/schemas/SubBulkSignerList' + $ref: '#/components/schemas/SubSignatureRequestGroupedSigners' allow_decline: description: 'Allows signers to decline to sign a document if `true`. Defaults to `false`.' type: boolean default: false - ccs: - description: 'Add CC email recipients. Required when a CC role exists for the Template.' + allow_reassign: + 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. + type: boolean + default: false + attachments: + description: 'A list describing the attachments' type: array items: - $ref: '#/components/schemas/SubCC' + $ref: '#/components/schemas/SubAttachment' + cc_email_addresses: + description: 'The email addresses that should be CCed.' + type: array + items: + type: string + format: email client_id: 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.' type: string @@ -8153,6 +8628,52 @@ components: type: array items: $ref: '#/components/schemas/SubCustomField' + field_options: + $ref: '#/components/schemas/SubFieldOptions' + form_field_groups: + 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`.' + type: array + items: + $ref: '#/components/schemas/SubFormFieldGroup' + form_field_rules: + description: 'Conditional Logic rules for fields defined in `form_fields_per_document`.' + type: array + items: + $ref: '#/components/schemas/SubFormFieldRule' + form_fields_per_document: + 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` + type: array + items: + $ref: '#/components/schemas/SubFormFieldsPerDocumentBase' + hide_text_tags: + 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. + type: boolean + default: false + is_eid: + 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. + type: boolean + default: false message: description: 'The custom message in the email that will be sent to the signers.' type: string @@ -8165,6 +8686,8 @@ components: type: object maxItems: 10 additionalProperties: {} + signing_options: + $ref: '#/components/schemas/SubSigningOptions' signing_redirect_url: description: 'The URL you want signers redirected to after they successfully sign.' type: string @@ -8180,8 +8703,16 @@ components: description: 'The title you want to assign to the SignatureRequest.' type: string maxLength: 255 + use_text_tags: + 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`.' + type: boolean + default: false + expires_at: + 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.' + type: integer + nullable: true type: object - SignatureRequestCreateEmbeddedRequest: + SignatureRequestEditEmbeddedRequest: required: - client_id properties: @@ -8333,7 +8864,7 @@ components: type: integer nullable: true type: object - SignatureRequestCreateEmbeddedWithTemplateRequest: + SignatureRequestEditEmbeddedWithTemplateRequest: required: - client_id - template_ids @@ -8417,6 +8948,94 @@ components: type: boolean default: false type: object + SignatureRequestEditWithTemplateRequest: + description: '' + required: + - signers + - template_ids + properties: + template_ids: + description: 'Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used.' + type: array + items: + type: string + allow_decline: + description: 'Allows signers to decline to sign a document if `true`. Defaults to `false`.' + type: boolean + default: false + ccs: + description: 'Add CC email recipients. Required when a CC role exists for the Template.' + type: array + items: + $ref: '#/components/schemas/SubCC' + client_id: + description: 'Client id of the app to associate with the signature request. Used to apply the branding and callback url defined for the app.' + type: string + custom_fields: + description: 'An array defining values and options for custom fields. Required when a custom field exists in the Template.' + type: array + items: + $ref: '#/components/schemas/SubCustomField' + files: + description: |- + Use `files[]` to indicate the uploaded file(s) to send for signature. + + This endpoint requires either **files** or **file_urls[]**, but not both. + type: array + items: + type: string + format: binary + file_urls: + 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. + type: array + items: + type: string + is_eid: + 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. + type: boolean + default: false + message: + description: 'The custom message in the email that will be sent to the signers.' + type: string + maxLength: 5000 + metadata: + 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. + type: object + maxItems: 10 + additionalProperties: {} + signers: + description: 'Add Signers to your Templated-based Signature Request.' + type: array + items: + $ref: '#/components/schemas/SubSignatureRequestTemplateSigner' + signing_options: + $ref: '#/components/schemas/SubSigningOptions' + signing_redirect_url: + description: 'The URL you want signers redirected to after they successfully sign.' + type: string + subject: + description: 'The subject in the email that will be sent to the signers.' + type: string + maxLength: 255 + test_mode: + description: 'Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.' + type: boolean + default: false + title: + description: 'The title you want to assign to the SignatureRequest.' + type: string + maxLength: 255 + type: object SignatureRequestRemindRequest: required: - email_address @@ -13085,498 +13704,522 @@ components: type: string default: 'Hello API Event Received' examples: - AccountCreateRequestDefaultExample: + AccountCreateRequest: summary: 'Default Example' value: - $ref: examples/json/AccountCreateRequestDefaultExample.json - AccountCreateRequestOAuthExample: + $ref: examples/json/AccountCreateRequest.json + AccountCreateRequestOAuth: summary: 'OAuth Example' value: - $ref: examples/json/AccountCreateRequestOAuthExample.json - AccountUpdateRequestDefaultExample: + $ref: examples/json/AccountCreateRequestOAuth.json + AccountUpdateRequest: summary: 'Default Example' value: - $ref: examples/json/AccountUpdateRequestDefaultExample.json - AccountVerifyRequestDefaultExample: + $ref: examples/json/AccountUpdateRequest.json + AccountVerifyRequest: summary: 'Default Example' value: - $ref: examples/json/AccountVerifyRequestDefaultExample.json - ApiAppCreateRequestDefaultExample: + $ref: examples/json/AccountVerifyRequest.json + ApiAppCreateRequest: summary: 'Default Example' value: - $ref: examples/json/ApiAppCreateRequestDefaultExample.json - ApiAppUpdateRequestDefaultExample: + $ref: examples/json/ApiAppCreateRequest.json + ApiAppUpdateRequest: summary: 'Default Example' value: - $ref: examples/json/ApiAppUpdateRequestDefaultExample.json - EmbeddedEditUrlRequestDefaultExample: + $ref: examples/json/ApiAppUpdateRequest.json + EmbeddedEditUrlRequest: summary: 'Default Example' value: - $ref: examples/json/EmbeddedEditUrlRequestDefaultExample.json - FaxLineAddUserRequestExample: + $ref: examples/json/EmbeddedEditUrlRequest.json + FaxLineAddUserRequest: summary: 'Default Example' value: - $ref: examples/json/FaxLineAddUserRequestExample.json - FaxLineCreateRequestExample: + $ref: examples/json/FaxLineAddUserRequest.json + FaxLineCreateRequest: summary: 'Default Example' value: - $ref: examples/json/FaxLineCreateRequestExample.json - FaxLineDeleteRequestExample: + $ref: examples/json/FaxLineCreateRequest.json + FaxLineDeleteRequest: summary: 'Default Example' value: - $ref: examples/json/FaxLineDeleteRequestExample.json - FaxLineRemoveUserRequestExample: + $ref: examples/json/FaxLineDeleteRequest.json + FaxLineRemoveUserRequest: summary: 'Default Example' value: - $ref: examples/json/FaxLineRemoveUserRequestExample.json - FaxSendRequestExample: + $ref: examples/json/FaxLineRemoveUserRequest.json + FaxSendRequest: summary: 'Default Example' value: - $ref: examples/json/FaxSendRequestExample.json - OAuthTokenGenerateRequestExample: + $ref: examples/json/FaxSendRequest.json + OAuthTokenGenerateRequest: summary: 'OAuth Token Generate Example' value: - $ref: examples/json/OAuthTokenGenerateRequestExample.json - OAuthTokenRefreshRequestExample: + $ref: examples/json/OAuthTokenGenerateRequest.json + OAuthTokenRefreshRequest: summary: 'OAuth Token Refresh Example' value: - $ref: examples/json/OAuthTokenRefreshRequestExample.json - ReportCreateRequestDefaultExample: + $ref: examples/json/OAuthTokenRefreshRequest.json + ReportCreateRequest: + summary: 'Default Example' + value: + $ref: examples/json/ReportCreateRequest.json + SignatureRequestBulkCreateEmbeddedWithTemplateRequest: + summary: 'Default Example' + value: + $ref: examples/json/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.json + SignatureRequestBulkSendWithTemplateRequest: + summary: 'Default Example' + value: + $ref: examples/json/SignatureRequestBulkSendWithTemplateRequest.json + SignatureRequestCreateEmbeddedRequest: summary: 'Default Example' value: - $ref: examples/json/ReportCreateRequestDefaultExample.json - SignatureRequestBulkCreateEmbeddedWithTemplateRequestDefaultExample: + $ref: examples/json/SignatureRequestCreateEmbeddedRequest.json + SignatureRequestCreateEmbeddedRequestGroupedSigners: + summary: 'Grouped Signers Example' + value: + $ref: examples/json/SignatureRequestCreateEmbeddedRequestGroupedSigners.json + SignatureRequestCreateEmbeddedWithTemplateRequest: summary: 'Default Example' value: - $ref: examples/json/SignatureRequestBulkCreateEmbeddedWithTemplateRequestDefaultExample.json - SignatureRequestBulkSendWithTemplateRequestDefaultExample: + $ref: examples/json/SignatureRequestCreateEmbeddedWithTemplateRequest.json + SignatureRequestEditRequest: summary: 'Default Example' value: - $ref: examples/json/SignatureRequestBulkSendWithTemplateRequestDefaultExample.json - SignatureRequestCreateEmbeddedRequestDefaultExample: + $ref: examples/json/SignatureRequestEditRequest.json + SignatureRequestEditRequestGroupedSigners: + summary: 'Grouped Signers Example' + value: + $ref: examples/json/SignatureRequestEditRequestGroupedSigners.json + SignatureRequestEditEmbeddedRequest: summary: 'Default Example' value: - $ref: examples/json/SignatureRequestCreateEmbeddedRequestDefaultExample.json - SignatureRequestCreateEmbeddedRequestGroupedSignersExample: + $ref: examples/json/SignatureRequestEditEmbeddedRequest.json + SignatureRequestEditEmbeddedRequestGroupedSigners: summary: 'Grouped Signers Example' value: - $ref: examples/json/SignatureRequestCreateEmbeddedRequestGroupedSignersExample.json - SignatureRequestCreateEmbeddedWithTemplateRequestDefaultExample: + $ref: examples/json/SignatureRequestEditEmbeddedRequestGroupedSigners.json + SignatureRequestEditEmbeddedWithTemplateRequest: + summary: 'Default Example' + value: + $ref: examples/json/SignatureRequestEditEmbeddedWithTemplateRequest.json + SignatureRequestEditWithTemplateRequest: summary: 'Default Example' value: - $ref: examples/json/SignatureRequestCreateEmbeddedWithTemplateRequestDefaultExample.json - SignatureRequestRemindRequestDefaultExample: + $ref: examples/json/SignatureRequestEditWithTemplateRequest.json + SignatureRequestRemindRequest: summary: 'Default Example' value: - $ref: examples/json/SignatureRequestRemindRequestDefaultExample.json - SignatureRequestSendRequestDefaultExample: + $ref: examples/json/SignatureRequestRemindRequest.json + SignatureRequestSendRequest: summary: 'Default Example' value: - $ref: examples/json/SignatureRequestSendRequestDefaultExample.json - SignatureRequestSendRequestGroupedSignersExample: + $ref: examples/json/SignatureRequestSendRequest.json + SignatureRequestSendRequestGroupedSigners: summary: 'Grouped Signers Example' value: - $ref: examples/json/SignatureRequestSendRequestGroupedSignersExample.json - SignatureRequestSendWithTemplateRequestDefaultExample: + $ref: examples/json/SignatureRequestSendRequestGroupedSigners.json + SignatureRequestSendWithTemplateRequest: summary: 'Default Example' value: - $ref: examples/json/SignatureRequestSendWithTemplateRequestDefaultExample.json - SignatureRequestUpdateRequestDefaultExample: + $ref: examples/json/SignatureRequestSendWithTemplateRequest.json + SignatureRequestUpdateRequest: summary: 'Default Example' value: - $ref: examples/json/SignatureRequestUpdateRequestDefaultExample.json - TeamAddMemberRequestEmailAddressExample: + $ref: examples/json/SignatureRequestUpdateRequest.json + TeamAddMemberRequest: summary: 'Email Address Example' value: - $ref: examples/json/TeamAddMemberRequestEmailAddressExample.json - TeamAddMemberRequestAccountIdExample: + $ref: examples/json/TeamAddMemberRequest.json + TeamAddMemberRequestAccountId: summary: 'Account ID Example' value: - $ref: examples/json/TeamAddMemberRequestAccountIdExample.json - TeamCreateRequestDefaultExample: + $ref: examples/json/TeamAddMemberRequestAccountId.json + TeamCreateRequest: summary: 'Default Example' value: - $ref: examples/json/TeamCreateRequestDefaultExample.json - TeamRemoveMemberRequestEmailAddressExample: + $ref: examples/json/TeamCreateRequest.json + TeamRemoveMemberRequest: summary: 'Email Address Example' value: - $ref: examples/json/TeamRemoveMemberRequestEmailAddressExample.json - TeamRemoveMemberRequestAccountIdExample: + $ref: examples/json/TeamRemoveMemberRequest.json + TeamRemoveMemberRequestAccountId: summary: 'Account ID Example' value: - $ref: examples/json/TeamRemoveMemberRequestAccountIdExample.json - TeamUpdateRequestDefaultExample: + $ref: examples/json/TeamRemoveMemberRequestAccountId.json + TeamUpdateRequest: summary: 'Default Example' value: - $ref: examples/json/TeamUpdateRequestDefaultExample.json - TemplateAddUserRequestDefaultExample: + $ref: examples/json/TeamUpdateRequest.json + TemplateAddUserRequest: summary: 'Default Example' value: - $ref: examples/json/TemplateAddUserRequestDefaultExample.json - TemplateCreateRequestDefaultExample: + $ref: examples/json/TemplateAddUserRequest.json + TemplateCreateRequest: summary: 'Default Example' value: - $ref: examples/json/TemplateCreateRequestDefaultExample.json - TemplateCreateRequestFormFieldsPerDocumentExample: + $ref: examples/json/TemplateCreateRequest.json + TemplateCreateRequestFormFieldsPerDocument: summary: 'Form Fields Per Document Example' value: - $ref: examples/json/TemplateCreateRequestFormFieldsPerDocumentExample.json - TemplateCreateRequestFormFieldGroupsExample: + $ref: examples/json/TemplateCreateRequestFormFieldsPerDocument.json + TemplateCreateRequestFormFieldGroups: summary: 'Form Fields Per Document and Groups Example' value: - $ref: examples/json/TemplateCreateRequestFormFieldGroupsExample.json - TemplateCreateRequestFormFieldRulesExample: + $ref: examples/json/TemplateCreateRequestFormFieldGroups.json + TemplateCreateRequestFormFieldRules: summary: 'Form Fields Per Document and Rules Example' value: - $ref: examples/json/TemplateCreateRequestFormFieldRulesExample.json - TemplateCreateEmbeddedDraftRequestDefaultExample: + $ref: examples/json/TemplateCreateRequestFormFieldRules.json + TemplateCreateEmbeddedDraftRequest: summary: 'Default Example' value: - $ref: examples/json/TemplateCreateEmbeddedDraftRequestDefaultExample.json - TemplateCreateEmbeddedDraftRequestFormFieldsPerDocumentExample: + $ref: examples/json/TemplateCreateEmbeddedDraftRequest.json + TemplateCreateEmbeddedDraftRequestFormFieldsPerDocument: summary: 'Form Fields Per Document Example' value: - $ref: examples/json/TemplateCreateEmbeddedDraftRequestFormFieldsPerDocumentExample.json - TemplateCreateEmbeddedDraftRequestFormFieldGroupsExample: + $ref: examples/json/TemplateCreateEmbeddedDraftRequestFormFieldsPerDocument.json + TemplateCreateEmbeddedDraftRequestFormFieldGroups: summary: 'Form Fields Per Document and Groups Example' value: - $ref: examples/json/TemplateCreateEmbeddedDraftRequestFormFieldGroupsExample.json - TemplateCreateEmbeddedDraftRequestFormFieldRulesExample: + $ref: examples/json/TemplateCreateEmbeddedDraftRequestFormFieldGroups.json + TemplateCreateEmbeddedDraftRequestFormFieldRules: summary: 'Form Fields Per Document and Rules Example' value: - $ref: examples/json/TemplateCreateEmbeddedDraftRequestFormFieldRulesExample.json - TemplateRemoveUserRequestDefaultExample: + $ref: examples/json/TemplateCreateEmbeddedDraftRequestFormFieldRules.json + TemplateRemoveUserRequest: summary: 'Default Example' value: - $ref: examples/json/TemplateRemoveUserRequestDefaultExample.json - TemplateUpdateFilesRequestDefaultExample: + $ref: examples/json/TemplateRemoveUserRequest.json + TemplateUpdateFilesRequest: summary: 'Default Example' value: - $ref: examples/json/TemplateUpdateFilesRequestDefaultExample.json - UnclaimedDraftCreateRequestDefaultExample: + $ref: examples/json/TemplateUpdateFilesRequest.json + UnclaimedDraftCreateRequest: summary: 'Default Example' value: - $ref: examples/json/UnclaimedDraftCreateRequestDefaultExample.json - UnclaimedDraftCreateRequestFormFieldsPerDocumentExample: + $ref: examples/json/UnclaimedDraftCreateRequest.json + UnclaimedDraftCreateRequestFormFieldsPerDocument: summary: 'Form Fields Per Document Example' value: - $ref: examples/json/UnclaimedDraftCreateRequestFormFieldsPerDocumentExample.json - UnclaimedDraftCreateRequestFormFieldGroupsExample: + $ref: examples/json/UnclaimedDraftCreateRequestFormFieldsPerDocument.json + UnclaimedDraftCreateRequestFormFieldGroups: summary: 'Form Fields Per Document and Groups Example' value: - $ref: examples/json/UnclaimedDraftCreateRequestFormFieldGroupsExample.json - UnclaimedDraftCreateRequestFormFieldRulesExample: + $ref: examples/json/UnclaimedDraftCreateRequestFormFieldGroups.json + UnclaimedDraftCreateRequestFormFieldRules: summary: 'Form Fields Per Document and Rules Example' value: - $ref: examples/json/UnclaimedDraftCreateRequestFormFieldRulesExample.json - UnclaimedDraftCreateEmbeddedRequestDefaultExample: + $ref: examples/json/UnclaimedDraftCreateRequestFormFieldRules.json + UnclaimedDraftCreateEmbeddedRequest: summary: 'Default Example' value: - $ref: examples/json/UnclaimedDraftCreateEmbeddedRequestDefaultExample.json - UnclaimedDraftCreateEmbeddedRequestFormFieldsPerDocumentExample: + $ref: examples/json/UnclaimedDraftCreateEmbeddedRequest.json + UnclaimedDraftCreateEmbeddedRequestFormFieldsPerDocument: summary: 'Form Fields Per Document Example' value: - $ref: examples/json/UnclaimedDraftCreateEmbeddedRequestFormFieldsPerDocumentExample.json - UnclaimedDraftCreateEmbeddedRequestFormFieldGroupsExample: + $ref: examples/json/UnclaimedDraftCreateEmbeddedRequestFormFieldsPerDocument.json + UnclaimedDraftCreateEmbeddedRequestFormFieldGroups: summary: 'Form Fields Per Document and Groups Example' value: - $ref: examples/json/UnclaimedDraftCreateEmbeddedRequestFormFieldGroupsExample.json - UnclaimedDraftCreateEmbeddedRequestFormFieldRulesExample: + $ref: examples/json/UnclaimedDraftCreateEmbeddedRequestFormFieldGroups.json + UnclaimedDraftCreateEmbeddedRequestFormFieldRules: summary: 'Form Fields Per Document and Rules Example' value: - $ref: examples/json/UnclaimedDraftCreateEmbeddedRequestFormFieldRulesExample.json - UnclaimedDraftCreateEmbeddedWithTemplateRequestDefaultExample: + $ref: examples/json/UnclaimedDraftCreateEmbeddedRequestFormFieldRules.json + UnclaimedDraftCreateEmbeddedWithTemplateRequest: summary: 'Default Example' value: - $ref: examples/json/UnclaimedDraftCreateEmbeddedWithTemplateRequestDefaultExample.json - UnclaimedDraftEditAndResendRequestDefaultExample: + $ref: examples/json/UnclaimedDraftCreateEmbeddedWithTemplateRequest.json + UnclaimedDraftEditAndResendRequest: summary: 'Default Example' value: - $ref: examples/json/UnclaimedDraftEditAndResendRequestDefaultExample.json - AccountCreateResponseExample: + $ref: examples/json/UnclaimedDraftEditAndResendRequest.json + AccountCreateResponse: summary: 'Account Create' value: - $ref: examples/json/AccountCreateResponseExample.json - AccountCreateOAuthResponseExample: + $ref: examples/json/AccountCreateResponse.json + AccountCreateOAuthResponse: summary: 'Account Create with OAuth Authorization' value: - $ref: examples/json/AccountCreateOAuthResponseExample.json - AccountGetResponseExample: + $ref: examples/json/AccountCreateOAuthResponse.json + AccountGetResponse: summary: 'Account Get' value: - $ref: examples/json/AccountGetResponseExample.json - AccountVerifyFoundResponseExample: + $ref: examples/json/AccountGetResponse.json + AccountVerifyFoundResponse: summary: 'Account Found' value: - $ref: examples/json/AccountVerifyFoundResponseExample.json - AccountVerifyNotFoundResponseExample: + $ref: examples/json/AccountVerifyFoundResponse.json + AccountVerifyNotFoundResponse: summary: 'Account Not Found' value: - $ref: examples/json/AccountVerifyNotFoundResponseExample.json - ApiAppGetResponseExample: + $ref: examples/json/AccountVerifyNotFoundResponse.json + ApiAppGetResponse: summary: 'API App' value: - $ref: examples/json/ApiAppGetResponseExample.json - ApiAppListResponseExample: + $ref: examples/json/ApiAppGetResponse.json + ApiAppListResponse: summary: 'API App List' value: - $ref: examples/json/ApiAppListResponseExample.json - BulkSendJobGetResponseExample: + $ref: examples/json/ApiAppListResponse.json + BulkSendJobGetResponse: summary: 'Bulk Send Job' value: - $ref: examples/json/BulkSendJobGetResponseExample.json - BulkSendJobListResponseExample: + $ref: examples/json/BulkSendJobGetResponse.json + BulkSendJobListResponse: summary: 'Bulk Send Job List' value: - $ref: examples/json/BulkSendJobListResponseExample.json - EmbeddedEditUrlResponseExample: + $ref: examples/json/BulkSendJobListResponse.json + EmbeddedEditUrlResponse: summary: 'Embedded Edit URL' value: - $ref: examples/json/EmbeddedEditUrlResponseExample.json - EmbeddedSignUrlResponseExample: + $ref: examples/json/EmbeddedEditUrlResponse.json + EmbeddedSignUrlResponse: summary: 'Embedded Sign URL' value: - $ref: examples/json/EmbeddedSignUrlResponseExample.json - Error400ResponseExample: + $ref: examples/json/EmbeddedSignUrlResponse.json + Error400Response: summary: 'Error 400 bad_request' value: - $ref: examples/json/Error400ResponseExample.json - Error401ResponseExample: + $ref: examples/json/Error400Response.json + Error401Response: summary: 'Error 401 unauthorized' value: - $ref: examples/json/Error401ResponseExample.json - Error402ResponseExample: + $ref: examples/json/Error401Response.json + Error402Response: summary: 'Error 402 payment_required' value: - $ref: examples/json/Error402ResponseExample.json - Error403ResponseExample: + $ref: examples/json/Error402Response.json + Error403Response: summary: 'Error 403 forbidden' value: - $ref: examples/json/Error403ResponseExample.json - Error404ResponseExample: + $ref: examples/json/Error403Response.json + Error404Response: summary: 'Error 404 not_found' value: - $ref: examples/json/Error404ResponseExample.json - Error409ResponseExample: + $ref: examples/json/Error404Response.json + Error409Response: summary: 'Error 409 conflict' value: - $ref: examples/json/Error409ResponseExample.json - Error410ResponseExample: + $ref: examples/json/Error409Response.json + Error410Response: summary: 'Error 410 deleted' value: - $ref: examples/json/Error410ResponseExample.json - Error422ResponseExample: + $ref: examples/json/Error410Response.json + Error422Response: summary: 'Error 422 unprocessable_entity' value: - $ref: examples/json/Error422ResponseExample.json - Error429ResponseExample: + $ref: examples/json/Error422Response.json + Error429Response: summary: 'Error 429 exceeded_rate' value: - $ref: examples/json/Error429ResponseExample.json - Error4XXResponseExample: + $ref: examples/json/Error429Response.json + Error4XXResponse: summary: 'Error 4XX failed_operation' value: - $ref: examples/json/Error4XXResponseExample.json - FaxGetResponseExample: + $ref: examples/json/Error4XXResponse.json + FaxGetResponse: summary: 'Fax Response' value: - $ref: examples/json/FaxGetResponseExample.json - FaxLineResponseExample: + $ref: examples/json/FaxGetResponse.json + FaxLineResponse: summary: 'Sample Fax Line Response' value: - $ref: examples/json/FaxLineResponseExample.json - FaxLineAreaCodeGetResponseExample: + $ref: examples/json/FaxLineResponse.json + FaxLineAreaCodeGetResponse: summary: 'Sample Area Code Response' value: - $ref: examples/json/FaxLineAreaCodeGetResponseExample.json - FaxLineListResponseExample: + $ref: examples/json/FaxLineAreaCodeGetResponse.json + FaxLineListResponse: summary: 'Sample Fax Line List Response' value: - $ref: examples/json/FaxLineListResponseExample.json - FaxListResponseExample: - summary: 'Returns the properties and settings of multiple Faxes.' + $ref: examples/json/FaxLineListResponse.json + FaxListResponse: + summary: 'Returns the properties and settings of multiple Faxes' value: - $ref: examples/json/FaxListResponseExample.json - ReportCreateResponseExample: + $ref: examples/json/FaxListResponse.json + ReportCreateResponse: summary: Report value: - $ref: examples/json/ReportCreateResponseExample.json - SignatureRequestGetResponseExample: + $ref: examples/json/ReportCreateResponse.json + SignatureRequestGetResponse: summary: 'Get Signature Request' value: - $ref: examples/json/SignatureRequestGetResponseExample.json - SignatureRequestListResponseExample: + $ref: examples/json/SignatureRequestGetResponse.json + SignatureRequestListResponse: summary: 'List Signature Requests' value: - $ref: examples/json/SignatureRequestListResponseExample.json - AccountUpdateResponseExample: + $ref: examples/json/SignatureRequestListResponse.json + AccountUpdateResponse: summary: 'Account Update' value: - $ref: examples/json/AccountUpdateResponseExample.json - OAuthTokenGenerateResponseExample: + $ref: examples/json/AccountUpdateResponse.json + OAuthTokenGenerateResponse: summary: 'Retrieving the OAuth token' value: - $ref: examples/json/OAuthTokenGenerateResponseExample.json - OAuthTokenRefreshResponseExample: + $ref: examples/json/OAuthTokenGenerateResponse.json + OAuthTokenRefreshResponse: summary: 'Refresh an existing OAuth token' value: - $ref: examples/json/OAuthTokenRefreshResponseExample.json - ApiAppCreateResponseExample: + $ref: examples/json/OAuthTokenRefreshResponse.json + ApiAppCreateResponse: summary: 'API App' value: - $ref: examples/json/ApiAppCreateResponseExample.json - ApiAppUpdateResponseExample: + $ref: examples/json/ApiAppCreateResponse.json + ApiAppUpdateResponse: summary: 'API App Update' value: - $ref: examples/json/ApiAppUpdateResponseExample.json - SignatureRequestCreateEmbeddedResponseExample: + $ref: examples/json/ApiAppUpdateResponse.json + SignatureRequestCreateEmbeddedResponse: summary: 'Create Embedded Signature Request' value: - $ref: examples/json/SignatureRequestCreateEmbeddedResponseExample.json - SignatureRequestCreateEmbeddedWithTemplateResponseExample: + $ref: examples/json/SignatureRequestCreateEmbeddedResponse.json + SignatureRequestCreateEmbeddedWithTemplateResponse: summary: 'Create Embedded Signature Request With Template' value: - $ref: examples/json/SignatureRequestCreateEmbeddedWithTemplateResponseExample.json - SignatureRequestFilesResponseExample: + $ref: examples/json/SignatureRequestCreateEmbeddedWithTemplateResponse.json + SignatureRequestFilesResponse: summary: 'Signature Requests Files' value: - $ref: examples/json/SignatureRequestFilesResponseExample.json - SignatureRequestReleaseHoldResponseExample: + $ref: examples/json/SignatureRequestFilesResponse.json + SignatureRequestReleaseHoldResponse: summary: 'Send Signature Release Hold' value: - $ref: examples/json/SignatureRequestReleaseHoldResponseExample.json - SignatureRequestRemindResponseExample: + $ref: examples/json/SignatureRequestReleaseHoldResponse.json + SignatureRequestRemindResponse: summary: 'Send Signature Request Reminder' value: - $ref: examples/json/SignatureRequestRemindResponseExample.json - SignatureRequestSendResponseExample: + $ref: examples/json/SignatureRequestRemindResponse.json + SignatureRequestSendResponse: summary: 'Send Signature Request' value: - $ref: examples/json/SignatureRequestSendResponseExample.json - SignatureRequestSendWithTemplateResponseExample: + $ref: examples/json/SignatureRequestSendResponse.json + SignatureRequestSendWithTemplateResponse: summary: 'Send Signature Request With Template' value: - $ref: examples/json/SignatureRequestSendWithTemplateResponseExample.json - SignatureRequestUpdateResponseExample: + $ref: examples/json/SignatureRequestSendWithTemplateResponse.json + SignatureRequestUpdateResponse: summary: 'Signature Request Update' value: - $ref: examples/json/SignatureRequestUpdateResponseExample.json - SignatureRequestBulkSendWithTemplateResponseExample: + $ref: examples/json/SignatureRequestUpdateResponse.json + SignatureRequestBulkSendWithTemplateResponse: summary: 'Send Signature Request With Template' value: - $ref: examples/json/SignatureRequestBulkSendWithTemplateResponseExample.json - SignatureRequestBulkCreateEmbeddedWithTemplateResponseExample: + $ref: examples/json/SignatureRequestBulkSendWithTemplateResponse.json + SignatureRequestBulkCreateEmbeddedWithTemplateResponse: summary: 'Bulk Send Create Embedded Signature Request With Template' value: - $ref: examples/json/SignatureRequestBulkCreateEmbeddedWithTemplateResponseExample.json - TeamCreateResponseExample: + $ref: examples/json/SignatureRequestBulkCreateEmbeddedWithTemplateResponse.json + TeamCreateResponse: summary: 'Team Create' value: - $ref: examples/json/TeamCreateResponseExample.json - TeamMembersResponseExample: + $ref: examples/json/TeamCreateResponse.json + TeamMembersResponse: summary: 'Team Members List' value: - $ref: examples/json/TeamMembersResponseExample.json - TeamRemoveMemberResponseExample: + $ref: examples/json/TeamMembersResponse.json + TeamRemoveMemberResponse: summary: 'Team Remove Member' value: - $ref: examples/json/TeamRemoveMemberResponseExample.json - TeamUpdateResponseExample: + $ref: examples/json/TeamRemoveMemberResponse.json + TeamUpdateResponse: summary: 'Team Update' value: - $ref: examples/json/TeamUpdateResponseExample.json - TeamDoesNotExistResponseExample: + $ref: examples/json/TeamUpdateResponse.json + TeamDoesNotExistResponse: summary: 'Team Does Not Exist' value: - $ref: examples/json/TeamDoesNotExistResponseExample.json - TemplateAddUserResponseExample: + $ref: examples/json/TeamDoesNotExistResponse.json + TemplateAddUserResponse: summary: 'Add User to Template' value: - $ref: examples/json/TemplateAddUserResponseExample.json - TemplateFilesResponseExample: + $ref: examples/json/TemplateAddUserResponse.json + TemplateFilesResponse: summary: 'Template Files' value: - $ref: examples/json/TemplateFilesResponseExample.json - TemplateRemoveUserResponseExample: + $ref: examples/json/TemplateFilesResponse.json + TemplateRemoveUserResponse: summary: 'Remove User from Template' value: - $ref: examples/json/TemplateRemoveUserResponseExample.json - UnclaimedDraftCreateEmbeddedResponseExample: + $ref: examples/json/TemplateRemoveUserResponse.json + UnclaimedDraftCreateEmbeddedResponse: summary: 'Unclaimed Draft Create Embedded' value: - $ref: examples/json/UnclaimedDraftCreateEmbeddedResponseExample.json - UnclaimedDraftCreateEmbeddedWithTemplateResponseExample: + $ref: examples/json/UnclaimedDraftCreateEmbeddedResponse.json + UnclaimedDraftCreateEmbeddedWithTemplateResponse: summary: 'Unclaimed Draft Create Embedded With Template' value: - $ref: examples/json/UnclaimedDraftCreateEmbeddedWithTemplateResponseExample.json - UnclaimedDraftEditAndResendExample: + $ref: examples/json/UnclaimedDraftCreateEmbeddedWithTemplateResponse.json + UnclaimedDraftEditAndResend: summary: 'Unclaimed Draft Edit and Resend' value: - $ref: examples/json/UnclaimedDraftEditAndResendExample.json - TeamGetResponseExample: + $ref: examples/json/UnclaimedDraftEditAndResend.json + TeamGetResponse: summary: 'Team Get' value: - $ref: examples/json/TeamGetResponseExample.json - TeamGetInfoResponseExample: + $ref: examples/json/TeamGetResponse.json + TeamGetInfoResponse: summary: 'Team Get Info' value: - $ref: examples/json/TeamGetInfoResponseExample.json - TeamInvitesResponseExample: + $ref: examples/json/TeamGetInfoResponse.json + TeamInvitesResponse: summary: 'Team Invites' value: - $ref: examples/json/TeamInvitesResponseExample.json - TeamAddMemberResponseExample: + $ref: examples/json/TeamInvitesResponse.json + TeamAddMemberResponse: summary: 'Team Add Member' value: - $ref: examples/json/TeamAddMemberResponseExample.json - TeamSubTeamsResponseExample: + $ref: examples/json/TeamAddMemberResponse.json + TeamSubTeamsResponse: summary: 'Team Sub Teams List' value: - $ref: examples/json/TeamSubTeamsResponseExample.json - TemplateCreateResponseExample: + $ref: examples/json/TeamSubTeamsResponse.json + TemplateCreateResponse: summary: 'Create Template' value: - $ref: examples/json/TemplateCreateResponseExample.json - TemplateCreateEmbeddedDraftResponseExample: + $ref: examples/json/TemplateCreateResponse.json + TemplateCreateEmbeddedDraftResponse: summary: 'Create Embedded Draft Template' value: - $ref: examples/json/TemplateCreateEmbeddedDraftResponseExample.json - TemplateGetResponseExample: + $ref: examples/json/TemplateCreateEmbeddedDraftResponse.json + TemplateGetResponse: summary: 'Get Template' value: - $ref: examples/json/TemplateGetResponseExample.json - TemplateListResponseExample: + $ref: examples/json/TemplateGetResponse.json + TemplateListResponse: summary: 'List Templates' value: - $ref: examples/json/TemplateListResponseExample.json - TemplateUpdateFilesResponseExample: + $ref: examples/json/TemplateListResponse.json + TemplateUpdateFilesResponse: summary: 'Update Template Files' value: - $ref: examples/json/TemplateUpdateFilesResponseExample.json - UnclaimedDraftCreateResponseExample: + $ref: examples/json/TemplateUpdateFilesResponse.json + UnclaimedDraftCreateResponse: summary: 'Unclaimed Draft Create' value: - $ref: examples/json/UnclaimedDraftCreateResponseExample.json - EventCallbackAccountSignatureRequestSentExample: + $ref: examples/json/UnclaimedDraftCreateResponse.json + EventCallbackAccountSignatureRequestSent: summary: 'Example: signature_request_sent' value: - $ref: examples/json/EventCallbackAccountSignatureRequestSentExample.json - EventCallbackAccountTemplateCreatedExample: + $ref: examples/json/EventCallbackAccountSignatureRequestSent.json + EventCallbackAccountTemplateCreated: summary: 'Example: template_created' value: - $ref: examples/json/EventCallbackAccountTemplateCreatedExample.json - EventCallbackAppAccountConfirmedExample: + $ref: examples/json/EventCallbackAccountTemplateCreated.json + EventCallbackAppAccountConfirmed: summary: 'Example: account_confirmed' value: - $ref: examples/json/EventCallbackAppAccountConfirmedExample.json - EventCallbackAppSignatureRequestSentExample: + $ref: examples/json/EventCallbackAppAccountConfirmed.json + EventCallbackAppSignatureRequestSent: summary: 'Example: signature_request_sent' value: - $ref: examples/json/EventCallbackAppSignatureRequestSentExample.json - EventCallbackAppTemplateCreatedExample: + $ref: examples/json/EventCallbackAppSignatureRequestSent.json + EventCallbackAppTemplateCreated: summary: 'Example: template_created' value: - $ref: examples/json/EventCallbackAppTemplateCreatedExample.json + $ref: examples/json/EventCallbackAppTemplateCreated.json requestBodies: EventCallbackAccountRequest: description: |- @@ -13588,9 +14231,9 @@ components: $ref: '#/components/schemas/EventCallbackRequest' examples: signature_request_sent_example: - $ref: '#/components/examples/EventCallbackAccountSignatureRequestSentExample' + $ref: '#/components/examples/EventCallbackAccountSignatureRequestSent' template_created_example: - $ref: '#/components/examples/EventCallbackAccountTemplateCreatedExample' + $ref: '#/components/examples/EventCallbackAccountTemplateCreated' EventCallbackAppRequest: description: |- **API App Callback Payloads --** @@ -13601,11 +14244,11 @@ components: $ref: '#/components/schemas/EventCallbackRequest' examples: account_confirmed_example: - $ref: '#/components/examples/EventCallbackAppAccountConfirmedExample' + $ref: '#/components/examples/EventCallbackAppAccountConfirmed' signature_request_sent_example: - $ref: '#/components/examples/EventCallbackAppSignatureRequestSentExample' + $ref: '#/components/examples/EventCallbackAppSignatureRequestSent' template_created_example: - $ref: '#/components/examples/EventCallbackAppTemplateCreatedExample' + $ref: '#/components/examples/EventCallbackAppTemplateCreated' headers: X-RateLimit-Limit: description: 'The maximum number of requests per hour that you can make.' @@ -13642,6 +14285,7 @@ components: security: - api_key: [] + - oauth2: - account_access - signature_request_access @@ -13669,37 +14313,32 @@ x-webhooks: lang: PHP label: PHP source: - $ref: examples/EventCallback.php + $ref: examples/EventCallbackExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/EventCallback.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/EventCallback.js + $ref: examples/EventCallbackExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/EventCallback.ts + $ref: examples/EventCallbackExample.ts - lang: Java label: Java source: - $ref: examples/EventCallback.java + $ref: examples/EventCallbackExample.java - lang: Ruby label: Ruby source: - $ref: examples/EventCallback.rb + $ref: examples/EventCallbackExample.rb - lang: Python label: Python source: - $ref: examples/EventCallback.py + $ref: examples/EventCallbackExample.py tags: - 'Callbacks and Events' requestBody: @@ -13722,37 +14361,32 @@ x-webhooks: lang: PHP label: PHP source: - $ref: examples/EventCallback.php + $ref: examples/EventCallbackExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/EventCallback.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/EventCallback.js + $ref: examples/EventCallbackExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/EventCallback.ts + $ref: examples/EventCallbackExample.ts - lang: Java label: Java source: - $ref: examples/EventCallback.java + $ref: examples/EventCallbackExample.java - lang: Ruby label: Ruby source: - $ref: examples/EventCallback.rb + $ref: examples/EventCallbackExample.rb - lang: Python label: Python source: - $ref: examples/EventCallback.py + $ref: examples/EventCallbackExample.py tags: - 'Callbacks and Events' requestBody: diff --git a/run-build b/run-build index ec27fff..e1012e0 100755 --- a/run-build +++ b/run-build @@ -19,7 +19,7 @@ rm -f "${DIR}/src/Model/"*.php docker run --rm \ -v "${DIR}/:/local" \ -v "${DIR}/openapi-sdk.yaml:/local/openapi-sdk.yaml" \ - openapitools/openapi-generator-cli:v7.8.0 generate \ + openapitools/openapi-generator-cli:v7.12.0 generate \ -i "/local/openapi-sdk.yaml" \ -c "/local/openapi-config.yaml" \ -t "/local/templates" \ @@ -48,6 +48,9 @@ docker run --rm \ -w "${WORKING_DIR}" \ perl bash ./bin/scan_for +printf "Adding old-style constant names ...\n" +bash "${DIR}/bin/php-8" ./bin/copy-constants.php + # avoid docker messing with permissions if [[ -z "$GITHUB_ACTIONS" ]]; then chmod 644 "${DIR}/README.md" diff --git a/src/Api/AccountApi.php b/src/Api/AccountApi.php index cfdc96f..700b221 100644 --- a/src/Api/AccountApi.php +++ b/src/Api/AccountApi.php @@ -15,7 +15,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -88,9 +88,9 @@ class AccountApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - Configuration $config = null, - ClientInterface $client = null, - HeaderSelector $selector = null, + ?Configuration $config = null, + ?ClientInterface $client = null, + ?HeaderSelector $selector = null, int $hostIndex = 0 ) { $this->client = $client ?: new Client(); @@ -194,19 +194,6 @@ public function accountCreateWithHttpInfo(Model\AccountCreateRequest $account_cr $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -246,6 +233,19 @@ public function accountCreateWithHttpInfo(Model\AccountCreateRequest $account_cr ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\AccountCreateResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -481,14 +481,14 @@ public function accountCreateRequest(Model\AccountCreateRequest $account_create_ * * Get Account * - * @param string $account_id `account_id` or `email_address` is required. If both are provided, the account id prevails. The ID of the Account. (optional) - * @param string $email_address `account_id` or `email_address` is required, If both are provided, the account id prevails. The email address of the Account. (optional) + * @param string|null $account_id `account_id` or `email_address` is required. If both are provided, the account id prevails. The ID of the Account. (optional) + * @param string|null $email_address `account_id` or `email_address` is required, If both are provided, the account id prevails. The email address of the Account. (optional) * * @return Model\AccountGetResponse * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException */ - public function accountGet(string $account_id = null, string $email_address = null) + public function accountGet(?string $account_id = null, ?string $email_address = null) { list($response) = $this->accountGetWithHttpInfo($account_id, $email_address); return $response; @@ -499,16 +499,16 @@ public function accountGet(string $account_id = null, string $email_address = nu * * Get Account * - * @param string $account_id `account_id` or `email_address` is required. If both are provided, the account id prevails. The ID of the Account. (optional) - * @param string $email_address `account_id` or `email_address` is required, If both are provided, the account id prevails. The email address of the Account. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['accountGet'] to see the possible values for this operation + * @param string|null $account_id `account_id` or `email_address` is required. If both are provided, the account id prevails. The ID of the Account. (optional) + * @param string|null $email_address `account_id` or `email_address` is required, If both are provided, the account id prevails. The email address of the Account. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['accountGet'] to see the possible values for this operation * * @return array of Model\AccountGetResponse, HTTP status code, HTTP response headers (array of strings) * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @deprecated Prefer to use ::accountGet. This method will eventually become unavailable */ - public function accountGetWithHttpInfo(string $account_id = null, string $email_address = null, string $contentType = self::contentTypes['accountGet'][0]) + public function accountGetWithHttpInfo(?string $account_id = null, ?string $email_address = null, string $contentType = self::contentTypes['accountGet'][0]) { $request = $this->accountGetRequest($account_id, $email_address, $contentType); @@ -535,19 +535,6 @@ public function accountGetWithHttpInfo(string $account_id = null, string $email_ $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -587,6 +574,19 @@ public function accountGetWithHttpInfo(string $account_id = null, string $email_ ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\AccountGetResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -637,15 +637,15 @@ public function accountGetWithHttpInfo(string $account_id = null, string $email_ * * Get Account * - * @param string $account_id `account_id` or `email_address` is required. If both are provided, the account id prevails. The ID of the Account. (optional) - * @param string $email_address `account_id` or `email_address` is required, If both are provided, the account id prevails. The email address of the Account. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['accountGet'] to see the possible values for this operation + * @param string|null $account_id `account_id` or `email_address` is required. If both are provided, the account id prevails. The ID of the Account. (optional) + * @param string|null $email_address `account_id` or `email_address` is required, If both are provided, the account id prevails. The email address of the Account. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['accountGet'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::accountGet. This method will eventually become unavailable */ - public function accountGetAsync(string $account_id = null, string $email_address = null, string $contentType = self::contentTypes['accountGet'][0]) + public function accountGetAsync(?string $account_id = null, ?string $email_address = null, string $contentType = self::contentTypes['accountGet'][0]) { return $this->accountGetAsyncWithHttpInfo($account_id, $email_address, $contentType) ->then( @@ -660,15 +660,15 @@ function ($response) { * * Get Account * - * @param string $account_id `account_id` or `email_address` is required. If both are provided, the account id prevails. The ID of the Account. (optional) - * @param string $email_address `account_id` or `email_address` is required, If both are provided, the account id prevails. The email address of the Account. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['accountGet'] to see the possible values for this operation + * @param string|null $account_id `account_id` or `email_address` is required. If both are provided, the account id prevails. The ID of the Account. (optional) + * @param string|null $email_address `account_id` or `email_address` is required, If both are provided, the account id prevails. The email address of the Account. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['accountGet'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::accountGet. This method will eventually become unavailable */ - public function accountGetAsyncWithHttpInfo(string $account_id = null, string $email_address = null, string $contentType = self::contentTypes['accountGet'][0]) + public function accountGetAsyncWithHttpInfo(?string $account_id = null, ?string $email_address = null, string $contentType = self::contentTypes['accountGet'][0]) { $returnType = '\Dropbox\Sign\Model\AccountGetResponse'; $request = $this->accountGetRequest($account_id, $email_address, $contentType); @@ -712,15 +712,15 @@ function ($exception) { /** * Create request for operation 'accountGet' * - * @param string $account_id `account_id` or `email_address` is required. If both are provided, the account id prevails. The ID of the Account. (optional) - * @param string $email_address `account_id` or `email_address` is required, If both are provided, the account id prevails. The email address of the Account. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['accountGet'] to see the possible values for this operation + * @param string|null $account_id `account_id` or `email_address` is required. If both are provided, the account id prevails. The ID of the Account. (optional) + * @param string|null $email_address `account_id` or `email_address` is required, If both are provided, the account id prevails. The email address of the Account. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['accountGet'] to see the possible values for this operation * * @return Request * @throws InvalidArgumentException * @deprecated Prefer to use ::accountGet. This method will eventually become unavailable */ - public function accountGetRequest(string $account_id = null, string $email_address = null, string $contentType = self::contentTypes['accountGet'][0]) + public function accountGetRequest(?string $account_id = null, ?string $email_address = null, string $contentType = self::contentTypes['accountGet'][0]) { $resourcePath = '/account'; $formParams = []; @@ -873,19 +873,6 @@ public function accountUpdateWithHttpInfo(Model\AccountUpdateRequest $account_up $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -925,6 +912,19 @@ public function accountUpdateWithHttpInfo(Model\AccountUpdateRequest $account_up ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\AccountGetResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -1212,19 +1212,6 @@ public function accountVerifyWithHttpInfo(Model\AccountVerifyRequest $account_ve $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -1264,6 +1251,19 @@ public function accountVerifyWithHttpInfo(Model\AccountVerifyRequest $account_ve ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\AccountVerifyResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer diff --git a/src/Api/ApiAppApi.php b/src/Api/ApiAppApi.php index 07dd3db..95b80a9 100644 --- a/src/Api/ApiAppApi.php +++ b/src/Api/ApiAppApi.php @@ -15,7 +15,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -93,9 +93,9 @@ class ApiAppApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - Configuration $config = null, - ClientInterface $client = null, - HeaderSelector $selector = null, + ?Configuration $config = null, + ?ClientInterface $client = null, + ?HeaderSelector $selector = null, int $hostIndex = 0 ) { $this->client = $client ?: new Client(); @@ -199,19 +199,6 @@ public function apiAppCreateWithHttpInfo(Model\ApiAppCreateRequest $api_app_crea $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -251,6 +238,19 @@ public function apiAppCreateWithHttpInfo(Model\ApiAppCreateRequest $api_app_crea ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\ApiAppGetResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -536,19 +536,6 @@ public function apiAppDeleteWithHttpInfo(string $client_id, string $contentType $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - return [null, $statusCode, $response->getHeaders()]; } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { @@ -782,19 +769,6 @@ public function apiAppGetWithHttpInfo(string $client_id, string $contentType = s $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -834,6 +808,19 @@ public function apiAppGetWithHttpInfo(string $client_id, string $contentType = s ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\ApiAppGetResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -1062,14 +1049,14 @@ public function apiAppGetRequest(string $client_id, string $contentType = self:: * * List API Apps * - * @param int $page Which page number of the API App List to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param int|null $page Which page number of the API App List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) * * @return Model\ApiAppListResponse * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException */ - public function apiAppList(int $page = 1, int $page_size = 20) + public function apiAppList(?int $page = 1, ?int $page_size = 20) { list($response) = $this->apiAppListWithHttpInfo($page, $page_size); return $response; @@ -1080,16 +1067,16 @@ public function apiAppList(int $page = 1, int $page_size = 20) * * List API Apps * - * @param int $page Which page number of the API App List to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiAppList'] to see the possible values for this operation + * @param int|null $page Which page number of the API App List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiAppList'] to see the possible values for this operation * * @return array of Model\ApiAppListResponse, HTTP status code, HTTP response headers (array of strings) * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @deprecated Prefer to use ::apiAppList. This method will eventually become unavailable */ - public function apiAppListWithHttpInfo(int $page = 1, int $page_size = 20, string $contentType = self::contentTypes['apiAppList'][0]) + public function apiAppListWithHttpInfo(?int $page = 1, ?int $page_size = 20, string $contentType = self::contentTypes['apiAppList'][0]) { $request = $this->apiAppListRequest($page, $page_size, $contentType); @@ -1116,19 +1103,6 @@ public function apiAppListWithHttpInfo(int $page = 1, int $page_size = 20, strin $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -1168,6 +1142,19 @@ public function apiAppListWithHttpInfo(int $page = 1, int $page_size = 20, strin ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\ApiAppListResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -1218,15 +1205,15 @@ public function apiAppListWithHttpInfo(int $page = 1, int $page_size = 20, strin * * List API Apps * - * @param int $page Which page number of the API App List to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiAppList'] to see the possible values for this operation + * @param int|null $page Which page number of the API App List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiAppList'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::apiAppList. This method will eventually become unavailable */ - public function apiAppListAsync(int $page = 1, int $page_size = 20, string $contentType = self::contentTypes['apiAppList'][0]) + public function apiAppListAsync(?int $page = 1, ?int $page_size = 20, string $contentType = self::contentTypes['apiAppList'][0]) { return $this->apiAppListAsyncWithHttpInfo($page, $page_size, $contentType) ->then( @@ -1241,15 +1228,15 @@ function ($response) { * * List API Apps * - * @param int $page Which page number of the API App List to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiAppList'] to see the possible values for this operation + * @param int|null $page Which page number of the API App List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiAppList'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::apiAppList. This method will eventually become unavailable */ - public function apiAppListAsyncWithHttpInfo(int $page = 1, int $page_size = 20, string $contentType = self::contentTypes['apiAppList'][0]) + public function apiAppListAsyncWithHttpInfo(?int $page = 1, ?int $page_size = 20, string $contentType = self::contentTypes['apiAppList'][0]) { $returnType = '\Dropbox\Sign\Model\ApiAppListResponse'; $request = $this->apiAppListRequest($page, $page_size, $contentType); @@ -1293,15 +1280,15 @@ function ($exception) { /** * Create request for operation 'apiAppList' * - * @param int $page Which page number of the API App List to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiAppList'] to see the possible values for this operation + * @param int|null $page Which page number of the API App List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiAppList'] to see the possible values for this operation * * @return Request * @throws InvalidArgumentException * @deprecated Prefer to use ::apiAppList. This method will eventually become unavailable */ - public function apiAppListRequest(int $page = 1, int $page_size = 20, string $contentType = self::contentTypes['apiAppList'][0]) + public function apiAppListRequest(?int $page = 1, ?int $page_size = 20, string $contentType = self::contentTypes['apiAppList'][0]) { $resourcePath = '/api_app/list'; $formParams = []; @@ -1456,19 +1443,6 @@ public function apiAppUpdateWithHttpInfo(string $client_id, Model\ApiAppUpdateRe $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -1508,6 +1482,19 @@ public function apiAppUpdateWithHttpInfo(string $client_id, Model\ApiAppUpdateRe ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\ApiAppGetResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer diff --git a/src/Api/BulkSendJobApi.php b/src/Api/BulkSendJobApi.php index 77ad055..3c6bb7e 100644 --- a/src/Api/BulkSendJobApi.php +++ b/src/Api/BulkSendJobApi.php @@ -15,7 +15,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -82,9 +82,9 @@ class BulkSendJobApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - Configuration $config = null, - ClientInterface $client = null, - HeaderSelector $selector = null, + ?Configuration $config = null, + ?ClientInterface $client = null, + ?HeaderSelector $selector = null, int $hostIndex = 0 ) { $this->client = $client ?: new Client(); @@ -136,15 +136,15 @@ public function getResponse() * * Get Bulk Send Job * - * @param string $bulk_send_job_id The id of the BulkSendJob to retrieve. (required) - * @param int $page Which page number of the BulkSendJob list to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. (optional, default to 20) + * @param string $bulk_send_job_id The id of the BulkSendJob to retrieve. (required) + * @param int|null $page Which page number of the BulkSendJob list to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. (optional, default to 20) * * @return Model\BulkSendJobGetResponse * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException */ - public function bulkSendJobGet(string $bulk_send_job_id, int $page = 1, int $page_size = 20) + public function bulkSendJobGet(string $bulk_send_job_id, ?int $page = 1, ?int $page_size = 20) { list($response) = $this->bulkSendJobGetWithHttpInfo($bulk_send_job_id, $page, $page_size); return $response; @@ -155,17 +155,17 @@ public function bulkSendJobGet(string $bulk_send_job_id, int $page = 1, int $pag * * Get Bulk Send Job * - * @param string $bulk_send_job_id The id of the BulkSendJob to retrieve. (required) - * @param int $page Which page number of the BulkSendJob list to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. (optional, default to 20) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bulkSendJobGet'] to see the possible values for this operation + * @param string $bulk_send_job_id The id of the BulkSendJob to retrieve. (required) + * @param int|null $page Which page number of the BulkSendJob list to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. (optional, default to 20) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bulkSendJobGet'] to see the possible values for this operation * * @return array of Model\BulkSendJobGetResponse, HTTP status code, HTTP response headers (array of strings) * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @deprecated Prefer to use ::bulkSendJobGet. This method will eventually become unavailable */ - public function bulkSendJobGetWithHttpInfo(string $bulk_send_job_id, int $page = 1, int $page_size = 20, string $contentType = self::contentTypes['bulkSendJobGet'][0]) + public function bulkSendJobGetWithHttpInfo(string $bulk_send_job_id, ?int $page = 1, ?int $page_size = 20, string $contentType = self::contentTypes['bulkSendJobGet'][0]) { $request = $this->bulkSendJobGetRequest($bulk_send_job_id, $page, $page_size, $contentType); @@ -192,19 +192,6 @@ public function bulkSendJobGetWithHttpInfo(string $bulk_send_job_id, int $page = $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -244,6 +231,19 @@ public function bulkSendJobGetWithHttpInfo(string $bulk_send_job_id, int $page = ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\BulkSendJobGetResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -294,16 +294,16 @@ public function bulkSendJobGetWithHttpInfo(string $bulk_send_job_id, int $page = * * Get Bulk Send Job * - * @param string $bulk_send_job_id The id of the BulkSendJob to retrieve. (required) - * @param int $page Which page number of the BulkSendJob list to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. (optional, default to 20) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bulkSendJobGet'] to see the possible values for this operation + * @param string $bulk_send_job_id The id of the BulkSendJob to retrieve. (required) + * @param int|null $page Which page number of the BulkSendJob list to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. (optional, default to 20) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bulkSendJobGet'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::bulkSendJobGet. This method will eventually become unavailable */ - public function bulkSendJobGetAsync(string $bulk_send_job_id, int $page = 1, int $page_size = 20, string $contentType = self::contentTypes['bulkSendJobGet'][0]) + public function bulkSendJobGetAsync(string $bulk_send_job_id, ?int $page = 1, ?int $page_size = 20, string $contentType = self::contentTypes['bulkSendJobGet'][0]) { return $this->bulkSendJobGetAsyncWithHttpInfo($bulk_send_job_id, $page, $page_size, $contentType) ->then( @@ -318,16 +318,16 @@ function ($response) { * * Get Bulk Send Job * - * @param string $bulk_send_job_id The id of the BulkSendJob to retrieve. (required) - * @param int $page Which page number of the BulkSendJob list to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. (optional, default to 20) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bulkSendJobGet'] to see the possible values for this operation + * @param string $bulk_send_job_id The id of the BulkSendJob to retrieve. (required) + * @param int|null $page Which page number of the BulkSendJob list to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. (optional, default to 20) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bulkSendJobGet'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::bulkSendJobGet. This method will eventually become unavailable */ - public function bulkSendJobGetAsyncWithHttpInfo(string $bulk_send_job_id, int $page = 1, int $page_size = 20, string $contentType = self::contentTypes['bulkSendJobGet'][0]) + public function bulkSendJobGetAsyncWithHttpInfo(string $bulk_send_job_id, ?int $page = 1, ?int $page_size = 20, string $contentType = self::contentTypes['bulkSendJobGet'][0]) { $returnType = '\Dropbox\Sign\Model\BulkSendJobGetResponse'; $request = $this->bulkSendJobGetRequest($bulk_send_job_id, $page, $page_size, $contentType); @@ -371,16 +371,16 @@ function ($exception) { /** * Create request for operation 'bulkSendJobGet' * - * @param string $bulk_send_job_id The id of the BulkSendJob to retrieve. (required) - * @param int $page Which page number of the BulkSendJob list to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. (optional, default to 20) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bulkSendJobGet'] to see the possible values for this operation + * @param string $bulk_send_job_id The id of the BulkSendJob to retrieve. (required) + * @param int|null $page Which page number of the BulkSendJob list to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. (optional, default to 20) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bulkSendJobGet'] to see the possible values for this operation * * @return Request * @throws InvalidArgumentException * @deprecated Prefer to use ::bulkSendJobGet. This method will eventually become unavailable */ - public function bulkSendJobGetRequest(string $bulk_send_job_id, int $page = 1, int $page_size = 20, string $contentType = self::contentTypes['bulkSendJobGet'][0]) + public function bulkSendJobGetRequest(string $bulk_send_job_id, ?int $page = 1, ?int $page_size = 20, string $contentType = self::contentTypes['bulkSendJobGet'][0]) { // verify the required parameter 'bulk_send_job_id' is set if ($bulk_send_job_id === null || (is_array($bulk_send_job_id) && count($bulk_send_job_id) === 0)) { @@ -497,14 +497,14 @@ public function bulkSendJobGetRequest(string $bulk_send_job_id, int $page = 1, i * * List Bulk Send Jobs * - * @param int $page Which page number of the BulkSendJob List to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. (optional, default to 20) + * @param int|null $page Which page number of the BulkSendJob List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. (optional, default to 20) * * @return Model\BulkSendJobListResponse * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException */ - public function bulkSendJobList(int $page = 1, int $page_size = 20) + public function bulkSendJobList(?int $page = 1, ?int $page_size = 20) { list($response) = $this->bulkSendJobListWithHttpInfo($page, $page_size); return $response; @@ -515,16 +515,16 @@ public function bulkSendJobList(int $page = 1, int $page_size = 20) * * List Bulk Send Jobs * - * @param int $page Which page number of the BulkSendJob List to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. (optional, default to 20) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bulkSendJobList'] to see the possible values for this operation + * @param int|null $page Which page number of the BulkSendJob List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. (optional, default to 20) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bulkSendJobList'] to see the possible values for this operation * * @return array of Model\BulkSendJobListResponse, HTTP status code, HTTP response headers (array of strings) * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @deprecated Prefer to use ::bulkSendJobList. This method will eventually become unavailable */ - public function bulkSendJobListWithHttpInfo(int $page = 1, int $page_size = 20, string $contentType = self::contentTypes['bulkSendJobList'][0]) + public function bulkSendJobListWithHttpInfo(?int $page = 1, ?int $page_size = 20, string $contentType = self::contentTypes['bulkSendJobList'][0]) { $request = $this->bulkSendJobListRequest($page, $page_size, $contentType); @@ -551,19 +551,6 @@ public function bulkSendJobListWithHttpInfo(int $page = 1, int $page_size = 20, $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -603,6 +590,19 @@ public function bulkSendJobListWithHttpInfo(int $page = 1, int $page_size = 20, ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\BulkSendJobListResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -653,15 +653,15 @@ public function bulkSendJobListWithHttpInfo(int $page = 1, int $page_size = 20, * * List Bulk Send Jobs * - * @param int $page Which page number of the BulkSendJob List to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. (optional, default to 20) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bulkSendJobList'] to see the possible values for this operation + * @param int|null $page Which page number of the BulkSendJob List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. (optional, default to 20) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bulkSendJobList'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::bulkSendJobList. This method will eventually become unavailable */ - public function bulkSendJobListAsync(int $page = 1, int $page_size = 20, string $contentType = self::contentTypes['bulkSendJobList'][0]) + public function bulkSendJobListAsync(?int $page = 1, ?int $page_size = 20, string $contentType = self::contentTypes['bulkSendJobList'][0]) { return $this->bulkSendJobListAsyncWithHttpInfo($page, $page_size, $contentType) ->then( @@ -676,15 +676,15 @@ function ($response) { * * List Bulk Send Jobs * - * @param int $page Which page number of the BulkSendJob List to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. (optional, default to 20) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bulkSendJobList'] to see the possible values for this operation + * @param int|null $page Which page number of the BulkSendJob List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. (optional, default to 20) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bulkSendJobList'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::bulkSendJobList. This method will eventually become unavailable */ - public function bulkSendJobListAsyncWithHttpInfo(int $page = 1, int $page_size = 20, string $contentType = self::contentTypes['bulkSendJobList'][0]) + public function bulkSendJobListAsyncWithHttpInfo(?int $page = 1, ?int $page_size = 20, string $contentType = self::contentTypes['bulkSendJobList'][0]) { $returnType = '\Dropbox\Sign\Model\BulkSendJobListResponse'; $request = $this->bulkSendJobListRequest($page, $page_size, $contentType); @@ -728,15 +728,15 @@ function ($exception) { /** * Create request for operation 'bulkSendJobList' * - * @param int $page Which page number of the BulkSendJob List to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. (optional, default to 20) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bulkSendJobList'] to see the possible values for this operation + * @param int|null $page Which page number of the BulkSendJob List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. (optional, default to 20) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bulkSendJobList'] to see the possible values for this operation * * @return Request * @throws InvalidArgumentException * @deprecated Prefer to use ::bulkSendJobList. This method will eventually become unavailable */ - public function bulkSendJobListRequest(int $page = 1, int $page_size = 20, string $contentType = self::contentTypes['bulkSendJobList'][0]) + public function bulkSendJobListRequest(?int $page = 1, ?int $page_size = 20, string $contentType = self::contentTypes['bulkSendJobList'][0]) { $resourcePath = '/bulk_send_job/list'; $formParams = []; diff --git a/src/Api/EmbeddedApi.php b/src/Api/EmbeddedApi.php index 364e5f7..3822287 100644 --- a/src/Api/EmbeddedApi.php +++ b/src/Api/EmbeddedApi.php @@ -15,7 +15,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -82,9 +82,9 @@ class EmbeddedApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - Configuration $config = null, - ClientInterface $client = null, - HeaderSelector $selector = null, + ?Configuration $config = null, + ?ClientInterface $client = null, + ?HeaderSelector $selector = null, int $hostIndex = 0 ) { $this->client = $client ?: new Client(); @@ -190,19 +190,6 @@ public function embeddedEditUrlWithHttpInfo(string $template_id, Model\EmbeddedE $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -242,6 +229,19 @@ public function embeddedEditUrlWithHttpInfo(string $template_id, Model\EmbeddedE ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\EmbeddedEditUrlResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -548,19 +548,6 @@ public function embeddedSignUrlWithHttpInfo(string $signature_id, string $conten $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -600,6 +587,19 @@ public function embeddedSignUrlWithHttpInfo(string $signature_id, string $conten ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\EmbeddedSignUrlResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer diff --git a/src/Api/FaxApi.php b/src/Api/FaxApi.php index 0ae0cf3..ec43e8a 100644 --- a/src/Api/FaxApi.php +++ b/src/Api/FaxApi.php @@ -15,7 +15,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -93,9 +93,9 @@ class FaxApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - Configuration $config = null, - ClientInterface $client = null, - HeaderSelector $selector = null, + ?Configuration $config = null, + ?ClientInterface $client = null, + ?HeaderSelector $selector = null, int $hostIndex = 0 ) { $this->client = $client ?: new Client(); @@ -197,19 +197,6 @@ public function faxDeleteWithHttpInfo(string $fax_id, string $contentType = self $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - return [null, $statusCode, $response->getHeaders()]; } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { @@ -385,7 +372,7 @@ public function faxDeleteRequest(string $fax_id, string $contentType = self::con /** * Operation faxFiles * - * List Fax Files + * Download Fax Files * * @param string $fax_id Fax ID (required) * @@ -402,7 +389,7 @@ public function faxFiles(string $fax_id) /** * Operation faxFilesWithHttpInfo * - * List Fax Files + * Download Fax Files * * @param string $fax_id Fax ID (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxFiles'] to see the possible values for this operation @@ -439,19 +426,6 @@ public function faxFilesWithHttpInfo(string $fax_id, string $contentType = self: $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -491,6 +465,19 @@ public function faxFilesWithHttpInfo(string $fax_id, string $contentType = self: ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\SplFileObject'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -539,7 +526,7 @@ public function faxFilesWithHttpInfo(string $fax_id, string $contentType = self: /** * Operation faxFilesAsync * - * List Fax Files + * Download Fax Files * * @param string $fax_id Fax ID (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxFiles'] to see the possible values for this operation @@ -561,7 +548,7 @@ function ($response) { /** * Operation faxFilesAsyncWithHttpInfo * - * List Fax Files + * Download Fax Files * * @param string $fax_id Fax ID (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxFiles'] to see the possible values for this operation @@ -767,19 +754,6 @@ public function faxGetWithHttpInfo(string $fax_id, string $contentType = self::c $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -819,6 +793,19 @@ public function faxGetWithHttpInfo(string $fax_id, string $contentType = self::c ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\FaxGetResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -1043,14 +1030,14 @@ public function faxGetRequest(string $fax_id, string $contentType = self::conten * * Lists Faxes * - * @param int $page Page (optional, default to 1) - * @param int $page_size Page size (optional, default to 20) + * @param int|null $page Which page number of the Fax List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) * * @return Model\FaxListResponse * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException */ - public function faxList(int $page = 1, int $page_size = 20) + public function faxList(?int $page = 1, ?int $page_size = 20) { list($response) = $this->faxListWithHttpInfo($page, $page_size); return $response; @@ -1061,16 +1048,16 @@ public function faxList(int $page = 1, int $page_size = 20) * * Lists Faxes * - * @param int $page Page (optional, default to 1) - * @param int $page_size Page size (optional, default to 20) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxList'] to see the possible values for this operation + * @param int|null $page Which page number of the Fax List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxList'] to see the possible values for this operation * * @return array of Model\FaxListResponse, HTTP status code, HTTP response headers (array of strings) * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @deprecated Prefer to use ::faxList. This method will eventually become unavailable */ - public function faxListWithHttpInfo(int $page = 1, int $page_size = 20, string $contentType = self::contentTypes['faxList'][0]) + public function faxListWithHttpInfo(?int $page = 1, ?int $page_size = 20, string $contentType = self::contentTypes['faxList'][0]) { $request = $this->faxListRequest($page, $page_size, $contentType); @@ -1097,19 +1084,6 @@ public function faxListWithHttpInfo(int $page = 1, int $page_size = 20, string $ $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -1149,6 +1123,19 @@ public function faxListWithHttpInfo(int $page = 1, int $page_size = 20, string $ ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\FaxListResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -1199,15 +1186,15 @@ public function faxListWithHttpInfo(int $page = 1, int $page_size = 20, string $ * * Lists Faxes * - * @param int $page Page (optional, default to 1) - * @param int $page_size Page size (optional, default to 20) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxList'] to see the possible values for this operation + * @param int|null $page Which page number of the Fax List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxList'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::faxList. This method will eventually become unavailable */ - public function faxListAsync(int $page = 1, int $page_size = 20, string $contentType = self::contentTypes['faxList'][0]) + public function faxListAsync(?int $page = 1, ?int $page_size = 20, string $contentType = self::contentTypes['faxList'][0]) { return $this->faxListAsyncWithHttpInfo($page, $page_size, $contentType) ->then( @@ -1222,15 +1209,15 @@ function ($response) { * * Lists Faxes * - * @param int $page Page (optional, default to 1) - * @param int $page_size Page size (optional, default to 20) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxList'] to see the possible values for this operation + * @param int|null $page Which page number of the Fax List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxList'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::faxList. This method will eventually become unavailable */ - public function faxListAsyncWithHttpInfo(int $page = 1, int $page_size = 20, string $contentType = self::contentTypes['faxList'][0]) + public function faxListAsyncWithHttpInfo(?int $page = 1, ?int $page_size = 20, string $contentType = self::contentTypes['faxList'][0]) { $returnType = '\Dropbox\Sign\Model\FaxListResponse'; $request = $this->faxListRequest($page, $page_size, $contentType); @@ -1274,15 +1261,15 @@ function ($exception) { /** * Create request for operation 'faxList' * - * @param int $page Page (optional, default to 1) - * @param int $page_size Page size (optional, default to 20) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxList'] to see the possible values for this operation + * @param int|null $page Which page number of the Fax List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxList'] to see the possible values for this operation * * @return Request * @throws InvalidArgumentException * @deprecated Prefer to use ::faxList. This method will eventually become unavailable */ - public function faxListRequest(int $page = 1, int $page_size = 20, string $contentType = self::contentTypes['faxList'][0]) + public function faxListRequest(?int $page = 1, ?int $page_size = 20, string $contentType = self::contentTypes['faxList'][0]) { if ($page !== null && $page < 1) { throw new InvalidArgumentException('invalid value for "$page" when calling FaxApi.faxList, must be bigger than or equal to 1.'); @@ -1442,19 +1429,6 @@ public function faxSendWithHttpInfo(Model\FaxSendRequest $fax_send_request, stri $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -1494,6 +1468,19 @@ public function faxSendWithHttpInfo(Model\FaxSendRequest $fax_send_request, stri ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\FaxGetResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer diff --git a/src/Api/FaxLineApi.php b/src/Api/FaxLineApi.php index 65cefff..94a5e6e 100644 --- a/src/Api/FaxLineApi.php +++ b/src/Api/FaxLineApi.php @@ -15,7 +15,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -97,9 +97,9 @@ class FaxLineApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - Configuration $config = null, - ClientInterface $client = null, - HeaderSelector $selector = null, + ?Configuration $config = null, + ?ClientInterface $client = null, + ?HeaderSelector $selector = null, int $hostIndex = 0 ) { $this->client = $client ?: new Client(); @@ -203,19 +203,6 @@ public function faxLineAddUserWithHttpInfo(Model\FaxLineAddUserRequest $fax_line $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -255,6 +242,19 @@ public function faxLineAddUserWithHttpInfo(Model\FaxLineAddUserRequest $fax_line ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\FaxLineResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -486,16 +486,16 @@ public function faxLineAddUserRequest(Model\FaxLineAddUserRequest $fax_line_add_ * * Get Available Fax Line Area Codes * - * @param string $country Filter area codes by country. (required) - * @param string $state Filter area codes by state. (optional) - * @param string $province Filter area codes by province. (optional) - * @param string $city Filter area codes by city. (optional) + * @param string $country Filter area codes by country (required) + * @param string|null $state Filter area codes by state (optional) + * @param string|null $province Filter area codes by province (optional) + * @param string|null $city Filter area codes by city (optional) * * @return Model\FaxLineAreaCodeGetResponse * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException */ - public function faxLineAreaCodeGet(string $country, string $state = null, string $province = null, string $city = null) + public function faxLineAreaCodeGet(string $country, ?string $state = null, ?string $province = null, ?string $city = null) { list($response) = $this->faxLineAreaCodeGetWithHttpInfo($country, $state, $province, $city); return $response; @@ -506,18 +506,18 @@ public function faxLineAreaCodeGet(string $country, string $state = null, string * * Get Available Fax Line Area Codes * - * @param string $country Filter area codes by country. (required) - * @param string $state Filter area codes by state. (optional) - * @param string $province Filter area codes by province. (optional) - * @param string $city Filter area codes by city. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxLineAreaCodeGet'] to see the possible values for this operation + * @param string $country Filter area codes by country (required) + * @param string|null $state Filter area codes by state (optional) + * @param string|null $province Filter area codes by province (optional) + * @param string|null $city Filter area codes by city (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxLineAreaCodeGet'] to see the possible values for this operation * * @return array of Model\FaxLineAreaCodeGetResponse, HTTP status code, HTTP response headers (array of strings) * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @deprecated Prefer to use ::faxLineAreaCodeGet. This method will eventually become unavailable */ - public function faxLineAreaCodeGetWithHttpInfo(string $country, string $state = null, string $province = null, string $city = null, string $contentType = self::contentTypes['faxLineAreaCodeGet'][0]) + public function faxLineAreaCodeGetWithHttpInfo(string $country, ?string $state = null, ?string $province = null, ?string $city = null, string $contentType = self::contentTypes['faxLineAreaCodeGet'][0]) { $request = $this->faxLineAreaCodeGetRequest($country, $state, $province, $city, $contentType); @@ -544,19 +544,6 @@ public function faxLineAreaCodeGetWithHttpInfo(string $country, string $state = $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -596,6 +583,19 @@ public function faxLineAreaCodeGetWithHttpInfo(string $country, string $state = ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\FaxLineAreaCodeGetResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -646,17 +646,17 @@ public function faxLineAreaCodeGetWithHttpInfo(string $country, string $state = * * Get Available Fax Line Area Codes * - * @param string $country Filter area codes by country. (required) - * @param string $state Filter area codes by state. (optional) - * @param string $province Filter area codes by province. (optional) - * @param string $city Filter area codes by city. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxLineAreaCodeGet'] to see the possible values for this operation + * @param string $country Filter area codes by country (required) + * @param string|null $state Filter area codes by state (optional) + * @param string|null $province Filter area codes by province (optional) + * @param string|null $city Filter area codes by city (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxLineAreaCodeGet'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::faxLineAreaCodeGet. This method will eventually become unavailable */ - public function faxLineAreaCodeGetAsync(string $country, string $state = null, string $province = null, string $city = null, string $contentType = self::contentTypes['faxLineAreaCodeGet'][0]) + public function faxLineAreaCodeGetAsync(string $country, ?string $state = null, ?string $province = null, ?string $city = null, string $contentType = self::contentTypes['faxLineAreaCodeGet'][0]) { return $this->faxLineAreaCodeGetAsyncWithHttpInfo($country, $state, $province, $city, $contentType) ->then( @@ -671,17 +671,17 @@ function ($response) { * * Get Available Fax Line Area Codes * - * @param string $country Filter area codes by country. (required) - * @param string $state Filter area codes by state. (optional) - * @param string $province Filter area codes by province. (optional) - * @param string $city Filter area codes by city. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxLineAreaCodeGet'] to see the possible values for this operation + * @param string $country Filter area codes by country (required) + * @param string|null $state Filter area codes by state (optional) + * @param string|null $province Filter area codes by province (optional) + * @param string|null $city Filter area codes by city (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxLineAreaCodeGet'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::faxLineAreaCodeGet. This method will eventually become unavailable */ - public function faxLineAreaCodeGetAsyncWithHttpInfo(string $country, string $state = null, string $province = null, string $city = null, string $contentType = self::contentTypes['faxLineAreaCodeGet'][0]) + public function faxLineAreaCodeGetAsyncWithHttpInfo(string $country, ?string $state = null, ?string $province = null, ?string $city = null, string $contentType = self::contentTypes['faxLineAreaCodeGet'][0]) { $returnType = '\Dropbox\Sign\Model\FaxLineAreaCodeGetResponse'; $request = $this->faxLineAreaCodeGetRequest($country, $state, $province, $city, $contentType); @@ -725,17 +725,17 @@ function ($exception) { /** * Create request for operation 'faxLineAreaCodeGet' * - * @param string $country Filter area codes by country. (required) - * @param string $state Filter area codes by state. (optional) - * @param string $province Filter area codes by province. (optional) - * @param string $city Filter area codes by city. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxLineAreaCodeGet'] to see the possible values for this operation + * @param string $country Filter area codes by country (required) + * @param string|null $state Filter area codes by state (optional) + * @param string|null $province Filter area codes by province (optional) + * @param string|null $city Filter area codes by city (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxLineAreaCodeGet'] to see the possible values for this operation * * @return Request * @throws InvalidArgumentException * @deprecated Prefer to use ::faxLineAreaCodeGet. This method will eventually become unavailable */ - public function faxLineAreaCodeGetRequest(string $country, string $state = null, string $province = null, string $city = null, string $contentType = self::contentTypes['faxLineAreaCodeGet'][0]) + public function faxLineAreaCodeGetRequest(string $country, ?string $state = null, ?string $province = null, ?string $city = null, string $contentType = self::contentTypes['faxLineAreaCodeGet'][0]) { // verify the required parameter 'country' is set if ($country === null || (is_array($country) && count($country) === 0)) { @@ -909,19 +909,6 @@ public function faxLineCreateWithHttpInfo(Model\FaxLineCreateRequest $fax_line_c $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -961,6 +948,19 @@ public function faxLineCreateWithHttpInfo(Model\FaxLineCreateRequest $fax_line_c ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\FaxLineResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -1242,19 +1242,6 @@ public function faxLineDeleteWithHttpInfo(Model\FaxLineDeleteRequest $fax_line_d $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - return [null, $statusCode, $response->getHeaders()]; } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { @@ -1439,7 +1426,7 @@ public function faxLineDeleteRequest(Model\FaxLineDeleteRequest $fax_line_delete * * Get Fax Line * - * @param string $number The Fax Line number. (required) + * @param string $number The Fax Line number (required) * * @return Model\FaxLineResponse * @throws ApiException on non-2xx response or if the response body is not in the expected format @@ -1456,7 +1443,7 @@ public function faxLineGet(string $number) * * Get Fax Line * - * @param string $number The Fax Line number. (required) + * @param string $number The Fax Line number (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxLineGet'] to see the possible values for this operation * * @return array of Model\FaxLineResponse, HTTP status code, HTTP response headers (array of strings) @@ -1491,19 +1478,6 @@ public function faxLineGetWithHttpInfo(string $number, string $contentType = sel $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -1543,6 +1517,19 @@ public function faxLineGetWithHttpInfo(string $number, string $contentType = sel ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\FaxLineResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -1593,7 +1580,7 @@ public function faxLineGetWithHttpInfo(string $number, string $contentType = sel * * Get Fax Line * - * @param string $number The Fax Line number. (required) + * @param string $number The Fax Line number (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxLineGet'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface @@ -1615,7 +1602,7 @@ function ($response) { * * Get Fax Line * - * @param string $number The Fax Line number. (required) + * @param string $number The Fax Line number (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxLineGet'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface @@ -1666,7 +1653,7 @@ function ($exception) { /** * Create request for operation 'faxLineGet' * - * @param string $number The Fax Line number. (required) + * @param string $number The Fax Line number (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxLineGet'] to see the possible values for this operation * * @return Request @@ -1768,16 +1755,16 @@ public function faxLineGetRequest(string $number, string $contentType = self::co * * List Fax Lines * - * @param string $account_id Account ID (optional) - * @param int $page Page (optional, default to 1) - * @param int $page_size Page size (optional, default to 20) - * @param bool $show_team_lines Show team lines (optional) + * @param string|null $account_id Account ID (optional) + * @param int|null $page Which page number of the Fax Line List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param bool|null $show_team_lines Include Fax Lines belonging to team members in the list (optional) * * @return Model\FaxLineListResponse * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException */ - public function faxLineList(string $account_id = null, int $page = 1, int $page_size = 20, bool $show_team_lines = null) + public function faxLineList(?string $account_id = null, ?int $page = 1, ?int $page_size = 20, ?bool $show_team_lines = null) { list($response) = $this->faxLineListWithHttpInfo($account_id, $page, $page_size, $show_team_lines); return $response; @@ -1788,18 +1775,18 @@ public function faxLineList(string $account_id = null, int $page = 1, int $page_ * * List Fax Lines * - * @param string $account_id Account ID (optional) - * @param int $page Page (optional, default to 1) - * @param int $page_size Page size (optional, default to 20) - * @param bool $show_team_lines Show team lines (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxLineList'] to see the possible values for this operation + * @param string|null $account_id Account ID (optional) + * @param int|null $page Which page number of the Fax Line List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param bool|null $show_team_lines Include Fax Lines belonging to team members in the list (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxLineList'] to see the possible values for this operation * * @return array of Model\FaxLineListResponse, HTTP status code, HTTP response headers (array of strings) * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @deprecated Prefer to use ::faxLineList. This method will eventually become unavailable */ - public function faxLineListWithHttpInfo(string $account_id = null, int $page = 1, int $page_size = 20, bool $show_team_lines = null, string $contentType = self::contentTypes['faxLineList'][0]) + public function faxLineListWithHttpInfo(?string $account_id = null, ?int $page = 1, ?int $page_size = 20, ?bool $show_team_lines = null, string $contentType = self::contentTypes['faxLineList'][0]) { $request = $this->faxLineListRequest($account_id, $page, $page_size, $show_team_lines, $contentType); @@ -1826,19 +1813,6 @@ public function faxLineListWithHttpInfo(string $account_id = null, int $page = 1 $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -1878,6 +1852,19 @@ public function faxLineListWithHttpInfo(string $account_id = null, int $page = 1 ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\FaxLineListResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -1928,17 +1915,17 @@ public function faxLineListWithHttpInfo(string $account_id = null, int $page = 1 * * List Fax Lines * - * @param string $account_id Account ID (optional) - * @param int $page Page (optional, default to 1) - * @param int $page_size Page size (optional, default to 20) - * @param bool $show_team_lines Show team lines (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxLineList'] to see the possible values for this operation + * @param string|null $account_id Account ID (optional) + * @param int|null $page Which page number of the Fax Line List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param bool|null $show_team_lines Include Fax Lines belonging to team members in the list (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxLineList'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::faxLineList. This method will eventually become unavailable */ - public function faxLineListAsync(string $account_id = null, int $page = 1, int $page_size = 20, bool $show_team_lines = null, string $contentType = self::contentTypes['faxLineList'][0]) + public function faxLineListAsync(?string $account_id = null, ?int $page = 1, ?int $page_size = 20, ?bool $show_team_lines = null, string $contentType = self::contentTypes['faxLineList'][0]) { return $this->faxLineListAsyncWithHttpInfo($account_id, $page, $page_size, $show_team_lines, $contentType) ->then( @@ -1953,17 +1940,17 @@ function ($response) { * * List Fax Lines * - * @param string $account_id Account ID (optional) - * @param int $page Page (optional, default to 1) - * @param int $page_size Page size (optional, default to 20) - * @param bool $show_team_lines Show team lines (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxLineList'] to see the possible values for this operation + * @param string|null $account_id Account ID (optional) + * @param int|null $page Which page number of the Fax Line List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param bool|null $show_team_lines Include Fax Lines belonging to team members in the list (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxLineList'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::faxLineList. This method will eventually become unavailable */ - public function faxLineListAsyncWithHttpInfo(string $account_id = null, int $page = 1, int $page_size = 20, bool $show_team_lines = null, string $contentType = self::contentTypes['faxLineList'][0]) + public function faxLineListAsyncWithHttpInfo(?string $account_id = null, ?int $page = 1, ?int $page_size = 20, ?bool $show_team_lines = null, string $contentType = self::contentTypes['faxLineList'][0]) { $returnType = '\Dropbox\Sign\Model\FaxLineListResponse'; $request = $this->faxLineListRequest($account_id, $page, $page_size, $show_team_lines, $contentType); @@ -2007,17 +1994,17 @@ function ($exception) { /** * Create request for operation 'faxLineList' * - * @param string $account_id Account ID (optional) - * @param int $page Page (optional, default to 1) - * @param int $page_size Page size (optional, default to 20) - * @param bool $show_team_lines Show team lines (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxLineList'] to see the possible values for this operation + * @param string|null $account_id Account ID (optional) + * @param int|null $page Which page number of the Fax Line List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param bool|null $show_team_lines Include Fax Lines belonging to team members in the list (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxLineList'] to see the possible values for this operation * * @return Request * @throws InvalidArgumentException * @deprecated Prefer to use ::faxLineList. This method will eventually become unavailable */ - public function faxLineListRequest(string $account_id = null, int $page = 1, int $page_size = 20, bool $show_team_lines = null, string $contentType = self::contentTypes['faxLineList'][0]) + public function faxLineListRequest(?string $account_id = null, ?int $page = 1, ?int $page_size = 20, ?bool $show_team_lines = null, string $contentType = self::contentTypes['faxLineList'][0]) { $resourcePath = '/fax_line/list'; $formParams = []; @@ -2184,19 +2171,6 @@ public function faxLineRemoveUserWithHttpInfo(Model\FaxLineRemoveUserRequest $fa $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -2236,6 +2210,19 @@ public function faxLineRemoveUserWithHttpInfo(Model\FaxLineRemoveUserRequest $fa ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\FaxLineResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer diff --git a/src/Api/OAuthApi.php b/src/Api/OAuthApi.php index 8146862..19b137a 100644 --- a/src/Api/OAuthApi.php +++ b/src/Api/OAuthApi.php @@ -15,7 +15,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -82,9 +82,9 @@ class OAuthApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - Configuration $config = null, - ClientInterface $client = null, - HeaderSelector $selector = null, + ?Configuration $config = null, + ?ClientInterface $client = null, + ?HeaderSelector $selector = null, int $hostIndex = 0 ) { $this->client = $client ?: new Client(); @@ -198,19 +198,6 @@ public function oauthTokenGenerateWithHttpInfo(Model\OAuthTokenGenerateRequest $ $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -250,6 +237,19 @@ public function oauthTokenGenerateWithHttpInfo(Model\OAuthTokenGenerateRequest $ ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\OAuthTokenResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -581,19 +581,6 @@ public function oauthTokenRefreshWithHttpInfo(Model\OAuthTokenRefreshRequest $o_ $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -633,6 +620,19 @@ public function oauthTokenRefreshWithHttpInfo(Model\OAuthTokenRefreshRequest $o_ ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\OAuthTokenResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer diff --git a/src/Api/ReportApi.php b/src/Api/ReportApi.php index 987fc25..cde61fc 100644 --- a/src/Api/ReportApi.php +++ b/src/Api/ReportApi.php @@ -15,7 +15,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -79,9 +79,9 @@ class ReportApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - Configuration $config = null, - ClientInterface $client = null, - HeaderSelector $selector = null, + ?Configuration $config = null, + ?ClientInterface $client = null, + ?HeaderSelector $selector = null, int $hostIndex = 0 ) { $this->client = $client ?: new Client(); @@ -185,19 +185,6 @@ public function reportCreateWithHttpInfo(Model\ReportCreateRequest $report_creat $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -237,6 +224,19 @@ public function reportCreateWithHttpInfo(Model\ReportCreateRequest $report_creat ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\ReportCreateResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer diff --git a/src/Api/SignatureRequestApi.php b/src/Api/SignatureRequestApi.php index e8da69d..3f6ad70 100644 --- a/src/Api/SignatureRequestApi.php +++ b/src/Api/SignatureRequestApi.php @@ -15,7 +15,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -87,6 +87,22 @@ class SignatureRequestApi 'application/json', 'multipart/form-data', ], + 'signatureRequestEdit' => [ + 'application/json', + 'multipart/form-data', + ], + 'signatureRequestEditEmbedded' => [ + 'application/json', + 'multipart/form-data', + ], + 'signatureRequestEditEmbeddedWithTemplate' => [ + 'application/json', + 'multipart/form-data', + ], + 'signatureRequestEditWithTemplate' => [ + 'application/json', + 'multipart/form-data', + ], 'signatureRequestFiles' => [ 'application/json', ], @@ -131,9 +147,9 @@ class SignatureRequestApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - Configuration $config = null, - ClientInterface $client = null, - HeaderSelector $selector = null, + ?Configuration $config = null, + ?ClientInterface $client = null, + ?HeaderSelector $selector = null, int $hostIndex = 0 ) { $this->client = $client ?: new Client(); @@ -237,19 +253,6 @@ public function signatureRequestBulkCreateEmbeddedWithTemplateWithHttpInfo(Model $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -289,6 +292,19 @@ public function signatureRequestBulkCreateEmbeddedWithTemplateWithHttpInfo(Model ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\BulkSendJobSendResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -572,19 +588,6 @@ public function signatureRequestBulkSendWithTemplateWithHttpInfo(Model\Signature $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -624,6 +627,19 @@ public function signatureRequestBulkSendWithTemplateWithHttpInfo(Model\Signature ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\BulkSendJobSendResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -909,19 +925,6 @@ public function signatureRequestCancelWithHttpInfo(string $signature_request_id, $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - return [null, $statusCode, $response->getHeaders()]; } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { @@ -1155,19 +1158,6 @@ public function signatureRequestCreateEmbeddedWithHttpInfo(Model\SignatureReques $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -1207,6 +1197,19 @@ public function signatureRequestCreateEmbeddedWithHttpInfo(Model\SignatureReques ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\SignatureRequestGetResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -1494,19 +1497,6 @@ public function signatureRequestCreateEmbeddedWithTemplateWithHttpInfo(Model\Sig $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -1546,6 +1536,19 @@ public function signatureRequestCreateEmbeddedWithTemplateWithHttpInfo(Model\Sig ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\SignatureRequestGetResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -1777,40 +1780,40 @@ public function signatureRequestCreateEmbeddedWithTemplateRequest(Model\Signatur } /** - * Operation signatureRequestFiles + * Operation signatureRequestEdit * - * Download Files + * Edit Signature Request * - * @param string $signature_request_id The id of the SignatureRequest to retrieve. (required) - * @param string $file_type Set to `pdf` for a single merged document or `zip` for a collection of individual documents. (optional, default to 'pdf') + * @param string $signature_request_id The id of the SignatureRequest to edit. (required) + * @param Model\SignatureRequestEditRequest $signature_request_edit_request signature_request_edit_request (required) * - * @return SplFileObject + * @return Model\SignatureRequestGetResponse * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException */ - public function signatureRequestFiles(string $signature_request_id, string $file_type = 'pdf') + public function signatureRequestEdit(string $signature_request_id, Model\SignatureRequestEditRequest $signature_request_edit_request) { - list($response) = $this->signatureRequestFilesWithHttpInfo($signature_request_id, $file_type); + list($response) = $this->signatureRequestEditWithHttpInfo($signature_request_id, $signature_request_edit_request); return $response; } /** - * Operation signatureRequestFilesWithHttpInfo + * Operation signatureRequestEditWithHttpInfo * - * Download Files + * Edit Signature Request * - * @param string $signature_request_id The id of the SignatureRequest to retrieve. (required) - * @param string $file_type Set to `pdf` for a single merged document or `zip` for a collection of individual documents. (optional, default to 'pdf') - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestFiles'] to see the possible values for this operation + * @param string $signature_request_id The id of the SignatureRequest to edit. (required) + * @param Model\SignatureRequestEditRequest $signature_request_edit_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestEdit'] to see the possible values for this operation * - * @return array of \SplFileObject|\Dropbox\Sign\Model\ErrorResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of Model\SignatureRequestGetResponse, HTTP status code, HTTP response headers (array of strings) * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @deprecated Prefer to use ::signatureRequestFiles. This method will eventually become unavailable + * @deprecated Prefer to use ::signatureRequestEdit. This method will eventually become unavailable */ - public function signatureRequestFilesWithHttpInfo(string $signature_request_id, string $file_type = 'pdf', string $contentType = self::contentTypes['signatureRequestFiles'][0]) + public function signatureRequestEditWithHttpInfo(string $signature_request_id, Model\SignatureRequestEditRequest $signature_request_edit_request, string $contentType = self::contentTypes['signatureRequestEdit'][0]) { - $request = $this->signatureRequestFilesRequest($signature_request_id, $file_type, $contentType); + $request = $this->signatureRequestEditRequest($signature_request_id, $signature_request_edit_request, $contentType); try { $options = $this->createHttpClientOption(); @@ -1835,19 +1838,6 @@ public function signatureRequestFilesWithHttpInfo(string $signature_request_id, $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -1859,11 +1849,11 @@ public function signatureRequestFilesWithHttpInfo(string $signature_request_id, switch ($statusCode) { case 200: - if ('\SplFileObject' === '\SplFileObject') { + if ('\Dropbox\Sign\Model\SignatureRequestGetResponse' === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer } else { $content = (string)$response->getBody(); - if ('\SplFileObject' !== 'string') { + if ('\Dropbox\Sign\Model\SignatureRequestGetResponse' !== 'string') { try { $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); } catch (JsonException $exception) { @@ -1881,12 +1871,1465 @@ public function signatureRequestFilesWithHttpInfo(string $signature_request_id, } return [ - ObjectSerializer::deserialize($content, '\SplFileObject', []), + ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\SignatureRequestGetResponse', []), $response->getStatusCode(), $response->getHeaders(), ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + + $returnType = '\Dropbox\Sign\Model\SignatureRequestGetResponse'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); // stream goes to serializer + } else { + $content = (string)$response->getBody(); + if ($returnType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } catch (ApiException $e) { + if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { + throw $e; + } + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\SignatureRequestGetResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation signatureRequestEditAsync + * + * Edit Signature Request + * + * @param string $signature_request_id The id of the SignatureRequest to edit. (required) + * @param Model\SignatureRequestEditRequest $signature_request_edit_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestEdit'] to see the possible values for this operation + * + * @return \GuzzleHttp\Promise\PromiseInterface + * @throws InvalidArgumentException + * @deprecated Prefer to use ::signatureRequestEdit. This method will eventually become unavailable + */ + public function signatureRequestEditAsync(string $signature_request_id, Model\SignatureRequestEditRequest $signature_request_edit_request, string $contentType = self::contentTypes['signatureRequestEdit'][0]) + { + return $this->signatureRequestEditAsyncWithHttpInfo($signature_request_id, $signature_request_edit_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation signatureRequestEditAsyncWithHttpInfo + * + * Edit Signature Request + * + * @param string $signature_request_id The id of the SignatureRequest to edit. (required) + * @param Model\SignatureRequestEditRequest $signature_request_edit_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestEdit'] to see the possible values for this operation + * + * @return \GuzzleHttp\Promise\PromiseInterface + * @throws InvalidArgumentException + * @deprecated Prefer to use ::signatureRequestEdit. This method will eventually become unavailable + */ + public function signatureRequestEditAsyncWithHttpInfo(string $signature_request_id, Model\SignatureRequestEditRequest $signature_request_edit_request, string $contentType = self::contentTypes['signatureRequestEdit'][0]) + { + $returnType = '\Dropbox\Sign\Model\SignatureRequestGetResponse'; + $request = $this->signatureRequestEditRequest($signature_request_id, $signature_request_edit_request, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); // stream goes to serializer + } else { + $content = (string)$response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'signatureRequestEdit' + * + * @param string $signature_request_id The id of the SignatureRequest to edit. (required) + * @param Model\SignatureRequestEditRequest $signature_request_edit_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestEdit'] to see the possible values for this operation + * + * @return Request + * @throws InvalidArgumentException + * @deprecated Prefer to use ::signatureRequestEdit. This method will eventually become unavailable + */ + public function signatureRequestEditRequest(string $signature_request_id, Model\SignatureRequestEditRequest $signature_request_edit_request, string $contentType = self::contentTypes['signatureRequestEdit'][0]) + { + // verify the required parameter 'signature_request_id' is set + if ($signature_request_id === null || (is_array($signature_request_id) && count($signature_request_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $signature_request_id when calling signatureRequestEdit' + ); + } + + // verify the required parameter 'signature_request_edit_request' is set + if ($signature_request_edit_request === null || (is_array($signature_request_edit_request) && count($signature_request_edit_request) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $signature_request_edit_request when calling signatureRequestEdit' + ); + } + + $resourcePath = '/signature_request/edit/{signature_request_id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $formParams = ObjectSerializer::getFormParams( + $signature_request_edit_request + ); + + $multipart = !empty($formParams); + + // path params + if ($signature_request_id !== null) { + $resourcePath = str_replace( + '{signature_request_id}', + ObjectSerializer::toPathValue($signature_request_id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + $multipart ? ['multipart/form-data'] : ['application/json'], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) === 0) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + // if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($signature_request_edit_request)); + } else { + $httpBody = $signature_request_edit_request; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem, + ]; + } + } + // for HTTP post (form) + if (!empty($body)) { + $multipartContents[] = [ + 'name' => 'body', + 'contents' => $body, + 'headers' => ['Content-Type' => 'application/json'], + ]; + } + + if ($payloadHook = $this->config->getPayloadHook()) { + $payloadHook('multipart', $multipartContents, $signature_request_edit_request); + } + $httpBody = new MultipartStream($multipartContents); + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + // if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername())) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ':'); + } + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'PUT', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation signatureRequestEditEmbedded + * + * Edit Embedded Signature Request + * + * @param string $signature_request_id The id of the SignatureRequest to edit. (required) + * @param Model\SignatureRequestEditEmbeddedRequest $signature_request_edit_embedded_request signature_request_edit_embedded_request (required) + * + * @return Model\SignatureRequestGetResponse + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + */ + public function signatureRequestEditEmbedded(string $signature_request_id, Model\SignatureRequestEditEmbeddedRequest $signature_request_edit_embedded_request) + { + list($response) = $this->signatureRequestEditEmbeddedWithHttpInfo($signature_request_id, $signature_request_edit_embedded_request); + return $response; + } + + /** + * Operation signatureRequestEditEmbeddedWithHttpInfo + * + * Edit Embedded Signature Request + * + * @param string $signature_request_id The id of the SignatureRequest to edit. (required) + * @param Model\SignatureRequestEditEmbeddedRequest $signature_request_edit_embedded_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestEditEmbedded'] to see the possible values for this operation + * + * @return array of Model\SignatureRequestGetResponse, HTTP status code, HTTP response headers (array of strings) + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @deprecated Prefer to use ::signatureRequestEditEmbedded. This method will eventually become unavailable + */ + public function signatureRequestEditEmbeddedWithHttpInfo(string $signature_request_id, Model\SignatureRequestEditEmbeddedRequest $signature_request_edit_embedded_request, string $contentType = self::contentTypes['signatureRequestEditEmbedded'][0]) + { + $request = $this->signatureRequestEditEmbeddedRequest($signature_request_id, $signature_request_edit_embedded_request, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + $this->response = $response; + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int)$e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string)$e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int)$e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + $result = $this->handleRangeCodeResponse( + $response, + '4XX', + '\Dropbox\Sign\Model\ErrorResponse' + ); + if ($result) { + return $result; + } + + switch ($statusCode) { + case 200: + if ('\Dropbox\Sign\Model\SignatureRequestGetResponse' === '\SplFileObject') { + $content = $response->getBody(); // stream goes to serializer + } else { + $content = (string)$response->getBody(); + if ('\Dropbox\Sign\Model\SignatureRequestGetResponse' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\SignatureRequestGetResponse', []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + + $returnType = '\Dropbox\Sign\Model\SignatureRequestGetResponse'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); // stream goes to serializer + } else { + $content = (string)$response->getBody(); + if ($returnType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } catch (ApiException $e) { + if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { + throw $e; + } + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\SignatureRequestGetResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation signatureRequestEditEmbeddedAsync + * + * Edit Embedded Signature Request + * + * @param string $signature_request_id The id of the SignatureRequest to edit. (required) + * @param Model\SignatureRequestEditEmbeddedRequest $signature_request_edit_embedded_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestEditEmbedded'] to see the possible values for this operation + * + * @return \GuzzleHttp\Promise\PromiseInterface + * @throws InvalidArgumentException + * @deprecated Prefer to use ::signatureRequestEditEmbedded. This method will eventually become unavailable + */ + public function signatureRequestEditEmbeddedAsync(string $signature_request_id, Model\SignatureRequestEditEmbeddedRequest $signature_request_edit_embedded_request, string $contentType = self::contentTypes['signatureRequestEditEmbedded'][0]) + { + return $this->signatureRequestEditEmbeddedAsyncWithHttpInfo($signature_request_id, $signature_request_edit_embedded_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation signatureRequestEditEmbeddedAsyncWithHttpInfo + * + * Edit Embedded Signature Request + * + * @param string $signature_request_id The id of the SignatureRequest to edit. (required) + * @param Model\SignatureRequestEditEmbeddedRequest $signature_request_edit_embedded_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestEditEmbedded'] to see the possible values for this operation + * + * @return \GuzzleHttp\Promise\PromiseInterface + * @throws InvalidArgumentException + * @deprecated Prefer to use ::signatureRequestEditEmbedded. This method will eventually become unavailable + */ + public function signatureRequestEditEmbeddedAsyncWithHttpInfo(string $signature_request_id, Model\SignatureRequestEditEmbeddedRequest $signature_request_edit_embedded_request, string $contentType = self::contentTypes['signatureRequestEditEmbedded'][0]) + { + $returnType = '\Dropbox\Sign\Model\SignatureRequestGetResponse'; + $request = $this->signatureRequestEditEmbeddedRequest($signature_request_id, $signature_request_edit_embedded_request, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); // stream goes to serializer + } else { + $content = (string)$response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'signatureRequestEditEmbedded' + * + * @param string $signature_request_id The id of the SignatureRequest to edit. (required) + * @param Model\SignatureRequestEditEmbeddedRequest $signature_request_edit_embedded_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestEditEmbedded'] to see the possible values for this operation + * + * @return Request + * @throws InvalidArgumentException + * @deprecated Prefer to use ::signatureRequestEditEmbedded. This method will eventually become unavailable + */ + public function signatureRequestEditEmbeddedRequest(string $signature_request_id, Model\SignatureRequestEditEmbeddedRequest $signature_request_edit_embedded_request, string $contentType = self::contentTypes['signatureRequestEditEmbedded'][0]) + { + // verify the required parameter 'signature_request_id' is set + if ($signature_request_id === null || (is_array($signature_request_id) && count($signature_request_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $signature_request_id when calling signatureRequestEditEmbedded' + ); + } + + // verify the required parameter 'signature_request_edit_embedded_request' is set + if ($signature_request_edit_embedded_request === null || (is_array($signature_request_edit_embedded_request) && count($signature_request_edit_embedded_request) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $signature_request_edit_embedded_request when calling signatureRequestEditEmbedded' + ); + } + + $resourcePath = '/signature_request/edit_embedded/{signature_request_id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $formParams = ObjectSerializer::getFormParams( + $signature_request_edit_embedded_request + ); + + $multipart = !empty($formParams); + + // path params + if ($signature_request_id !== null) { + $resourcePath = str_replace( + '{signature_request_id}', + ObjectSerializer::toPathValue($signature_request_id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + $multipart ? ['multipart/form-data'] : ['application/json'], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) === 0) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + // if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($signature_request_edit_embedded_request)); + } else { + $httpBody = $signature_request_edit_embedded_request; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem, + ]; + } + } + // for HTTP post (form) + if (!empty($body)) { + $multipartContents[] = [ + 'name' => 'body', + 'contents' => $body, + 'headers' => ['Content-Type' => 'application/json'], + ]; + } + + if ($payloadHook = $this->config->getPayloadHook()) { + $payloadHook('multipart', $multipartContents, $signature_request_edit_embedded_request); + } + $httpBody = new MultipartStream($multipartContents); + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + // if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername())) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ':'); + } + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'PUT', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation signatureRequestEditEmbeddedWithTemplate + * + * Edit Embedded Signature Request with Template + * + * @param string $signature_request_id The id of the SignatureRequest to edit. (required) + * @param Model\SignatureRequestEditEmbeddedWithTemplateRequest $signature_request_edit_embedded_with_template_request signature_request_edit_embedded_with_template_request (required) + * + * @return Model\SignatureRequestGetResponse + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + */ + public function signatureRequestEditEmbeddedWithTemplate(string $signature_request_id, Model\SignatureRequestEditEmbeddedWithTemplateRequest $signature_request_edit_embedded_with_template_request) + { + list($response) = $this->signatureRequestEditEmbeddedWithTemplateWithHttpInfo($signature_request_id, $signature_request_edit_embedded_with_template_request); + return $response; + } + + /** + * Operation signatureRequestEditEmbeddedWithTemplateWithHttpInfo + * + * Edit Embedded Signature Request with Template + * + * @param string $signature_request_id The id of the SignatureRequest to edit. (required) + * @param Model\SignatureRequestEditEmbeddedWithTemplateRequest $signature_request_edit_embedded_with_template_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestEditEmbeddedWithTemplate'] to see the possible values for this operation + * + * @return array of Model\SignatureRequestGetResponse, HTTP status code, HTTP response headers (array of strings) + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @deprecated Prefer to use ::signatureRequestEditEmbeddedWithTemplate. This method will eventually become unavailable + */ + public function signatureRequestEditEmbeddedWithTemplateWithHttpInfo(string $signature_request_id, Model\SignatureRequestEditEmbeddedWithTemplateRequest $signature_request_edit_embedded_with_template_request, string $contentType = self::contentTypes['signatureRequestEditEmbeddedWithTemplate'][0]) + { + $request = $this->signatureRequestEditEmbeddedWithTemplateRequest($signature_request_id, $signature_request_edit_embedded_with_template_request, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + $this->response = $response; + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int)$e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string)$e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int)$e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + $result = $this->handleRangeCodeResponse( + $response, + '4XX', + '\Dropbox\Sign\Model\ErrorResponse' + ); + if ($result) { + return $result; + } + + switch ($statusCode) { + case 200: + if ('\Dropbox\Sign\Model\SignatureRequestGetResponse' === '\SplFileObject') { + $content = $response->getBody(); // stream goes to serializer + } else { + $content = (string)$response->getBody(); + if ('\Dropbox\Sign\Model\SignatureRequestGetResponse' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\SignatureRequestGetResponse', []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + + $returnType = '\Dropbox\Sign\Model\SignatureRequestGetResponse'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); // stream goes to serializer + } else { + $content = (string)$response->getBody(); + if ($returnType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } catch (ApiException $e) { + if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { + throw $e; + } + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\SignatureRequestGetResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation signatureRequestEditEmbeddedWithTemplateAsync + * + * Edit Embedded Signature Request with Template + * + * @param string $signature_request_id The id of the SignatureRequest to edit. (required) + * @param Model\SignatureRequestEditEmbeddedWithTemplateRequest $signature_request_edit_embedded_with_template_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestEditEmbeddedWithTemplate'] to see the possible values for this operation + * + * @return \GuzzleHttp\Promise\PromiseInterface + * @throws InvalidArgumentException + * @deprecated Prefer to use ::signatureRequestEditEmbeddedWithTemplate. This method will eventually become unavailable + */ + public function signatureRequestEditEmbeddedWithTemplateAsync(string $signature_request_id, Model\SignatureRequestEditEmbeddedWithTemplateRequest $signature_request_edit_embedded_with_template_request, string $contentType = self::contentTypes['signatureRequestEditEmbeddedWithTemplate'][0]) + { + return $this->signatureRequestEditEmbeddedWithTemplateAsyncWithHttpInfo($signature_request_id, $signature_request_edit_embedded_with_template_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation signatureRequestEditEmbeddedWithTemplateAsyncWithHttpInfo + * + * Edit Embedded Signature Request with Template + * + * @param string $signature_request_id The id of the SignatureRequest to edit. (required) + * @param Model\SignatureRequestEditEmbeddedWithTemplateRequest $signature_request_edit_embedded_with_template_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestEditEmbeddedWithTemplate'] to see the possible values for this operation + * + * @return \GuzzleHttp\Promise\PromiseInterface + * @throws InvalidArgumentException + * @deprecated Prefer to use ::signatureRequestEditEmbeddedWithTemplate. This method will eventually become unavailable + */ + public function signatureRequestEditEmbeddedWithTemplateAsyncWithHttpInfo(string $signature_request_id, Model\SignatureRequestEditEmbeddedWithTemplateRequest $signature_request_edit_embedded_with_template_request, string $contentType = self::contentTypes['signatureRequestEditEmbeddedWithTemplate'][0]) + { + $returnType = '\Dropbox\Sign\Model\SignatureRequestGetResponse'; + $request = $this->signatureRequestEditEmbeddedWithTemplateRequest($signature_request_id, $signature_request_edit_embedded_with_template_request, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); // stream goes to serializer + } else { + $content = (string)$response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'signatureRequestEditEmbeddedWithTemplate' + * + * @param string $signature_request_id The id of the SignatureRequest to edit. (required) + * @param Model\SignatureRequestEditEmbeddedWithTemplateRequest $signature_request_edit_embedded_with_template_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestEditEmbeddedWithTemplate'] to see the possible values for this operation + * + * @return Request + * @throws InvalidArgumentException + * @deprecated Prefer to use ::signatureRequestEditEmbeddedWithTemplate. This method will eventually become unavailable + */ + public function signatureRequestEditEmbeddedWithTemplateRequest(string $signature_request_id, Model\SignatureRequestEditEmbeddedWithTemplateRequest $signature_request_edit_embedded_with_template_request, string $contentType = self::contentTypes['signatureRequestEditEmbeddedWithTemplate'][0]) + { + // verify the required parameter 'signature_request_id' is set + if ($signature_request_id === null || (is_array($signature_request_id) && count($signature_request_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $signature_request_id when calling signatureRequestEditEmbeddedWithTemplate' + ); + } + + // verify the required parameter 'signature_request_edit_embedded_with_template_request' is set + if ($signature_request_edit_embedded_with_template_request === null || (is_array($signature_request_edit_embedded_with_template_request) && count($signature_request_edit_embedded_with_template_request) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $signature_request_edit_embedded_with_template_request when calling signatureRequestEditEmbeddedWithTemplate' + ); + } + + $resourcePath = '/signature_request/edit_embedded_with_template/{signature_request_id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $formParams = ObjectSerializer::getFormParams( + $signature_request_edit_embedded_with_template_request + ); + + $multipart = !empty($formParams); + + // path params + if ($signature_request_id !== null) { + $resourcePath = str_replace( + '{signature_request_id}', + ObjectSerializer::toPathValue($signature_request_id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + $multipart ? ['multipart/form-data'] : ['application/json'], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) === 0) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + // if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($signature_request_edit_embedded_with_template_request)); + } else { + $httpBody = $signature_request_edit_embedded_with_template_request; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem, + ]; + } + } + // for HTTP post (form) + if (!empty($body)) { + $multipartContents[] = [ + 'name' => 'body', + 'contents' => $body, + 'headers' => ['Content-Type' => 'application/json'], + ]; + } + + if ($payloadHook = $this->config->getPayloadHook()) { + $payloadHook('multipart', $multipartContents, $signature_request_edit_embedded_with_template_request); + } + $httpBody = new MultipartStream($multipartContents); + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + // if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername())) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ':'); + } + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'PUT', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation signatureRequestEditWithTemplate + * + * Edit Signature Request With Template + * + * @param string $signature_request_id The id of the SignatureRequest to edit. (required) + * @param Model\SignatureRequestEditWithTemplateRequest $signature_request_edit_with_template_request signature_request_edit_with_template_request (required) + * + * @return Model\SignatureRequestGetResponse + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + */ + public function signatureRequestEditWithTemplate(string $signature_request_id, Model\SignatureRequestEditWithTemplateRequest $signature_request_edit_with_template_request) + { + list($response) = $this->signatureRequestEditWithTemplateWithHttpInfo($signature_request_id, $signature_request_edit_with_template_request); + return $response; + } + + /** + * Operation signatureRequestEditWithTemplateWithHttpInfo + * + * Edit Signature Request With Template + * + * @param string $signature_request_id The id of the SignatureRequest to edit. (required) + * @param Model\SignatureRequestEditWithTemplateRequest $signature_request_edit_with_template_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestEditWithTemplate'] to see the possible values for this operation + * + * @return array of Model\SignatureRequestGetResponse, HTTP status code, HTTP response headers (array of strings) + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @deprecated Prefer to use ::signatureRequestEditWithTemplate. This method will eventually become unavailable + */ + public function signatureRequestEditWithTemplateWithHttpInfo(string $signature_request_id, Model\SignatureRequestEditWithTemplateRequest $signature_request_edit_with_template_request, string $contentType = self::contentTypes['signatureRequestEditWithTemplate'][0]) + { + $request = $this->signatureRequestEditWithTemplateRequest($signature_request_id, $signature_request_edit_with_template_request, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + $this->response = $response; + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int)$e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string)$e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int)$e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + $result = $this->handleRangeCodeResponse( + $response, + '4XX', + '\Dropbox\Sign\Model\ErrorResponse' + ); + if ($result) { + return $result; + } + + switch ($statusCode) { + case 200: + if ('\Dropbox\Sign\Model\SignatureRequestGetResponse' === '\SplFileObject') { + $content = $response->getBody(); // stream goes to serializer + } else { + $content = (string)$response->getBody(); + if ('\Dropbox\Sign\Model\SignatureRequestGetResponse' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\SignatureRequestGetResponse', []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + + $returnType = '\Dropbox\Sign\Model\SignatureRequestGetResponse'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); // stream goes to serializer + } else { + $content = (string)$response->getBody(); + if ($returnType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } catch (ApiException $e) { + if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { + throw $e; + } + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\SignatureRequestGetResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation signatureRequestEditWithTemplateAsync + * + * Edit Signature Request With Template + * + * @param string $signature_request_id The id of the SignatureRequest to edit. (required) + * @param Model\SignatureRequestEditWithTemplateRequest $signature_request_edit_with_template_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestEditWithTemplate'] to see the possible values for this operation + * + * @return \GuzzleHttp\Promise\PromiseInterface + * @throws InvalidArgumentException + * @deprecated Prefer to use ::signatureRequestEditWithTemplate. This method will eventually become unavailable + */ + public function signatureRequestEditWithTemplateAsync(string $signature_request_id, Model\SignatureRequestEditWithTemplateRequest $signature_request_edit_with_template_request, string $contentType = self::contentTypes['signatureRequestEditWithTemplate'][0]) + { + return $this->signatureRequestEditWithTemplateAsyncWithHttpInfo($signature_request_id, $signature_request_edit_with_template_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation signatureRequestEditWithTemplateAsyncWithHttpInfo + * + * Edit Signature Request With Template + * + * @param string $signature_request_id The id of the SignatureRequest to edit. (required) + * @param Model\SignatureRequestEditWithTemplateRequest $signature_request_edit_with_template_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestEditWithTemplate'] to see the possible values for this operation + * + * @return \GuzzleHttp\Promise\PromiseInterface + * @throws InvalidArgumentException + * @deprecated Prefer to use ::signatureRequestEditWithTemplate. This method will eventually become unavailable + */ + public function signatureRequestEditWithTemplateAsyncWithHttpInfo(string $signature_request_id, Model\SignatureRequestEditWithTemplateRequest $signature_request_edit_with_template_request, string $contentType = self::contentTypes['signatureRequestEditWithTemplate'][0]) + { + $returnType = '\Dropbox\Sign\Model\SignatureRequestGetResponse'; + $request = $this->signatureRequestEditWithTemplateRequest($signature_request_id, $signature_request_edit_with_template_request, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); // stream goes to serializer + } else { + $content = (string)$response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'signatureRequestEditWithTemplate' + * + * @param string $signature_request_id The id of the SignatureRequest to edit. (required) + * @param Model\SignatureRequestEditWithTemplateRequest $signature_request_edit_with_template_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestEditWithTemplate'] to see the possible values for this operation + * + * @return Request + * @throws InvalidArgumentException + * @deprecated Prefer to use ::signatureRequestEditWithTemplate. This method will eventually become unavailable + */ + public function signatureRequestEditWithTemplateRequest(string $signature_request_id, Model\SignatureRequestEditWithTemplateRequest $signature_request_edit_with_template_request, string $contentType = self::contentTypes['signatureRequestEditWithTemplate'][0]) + { + // verify the required parameter 'signature_request_id' is set + if ($signature_request_id === null || (is_array($signature_request_id) && count($signature_request_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $signature_request_id when calling signatureRequestEditWithTemplate' + ); + } + + // verify the required parameter 'signature_request_edit_with_template_request' is set + if ($signature_request_edit_with_template_request === null || (is_array($signature_request_edit_with_template_request) && count($signature_request_edit_with_template_request) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $signature_request_edit_with_template_request when calling signatureRequestEditWithTemplate' + ); + } + + $resourcePath = '/signature_request/edit_with_template/{signature_request_id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $formParams = ObjectSerializer::getFormParams( + $signature_request_edit_with_template_request + ); + + $multipart = !empty($formParams); + + // path params + if ($signature_request_id !== null) { + $resourcePath = str_replace( + '{signature_request_id}', + ObjectSerializer::toPathValue($signature_request_id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + $multipart ? ['multipart/form-data'] : ['application/json'], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) === 0) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + // if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($signature_request_edit_with_template_request)); + } else { + $httpBody = $signature_request_edit_with_template_request; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem, + ]; + } + } + // for HTTP post (form) + if (!empty($body)) { + $multipartContents[] = [ + 'name' => 'body', + 'contents' => $body, + 'headers' => ['Content-Type' => 'application/json'], + ]; + } + + if ($payloadHook = $this->config->getPayloadHook()) { + $payloadHook('multipart', $multipartContents, $signature_request_edit_with_template_request); + } + $httpBody = new MultipartStream($multipartContents); + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + // if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername())) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ':'); + } + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'PUT', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation signatureRequestFiles + * + * Download Files + * + * @param string $signature_request_id The id of the SignatureRequest to retrieve. (required) + * @param string|null $file_type Set to `pdf` for a single merged document or `zip` for a collection of individual documents. (optional, default to 'pdf') + * + * @return SplFileObject + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + */ + public function signatureRequestFiles(string $signature_request_id, ?string $file_type = 'pdf') + { + list($response) = $this->signatureRequestFilesWithHttpInfo($signature_request_id, $file_type); + return $response; + } + + /** + * Operation signatureRequestFilesWithHttpInfo + * + * Download Files + * + * @param string $signature_request_id The id of the SignatureRequest to retrieve. (required) + * @param string|null $file_type Set to `pdf` for a single merged document or `zip` for a collection of individual documents. (optional, default to 'pdf') + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestFiles'] to see the possible values for this operation + * + * @return array of \SplFileObject|\Dropbox\Sign\Model\ErrorResponse, HTTP status code, HTTP response headers (array of strings) + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @deprecated Prefer to use ::signatureRequestFiles. This method will eventually become unavailable + */ + public function signatureRequestFilesWithHttpInfo(string $signature_request_id, ?string $file_type = 'pdf', string $contentType = self::contentTypes['signatureRequestFiles'][0]) + { + $request = $this->signatureRequestFilesRequest($signature_request_id, $file_type, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + $this->response = $response; + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int)$e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string)$e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int)$e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + $result = $this->handleRangeCodeResponse( + $response, + '4XX', + '\Dropbox\Sign\Model\ErrorResponse' + ); + if ($result) { + return $result; + } + + switch ($statusCode) { + case 200: + if ('\SplFileObject' === '\SplFileObject') { + $content = $response->getBody(); // stream goes to serializer + } else { + $content = (string)$response->getBody(); + if ('\SplFileObject' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\SplFileObject', []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\SplFileObject'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -1937,15 +3380,15 @@ public function signatureRequestFilesWithHttpInfo(string $signature_request_id, * * Download Files * - * @param string $signature_request_id The id of the SignatureRequest to retrieve. (required) - * @param string $file_type Set to `pdf` for a single merged document or `zip` for a collection of individual documents. (optional, default to 'pdf') - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestFiles'] to see the possible values for this operation + * @param string $signature_request_id The id of the SignatureRequest to retrieve. (required) + * @param string|null $file_type Set to `pdf` for a single merged document or `zip` for a collection of individual documents. (optional, default to 'pdf') + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestFiles'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::signatureRequestFiles. This method will eventually become unavailable */ - public function signatureRequestFilesAsync(string $signature_request_id, string $file_type = 'pdf', string $contentType = self::contentTypes['signatureRequestFiles'][0]) + public function signatureRequestFilesAsync(string $signature_request_id, ?string $file_type = 'pdf', string $contentType = self::contentTypes['signatureRequestFiles'][0]) { return $this->signatureRequestFilesAsyncWithHttpInfo($signature_request_id, $file_type, $contentType) ->then( @@ -1960,15 +3403,15 @@ function ($response) { * * Download Files * - * @param string $signature_request_id The id of the SignatureRequest to retrieve. (required) - * @param string $file_type Set to `pdf` for a single merged document or `zip` for a collection of individual documents. (optional, default to 'pdf') - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestFiles'] to see the possible values for this operation + * @param string $signature_request_id The id of the SignatureRequest to retrieve. (required) + * @param string|null $file_type Set to `pdf` for a single merged document or `zip` for a collection of individual documents. (optional, default to 'pdf') + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestFiles'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::signatureRequestFiles. This method will eventually become unavailable */ - public function signatureRequestFilesAsyncWithHttpInfo(string $signature_request_id, string $file_type = 'pdf', string $contentType = self::contentTypes['signatureRequestFiles'][0]) + public function signatureRequestFilesAsyncWithHttpInfo(string $signature_request_id, ?string $file_type = 'pdf', string $contentType = self::contentTypes['signatureRequestFiles'][0]) { $returnType = '\SplFileObject'; $request = $this->signatureRequestFilesRequest($signature_request_id, $file_type, $contentType); @@ -2012,15 +3455,15 @@ function ($exception) { /** * Create request for operation 'signatureRequestFiles' * - * @param string $signature_request_id The id of the SignatureRequest to retrieve. (required) - * @param string $file_type Set to `pdf` for a single merged document or `zip` for a collection of individual documents. (optional, default to 'pdf') - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestFiles'] to see the possible values for this operation + * @param string $signature_request_id The id of the SignatureRequest to retrieve. (required) + * @param string|null $file_type Set to `pdf` for a single merged document or `zip` for a collection of individual documents. (optional, default to 'pdf') + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestFiles'] to see the possible values for this operation * * @return Request * @throws InvalidArgumentException * @deprecated Prefer to use ::signatureRequestFiles. This method will eventually become unavailable */ - public function signatureRequestFilesRequest(string $signature_request_id, string $file_type = 'pdf', string $contentType = self::contentTypes['signatureRequestFiles'][0]) + public function signatureRequestFilesRequest(string $signature_request_id, ?string $file_type = 'pdf', string $contentType = self::contentTypes['signatureRequestFiles'][0]) { // verify the required parameter 'signature_request_id' is set if ($signature_request_id === null || (is_array($signature_request_id) && count($signature_request_id) === 0)) { @@ -2180,19 +3623,6 @@ public function signatureRequestFilesAsDataUriWithHttpInfo(string $signature_req $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -2232,6 +3662,19 @@ public function signatureRequestFilesAsDataUriWithHttpInfo(string $signature_req ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\FileResponseDataUri'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -2460,14 +3903,14 @@ public function signatureRequestFilesAsDataUriRequest(string $signature_request_ * * Download Files as File Url * - * @param string $signature_request_id The id of the SignatureRequest to retrieve. (required) - * @param int $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. (optional, default to 1) + * @param string $signature_request_id The id of the SignatureRequest to retrieve. (required) + * @param int|null $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. (optional, default to 1) * * @return Model\FileResponse * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException */ - public function signatureRequestFilesAsFileUrl(string $signature_request_id, int $force_download = 1) + public function signatureRequestFilesAsFileUrl(string $signature_request_id, ?int $force_download = 1) { list($response) = $this->signatureRequestFilesAsFileUrlWithHttpInfo($signature_request_id, $force_download); return $response; @@ -2478,16 +3921,16 @@ public function signatureRequestFilesAsFileUrl(string $signature_request_id, int * * Download Files as File Url * - * @param string $signature_request_id The id of the SignatureRequest to retrieve. (required) - * @param int $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. (optional, default to 1) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestFilesAsFileUrl'] to see the possible values for this operation + * @param string $signature_request_id The id of the SignatureRequest to retrieve. (required) + * @param int|null $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. (optional, default to 1) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestFilesAsFileUrl'] to see the possible values for this operation * * @return array of Model\FileResponse, HTTP status code, HTTP response headers (array of strings) * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @deprecated Prefer to use ::signatureRequestFilesAsFileUrl. This method will eventually become unavailable */ - public function signatureRequestFilesAsFileUrlWithHttpInfo(string $signature_request_id, int $force_download = 1, string $contentType = self::contentTypes['signatureRequestFilesAsFileUrl'][0]) + public function signatureRequestFilesAsFileUrlWithHttpInfo(string $signature_request_id, ?int $force_download = 1, string $contentType = self::contentTypes['signatureRequestFilesAsFileUrl'][0]) { $request = $this->signatureRequestFilesAsFileUrlRequest($signature_request_id, $force_download, $contentType); @@ -2514,19 +3957,6 @@ public function signatureRequestFilesAsFileUrlWithHttpInfo(string $signature_req $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -2566,6 +3996,19 @@ public function signatureRequestFilesAsFileUrlWithHttpInfo(string $signature_req ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\FileResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -2616,15 +4059,15 @@ public function signatureRequestFilesAsFileUrlWithHttpInfo(string $signature_req * * Download Files as File Url * - * @param string $signature_request_id The id of the SignatureRequest to retrieve. (required) - * @param int $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. (optional, default to 1) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestFilesAsFileUrl'] to see the possible values for this operation + * @param string $signature_request_id The id of the SignatureRequest to retrieve. (required) + * @param int|null $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. (optional, default to 1) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestFilesAsFileUrl'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::signatureRequestFilesAsFileUrl. This method will eventually become unavailable */ - public function signatureRequestFilesAsFileUrlAsync(string $signature_request_id, int $force_download = 1, string $contentType = self::contentTypes['signatureRequestFilesAsFileUrl'][0]) + public function signatureRequestFilesAsFileUrlAsync(string $signature_request_id, ?int $force_download = 1, string $contentType = self::contentTypes['signatureRequestFilesAsFileUrl'][0]) { return $this->signatureRequestFilesAsFileUrlAsyncWithHttpInfo($signature_request_id, $force_download, $contentType) ->then( @@ -2639,15 +4082,15 @@ function ($response) { * * Download Files as File Url * - * @param string $signature_request_id The id of the SignatureRequest to retrieve. (required) - * @param int $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. (optional, default to 1) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestFilesAsFileUrl'] to see the possible values for this operation + * @param string $signature_request_id The id of the SignatureRequest to retrieve. (required) + * @param int|null $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. (optional, default to 1) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestFilesAsFileUrl'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::signatureRequestFilesAsFileUrl. This method will eventually become unavailable */ - public function signatureRequestFilesAsFileUrlAsyncWithHttpInfo(string $signature_request_id, int $force_download = 1, string $contentType = self::contentTypes['signatureRequestFilesAsFileUrl'][0]) + public function signatureRequestFilesAsFileUrlAsyncWithHttpInfo(string $signature_request_id, ?int $force_download = 1, string $contentType = self::contentTypes['signatureRequestFilesAsFileUrl'][0]) { $returnType = '\Dropbox\Sign\Model\FileResponse'; $request = $this->signatureRequestFilesAsFileUrlRequest($signature_request_id, $force_download, $contentType); @@ -2691,15 +4134,15 @@ function ($exception) { /** * Create request for operation 'signatureRequestFilesAsFileUrl' * - * @param string $signature_request_id The id of the SignatureRequest to retrieve. (required) - * @param int $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. (optional, default to 1) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestFilesAsFileUrl'] to see the possible values for this operation + * @param string $signature_request_id The id of the SignatureRequest to retrieve. (required) + * @param int|null $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. (optional, default to 1) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestFilesAsFileUrl'] to see the possible values for this operation * * @return Request * @throws InvalidArgumentException * @deprecated Prefer to use ::signatureRequestFilesAsFileUrl. This method will eventually become unavailable */ - public function signatureRequestFilesAsFileUrlRequest(string $signature_request_id, int $force_download = 1, string $contentType = self::contentTypes['signatureRequestFilesAsFileUrl'][0]) + public function signatureRequestFilesAsFileUrlRequest(string $signature_request_id, ?int $force_download = 1, string $contentType = self::contentTypes['signatureRequestFilesAsFileUrl'][0]) { // verify the required parameter 'signature_request_id' is set if ($signature_request_id === null || (is_array($signature_request_id) && count($signature_request_id) === 0)) { @@ -2859,19 +4302,6 @@ public function signatureRequestGetWithHttpInfo(string $signature_request_id, st $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -2911,6 +4341,19 @@ public function signatureRequestGetWithHttpInfo(string $signature_request_id, st ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\SignatureRequestGetResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -3139,16 +4582,16 @@ public function signatureRequestGetRequest(string $signature_request_id, string * * List Signature Requests * - * @param string $account_id Which account to return SignatureRequests for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. (optional) - * @param int $page Which page number of the SignatureRequest List to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) - * @param string $query String that includes search terms and/or fields to be used to filter the SignatureRequest objects. (optional) + * @param string|null $account_id Which account to return SignatureRequests for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. (optional) + * @param int|null $page Which page number of the SignatureRequest List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param string|null $query String that includes search terms and/or fields to be used to filter the SignatureRequest objects. (optional) * * @return Model\SignatureRequestListResponse * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException */ - public function signatureRequestList(string $account_id = null, int $page = 1, int $page_size = 20, string $query = null) + public function signatureRequestList(?string $account_id = null, ?int $page = 1, ?int $page_size = 20, ?string $query = null) { list($response) = $this->signatureRequestListWithHttpInfo($account_id, $page, $page_size, $query); return $response; @@ -3159,18 +4602,18 @@ public function signatureRequestList(string $account_id = null, int $page = 1, i * * List Signature Requests * - * @param string $account_id Which account to return SignatureRequests for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. (optional) - * @param int $page Which page number of the SignatureRequest List to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) - * @param string $query String that includes search terms and/or fields to be used to filter the SignatureRequest objects. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestList'] to see the possible values for this operation + * @param string|null $account_id Which account to return SignatureRequests for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. (optional) + * @param int|null $page Which page number of the SignatureRequest List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param string|null $query String that includes search terms and/or fields to be used to filter the SignatureRequest objects. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestList'] to see the possible values for this operation * * @return array of Model\SignatureRequestListResponse, HTTP status code, HTTP response headers (array of strings) * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @deprecated Prefer to use ::signatureRequestList. This method will eventually become unavailable */ - public function signatureRequestListWithHttpInfo(string $account_id = null, int $page = 1, int $page_size = 20, string $query = null, string $contentType = self::contentTypes['signatureRequestList'][0]) + public function signatureRequestListWithHttpInfo(?string $account_id = null, ?int $page = 1, ?int $page_size = 20, ?string $query = null, string $contentType = self::contentTypes['signatureRequestList'][0]) { $request = $this->signatureRequestListRequest($account_id, $page, $page_size, $query, $contentType); @@ -3197,19 +4640,6 @@ public function signatureRequestListWithHttpInfo(string $account_id = null, int $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -3249,6 +4679,19 @@ public function signatureRequestListWithHttpInfo(string $account_id = null, int ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\SignatureRequestListResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -3299,17 +4742,17 @@ public function signatureRequestListWithHttpInfo(string $account_id = null, int * * List Signature Requests * - * @param string $account_id Which account to return SignatureRequests for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. (optional) - * @param int $page Which page number of the SignatureRequest List to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) - * @param string $query String that includes search terms and/or fields to be used to filter the SignatureRequest objects. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestList'] to see the possible values for this operation + * @param string|null $account_id Which account to return SignatureRequests for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. (optional) + * @param int|null $page Which page number of the SignatureRequest List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param string|null $query String that includes search terms and/or fields to be used to filter the SignatureRequest objects. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestList'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::signatureRequestList. This method will eventually become unavailable */ - public function signatureRequestListAsync(string $account_id = null, int $page = 1, int $page_size = 20, string $query = null, string $contentType = self::contentTypes['signatureRequestList'][0]) + public function signatureRequestListAsync(?string $account_id = null, ?int $page = 1, ?int $page_size = 20, ?string $query = null, string $contentType = self::contentTypes['signatureRequestList'][0]) { return $this->signatureRequestListAsyncWithHttpInfo($account_id, $page, $page_size, $query, $contentType) ->then( @@ -3324,17 +4767,17 @@ function ($response) { * * List Signature Requests * - * @param string $account_id Which account to return SignatureRequests for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. (optional) - * @param int $page Which page number of the SignatureRequest List to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) - * @param string $query String that includes search terms and/or fields to be used to filter the SignatureRequest objects. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestList'] to see the possible values for this operation + * @param string|null $account_id Which account to return SignatureRequests for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. (optional) + * @param int|null $page Which page number of the SignatureRequest List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param string|null $query String that includes search terms and/or fields to be used to filter the SignatureRequest objects. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestList'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::signatureRequestList. This method will eventually become unavailable */ - public function signatureRequestListAsyncWithHttpInfo(string $account_id = null, int $page = 1, int $page_size = 20, string $query = null, string $contentType = self::contentTypes['signatureRequestList'][0]) + public function signatureRequestListAsyncWithHttpInfo(?string $account_id = null, ?int $page = 1, ?int $page_size = 20, ?string $query = null, string $contentType = self::contentTypes['signatureRequestList'][0]) { $returnType = '\Dropbox\Sign\Model\SignatureRequestListResponse'; $request = $this->signatureRequestListRequest($account_id, $page, $page_size, $query, $contentType); @@ -3378,17 +4821,17 @@ function ($exception) { /** * Create request for operation 'signatureRequestList' * - * @param string $account_id Which account to return SignatureRequests for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. (optional) - * @param int $page Which page number of the SignatureRequest List to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) - * @param string $query String that includes search terms and/or fields to be used to filter the SignatureRequest objects. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestList'] to see the possible values for this operation + * @param string|null $account_id Which account to return SignatureRequests for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. (optional) + * @param int|null $page Which page number of the SignatureRequest List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param string|null $query String that includes search terms and/or fields to be used to filter the SignatureRequest objects. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestList'] to see the possible values for this operation * * @return Request * @throws InvalidArgumentException * @deprecated Prefer to use ::signatureRequestList. This method will eventually become unavailable */ - public function signatureRequestListRequest(string $account_id = null, int $page = 1, int $page_size = 20, string $query = null, string $contentType = self::contentTypes['signatureRequestList'][0]) + public function signatureRequestListRequest(?string $account_id = null, ?int $page = 1, ?int $page_size = 20, ?string $query = null, string $contentType = self::contentTypes['signatureRequestList'][0]) { $resourcePath = '/signature_request/list'; $formParams = []; @@ -3559,19 +5002,6 @@ public function signatureRequestReleaseHoldWithHttpInfo(string $signature_reques $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -3611,6 +5041,19 @@ public function signatureRequestReleaseHoldWithHttpInfo(string $signature_reques ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\SignatureRequestGetResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -3893,19 +5336,6 @@ public function signatureRequestRemindWithHttpInfo(string $signature_request_id, $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -3945,6 +5375,19 @@ public function signatureRequestRemindWithHttpInfo(string $signature_request_id, ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\SignatureRequestGetResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -4249,19 +5692,6 @@ public function signatureRequestRemoveWithHttpInfo(string $signature_request_id, $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - return [null, $statusCode, $response->getHeaders()]; } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { @@ -4491,19 +5921,6 @@ public function signatureRequestSendWithHttpInfo(Model\SignatureRequestSendReque $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -4543,6 +5960,19 @@ public function signatureRequestSendWithHttpInfo(Model\SignatureRequestSendReque ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\SignatureRequestGetResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -4830,19 +6260,6 @@ public function signatureRequestSendWithTemplateWithHttpInfo(Model\SignatureRequ $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -4882,6 +6299,19 @@ public function signatureRequestSendWithTemplateWithHttpInfo(Model\SignatureRequ ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\SignatureRequestGetResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -5171,19 +6601,6 @@ public function signatureRequestUpdateWithHttpInfo(string $signature_request_id, $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -5223,6 +6640,19 @@ public function signatureRequestUpdateWithHttpInfo(string $signature_request_id, ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\SignatureRequestGetResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer diff --git a/src/Api/TeamApi.php b/src/Api/TeamApi.php index ec599b4..8b61a5d 100644 --- a/src/Api/TeamApi.php +++ b/src/Api/TeamApi.php @@ -15,7 +15,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -106,9 +106,9 @@ class TeamApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - Configuration $config = null, - ClientInterface $client = null, - HeaderSelector $selector = null, + ?Configuration $config = null, + ?ClientInterface $client = null, + ?HeaderSelector $selector = null, int $hostIndex = 0 ) { $this->client = $client ?: new Client(); @@ -161,13 +161,13 @@ public function getResponse() * Add User to Team * * @param Model\TeamAddMemberRequest $team_add_member_request team_add_member_request (required) - * @param string $team_id The id of the team. (optional) + * @param string|null $team_id The id of the team. (optional) * * @return Model\TeamGetResponse * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException */ - public function teamAddMember(Model\TeamAddMemberRequest $team_add_member_request, string $team_id = null) + public function teamAddMember(Model\TeamAddMemberRequest $team_add_member_request, ?string $team_id = null) { list($response) = $this->teamAddMemberWithHttpInfo($team_add_member_request, $team_id); return $response; @@ -179,7 +179,7 @@ public function teamAddMember(Model\TeamAddMemberRequest $team_add_member_reques * Add User to Team * * @param Model\TeamAddMemberRequest $team_add_member_request (required) - * @param string $team_id The id of the team. (optional) + * @param string|null $team_id The id of the team. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamAddMember'] to see the possible values for this operation * * @return array of Model\TeamGetResponse, HTTP status code, HTTP response headers (array of strings) @@ -187,7 +187,7 @@ public function teamAddMember(Model\TeamAddMemberRequest $team_add_member_reques * @throws InvalidArgumentException * @deprecated Prefer to use ::teamAddMember. This method will eventually become unavailable */ - public function teamAddMemberWithHttpInfo(Model\TeamAddMemberRequest $team_add_member_request, string $team_id = null, string $contentType = self::contentTypes['teamAddMember'][0]) + public function teamAddMemberWithHttpInfo(Model\TeamAddMemberRequest $team_add_member_request, ?string $team_id = null, string $contentType = self::contentTypes['teamAddMember'][0]) { $request = $this->teamAddMemberRequest($team_add_member_request, $team_id, $contentType); @@ -214,19 +214,6 @@ public function teamAddMemberWithHttpInfo(Model\TeamAddMemberRequest $team_add_m $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -266,6 +253,19 @@ public function teamAddMemberWithHttpInfo(Model\TeamAddMemberRequest $team_add_m ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\TeamGetResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -317,14 +317,14 @@ public function teamAddMemberWithHttpInfo(Model\TeamAddMemberRequest $team_add_m * Add User to Team * * @param Model\TeamAddMemberRequest $team_add_member_request (required) - * @param string $team_id The id of the team. (optional) + * @param string|null $team_id The id of the team. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamAddMember'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::teamAddMember. This method will eventually become unavailable */ - public function teamAddMemberAsync(Model\TeamAddMemberRequest $team_add_member_request, string $team_id = null, string $contentType = self::contentTypes['teamAddMember'][0]) + public function teamAddMemberAsync(Model\TeamAddMemberRequest $team_add_member_request, ?string $team_id = null, string $contentType = self::contentTypes['teamAddMember'][0]) { return $this->teamAddMemberAsyncWithHttpInfo($team_add_member_request, $team_id, $contentType) ->then( @@ -340,14 +340,14 @@ function ($response) { * Add User to Team * * @param Model\TeamAddMemberRequest $team_add_member_request (required) - * @param string $team_id The id of the team. (optional) + * @param string|null $team_id The id of the team. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamAddMember'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::teamAddMember. This method will eventually become unavailable */ - public function teamAddMemberAsyncWithHttpInfo(Model\TeamAddMemberRequest $team_add_member_request, string $team_id = null, string $contentType = self::contentTypes['teamAddMember'][0]) + public function teamAddMemberAsyncWithHttpInfo(Model\TeamAddMemberRequest $team_add_member_request, ?string $team_id = null, string $contentType = self::contentTypes['teamAddMember'][0]) { $returnType = '\Dropbox\Sign\Model\TeamGetResponse'; $request = $this->teamAddMemberRequest($team_add_member_request, $team_id, $contentType); @@ -392,14 +392,14 @@ function ($exception) { * Create request for operation 'teamAddMember' * * @param Model\TeamAddMemberRequest $team_add_member_request (required) - * @param string $team_id The id of the team. (optional) + * @param string|null $team_id The id of the team. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamAddMember'] to see the possible values for this operation * * @return Request * @throws InvalidArgumentException * @deprecated Prefer to use ::teamAddMember. This method will eventually become unavailable */ - public function teamAddMemberRequest(Model\TeamAddMemberRequest $team_add_member_request, string $team_id = null, string $contentType = self::contentTypes['teamAddMember'][0]) + public function teamAddMemberRequest(Model\TeamAddMemberRequest $team_add_member_request, ?string $team_id = null, string $contentType = self::contentTypes['teamAddMember'][0]) { // verify the required parameter 'team_add_member_request' is set if ($team_add_member_request === null || (is_array($team_add_member_request) && count($team_add_member_request) === 0)) { @@ -565,19 +565,6 @@ public function teamCreateWithHttpInfo(Model\TeamCreateRequest $team_create_requ $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -617,6 +604,19 @@ public function teamCreateWithHttpInfo(Model\TeamCreateRequest $team_create_requ ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\TeamGetResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -899,19 +899,6 @@ public function teamDeleteWithHttpInfo(string $contentType = self::contentTypes[ $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - return [null, $statusCode, $response->getHeaders()]; } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { @@ -1123,19 +1110,6 @@ public function teamGetWithHttpInfo(string $contentType = self::contentTypes['te $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -1175,6 +1149,19 @@ public function teamGetWithHttpInfo(string $contentType = self::contentTypes['te ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\TeamGetResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -1384,13 +1371,13 @@ public function teamGetRequest(string $contentType = self::contentTypes['teamGet * * Get Team Info * - * @param string $team_id The id of the team. (optional) + * @param string|null $team_id The id of the team. (optional) * * @return Model\TeamGetInfoResponse * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException */ - public function teamInfo(string $team_id = null) + public function teamInfo(?string $team_id = null) { list($response) = $this->teamInfoWithHttpInfo($team_id); return $response; @@ -1401,15 +1388,15 @@ public function teamInfo(string $team_id = null) * * Get Team Info * - * @param string $team_id The id of the team. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamInfo'] to see the possible values for this operation + * @param string|null $team_id The id of the team. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamInfo'] to see the possible values for this operation * * @return array of Model\TeamGetInfoResponse, HTTP status code, HTTP response headers (array of strings) * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @deprecated Prefer to use ::teamInfo. This method will eventually become unavailable */ - public function teamInfoWithHttpInfo(string $team_id = null, string $contentType = self::contentTypes['teamInfo'][0]) + public function teamInfoWithHttpInfo(?string $team_id = null, string $contentType = self::contentTypes['teamInfo'][0]) { $request = $this->teamInfoRequest($team_id, $contentType); @@ -1436,19 +1423,6 @@ public function teamInfoWithHttpInfo(string $team_id = null, string $contentType $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -1488,6 +1462,19 @@ public function teamInfoWithHttpInfo(string $team_id = null, string $contentType ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\TeamGetInfoResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -1538,14 +1525,14 @@ public function teamInfoWithHttpInfo(string $team_id = null, string $contentType * * Get Team Info * - * @param string $team_id The id of the team. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamInfo'] to see the possible values for this operation + * @param string|null $team_id The id of the team. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamInfo'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::teamInfo. This method will eventually become unavailable */ - public function teamInfoAsync(string $team_id = null, string $contentType = self::contentTypes['teamInfo'][0]) + public function teamInfoAsync(?string $team_id = null, string $contentType = self::contentTypes['teamInfo'][0]) { return $this->teamInfoAsyncWithHttpInfo($team_id, $contentType) ->then( @@ -1560,14 +1547,14 @@ function ($response) { * * Get Team Info * - * @param string $team_id The id of the team. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamInfo'] to see the possible values for this operation + * @param string|null $team_id The id of the team. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamInfo'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::teamInfo. This method will eventually become unavailable */ - public function teamInfoAsyncWithHttpInfo(string $team_id = null, string $contentType = self::contentTypes['teamInfo'][0]) + public function teamInfoAsyncWithHttpInfo(?string $team_id = null, string $contentType = self::contentTypes['teamInfo'][0]) { $returnType = '\Dropbox\Sign\Model\TeamGetInfoResponse'; $request = $this->teamInfoRequest($team_id, $contentType); @@ -1611,14 +1598,14 @@ function ($exception) { /** * Create request for operation 'teamInfo' * - * @param string $team_id The id of the team. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamInfo'] to see the possible values for this operation + * @param string|null $team_id The id of the team. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamInfo'] to see the possible values for this operation * * @return Request * @throws InvalidArgumentException * @deprecated Prefer to use ::teamInfo. This method will eventually become unavailable */ - public function teamInfoRequest(string $team_id = null, string $contentType = self::contentTypes['teamInfo'][0]) + public function teamInfoRequest(?string $team_id = null, string $contentType = self::contentTypes['teamInfo'][0]) { $resourcePath = '/team/info'; $formParams = []; @@ -1710,13 +1697,13 @@ public function teamInfoRequest(string $team_id = null, string $contentType = se * * List Team Invites * - * @param string $email_address The email address for which to display the team invites. (optional) + * @param string|null $email_address The email address for which to display the team invites. (optional) * * @return Model\TeamInvitesResponse * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException */ - public function teamInvites(string $email_address = null) + public function teamInvites(?string $email_address = null) { list($response) = $this->teamInvitesWithHttpInfo($email_address); return $response; @@ -1727,15 +1714,15 @@ public function teamInvites(string $email_address = null) * * List Team Invites * - * @param string $email_address The email address for which to display the team invites. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamInvites'] to see the possible values for this operation + * @param string|null $email_address The email address for which to display the team invites. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamInvites'] to see the possible values for this operation * * @return array of Model\TeamInvitesResponse, HTTP status code, HTTP response headers (array of strings) * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @deprecated Prefer to use ::teamInvites. This method will eventually become unavailable */ - public function teamInvitesWithHttpInfo(string $email_address = null, string $contentType = self::contentTypes['teamInvites'][0]) + public function teamInvitesWithHttpInfo(?string $email_address = null, string $contentType = self::contentTypes['teamInvites'][0]) { $request = $this->teamInvitesRequest($email_address, $contentType); @@ -1762,19 +1749,6 @@ public function teamInvitesWithHttpInfo(string $email_address = null, string $co $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -1814,6 +1788,19 @@ public function teamInvitesWithHttpInfo(string $email_address = null, string $co ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\TeamInvitesResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -1864,14 +1851,14 @@ public function teamInvitesWithHttpInfo(string $email_address = null, string $co * * List Team Invites * - * @param string $email_address The email address for which to display the team invites. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamInvites'] to see the possible values for this operation + * @param string|null $email_address The email address for which to display the team invites. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamInvites'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::teamInvites. This method will eventually become unavailable */ - public function teamInvitesAsync(string $email_address = null, string $contentType = self::contentTypes['teamInvites'][0]) + public function teamInvitesAsync(?string $email_address = null, string $contentType = self::contentTypes['teamInvites'][0]) { return $this->teamInvitesAsyncWithHttpInfo($email_address, $contentType) ->then( @@ -1886,14 +1873,14 @@ function ($response) { * * List Team Invites * - * @param string $email_address The email address for which to display the team invites. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamInvites'] to see the possible values for this operation + * @param string|null $email_address The email address for which to display the team invites. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamInvites'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::teamInvites. This method will eventually become unavailable */ - public function teamInvitesAsyncWithHttpInfo(string $email_address = null, string $contentType = self::contentTypes['teamInvites'][0]) + public function teamInvitesAsyncWithHttpInfo(?string $email_address = null, string $contentType = self::contentTypes['teamInvites'][0]) { $returnType = '\Dropbox\Sign\Model\TeamInvitesResponse'; $request = $this->teamInvitesRequest($email_address, $contentType); @@ -1937,14 +1924,14 @@ function ($exception) { /** * Create request for operation 'teamInvites' * - * @param string $email_address The email address for which to display the team invites. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamInvites'] to see the possible values for this operation + * @param string|null $email_address The email address for which to display the team invites. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamInvites'] to see the possible values for this operation * * @return Request * @throws InvalidArgumentException * @deprecated Prefer to use ::teamInvites. This method will eventually become unavailable */ - public function teamInvitesRequest(string $email_address = null, string $contentType = self::contentTypes['teamInvites'][0]) + public function teamInvitesRequest(?string $email_address = null, string $contentType = self::contentTypes['teamInvites'][0]) { $resourcePath = '/team/invites'; $formParams = []; @@ -2036,15 +2023,15 @@ public function teamInvitesRequest(string $email_address = null, string $content * * List Team Members * - * @param string $team_id The id of the team that a member list is being requested from. (required) - * @param int $page Which page number of the team member list to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param string $team_id The id of the team that a member list is being requested from. (required) + * @param int|null $page Which page number of the team member list to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) * * @return Model\TeamMembersResponse * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException */ - public function teamMembers(string $team_id, int $page = 1, int $page_size = 20) + public function teamMembers(string $team_id, ?int $page = 1, ?int $page_size = 20) { list($response) = $this->teamMembersWithHttpInfo($team_id, $page, $page_size); return $response; @@ -2055,17 +2042,17 @@ public function teamMembers(string $team_id, int $page = 1, int $page_size = 20) * * List Team Members * - * @param string $team_id The id of the team that a member list is being requested from. (required) - * @param int $page Which page number of the team member list to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamMembers'] to see the possible values for this operation + * @param string $team_id The id of the team that a member list is being requested from. (required) + * @param int|null $page Which page number of the team member list to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamMembers'] to see the possible values for this operation * * @return array of Model\TeamMembersResponse, HTTP status code, HTTP response headers (array of strings) * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @deprecated Prefer to use ::teamMembers. This method will eventually become unavailable */ - public function teamMembersWithHttpInfo(string $team_id, int $page = 1, int $page_size = 20, string $contentType = self::contentTypes['teamMembers'][0]) + public function teamMembersWithHttpInfo(string $team_id, ?int $page = 1, ?int $page_size = 20, string $contentType = self::contentTypes['teamMembers'][0]) { $request = $this->teamMembersRequest($team_id, $page, $page_size, $contentType); @@ -2092,19 +2079,6 @@ public function teamMembersWithHttpInfo(string $team_id, int $page = 1, int $pag $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -2144,6 +2118,19 @@ public function teamMembersWithHttpInfo(string $team_id, int $page = 1, int $pag ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\TeamMembersResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -2194,16 +2181,16 @@ public function teamMembersWithHttpInfo(string $team_id, int $page = 1, int $pag * * List Team Members * - * @param string $team_id The id of the team that a member list is being requested from. (required) - * @param int $page Which page number of the team member list to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamMembers'] to see the possible values for this operation + * @param string $team_id The id of the team that a member list is being requested from. (required) + * @param int|null $page Which page number of the team member list to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamMembers'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::teamMembers. This method will eventually become unavailable */ - public function teamMembersAsync(string $team_id, int $page = 1, int $page_size = 20, string $contentType = self::contentTypes['teamMembers'][0]) + public function teamMembersAsync(string $team_id, ?int $page = 1, ?int $page_size = 20, string $contentType = self::contentTypes['teamMembers'][0]) { return $this->teamMembersAsyncWithHttpInfo($team_id, $page, $page_size, $contentType) ->then( @@ -2218,16 +2205,16 @@ function ($response) { * * List Team Members * - * @param string $team_id The id of the team that a member list is being requested from. (required) - * @param int $page Which page number of the team member list to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamMembers'] to see the possible values for this operation + * @param string $team_id The id of the team that a member list is being requested from. (required) + * @param int|null $page Which page number of the team member list to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamMembers'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::teamMembers. This method will eventually become unavailable */ - public function teamMembersAsyncWithHttpInfo(string $team_id, int $page = 1, int $page_size = 20, string $contentType = self::contentTypes['teamMembers'][0]) + public function teamMembersAsyncWithHttpInfo(string $team_id, ?int $page = 1, ?int $page_size = 20, string $contentType = self::contentTypes['teamMembers'][0]) { $returnType = '\Dropbox\Sign\Model\TeamMembersResponse'; $request = $this->teamMembersRequest($team_id, $page, $page_size, $contentType); @@ -2271,16 +2258,16 @@ function ($exception) { /** * Create request for operation 'teamMembers' * - * @param string $team_id The id of the team that a member list is being requested from. (required) - * @param int $page Which page number of the team member list to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamMembers'] to see the possible values for this operation + * @param string $team_id The id of the team that a member list is being requested from. (required) + * @param int|null $page Which page number of the team member list to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamMembers'] to see the possible values for this operation * * @return Request * @throws InvalidArgumentException * @deprecated Prefer to use ::teamMembers. This method will eventually become unavailable */ - public function teamMembersRequest(string $team_id, int $page = 1, int $page_size = 20, string $contentType = self::contentTypes['teamMembers'][0]) + public function teamMembersRequest(string $team_id, ?int $page = 1, ?int $page_size = 20, string $contentType = self::contentTypes['teamMembers'][0]) { // verify the required parameter 'team_id' is set if ($team_id === null || (is_array($team_id) && count($team_id) === 0)) { @@ -2456,19 +2443,6 @@ public function teamRemoveMemberWithHttpInfo(Model\TeamRemoveMemberRequest $team $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -2508,6 +2482,19 @@ public function teamRemoveMemberWithHttpInfo(Model\TeamRemoveMemberRequest $team ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\TeamGetResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -2743,15 +2730,15 @@ public function teamRemoveMemberRequest(Model\TeamRemoveMemberRequest $team_remo * * List Sub Teams * - * @param string $team_id The id of the parent Team. (required) - * @param int $page Which page number of the SubTeam List to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param string $team_id The id of the parent Team. (required) + * @param int|null $page Which page number of the SubTeam List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) * * @return Model\TeamSubTeamsResponse * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException */ - public function teamSubTeams(string $team_id, int $page = 1, int $page_size = 20) + public function teamSubTeams(string $team_id, ?int $page = 1, ?int $page_size = 20) { list($response) = $this->teamSubTeamsWithHttpInfo($team_id, $page, $page_size); return $response; @@ -2762,17 +2749,17 @@ public function teamSubTeams(string $team_id, int $page = 1, int $page_size = 20 * * List Sub Teams * - * @param string $team_id The id of the parent Team. (required) - * @param int $page Which page number of the SubTeam List to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamSubTeams'] to see the possible values for this operation + * @param string $team_id The id of the parent Team. (required) + * @param int|null $page Which page number of the SubTeam List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamSubTeams'] to see the possible values for this operation * * @return array of Model\TeamSubTeamsResponse, HTTP status code, HTTP response headers (array of strings) * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @deprecated Prefer to use ::teamSubTeams. This method will eventually become unavailable */ - public function teamSubTeamsWithHttpInfo(string $team_id, int $page = 1, int $page_size = 20, string $contentType = self::contentTypes['teamSubTeams'][0]) + public function teamSubTeamsWithHttpInfo(string $team_id, ?int $page = 1, ?int $page_size = 20, string $contentType = self::contentTypes['teamSubTeams'][0]) { $request = $this->teamSubTeamsRequest($team_id, $page, $page_size, $contentType); @@ -2799,19 +2786,6 @@ public function teamSubTeamsWithHttpInfo(string $team_id, int $page = 1, int $pa $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -2851,6 +2825,19 @@ public function teamSubTeamsWithHttpInfo(string $team_id, int $page = 1, int $pa ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\TeamSubTeamsResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -2901,16 +2888,16 @@ public function teamSubTeamsWithHttpInfo(string $team_id, int $page = 1, int $pa * * List Sub Teams * - * @param string $team_id The id of the parent Team. (required) - * @param int $page Which page number of the SubTeam List to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamSubTeams'] to see the possible values for this operation + * @param string $team_id The id of the parent Team. (required) + * @param int|null $page Which page number of the SubTeam List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamSubTeams'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::teamSubTeams. This method will eventually become unavailable */ - public function teamSubTeamsAsync(string $team_id, int $page = 1, int $page_size = 20, string $contentType = self::contentTypes['teamSubTeams'][0]) + public function teamSubTeamsAsync(string $team_id, ?int $page = 1, ?int $page_size = 20, string $contentType = self::contentTypes['teamSubTeams'][0]) { return $this->teamSubTeamsAsyncWithHttpInfo($team_id, $page, $page_size, $contentType) ->then( @@ -2925,16 +2912,16 @@ function ($response) { * * List Sub Teams * - * @param string $team_id The id of the parent Team. (required) - * @param int $page Which page number of the SubTeam List to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamSubTeams'] to see the possible values for this operation + * @param string $team_id The id of the parent Team. (required) + * @param int|null $page Which page number of the SubTeam List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamSubTeams'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::teamSubTeams. This method will eventually become unavailable */ - public function teamSubTeamsAsyncWithHttpInfo(string $team_id, int $page = 1, int $page_size = 20, string $contentType = self::contentTypes['teamSubTeams'][0]) + public function teamSubTeamsAsyncWithHttpInfo(string $team_id, ?int $page = 1, ?int $page_size = 20, string $contentType = self::contentTypes['teamSubTeams'][0]) { $returnType = '\Dropbox\Sign\Model\TeamSubTeamsResponse'; $request = $this->teamSubTeamsRequest($team_id, $page, $page_size, $contentType); @@ -2978,16 +2965,16 @@ function ($exception) { /** * Create request for operation 'teamSubTeams' * - * @param string $team_id The id of the parent Team. (required) - * @param int $page Which page number of the SubTeam List to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamSubTeams'] to see the possible values for this operation + * @param string $team_id The id of the parent Team. (required) + * @param int|null $page Which page number of the SubTeam List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamSubTeams'] to see the possible values for this operation * * @return Request * @throws InvalidArgumentException * @deprecated Prefer to use ::teamSubTeams. This method will eventually become unavailable */ - public function teamSubTeamsRequest(string $team_id, int $page = 1, int $page_size = 20, string $contentType = self::contentTypes['teamSubTeams'][0]) + public function teamSubTeamsRequest(string $team_id, ?int $page = 1, ?int $page_size = 20, string $contentType = self::contentTypes['teamSubTeams'][0]) { // verify the required parameter 'team_id' is set if ($team_id === null || (is_array($team_id) && count($team_id) === 0)) { @@ -3163,19 +3150,6 @@ public function teamUpdateWithHttpInfo(Model\TeamUpdateRequest $team_update_requ $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -3215,6 +3189,19 @@ public function teamUpdateWithHttpInfo(Model\TeamUpdateRequest $team_update_requ ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\TeamGetResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer diff --git a/src/Api/TemplateApi.php b/src/Api/TemplateApi.php index 091dc84..2d39bc8 100644 --- a/src/Api/TemplateApi.php +++ b/src/Api/TemplateApi.php @@ -15,7 +15,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -113,9 +113,9 @@ class TemplateApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - Configuration $config = null, - ClientInterface $client = null, - HeaderSelector $selector = null, + ?Configuration $config = null, + ?ClientInterface $client = null, + ?HeaderSelector $selector = null, int $hostIndex = 0 ) { $this->client = $client ?: new Client(); @@ -221,19 +221,6 @@ public function templateAddUserWithHttpInfo(string $template_id, Model\TemplateA $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -273,6 +260,19 @@ public function templateAddUserWithHttpInfo(string $template_id, Model\TemplateA ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\TemplateGetResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -579,19 +579,6 @@ public function templateCreateWithHttpInfo(Model\TemplateCreateRequest $template $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -631,6 +618,19 @@ public function templateCreateWithHttpInfo(Model\TemplateCreateRequest $template ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\TemplateCreateResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -918,19 +918,6 @@ public function templateCreateEmbeddedDraftWithHttpInfo(Model\TemplateCreateEmbe $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -970,6 +957,19 @@ public function templateCreateEmbeddedDraftWithHttpInfo(Model\TemplateCreateEmbe ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\TemplateCreateEmbeddedDraftResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -1255,19 +1255,6 @@ public function templateDeleteWithHttpInfo(string $template_id, string $contentT $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - return [null, $statusCode, $response->getHeaders()]; } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { @@ -1449,14 +1436,14 @@ public function templateDeleteRequest(string $template_id, string $contentType = * * Get Template Files * - * @param string $template_id The id of the template files to retrieve. (required) - * @param string $file_type Set to `pdf` for a single merged document or `zip` for a collection of individual documents. (optional) + * @param string $template_id The id of the template files to retrieve. (required) + * @param string|null $file_type Set to `pdf` for a single merged document or `zip` for a collection of individual documents. (optional) * * @return SplFileObject * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException */ - public function templateFiles(string $template_id, string $file_type = null) + public function templateFiles(string $template_id, ?string $file_type = null) { list($response) = $this->templateFilesWithHttpInfo($template_id, $file_type); return $response; @@ -1467,16 +1454,16 @@ public function templateFiles(string $template_id, string $file_type = null) * * Get Template Files * - * @param string $template_id The id of the template files to retrieve. (required) - * @param string $file_type Set to `pdf` for a single merged document or `zip` for a collection of individual documents. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['templateFiles'] to see the possible values for this operation + * @param string $template_id The id of the template files to retrieve. (required) + * @param string|null $file_type Set to `pdf` for a single merged document or `zip` for a collection of individual documents. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['templateFiles'] to see the possible values for this operation * * @return array of \SplFileObject|\Dropbox\Sign\Model\ErrorResponse, HTTP status code, HTTP response headers (array of strings) * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @deprecated Prefer to use ::templateFiles. This method will eventually become unavailable */ - public function templateFilesWithHttpInfo(string $template_id, string $file_type = null, string $contentType = self::contentTypes['templateFiles'][0]) + public function templateFilesWithHttpInfo(string $template_id, ?string $file_type = null, string $contentType = self::contentTypes['templateFiles'][0]) { $request = $this->templateFilesRequest($template_id, $file_type, $contentType); @@ -1503,19 +1490,6 @@ public function templateFilesWithHttpInfo(string $template_id, string $file_type $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -1555,6 +1529,19 @@ public function templateFilesWithHttpInfo(string $template_id, string $file_type ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\SplFileObject'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -1605,15 +1592,15 @@ public function templateFilesWithHttpInfo(string $template_id, string $file_type * * Get Template Files * - * @param string $template_id The id of the template files to retrieve. (required) - * @param string $file_type Set to `pdf` for a single merged document or `zip` for a collection of individual documents. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['templateFiles'] to see the possible values for this operation + * @param string $template_id The id of the template files to retrieve. (required) + * @param string|null $file_type Set to `pdf` for a single merged document or `zip` for a collection of individual documents. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['templateFiles'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::templateFiles. This method will eventually become unavailable */ - public function templateFilesAsync(string $template_id, string $file_type = null, string $contentType = self::contentTypes['templateFiles'][0]) + public function templateFilesAsync(string $template_id, ?string $file_type = null, string $contentType = self::contentTypes['templateFiles'][0]) { return $this->templateFilesAsyncWithHttpInfo($template_id, $file_type, $contentType) ->then( @@ -1628,15 +1615,15 @@ function ($response) { * * Get Template Files * - * @param string $template_id The id of the template files to retrieve. (required) - * @param string $file_type Set to `pdf` for a single merged document or `zip` for a collection of individual documents. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['templateFiles'] to see the possible values for this operation + * @param string $template_id The id of the template files to retrieve. (required) + * @param string|null $file_type Set to `pdf` for a single merged document or `zip` for a collection of individual documents. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['templateFiles'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::templateFiles. This method will eventually become unavailable */ - public function templateFilesAsyncWithHttpInfo(string $template_id, string $file_type = null, string $contentType = self::contentTypes['templateFiles'][0]) + public function templateFilesAsyncWithHttpInfo(string $template_id, ?string $file_type = null, string $contentType = self::contentTypes['templateFiles'][0]) { $returnType = '\SplFileObject'; $request = $this->templateFilesRequest($template_id, $file_type, $contentType); @@ -1680,15 +1667,15 @@ function ($exception) { /** * Create request for operation 'templateFiles' * - * @param string $template_id The id of the template files to retrieve. (required) - * @param string $file_type Set to `pdf` for a single merged document or `zip` for a collection of individual documents. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['templateFiles'] to see the possible values for this operation + * @param string $template_id The id of the template files to retrieve. (required) + * @param string|null $file_type Set to `pdf` for a single merged document or `zip` for a collection of individual documents. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['templateFiles'] to see the possible values for this operation * * @return Request * @throws InvalidArgumentException * @deprecated Prefer to use ::templateFiles. This method will eventually become unavailable */ - public function templateFilesRequest(string $template_id, string $file_type = null, string $contentType = self::contentTypes['templateFiles'][0]) + public function templateFilesRequest(string $template_id, ?string $file_type = null, string $contentType = self::contentTypes['templateFiles'][0]) { // verify the required parameter 'template_id' is set if ($template_id === null || (is_array($template_id) && count($template_id) === 0)) { @@ -1848,19 +1835,6 @@ public function templateFilesAsDataUriWithHttpInfo(string $template_id, string $ $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -1900,6 +1874,19 @@ public function templateFilesAsDataUriWithHttpInfo(string $template_id, string $ ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\FileResponseDataUri'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -2128,14 +2115,14 @@ public function templateFilesAsDataUriRequest(string $template_id, string $conte * * Get Template Files as File Url * - * @param string $template_id The id of the template files to retrieve. (required) - * @param int $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. (optional, default to 1) + * @param string $template_id The id of the template files to retrieve. (required) + * @param int|null $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. (optional, default to 1) * * @return Model\FileResponse * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException */ - public function templateFilesAsFileUrl(string $template_id, int $force_download = 1) + public function templateFilesAsFileUrl(string $template_id, ?int $force_download = 1) { list($response) = $this->templateFilesAsFileUrlWithHttpInfo($template_id, $force_download); return $response; @@ -2146,16 +2133,16 @@ public function templateFilesAsFileUrl(string $template_id, int $force_download * * Get Template Files as File Url * - * @param string $template_id The id of the template files to retrieve. (required) - * @param int $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. (optional, default to 1) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['templateFilesAsFileUrl'] to see the possible values for this operation + * @param string $template_id The id of the template files to retrieve. (required) + * @param int|null $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. (optional, default to 1) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['templateFilesAsFileUrl'] to see the possible values for this operation * * @return array of Model\FileResponse, HTTP status code, HTTP response headers (array of strings) * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @deprecated Prefer to use ::templateFilesAsFileUrl. This method will eventually become unavailable */ - public function templateFilesAsFileUrlWithHttpInfo(string $template_id, int $force_download = 1, string $contentType = self::contentTypes['templateFilesAsFileUrl'][0]) + public function templateFilesAsFileUrlWithHttpInfo(string $template_id, ?int $force_download = 1, string $contentType = self::contentTypes['templateFilesAsFileUrl'][0]) { $request = $this->templateFilesAsFileUrlRequest($template_id, $force_download, $contentType); @@ -2182,19 +2169,6 @@ public function templateFilesAsFileUrlWithHttpInfo(string $template_id, int $for $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -2234,6 +2208,19 @@ public function templateFilesAsFileUrlWithHttpInfo(string $template_id, int $for ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\FileResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -2284,15 +2271,15 @@ public function templateFilesAsFileUrlWithHttpInfo(string $template_id, int $for * * Get Template Files as File Url * - * @param string $template_id The id of the template files to retrieve. (required) - * @param int $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. (optional, default to 1) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['templateFilesAsFileUrl'] to see the possible values for this operation + * @param string $template_id The id of the template files to retrieve. (required) + * @param int|null $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. (optional, default to 1) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['templateFilesAsFileUrl'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::templateFilesAsFileUrl. This method will eventually become unavailable */ - public function templateFilesAsFileUrlAsync(string $template_id, int $force_download = 1, string $contentType = self::contentTypes['templateFilesAsFileUrl'][0]) + public function templateFilesAsFileUrlAsync(string $template_id, ?int $force_download = 1, string $contentType = self::contentTypes['templateFilesAsFileUrl'][0]) { return $this->templateFilesAsFileUrlAsyncWithHttpInfo($template_id, $force_download, $contentType) ->then( @@ -2307,15 +2294,15 @@ function ($response) { * * Get Template Files as File Url * - * @param string $template_id The id of the template files to retrieve. (required) - * @param int $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. (optional, default to 1) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['templateFilesAsFileUrl'] to see the possible values for this operation + * @param string $template_id The id of the template files to retrieve. (required) + * @param int|null $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. (optional, default to 1) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['templateFilesAsFileUrl'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::templateFilesAsFileUrl. This method will eventually become unavailable */ - public function templateFilesAsFileUrlAsyncWithHttpInfo(string $template_id, int $force_download = 1, string $contentType = self::contentTypes['templateFilesAsFileUrl'][0]) + public function templateFilesAsFileUrlAsyncWithHttpInfo(string $template_id, ?int $force_download = 1, string $contentType = self::contentTypes['templateFilesAsFileUrl'][0]) { $returnType = '\Dropbox\Sign\Model\FileResponse'; $request = $this->templateFilesAsFileUrlRequest($template_id, $force_download, $contentType); @@ -2359,15 +2346,15 @@ function ($exception) { /** * Create request for operation 'templateFilesAsFileUrl' * - * @param string $template_id The id of the template files to retrieve. (required) - * @param int $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. (optional, default to 1) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['templateFilesAsFileUrl'] to see the possible values for this operation + * @param string $template_id The id of the template files to retrieve. (required) + * @param int|null $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. (optional, default to 1) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['templateFilesAsFileUrl'] to see the possible values for this operation * * @return Request * @throws InvalidArgumentException * @deprecated Prefer to use ::templateFilesAsFileUrl. This method will eventually become unavailable */ - public function templateFilesAsFileUrlRequest(string $template_id, int $force_download = 1, string $contentType = self::contentTypes['templateFilesAsFileUrl'][0]) + public function templateFilesAsFileUrlRequest(string $template_id, ?int $force_download = 1, string $contentType = self::contentTypes['templateFilesAsFileUrl'][0]) { // verify the required parameter 'template_id' is set if ($template_id === null || (is_array($template_id) && count($template_id) === 0)) { @@ -2527,19 +2514,6 @@ public function templateGetWithHttpInfo(string $template_id, string $contentType $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -2579,6 +2553,19 @@ public function templateGetWithHttpInfo(string $template_id, string $contentType ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\TemplateGetResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -2807,16 +2794,16 @@ public function templateGetRequest(string $template_id, string $contentType = se * * List Templates * - * @param string $account_id Which account to return Templates for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. (optional) - * @param int $page Which page number of the Template List to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) - * @param string $query String that includes search terms and/or fields to be used to filter the Template objects. (optional) + * @param string|null $account_id Which account to return Templates for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. (optional) + * @param int|null $page Which page number of the Template List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param string|null $query String that includes search terms and/or fields to be used to filter the Template objects. (optional) * * @return Model\TemplateListResponse * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException */ - public function templateList(string $account_id = null, int $page = 1, int $page_size = 20, string $query = null) + public function templateList(?string $account_id = null, ?int $page = 1, ?int $page_size = 20, ?string $query = null) { list($response) = $this->templateListWithHttpInfo($account_id, $page, $page_size, $query); return $response; @@ -2827,18 +2814,18 @@ public function templateList(string $account_id = null, int $page = 1, int $page * * List Templates * - * @param string $account_id Which account to return Templates for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. (optional) - * @param int $page Which page number of the Template List to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) - * @param string $query String that includes search terms and/or fields to be used to filter the Template objects. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['templateList'] to see the possible values for this operation + * @param string|null $account_id Which account to return Templates for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. (optional) + * @param int|null $page Which page number of the Template List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param string|null $query String that includes search terms and/or fields to be used to filter the Template objects. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['templateList'] to see the possible values for this operation * * @return array of Model\TemplateListResponse, HTTP status code, HTTP response headers (array of strings) * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @deprecated Prefer to use ::templateList. This method will eventually become unavailable */ - public function templateListWithHttpInfo(string $account_id = null, int $page = 1, int $page_size = 20, string $query = null, string $contentType = self::contentTypes['templateList'][0]) + public function templateListWithHttpInfo(?string $account_id = null, ?int $page = 1, ?int $page_size = 20, ?string $query = null, string $contentType = self::contentTypes['templateList'][0]) { $request = $this->templateListRequest($account_id, $page, $page_size, $query, $contentType); @@ -2865,19 +2852,6 @@ public function templateListWithHttpInfo(string $account_id = null, int $page = $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -2917,6 +2891,19 @@ public function templateListWithHttpInfo(string $account_id = null, int $page = ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\TemplateListResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -2967,17 +2954,17 @@ public function templateListWithHttpInfo(string $account_id = null, int $page = * * List Templates * - * @param string $account_id Which account to return Templates for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. (optional) - * @param int $page Which page number of the Template List to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) - * @param string $query String that includes search terms and/or fields to be used to filter the Template objects. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['templateList'] to see the possible values for this operation + * @param string|null $account_id Which account to return Templates for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. (optional) + * @param int|null $page Which page number of the Template List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param string|null $query String that includes search terms and/or fields to be used to filter the Template objects. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['templateList'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::templateList. This method will eventually become unavailable */ - public function templateListAsync(string $account_id = null, int $page = 1, int $page_size = 20, string $query = null, string $contentType = self::contentTypes['templateList'][0]) + public function templateListAsync(?string $account_id = null, ?int $page = 1, ?int $page_size = 20, ?string $query = null, string $contentType = self::contentTypes['templateList'][0]) { return $this->templateListAsyncWithHttpInfo($account_id, $page, $page_size, $query, $contentType) ->then( @@ -2992,17 +2979,17 @@ function ($response) { * * List Templates * - * @param string $account_id Which account to return Templates for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. (optional) - * @param int $page Which page number of the Template List to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) - * @param string $query String that includes search terms and/or fields to be used to filter the Template objects. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['templateList'] to see the possible values for this operation + * @param string|null $account_id Which account to return Templates for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. (optional) + * @param int|null $page Which page number of the Template List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param string|null $query String that includes search terms and/or fields to be used to filter the Template objects. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['templateList'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::templateList. This method will eventually become unavailable */ - public function templateListAsyncWithHttpInfo(string $account_id = null, int $page = 1, int $page_size = 20, string $query = null, string $contentType = self::contentTypes['templateList'][0]) + public function templateListAsyncWithHttpInfo(?string $account_id = null, ?int $page = 1, ?int $page_size = 20, ?string $query = null, string $contentType = self::contentTypes['templateList'][0]) { $returnType = '\Dropbox\Sign\Model\TemplateListResponse'; $request = $this->templateListRequest($account_id, $page, $page_size, $query, $contentType); @@ -3046,17 +3033,17 @@ function ($exception) { /** * Create request for operation 'templateList' * - * @param string $account_id Which account to return Templates for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. (optional) - * @param int $page Which page number of the Template List to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) - * @param string $query String that includes search terms and/or fields to be used to filter the Template objects. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['templateList'] to see the possible values for this operation + * @param string|null $account_id Which account to return Templates for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. (optional) + * @param int|null $page Which page number of the Template List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param string|null $query String that includes search terms and/or fields to be used to filter the Template objects. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['templateList'] to see the possible values for this operation * * @return Request * @throws InvalidArgumentException * @deprecated Prefer to use ::templateList. This method will eventually become unavailable */ - public function templateListRequest(string $account_id = null, int $page = 1, int $page_size = 20, string $query = null, string $contentType = self::contentTypes['templateList'][0]) + public function templateListRequest(?string $account_id = null, ?int $page = 1, ?int $page_size = 20, ?string $query = null, string $contentType = self::contentTypes['templateList'][0]) { if ($page_size !== null && $page_size > 100) { throw new InvalidArgumentException('invalid value for "$page_size" when calling TemplateApi.templateList, must be smaller than or equal to 100.'); @@ -3236,19 +3223,6 @@ public function templateRemoveUserWithHttpInfo(string $template_id, Model\Templa $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -3288,6 +3262,19 @@ public function templateRemoveUserWithHttpInfo(string $template_id, Model\Templa ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\TemplateGetResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -3596,19 +3583,6 @@ public function templateUpdateFilesWithHttpInfo(string $template_id, Model\Templ $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -3648,6 +3622,19 @@ public function templateUpdateFilesWithHttpInfo(string $template_id, Model\Templ ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\TemplateUpdateFilesResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer diff --git a/src/Api/UnclaimedDraftApi.php b/src/Api/UnclaimedDraftApi.php index 3886a87..bb24fb1 100644 --- a/src/Api/UnclaimedDraftApi.php +++ b/src/Api/UnclaimedDraftApi.php @@ -15,7 +15,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -91,9 +91,9 @@ class UnclaimedDraftApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - Configuration $config = null, - ClientInterface $client = null, - HeaderSelector $selector = null, + ?Configuration $config = null, + ?ClientInterface $client = null, + ?HeaderSelector $selector = null, int $hostIndex = 0 ) { $this->client = $client ?: new Client(); @@ -197,19 +197,6 @@ public function unclaimedDraftCreateWithHttpInfo(Model\UnclaimedDraftCreateReque $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -249,6 +236,19 @@ public function unclaimedDraftCreateWithHttpInfo(Model\UnclaimedDraftCreateReque ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\UnclaimedDraftCreateResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -536,19 +536,6 @@ public function unclaimedDraftCreateEmbeddedWithHttpInfo(Model\UnclaimedDraftCre $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -588,6 +575,19 @@ public function unclaimedDraftCreateEmbeddedWithHttpInfo(Model\UnclaimedDraftCre ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\UnclaimedDraftCreateResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -875,19 +875,6 @@ public function unclaimedDraftCreateEmbeddedWithTemplateWithHttpInfo(Model\Uncla $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -927,6 +914,19 @@ public function unclaimedDraftCreateEmbeddedWithTemplateWithHttpInfo(Model\Uncla ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\UnclaimedDraftCreateResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -1216,19 +1216,6 @@ public function unclaimedDraftEditAndResendWithHttpInfo(string $signature_reques $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -1268,6 +1255,19 @@ public function unclaimedDraftEditAndResendWithHttpInfo(string $signature_reques ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\UnclaimedDraftCreateResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer diff --git a/src/ApiException.php b/src/ApiException.php index 3d4a49c..88738d7 100644 --- a/src/ApiException.php +++ b/src/ApiException.php @@ -15,7 +15,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** diff --git a/src/Configuration.php b/src/Configuration.php index ee633ac..2a2839c 100644 --- a/src/Configuration.php +++ b/src/Configuration.php @@ -15,7 +15,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -97,7 +97,7 @@ class Configuration * * @var string */ - protected $userAgent = 'OpenAPI-Generator/1.8.0/PHP'; + protected $userAgent = 'OpenAPI-Generator/1.9.0/PHP'; /** * Debug switch (default set to false) @@ -438,7 +438,7 @@ public static function toDebugReport() $report .= ' OS: ' . php_uname() . PHP_EOL; $report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL; $report .= ' The version of the OpenAPI document: 3.0.0' . PHP_EOL; - $report .= ' SDK Package Version: 1.8.0' . PHP_EOL; + $report .= ' SDK Package Version: 1.9.0' . PHP_EOL; $report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL; return $report; @@ -492,7 +492,7 @@ public function getHostSettings() * @param array|null $variables hash of variable and the corresponding value (optional) * @return string URL based on host settings */ - public static function getHostString(array $hostSettings, int $hostIndex, array $variables = null) + public static function getHostString(array $hostSettings, int $hostIndex, ?array $variables = null) { if (null === $variables) { $variables = []; diff --git a/src/EventCallbackHelper.php b/src/EventCallbackHelper.php index 16e76ec..f153733 100644 --- a/src/EventCallbackHelper.php +++ b/src/EventCallbackHelper.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** diff --git a/src/HeaderSelector.php b/src/HeaderSelector.php index fe1faf2..9f16eda 100644 --- a/src/HeaderSelector.php +++ b/src/HeaderSelector.php @@ -15,7 +15,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -80,7 +80,7 @@ private function selectAcceptHeader(array $accept): ?string } // If none of the available Accept headers is of type "json", then just use all them - $headersWithJson = preg_grep('~(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$~', $accept); + $headersWithJson = $this->selectJsonMimeList($accept); if (count($headersWithJson) === 0) { return implode(',', $accept); } @@ -90,6 +90,28 @@ private function selectAcceptHeader(array $accept): ?string return $this->getAcceptHeaderWithAdjustedWeight($accept, $headersWithJson); } + /** + * Detects whether a string contains a valid JSON mime type + */ + public function isJsonMime(string $searchString): bool + { + return preg_match('~^application/(json|[\w!#$&.+-^_]+\+json)\s*(;|$)~', $searchString) === 1; + } + + /** + * Select all items from a list containing a JSON mime type + */ + private function selectJsonMimeList(array $mimeList): array + { + $jsonMimeList = []; + foreach ($mimeList as $mime) { + if ($this->isJsonMime($mime)) { + $jsonMimeList[] = $mime; + } + } + return $jsonMimeList; + } + /** * Create an Accept header string from the given "Accept" headers array, recalculating all weights * diff --git a/src/Model/AccountCreateRequest.php b/src/Model/AccountCreateRequest.php index f4b9273..7a48414 100644 --- a/src/Model/AccountCreateRequest.php +++ b/src/Model/AccountCreateRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -248,10 +248,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('email_address', $data ?? [], null); $this->setIfExists('client_id', $data ?? [], null); diff --git a/src/Model/AccountCreateResponse.php b/src/Model/AccountCreateResponse.php index 66e9a34..619bf49 100644 --- a/src/Model/AccountCreateResponse.php +++ b/src/Model/AccountCreateResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -242,10 +242,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('account', $data ?? [], null); $this->setIfExists('oauth_data', $data ?? [], null); diff --git a/src/Model/AccountGetResponse.php b/src/Model/AccountGetResponse.php index b59da12..5005bc4 100644 --- a/src/Model/AccountGetResponse.php +++ b/src/Model/AccountGetResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -236,10 +236,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('account', $data ?? [], null); $this->setIfExists('warnings', $data ?? [], null); diff --git a/src/Model/AccountResponse.php b/src/Model/AccountResponse.php index 3fb1a18..6c3370e 100644 --- a/src/Model/AccountResponse.php +++ b/src/Model/AccountResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -290,10 +290,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('account_id', $data ?? [], null); $this->setIfExists('email_address', $data ?? [], null); diff --git a/src/Model/AccountResponseQuotas.php b/src/Model/AccountResponseQuotas.php index 85d0040..119733b 100644 --- a/src/Model/AccountResponseQuotas.php +++ b/src/Model/AccountResponseQuotas.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -260,10 +260,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('api_signature_requests_left', $data ?? [], null); $this->setIfExists('documents_left', $data ?? [], null); diff --git a/src/Model/AccountResponseUsage.php b/src/Model/AccountResponseUsage.php index 94eb509..90cb9bb 100644 --- a/src/Model/AccountResponseUsage.php +++ b/src/Model/AccountResponseUsage.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -230,10 +230,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('fax_pages_sent', $data ?? [], null); } diff --git a/src/Model/AccountUpdateRequest.php b/src/Model/AccountUpdateRequest.php index 34a65c4..cc7e7df 100644 --- a/src/Model/AccountUpdateRequest.php +++ b/src/Model/AccountUpdateRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -242,10 +242,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('account_id', $data ?? [], null); $this->setIfExists('callback_url', $data ?? [], null); diff --git a/src/Model/AccountVerifyRequest.php b/src/Model/AccountVerifyRequest.php index d8731ea..8383f65 100644 --- a/src/Model/AccountVerifyRequest.php +++ b/src/Model/AccountVerifyRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -230,10 +230,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('email_address', $data ?? [], null); } diff --git a/src/Model/AccountVerifyResponse.php b/src/Model/AccountVerifyResponse.php index f8f6a65..359be63 100644 --- a/src/Model/AccountVerifyResponse.php +++ b/src/Model/AccountVerifyResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -236,10 +236,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('account', $data ?? [], null); $this->setIfExists('warnings', $data ?? [], null); diff --git a/src/Model/AccountVerifyResponseAccount.php b/src/Model/AccountVerifyResponseAccount.php index 34a1de5..2c4bf22 100644 --- a/src/Model/AccountVerifyResponseAccount.php +++ b/src/Model/AccountVerifyResponseAccount.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -230,10 +230,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('email_address', $data ?? [], null); } diff --git a/src/Model/ApiAppCreateRequest.php b/src/Model/ApiAppCreateRequest.php index d314440..c6d0cc9 100644 --- a/src/Model/ApiAppCreateRequest.php +++ b/src/Model/ApiAppCreateRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -267,10 +267,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('domains', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); diff --git a/src/Model/ApiAppGetResponse.php b/src/Model/ApiAppGetResponse.php index f95c2b6..3d9dc5d 100644 --- a/src/Model/ApiAppGetResponse.php +++ b/src/Model/ApiAppGetResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -236,10 +236,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('api_app', $data ?? [], null); $this->setIfExists('warnings', $data ?? [], null); diff --git a/src/Model/ApiAppListResponse.php b/src/Model/ApiAppListResponse.php index 44afca3..02e2483 100644 --- a/src/Model/ApiAppListResponse.php +++ b/src/Model/ApiAppListResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -242,10 +242,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('api_apps', $data ?? [], null); $this->setIfExists('list_info', $data ?? [], null); diff --git a/src/Model/ApiAppResponse.php b/src/Model/ApiAppResponse.php index 3e21403..c283d86 100644 --- a/src/Model/ApiAppResponse.php +++ b/src/Model/ApiAppResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -285,10 +285,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('callback_url', $data ?? [], null); $this->setIfExists('client_id', $data ?? [], null); diff --git a/src/Model/ApiAppResponseOAuth.php b/src/Model/ApiAppResponseOAuth.php index ac2ecf0..6c84b43 100644 --- a/src/Model/ApiAppResponseOAuth.php +++ b/src/Model/ApiAppResponseOAuth.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -249,10 +249,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('callback_url', $data ?? [], null); $this->setIfExists('secret', $data ?? [], null); diff --git a/src/Model/ApiAppResponseOptions.php b/src/Model/ApiAppResponseOptions.php index 99c11f0..46466cb 100644 --- a/src/Model/ApiAppResponseOptions.php +++ b/src/Model/ApiAppResponseOptions.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -231,10 +231,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('can_insert_everywhere', $data ?? [], null); } diff --git a/src/Model/ApiAppResponseOwnerAccount.php b/src/Model/ApiAppResponseOwnerAccount.php index ffc1209..db9e8e0 100644 --- a/src/Model/ApiAppResponseOwnerAccount.php +++ b/src/Model/ApiAppResponseOwnerAccount.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -237,10 +237,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('account_id', $data ?? [], null); $this->setIfExists('email_address', $data ?? [], null); diff --git a/src/Model/ApiAppResponseWhiteLabelingOptions.php b/src/Model/ApiAppResponseWhiteLabelingOptions.php index 95f29f5..b010c59 100644 --- a/src/Model/ApiAppResponseWhiteLabelingOptions.php +++ b/src/Model/ApiAppResponseWhiteLabelingOptions.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -309,10 +309,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('header_background_color', $data ?? [], null); $this->setIfExists('legal_version', $data ?? [], null); diff --git a/src/Model/ApiAppUpdateRequest.php b/src/Model/ApiAppUpdateRequest.php index 456d143..323f28d 100644 --- a/src/Model/ApiAppUpdateRequest.php +++ b/src/Model/ApiAppUpdateRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -267,10 +267,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('callback_url', $data ?? [], null); $this->setIfExists('custom_logo_file', $data ?? [], null); diff --git a/src/Model/BulkSendJobGetResponse.php b/src/Model/BulkSendJobGetResponse.php index 3d97f3f..a0699b4 100644 --- a/src/Model/BulkSendJobGetResponse.php +++ b/src/Model/BulkSendJobGetResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -248,10 +248,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('bulk_send_job', $data ?? [], null); $this->setIfExists('list_info', $data ?? [], null); diff --git a/src/Model/BulkSendJobGetResponseSignatureRequests.php b/src/Model/BulkSendJobGetResponseSignatureRequests.php index 0781348..a68be1c 100644 --- a/src/Model/BulkSendJobGetResponseSignatureRequests.php +++ b/src/Model/BulkSendJobGetResponseSignatureRequests.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -374,10 +374,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('test_mode', $data ?? [], false); $this->setIfExists('signature_request_id', $data ?? [], null); diff --git a/src/Model/BulkSendJobListResponse.php b/src/Model/BulkSendJobListResponse.php index 8420c46..ee12f4f 100644 --- a/src/Model/BulkSendJobListResponse.php +++ b/src/Model/BulkSendJobListResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -242,10 +242,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('bulk_send_jobs', $data ?? [], null); $this->setIfExists('list_info', $data ?? [], null); diff --git a/src/Model/BulkSendJobResponse.php b/src/Model/BulkSendJobResponse.php index fcd66e1..987a9bd 100644 --- a/src/Model/BulkSendJobResponse.php +++ b/src/Model/BulkSendJobResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -249,10 +249,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('bulk_send_job_id', $data ?? [], null); $this->setIfExists('total', $data ?? [], null); diff --git a/src/Model/BulkSendJobSendResponse.php b/src/Model/BulkSendJobSendResponse.php index 7797e84..945a1a5 100644 --- a/src/Model/BulkSendJobSendResponse.php +++ b/src/Model/BulkSendJobSendResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -236,10 +236,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('bulk_send_job', $data ?? [], null); $this->setIfExists('warnings', $data ?? [], null); diff --git a/src/Model/EmbeddedEditUrlRequest.php b/src/Model/EmbeddedEditUrlRequest.php index b4992a4..d5252f0 100644 --- a/src/Model/EmbeddedEditUrlRequest.php +++ b/src/Model/EmbeddedEditUrlRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -284,10 +284,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('allow_edit_ccs', $data ?? [], false); $this->setIfExists('cc_roles', $data ?? [], null); diff --git a/src/Model/EmbeddedEditUrlResponse.php b/src/Model/EmbeddedEditUrlResponse.php index 88320ef..865768d 100644 --- a/src/Model/EmbeddedEditUrlResponse.php +++ b/src/Model/EmbeddedEditUrlResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -236,10 +236,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('embedded', $data ?? [], null); $this->setIfExists('warnings', $data ?? [], null); diff --git a/src/Model/EmbeddedEditUrlResponseEmbedded.php b/src/Model/EmbeddedEditUrlResponseEmbedded.php index 0ef3537..bda80cf 100644 --- a/src/Model/EmbeddedEditUrlResponseEmbedded.php +++ b/src/Model/EmbeddedEditUrlResponseEmbedded.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -237,10 +237,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('edit_url', $data ?? [], null); $this->setIfExists('expires_at', $data ?? [], null); diff --git a/src/Model/EmbeddedSignUrlResponse.php b/src/Model/EmbeddedSignUrlResponse.php index 4f91647..8b2c9af 100644 --- a/src/Model/EmbeddedSignUrlResponse.php +++ b/src/Model/EmbeddedSignUrlResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -236,10 +236,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('embedded', $data ?? [], null); $this->setIfExists('warnings', $data ?? [], null); diff --git a/src/Model/EmbeddedSignUrlResponseEmbedded.php b/src/Model/EmbeddedSignUrlResponseEmbedded.php index f8b6619..54fffcb 100644 --- a/src/Model/EmbeddedSignUrlResponseEmbedded.php +++ b/src/Model/EmbeddedSignUrlResponseEmbedded.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -237,10 +237,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('sign_url', $data ?? [], null); $this->setIfExists('expires_at', $data ?? [], null); diff --git a/src/Model/ErrorResponse.php b/src/Model/ErrorResponse.php index 081ed78..108b8e6 100644 --- a/src/Model/ErrorResponse.php +++ b/src/Model/ErrorResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -230,10 +230,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('error', $data ?? [], null); } diff --git a/src/Model/ErrorResponseError.php b/src/Model/ErrorResponseError.php index 6098192..6bb4b86 100644 --- a/src/Model/ErrorResponseError.php +++ b/src/Model/ErrorResponseError.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -243,10 +243,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('error_msg', $data ?? [], null); $this->setIfExists('error_name', $data ?? [], null); diff --git a/src/Model/EventCallbackRequest.php b/src/Model/EventCallbackRequest.php index 35c806b..a3b4a18 100644 --- a/src/Model/EventCallbackRequest.php +++ b/src/Model/EventCallbackRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -248,10 +248,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('event', $data ?? [], null); $this->setIfExists('account', $data ?? [], null); diff --git a/src/Model/EventCallbackRequestEvent.php b/src/Model/EventCallbackRequestEvent.php index 36d99c7..2501307 100644 --- a/src/Model/EventCallbackRequestEvent.php +++ b/src/Model/EventCallbackRequestEvent.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -307,10 +307,10 @@ public function getEventTypeAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('event_time', $data ?? [], null); $this->setIfExists('event_type', $data ?? [], null); diff --git a/src/Model/EventCallbackRequestEventMetadata.php b/src/Model/EventCallbackRequestEventMetadata.php index c0d665c..9116a54 100644 --- a/src/Model/EventCallbackRequestEventMetadata.php +++ b/src/Model/EventCallbackRequestEventMetadata.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -248,10 +248,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('related_signature_id', $data ?? [], null); $this->setIfExists('reported_for_account_id', $data ?? [], null); diff --git a/src/Model/FaxGetResponse.php b/src/Model/FaxGetResponse.php index 2329434..ee85f3d 100644 --- a/src/Model/FaxGetResponse.php +++ b/src/Model/FaxGetResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -236,10 +236,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('fax', $data ?? [], null); $this->setIfExists('warnings', $data ?? [], null); diff --git a/src/Model/FaxLineAddUserRequest.php b/src/Model/FaxLineAddUserRequest.php index b7e2c84..4bada1b 100644 --- a/src/Model/FaxLineAddUserRequest.php +++ b/src/Model/FaxLineAddUserRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -242,10 +242,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('number', $data ?? [], null); $this->setIfExists('account_id', $data ?? [], null); @@ -327,7 +327,7 @@ public function getNumber() /** * Sets number * - * @param string $number the Fax Line number + * @param string $number The Fax Line number * * @return self */ diff --git a/src/Model/FaxLineAreaCodeGetCountryEnum.php b/src/Model/FaxLineAreaCodeGetCountryEnum.php index 1b96f68..68597df 100644 --- a/src/Model/FaxLineAreaCodeGetCountryEnum.php +++ b/src/Model/FaxLineAreaCodeGetCountryEnum.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** diff --git a/src/Model/FaxLineAreaCodeGetProvinceEnum.php b/src/Model/FaxLineAreaCodeGetProvinceEnum.php index 8bfde87..1599865 100644 --- a/src/Model/FaxLineAreaCodeGetProvinceEnum.php +++ b/src/Model/FaxLineAreaCodeGetProvinceEnum.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** diff --git a/src/Model/FaxLineAreaCodeGetResponse.php b/src/Model/FaxLineAreaCodeGetResponse.php index 085e8a8..c4e650c 100644 --- a/src/Model/FaxLineAreaCodeGetResponse.php +++ b/src/Model/FaxLineAreaCodeGetResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -230,10 +230,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('area_codes', $data ?? [], null); } diff --git a/src/Model/FaxLineAreaCodeGetStateEnum.php b/src/Model/FaxLineAreaCodeGetStateEnum.php index db4f35f..3ce60e6 100644 --- a/src/Model/FaxLineAreaCodeGetStateEnum.php +++ b/src/Model/FaxLineAreaCodeGetStateEnum.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** diff --git a/src/Model/FaxLineCreateRequest.php b/src/Model/FaxLineCreateRequest.php index a898fef..1f9504a 100644 --- a/src/Model/FaxLineCreateRequest.php +++ b/src/Model/FaxLineCreateRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -266,10 +266,10 @@ public function getCountryAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('area_code', $data ?? [], null); $this->setIfExists('country', $data ?? [], null); @@ -364,7 +364,7 @@ public function getAreaCode() /** * Sets area_code * - * @param int $area_code Area code + * @param int $area_code Area code of the new Fax Line * * @return self */ @@ -391,7 +391,7 @@ public function getCountry() /** * Sets country * - * @param string $country Country + * @param string $country Country of the area code * * @return self */ @@ -428,7 +428,7 @@ public function getCity() /** * Sets city * - * @param string|null $city City + * @param string|null $city City of the area code * * @return self */ @@ -455,7 +455,7 @@ public function getAccountId() /** * Sets account_id * - * @param string|null $account_id Account ID + * @param string|null $account_id Account ID of the account that will be assigned this new Fax Line * * @return self */ diff --git a/src/Model/FaxLineDeleteRequest.php b/src/Model/FaxLineDeleteRequest.php index 1fc4fa4..c3946e2 100644 --- a/src/Model/FaxLineDeleteRequest.php +++ b/src/Model/FaxLineDeleteRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -230,10 +230,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('number', $data ?? [], null); } @@ -313,7 +313,7 @@ public function getNumber() /** * Sets number * - * @param string $number the Fax Line number + * @param string $number The Fax Line number * * @return self */ diff --git a/src/Model/FaxLineListResponse.php b/src/Model/FaxLineListResponse.php index 1b32ad4..904c477 100644 --- a/src/Model/FaxLineListResponse.php +++ b/src/Model/FaxLineListResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -242,10 +242,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('list_info', $data ?? [], null); $this->setIfExists('fax_lines', $data ?? [], null); diff --git a/src/Model/FaxLineRemoveUserRequest.php b/src/Model/FaxLineRemoveUserRequest.php index 5bec490..43bcce5 100644 --- a/src/Model/FaxLineRemoveUserRequest.php +++ b/src/Model/FaxLineRemoveUserRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -242,10 +242,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('number', $data ?? [], null); $this->setIfExists('account_id', $data ?? [], null); @@ -327,7 +327,7 @@ public function getNumber() /** * Sets number * - * @param string $number the Fax Line number + * @param string $number The Fax Line number * * @return self */ @@ -354,7 +354,7 @@ public function getAccountId() /** * Sets account_id * - * @param string|null $account_id Account ID + * @param string|null $account_id Account ID of the user to remove access * * @return self */ @@ -381,7 +381,7 @@ public function getEmailAddress() /** * Sets email_address * - * @param string|null $email_address Email address + * @param string|null $email_address Email address of the user to remove access * * @return self */ diff --git a/src/Model/FaxLineResponse.php b/src/Model/FaxLineResponse.php index c30616f..7b84af2 100644 --- a/src/Model/FaxLineResponse.php +++ b/src/Model/FaxLineResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -236,10 +236,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('fax_line', $data ?? [], null); $this->setIfExists('warnings', $data ?? [], null); diff --git a/src/Model/FaxLineResponseFaxLine.php b/src/Model/FaxLineResponseFaxLine.php index 4a3fe8f..bde8875 100644 --- a/src/Model/FaxLineResponseFaxLine.php +++ b/src/Model/FaxLineResponseFaxLine.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -248,10 +248,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('number', $data ?? [], null); $this->setIfExists('created_at', $data ?? [], null); diff --git a/src/Model/FaxListResponse.php b/src/Model/FaxListResponse.php index 21e89d3..bb402e8 100644 --- a/src/Model/FaxListResponse.php +++ b/src/Model/FaxListResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -236,10 +236,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('faxes', $data ?? [], null); $this->setIfExists('list_info', $data ?? [], null); diff --git a/src/Model/FaxResponse.php b/src/Model/FaxResponse.php index 9471ccc..ebe08f4 100644 --- a/src/Model/FaxResponse.php +++ b/src/Model/FaxResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -290,10 +290,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('fax_id', $data ?? [], null); $this->setIfExists('title', $data ?? [], null); diff --git a/src/Model/FaxResponseTransmission.php b/src/Model/FaxResponseTransmission.php index 8c30b8a..4407739 100644 --- a/src/Model/FaxResponseTransmission.php +++ b/src/Model/FaxResponseTransmission.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -270,10 +270,10 @@ public function getStatusCodeAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('recipient', $data ?? [], null); $this->setIfExists('status_code', $data ?? [], null); diff --git a/src/Model/FaxSendRequest.php b/src/Model/FaxSendRequest.php index d095734..4923a51 100644 --- a/src/Model/FaxSendRequest.php +++ b/src/Model/FaxSendRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -279,10 +279,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('recipient', $data ?? [], null); $this->setIfExists('sender', $data ?? [], null); @@ -370,7 +370,7 @@ public function getRecipient() /** * Sets recipient * - * @param string $recipient Fax Send To Recipient + * @param string $recipient Recipient of the fax Can be a phone number in E.164 format or email address * * @return self */ @@ -424,7 +424,7 @@ public function getFiles() /** * Sets files * - * @param SplFileObject[]|null $files Fax File to Send + * @param SplFileObject[]|null $files use `files[]` to indicate the uploaded file(s) to fax This endpoint requires either **files** or **file_urls[]**, but not both * * @return self */ @@ -451,7 +451,7 @@ public function getFileUrls() /** * Sets file_urls * - * @param string[]|null $file_urls Fax File URL to Send + * @param string[]|null $file_urls use `file_urls[]` to have Dropbox Fax download the file(s) to fax This endpoint requires either **files** or **file_urls[]**, but not both * * @return self */ @@ -505,7 +505,7 @@ public function getCoverPageTo() /** * Sets cover_page_to * - * @param string|null $cover_page_to Fax Cover Page for Recipient + * @param string|null $cover_page_to Fax cover page recipient information * * @return self */ @@ -532,7 +532,7 @@ public function getCoverPageFrom() /** * Sets cover_page_from * - * @param string|null $cover_page_from Fax Cover Page for Sender + * @param string|null $cover_page_from Fax cover page sender information * * @return self */ diff --git a/src/Model/FileResponse.php b/src/Model/FileResponse.php index 3ebdc33..82f84a6 100644 --- a/src/Model/FileResponse.php +++ b/src/Model/FileResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -236,10 +236,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('file_url', $data ?? [], null); $this->setIfExists('expires_at', $data ?? [], null); diff --git a/src/Model/FileResponseDataUri.php b/src/Model/FileResponseDataUri.php index 474e8a7..98e37dd 100644 --- a/src/Model/FileResponseDataUri.php +++ b/src/Model/FileResponseDataUri.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -230,10 +230,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('data_uri', $data ?? [], null); } diff --git a/src/Model/ListInfoResponse.php b/src/Model/ListInfoResponse.php index 623284e..a036c6d 100644 --- a/src/Model/ListInfoResponse.php +++ b/src/Model/ListInfoResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -249,10 +249,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('num_pages', $data ?? [], null); $this->setIfExists('num_results', $data ?? [], null); diff --git a/src/Model/ModelInterface.php b/src/Model/ModelInterface.php index 0bc2f21..1df0ec6 100644 --- a/src/Model/ModelInterface.php +++ b/src/Model/ModelInterface.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** diff --git a/src/Model/OAuthTokenGenerateRequest.php b/src/Model/OAuthTokenGenerateRequest.php index 38a0395..c8e7609 100644 --- a/src/Model/OAuthTokenGenerateRequest.php +++ b/src/Model/OAuthTokenGenerateRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -254,10 +254,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('client_id', $data ?? [], null); $this->setIfExists('client_secret', $data ?? [], null); diff --git a/src/Model/OAuthTokenRefreshRequest.php b/src/Model/OAuthTokenRefreshRequest.php index 11cf05a..d923650 100644 --- a/src/Model/OAuthTokenRefreshRequest.php +++ b/src/Model/OAuthTokenRefreshRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -248,10 +248,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('grant_type', $data ?? [], 'refresh_token'); $this->setIfExists('refresh_token', $data ?? [], null); diff --git a/src/Model/OAuthTokenResponse.php b/src/Model/OAuthTokenResponse.php index 8c83de7..72b8993 100644 --- a/src/Model/OAuthTokenResponse.php +++ b/src/Model/OAuthTokenResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -254,10 +254,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('access_token', $data ?? [], null); $this->setIfExists('token_type', $data ?? [], null); diff --git a/src/Model/ReportCreateRequest.php b/src/Model/ReportCreateRequest.php index 5802963..f2aefab 100644 --- a/src/Model/ReportCreateRequest.php +++ b/src/Model/ReportCreateRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -258,10 +258,10 @@ public function getReportTypeAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('end_date', $data ?? [], null); $this->setIfExists('report_type', $data ?? [], null); diff --git a/src/Model/ReportCreateResponse.php b/src/Model/ReportCreateResponse.php index 415406e..bc712c9 100644 --- a/src/Model/ReportCreateResponse.php +++ b/src/Model/ReportCreateResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -236,10 +236,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('report', $data ?? [], null); $this->setIfExists('warnings', $data ?? [], null); diff --git a/src/Model/ReportResponse.php b/src/Model/ReportResponse.php index c2d024c..537eb92 100644 --- a/src/Model/ReportResponse.php +++ b/src/Model/ReportResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -265,10 +265,10 @@ public function getReportTypeAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('success', $data ?? [], null); $this->setIfExists('start_date', $data ?? [], null); diff --git a/src/Model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.php b/src/Model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.php index 9c5947f..1874fd2 100644 --- a/src/Model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.php +++ b/src/Model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -303,10 +303,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('template_ids', $data ?? [], null); $this->setIfExists('client_id', $data ?? [], null); diff --git a/src/Model/SignatureRequestBulkSendWithTemplateRequest.php b/src/Model/SignatureRequestBulkSendWithTemplateRequest.php index 26092eb..1e85b44 100644 --- a/src/Model/SignatureRequestBulkSendWithTemplateRequest.php +++ b/src/Model/SignatureRequestBulkSendWithTemplateRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -303,10 +303,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('template_ids', $data ?? [], null); $this->setIfExists('signer_file', $data ?? [], null); diff --git a/src/Model/SignatureRequestCreateEmbeddedRequest.php b/src/Model/SignatureRequestCreateEmbeddedRequest.php index 7d14b82..badc3ea 100644 --- a/src/Model/SignatureRequestCreateEmbeddedRequest.php +++ b/src/Model/SignatureRequestCreateEmbeddedRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -369,10 +369,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('client_id', $data ?? [], null); $this->setIfExists('files', $data ?? [], null); diff --git a/src/Model/SignatureRequestCreateEmbeddedWithTemplateRequest.php b/src/Model/SignatureRequestCreateEmbeddedWithTemplateRequest.php index b98f7b8..4f5b84e 100644 --- a/src/Model/SignatureRequestCreateEmbeddedWithTemplateRequest.php +++ b/src/Model/SignatureRequestCreateEmbeddedWithTemplateRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -315,10 +315,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('template_ids', $data ?? [], null); $this->setIfExists('client_id', $data ?? [], null); diff --git a/src/Model/SignatureRequestEditEmbeddedRequest.php b/src/Model/SignatureRequestEditEmbeddedRequest.php new file mode 100644 index 0000000..cb0190f --- /dev/null +++ b/src/Model/SignatureRequestEditEmbeddedRequest.php @@ -0,0 +1,1231 @@ + + */ +class SignatureRequestEditEmbeddedRequest implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'SignatureRequestEditEmbeddedRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'client_id' => 'string', + 'files' => '\SplFileObject[]', + 'file_urls' => 'string[]', + 'signers' => '\Dropbox\Sign\Model\SubSignatureRequestSigner[]', + 'grouped_signers' => '\Dropbox\Sign\Model\SubSignatureRequestGroupedSigners[]', + 'allow_decline' => 'bool', + 'allow_reassign' => 'bool', + 'attachments' => '\Dropbox\Sign\Model\SubAttachment[]', + 'cc_email_addresses' => 'string[]', + 'custom_fields' => '\Dropbox\Sign\Model\SubCustomField[]', + 'field_options' => '\Dropbox\Sign\Model\SubFieldOptions', + 'form_field_groups' => '\Dropbox\Sign\Model\SubFormFieldGroup[]', + 'form_field_rules' => '\Dropbox\Sign\Model\SubFormFieldRule[]', + 'form_fields_per_document' => '\Dropbox\Sign\Model\SubFormFieldsPerDocumentBase[]', + 'hide_text_tags' => 'bool', + 'message' => 'string', + 'metadata' => 'array', + 'signing_options' => '\Dropbox\Sign\Model\SubSigningOptions', + 'subject' => 'string', + 'test_mode' => 'bool', + 'title' => 'string', + 'use_text_tags' => 'bool', + 'populate_auto_fill_fields' => 'bool', + 'expires_at' => 'int', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'client_id' => null, + 'files' => 'binary', + 'file_urls' => null, + 'signers' => null, + 'grouped_signers' => null, + 'allow_decline' => null, + 'allow_reassign' => null, + 'attachments' => null, + 'cc_email_addresses' => 'email', + 'custom_fields' => null, + 'field_options' => null, + 'form_field_groups' => null, + 'form_field_rules' => null, + 'form_fields_per_document' => null, + 'hide_text_tags' => null, + 'message' => null, + 'metadata' => null, + 'signing_options' => null, + 'subject' => null, + 'test_mode' => null, + 'title' => null, + 'use_text_tags' => null, + 'populate_auto_fill_fields' => null, + 'expires_at' => null, + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ + protected static array $openAPINullables = [ + 'client_id' => false, + 'files' => false, + 'file_urls' => false, + 'signers' => false, + 'grouped_signers' => false, + 'allow_decline' => false, + 'allow_reassign' => false, + 'attachments' => false, + 'cc_email_addresses' => false, + 'custom_fields' => false, + 'field_options' => false, + 'form_field_groups' => false, + 'form_field_rules' => false, + 'form_fields_per_document' => false, + 'hide_text_tags' => false, + 'message' => false, + 'metadata' => false, + 'signing_options' => false, + 'subject' => false, + 'test_mode' => false, + 'title' => false, + 'use_text_tags' => false, + 'populate_auto_fill_fields' => false, + 'expires_at' => true, + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return bool[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'client_id' => 'client_id', + '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', + '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', + 'message' => 'message', + 'metadata' => 'metadata', + 'signing_options' => 'signing_options', + 'subject' => 'subject', + 'test_mode' => 'test_mode', + 'title' => 'title', + 'use_text_tags' => 'use_text_tags', + 'populate_auto_fill_fields' => 'populate_auto_fill_fields', + 'expires_at' => 'expires_at', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'client_id' => 'setClientId', + 'files' => 'setFiles', + 'file_urls' => 'setFileUrls', + 'signers' => 'setSigners', + 'grouped_signers' => 'setGroupedSigners', + 'allow_decline' => 'setAllowDecline', + 'allow_reassign' => 'setAllowReassign', + 'attachments' => 'setAttachments', + 'cc_email_addresses' => 'setCcEmailAddresses', + 'custom_fields' => 'setCustomFields', + 'field_options' => 'setFieldOptions', + 'form_field_groups' => 'setFormFieldGroups', + 'form_field_rules' => 'setFormFieldRules', + 'form_fields_per_document' => 'setFormFieldsPerDocument', + 'hide_text_tags' => 'setHideTextTags', + 'message' => 'setMessage', + 'metadata' => 'setMetadata', + 'signing_options' => 'setSigningOptions', + 'subject' => 'setSubject', + 'test_mode' => 'setTestMode', + 'title' => 'setTitle', + 'use_text_tags' => 'setUseTextTags', + 'populate_auto_fill_fields' => 'setPopulateAutoFillFields', + 'expires_at' => 'setExpiresAt', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'client_id' => 'getClientId', + 'files' => 'getFiles', + 'file_urls' => 'getFileUrls', + 'signers' => 'getSigners', + 'grouped_signers' => 'getGroupedSigners', + 'allow_decline' => 'getAllowDecline', + 'allow_reassign' => 'getAllowReassign', + 'attachments' => 'getAttachments', + 'cc_email_addresses' => 'getCcEmailAddresses', + 'custom_fields' => 'getCustomFields', + 'field_options' => 'getFieldOptions', + 'form_field_groups' => 'getFormFieldGroups', + 'form_field_rules' => 'getFormFieldRules', + 'form_fields_per_document' => 'getFormFieldsPerDocument', + 'hide_text_tags' => 'getHideTextTags', + 'message' => 'getMessage', + 'metadata' => 'getMetadata', + 'signing_options' => 'getSigningOptions', + 'subject' => 'getSubject', + 'test_mode' => 'getTestMode', + 'title' => 'getTitle', + 'use_text_tags' => 'getUseTextTags', + 'populate_auto_fill_fields' => 'getPopulateAutoFillFields', + 'expires_at' => 'getExpiresAt', + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('client_id', $data ?? [], null); + $this->setIfExists('files', $data ?? [], null); + $this->setIfExists('file_urls', $data ?? [], null); + $this->setIfExists('signers', $data ?? [], null); + $this->setIfExists('grouped_signers', $data ?? [], null); + $this->setIfExists('allow_decline', $data ?? [], false); + $this->setIfExists('allow_reassign', $data ?? [], false); + $this->setIfExists('attachments', $data ?? [], null); + $this->setIfExists('cc_email_addresses', $data ?? [], null); + $this->setIfExists('custom_fields', $data ?? [], null); + $this->setIfExists('field_options', $data ?? [], null); + $this->setIfExists('form_field_groups', $data ?? [], null); + $this->setIfExists('form_field_rules', $data ?? [], null); + $this->setIfExists('form_fields_per_document', $data ?? [], null); + $this->setIfExists('hide_text_tags', $data ?? [], false); + $this->setIfExists('message', $data ?? [], null); + $this->setIfExists('metadata', $data ?? [], null); + $this->setIfExists('signing_options', $data ?? [], null); + $this->setIfExists('subject', $data ?? [], null); + $this->setIfExists('test_mode', $data ?? [], false); + $this->setIfExists('title', $data ?? [], null); + $this->setIfExists('use_text_tags', $data ?? [], false); + $this->setIfExists('populate_auto_fill_fields', $data ?? [], false); + $this->setIfExists('expires_at', $data ?? [], null); + } + + /** + * @deprecated use ::init() + */ + public static function fromArray(array $data): SignatureRequestEditEmbeddedRequest + { + return self::init($data); + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + */ + public static function init(array $data): SignatureRequestEditEmbeddedRequest + { + /** @var SignatureRequestEditEmbeddedRequest */ + return ObjectSerializer::deserialize( + $data, + SignatureRequestEditEmbeddedRequest::class, + ); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string|int|object|array|mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['client_id'] === null) { + $invalidProperties[] = "'client_id' can't be null"; + } + if (!is_null($this->container['message']) && (mb_strlen($this->container['message']) > 5000)) { + $invalidProperties[] = "invalid value for 'message', the character length must be smaller than or equal to 5000."; + } + + if (!is_null($this->container['subject']) && (mb_strlen($this->container['subject']) > 255)) { + $invalidProperties[] = "invalid value for 'subject', the character length must be smaller than or equal to 255."; + } + + if (!is_null($this->container['title']) && (mb_strlen($this->container['title']) > 255)) { + $invalidProperties[] = "invalid value for 'title', the character length must be smaller than or equal to 255."; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets client_id + * + * @return string + */ + public function getClientId() + { + return $this->container['client_id']; + } + + /** + * Sets client_id + * + * @param string $client_id Client id of the app you're using to create this embedded signature request. Used for security purposes. + * + * @return self + */ + public function setClientId(string $client_id) + { + if (is_null($client_id)) { + throw new InvalidArgumentException('non-nullable client_id cannot be null'); + } + $this->container['client_id'] = $client_id; + + return $this; + } + + /** + * Gets files + * + * @return SplFileObject[]|null + */ + public function getFiles() + { + return $this->container['files']; + } + + /** + * Sets files + * + * @param SplFileObject[]|null $files Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + * + * @return self + */ + public function setFiles(?array $files) + { + if (is_null($files)) { + throw new InvalidArgumentException('non-nullable files cannot be null'); + } + $this->container['files'] = $files; + + return $this; + } + + /** + * Gets file_urls + * + * @return string[]|null + */ + public function getFileUrls() + { + return $this->container['file_urls']; + } + + /** + * Sets file_urls + * + * @param string[]|null $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. + * + * @return self + */ + public function setFileUrls(?array $file_urls) + { + if (is_null($file_urls)) { + throw new InvalidArgumentException('non-nullable file_urls cannot be null'); + } + $this->container['file_urls'] = $file_urls; + + return $this; + } + + /** + * Gets signers + * + * @return SubSignatureRequestSigner[]|null + */ + public function getSigners() + { + return $this->container['signers']; + } + + /** + * Sets signers + * + * @param SubSignatureRequestSigner[]|null $signers Add Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. + * + * @return self + */ + public function setSigners(?array $signers) + { + if (is_null($signers)) { + throw new InvalidArgumentException('non-nullable signers cannot be null'); + } + $this->container['signers'] = $signers; + + return $this; + } + + /** + * Gets grouped_signers + * + * @return SubSignatureRequestGroupedSigners[]|null + */ + public function getGroupedSigners() + { + return $this->container['grouped_signers']; + } + + /** + * Sets grouped_signers + * + * @param SubSignatureRequestGroupedSigners[]|null $grouped_signers Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. + * + * @return self + */ + public function setGroupedSigners(?array $grouped_signers) + { + if (is_null($grouped_signers)) { + throw new InvalidArgumentException('non-nullable grouped_signers cannot be null'); + } + $this->container['grouped_signers'] = $grouped_signers; + + return $this; + } + + /** + * Gets allow_decline + * + * @return bool|null + */ + public function getAllowDecline() + { + return $this->container['allow_decline']; + } + + /** + * Sets allow_decline + * + * @param bool|null $allow_decline Allows signers to decline to sign a document if `true`. Defaults to `false`. + * + * @return self + */ + public function setAllowDecline(?bool $allow_decline) + { + if (is_null($allow_decline)) { + throw new InvalidArgumentException('non-nullable allow_decline cannot be null'); + } + $this->container['allow_decline'] = $allow_decline; + + return $this; + } + + /** + * Gets allow_reassign + * + * @return bool|null + */ + public function getAllowReassign() + { + return $this->container['allow_reassign']; + } + + /** + * Sets allow_reassign + * + * @param bool|null $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. + * + * @return self + */ + public function setAllowReassign(?bool $allow_reassign) + { + if (is_null($allow_reassign)) { + throw new InvalidArgumentException('non-nullable allow_reassign cannot be null'); + } + $this->container['allow_reassign'] = $allow_reassign; + + return $this; + } + + /** + * Gets attachments + * + * @return SubAttachment[]|null + */ + public function getAttachments() + { + return $this->container['attachments']; + } + + /** + * Sets attachments + * + * @param SubAttachment[]|null $attachments A list describing the attachments + * + * @return self + */ + public function setAttachments(?array $attachments) + { + if (is_null($attachments)) { + throw new InvalidArgumentException('non-nullable attachments cannot be null'); + } + $this->container['attachments'] = $attachments; + + return $this; + } + + /** + * Gets cc_email_addresses + * + * @return string[]|null + */ + public function getCcEmailAddresses() + { + return $this->container['cc_email_addresses']; + } + + /** + * Sets cc_email_addresses + * + * @param string[]|null $cc_email_addresses the email addresses that should be CCed + * + * @return self + */ + public function setCcEmailAddresses(?array $cc_email_addresses) + { + if (is_null($cc_email_addresses)) { + throw new InvalidArgumentException('non-nullable cc_email_addresses cannot be null'); + } + $this->container['cc_email_addresses'] = $cc_email_addresses; + + return $this; + } + + /** + * Gets custom_fields + * + * @return SubCustomField[]|null + */ + public function getCustomFields() + { + return $this->container['custom_fields']; + } + + /** + * Sets custom_fields + * + * @param SubCustomField[]|null $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. + * + * @return self + */ + public function setCustomFields(?array $custom_fields) + { + if (is_null($custom_fields)) { + throw new InvalidArgumentException('non-nullable custom_fields cannot be null'); + } + $this->container['custom_fields'] = $custom_fields; + + return $this; + } + + /** + * Gets field_options + * + * @return SubFieldOptions|null + */ + public function getFieldOptions() + { + return $this->container['field_options']; + } + + /** + * Sets field_options + * + * @param SubFieldOptions|null $field_options field_options + * + * @return self + */ + public function setFieldOptions(?SubFieldOptions $field_options) + { + if (is_null($field_options)) { + throw new InvalidArgumentException('non-nullable field_options cannot be null'); + } + $this->container['field_options'] = $field_options; + + return $this; + } + + /** + * Gets form_field_groups + * + * @return SubFormFieldGroup[]|null + */ + public function getFormFieldGroups() + { + return $this->container['form_field_groups']; + } + + /** + * Sets form_field_groups + * + * @param SubFormFieldGroup[]|null $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`. + * + * @return self + */ + public function setFormFieldGroups(?array $form_field_groups) + { + if (is_null($form_field_groups)) { + throw new InvalidArgumentException('non-nullable form_field_groups cannot be null'); + } + $this->container['form_field_groups'] = $form_field_groups; + + return $this; + } + + /** + * Gets form_field_rules + * + * @return SubFormFieldRule[]|null + */ + public function getFormFieldRules() + { + return $this->container['form_field_rules']; + } + + /** + * Sets form_field_rules + * + * @param SubFormFieldRule[]|null $form_field_rules conditional Logic rules for fields defined in `form_fields_per_document` + * + * @return self + */ + public function setFormFieldRules(?array $form_field_rules) + { + if (is_null($form_field_rules)) { + throw new InvalidArgumentException('non-nullable form_field_rules cannot be null'); + } + $this->container['form_field_rules'] = $form_field_rules; + + return $this; + } + + /** + * Gets form_fields_per_document + * + * @return SubFormFieldsPerDocumentBase[]|null + */ + public function getFormFieldsPerDocument() + { + return $this->container['form_fields_per_document']; + } + + /** + * Sets form_fields_per_document + * + * @param SubFormFieldsPerDocumentBase[]|null $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` + * + * @return self + */ + public function setFormFieldsPerDocument(?array $form_fields_per_document) + { + if (is_null($form_fields_per_document)) { + throw new InvalidArgumentException('non-nullable form_fields_per_document cannot be null'); + } + $this->container['form_fields_per_document'] = $form_fields_per_document; + + return $this; + } + + /** + * Gets hide_text_tags + * + * @return bool|null + */ + public function getHideTextTags() + { + return $this->container['hide_text_tags']; + } + + /** + * Sets hide_text_tags + * + * @param bool|null $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. + * + * @return self + */ + public function setHideTextTags(?bool $hide_text_tags) + { + if (is_null($hide_text_tags)) { + throw new InvalidArgumentException('non-nullable hide_text_tags cannot be null'); + } + $this->container['hide_text_tags'] = $hide_text_tags; + + return $this; + } + + /** + * Gets message + * + * @return string|null + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string|null $message the custom message in the email that will be sent to the signers + * + * @return self + */ + public function setMessage(?string $message) + { + if (is_null($message)) { + throw new InvalidArgumentException('non-nullable message cannot be null'); + } + if (mb_strlen($message) > 5000) { + throw new InvalidArgumentException('invalid length for $message when calling SignatureRequestEditEmbeddedRequest., must be smaller than or equal to 5000.'); + } + + $this->container['message'] = $message; + + return $this; + } + + /** + * Gets metadata + * + * @return array|null + */ + public function getMetadata() + { + return $this->container['metadata']; + } + + /** + * Sets metadata + * + * @param array|null $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. + * + * @return self + */ + public function setMetadata(?array $metadata) + { + if (is_null($metadata)) { + throw new InvalidArgumentException('non-nullable metadata cannot be null'); + } + + $this->container['metadata'] = $metadata; + + return $this; + } + + /** + * Gets signing_options + * + * @return SubSigningOptions|null + */ + public function getSigningOptions() + { + return $this->container['signing_options']; + } + + /** + * Sets signing_options + * + * @param SubSigningOptions|null $signing_options signing_options + * + * @return self + */ + public function setSigningOptions(?SubSigningOptions $signing_options) + { + if (is_null($signing_options)) { + throw new InvalidArgumentException('non-nullable signing_options cannot be null'); + } + $this->container['signing_options'] = $signing_options; + + return $this; + } + + /** + * Gets subject + * + * @return string|null + */ + public function getSubject() + { + return $this->container['subject']; + } + + /** + * Sets subject + * + * @param string|null $subject the subject in the email that will be sent to the signers + * + * @return self + */ + public function setSubject(?string $subject) + { + if (is_null($subject)) { + throw new InvalidArgumentException('non-nullable subject cannot be null'); + } + if (mb_strlen($subject) > 255) { + throw new InvalidArgumentException('invalid length for $subject when calling SignatureRequestEditEmbeddedRequest., must be smaller than or equal to 255.'); + } + + $this->container['subject'] = $subject; + + return $this; + } + + /** + * Gets test_mode + * + * @return bool|null + */ + public function getTestMode() + { + return $this->container['test_mode']; + } + + /** + * Sets test_mode + * + * @param bool|null $test_mode Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + * + * @return self + */ + public function setTestMode(?bool $test_mode) + { + if (is_null($test_mode)) { + throw new InvalidArgumentException('non-nullable test_mode cannot be null'); + } + $this->container['test_mode'] = $test_mode; + + return $this; + } + + /** + * Gets title + * + * @return string|null + */ + public function getTitle() + { + return $this->container['title']; + } + + /** + * Sets title + * + * @param string|null $title the title you want to assign to the SignatureRequest + * + * @return self + */ + public function setTitle(?string $title) + { + if (is_null($title)) { + throw new InvalidArgumentException('non-nullable title cannot be null'); + } + if (mb_strlen($title) > 255) { + throw new InvalidArgumentException('invalid length for $title when calling SignatureRequestEditEmbeddedRequest., must be smaller than or equal to 255.'); + } + + $this->container['title'] = $title; + + return $this; + } + + /** + * Gets use_text_tags + * + * @return bool|null + */ + public function getUseTextTags() + { + return $this->container['use_text_tags']; + } + + /** + * Sets use_text_tags + * + * @param bool|null $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`. + * + * @return self + */ + public function setUseTextTags(?bool $use_text_tags) + { + if (is_null($use_text_tags)) { + throw new InvalidArgumentException('non-nullable use_text_tags cannot be null'); + } + $this->container['use_text_tags'] = $use_text_tags; + + return $this; + } + + /** + * Gets populate_auto_fill_fields + * + * @return bool|null + */ + public function getPopulateAutoFillFields() + { + return $this->container['populate_auto_fill_fields']; + } + + /** + * Sets populate_auto_fill_fields + * + * @param bool|null $populate_auto_fill_fields 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. + * + * @return self + */ + public function setPopulateAutoFillFields(?bool $populate_auto_fill_fields) + { + if (is_null($populate_auto_fill_fields)) { + throw new InvalidArgumentException('non-nullable populate_auto_fill_fields cannot be null'); + } + $this->container['populate_auto_fill_fields'] = $populate_auto_fill_fields; + + return $this; + } + + /** + * Gets expires_at + * + * @return int|null + */ + public function getExpiresAt() + { + return $this->container['expires_at']; + } + + /** + * Sets expires_at + * + * @param int|null $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. + * + * @return self + */ + public function setExpiresAt(?int $expires_at) + { + if (is_null($expires_at)) { + array_push($this->openAPINullablesSetToNull, 'expires_at'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('expires_at', $nullablesSetToNull); + if ($index !== false) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['expires_at'] = $expires_at; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + */ + #[ReturnTypeWillChange] + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + */ + #[ReturnTypeWillChange] + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + */ + #[ReturnTypeWillChange] + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @see https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource + */ + #[ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_UNESCAPED_SLASHES + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/src/Model/SignatureRequestEditEmbeddedWithTemplateRequest.php b/src/Model/SignatureRequestEditEmbeddedWithTemplateRequest.php new file mode 100644 index 0000000..ac58ec0 --- /dev/null +++ b/src/Model/SignatureRequestEditEmbeddedWithTemplateRequest.php @@ -0,0 +1,924 @@ + + */ +class SignatureRequestEditEmbeddedWithTemplateRequest implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'SignatureRequestEditEmbeddedWithTemplateRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'template_ids' => 'string[]', + 'client_id' => 'string', + 'signers' => '\Dropbox\Sign\Model\SubSignatureRequestTemplateSigner[]', + 'allow_decline' => 'bool', + 'ccs' => '\Dropbox\Sign\Model\SubCC[]', + 'custom_fields' => '\Dropbox\Sign\Model\SubCustomField[]', + 'files' => '\SplFileObject[]', + 'file_urls' => 'string[]', + 'message' => 'string', + 'metadata' => 'array', + 'signing_options' => '\Dropbox\Sign\Model\SubSigningOptions', + 'subject' => 'string', + 'test_mode' => 'bool', + 'title' => 'string', + 'populate_auto_fill_fields' => 'bool', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'template_ids' => null, + 'client_id' => null, + 'signers' => null, + 'allow_decline' => null, + 'ccs' => null, + 'custom_fields' => null, + 'files' => 'binary', + 'file_urls' => null, + 'message' => null, + 'metadata' => null, + 'signing_options' => null, + 'subject' => null, + 'test_mode' => null, + 'title' => null, + 'populate_auto_fill_fields' => null, + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ + protected static array $openAPINullables = [ + 'template_ids' => false, + 'client_id' => false, + 'signers' => false, + 'allow_decline' => false, + 'ccs' => false, + 'custom_fields' => false, + 'files' => false, + 'file_urls' => false, + 'message' => false, + 'metadata' => false, + 'signing_options' => false, + 'subject' => false, + 'test_mode' => false, + 'title' => false, + 'populate_auto_fill_fields' => false, + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return bool[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'template_ids' => 'template_ids', + 'client_id' => 'client_id', + 'signers' => 'signers', + 'allow_decline' => 'allow_decline', + 'ccs' => 'ccs', + 'custom_fields' => 'custom_fields', + 'files' => 'files', + 'file_urls' => 'file_urls', + 'message' => 'message', + 'metadata' => 'metadata', + 'signing_options' => 'signing_options', + 'subject' => 'subject', + 'test_mode' => 'test_mode', + 'title' => 'title', + 'populate_auto_fill_fields' => 'populate_auto_fill_fields', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'template_ids' => 'setTemplateIds', + 'client_id' => 'setClientId', + 'signers' => 'setSigners', + 'allow_decline' => 'setAllowDecline', + 'ccs' => 'setCcs', + 'custom_fields' => 'setCustomFields', + 'files' => 'setFiles', + 'file_urls' => 'setFileUrls', + 'message' => 'setMessage', + 'metadata' => 'setMetadata', + 'signing_options' => 'setSigningOptions', + 'subject' => 'setSubject', + 'test_mode' => 'setTestMode', + 'title' => 'setTitle', + 'populate_auto_fill_fields' => 'setPopulateAutoFillFields', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'template_ids' => 'getTemplateIds', + 'client_id' => 'getClientId', + 'signers' => 'getSigners', + 'allow_decline' => 'getAllowDecline', + 'ccs' => 'getCcs', + 'custom_fields' => 'getCustomFields', + 'files' => 'getFiles', + 'file_urls' => 'getFileUrls', + 'message' => 'getMessage', + 'metadata' => 'getMetadata', + 'signing_options' => 'getSigningOptions', + 'subject' => 'getSubject', + 'test_mode' => 'getTestMode', + 'title' => 'getTitle', + 'populate_auto_fill_fields' => 'getPopulateAutoFillFields', + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('template_ids', $data ?? [], null); + $this->setIfExists('client_id', $data ?? [], null); + $this->setIfExists('signers', $data ?? [], null); + $this->setIfExists('allow_decline', $data ?? [], false); + $this->setIfExists('ccs', $data ?? [], null); + $this->setIfExists('custom_fields', $data ?? [], null); + $this->setIfExists('files', $data ?? [], null); + $this->setIfExists('file_urls', $data ?? [], null); + $this->setIfExists('message', $data ?? [], null); + $this->setIfExists('metadata', $data ?? [], null); + $this->setIfExists('signing_options', $data ?? [], null); + $this->setIfExists('subject', $data ?? [], null); + $this->setIfExists('test_mode', $data ?? [], false); + $this->setIfExists('title', $data ?? [], null); + $this->setIfExists('populate_auto_fill_fields', $data ?? [], false); + } + + /** + * @deprecated use ::init() + */ + public static function fromArray(array $data): SignatureRequestEditEmbeddedWithTemplateRequest + { + return self::init($data); + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + */ + public static function init(array $data): SignatureRequestEditEmbeddedWithTemplateRequest + { + /** @var SignatureRequestEditEmbeddedWithTemplateRequest */ + return ObjectSerializer::deserialize( + $data, + SignatureRequestEditEmbeddedWithTemplateRequest::class, + ); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string|int|object|array|mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['template_ids'] === null) { + $invalidProperties[] = "'template_ids' can't be null"; + } + if ($this->container['client_id'] === null) { + $invalidProperties[] = "'client_id' can't be null"; + } + if ($this->container['signers'] === null) { + $invalidProperties[] = "'signers' can't be null"; + } + if (!is_null($this->container['message']) && (mb_strlen($this->container['message']) > 5000)) { + $invalidProperties[] = "invalid value for 'message', the character length must be smaller than or equal to 5000."; + } + + if (!is_null($this->container['subject']) && (mb_strlen($this->container['subject']) > 255)) { + $invalidProperties[] = "invalid value for 'subject', the character length must be smaller than or equal to 255."; + } + + if (!is_null($this->container['title']) && (mb_strlen($this->container['title']) > 255)) { + $invalidProperties[] = "invalid value for 'title', the character length must be smaller than or equal to 255."; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets template_ids + * + * @return string[] + */ + public function getTemplateIds() + { + return $this->container['template_ids']; + } + + /** + * Sets template_ids + * + * @param string[] $template_ids use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used + * + * @return self + */ + public function setTemplateIds(array $template_ids) + { + if (is_null($template_ids)) { + throw new InvalidArgumentException('non-nullable template_ids cannot be null'); + } + $this->container['template_ids'] = $template_ids; + + return $this; + } + + /** + * Gets client_id + * + * @return string + */ + public function getClientId() + { + return $this->container['client_id']; + } + + /** + * Sets client_id + * + * @param string $client_id Client id of the app you're using to create this embedded signature request. Used for security purposes. + * + * @return self + */ + public function setClientId(string $client_id) + { + if (is_null($client_id)) { + throw new InvalidArgumentException('non-nullable client_id cannot be null'); + } + $this->container['client_id'] = $client_id; + + return $this; + } + + /** + * Gets signers + * + * @return SubSignatureRequestTemplateSigner[] + */ + public function getSigners() + { + return $this->container['signers']; + } + + /** + * Sets signers + * + * @param SubSignatureRequestTemplateSigner[] $signers add Signers to your Templated-based Signature Request + * + * @return self + */ + public function setSigners(array $signers) + { + if (is_null($signers)) { + throw new InvalidArgumentException('non-nullable signers cannot be null'); + } + $this->container['signers'] = $signers; + + return $this; + } + + /** + * Gets allow_decline + * + * @return bool|null + */ + public function getAllowDecline() + { + return $this->container['allow_decline']; + } + + /** + * Sets allow_decline + * + * @param bool|null $allow_decline Allows signers to decline to sign a document if `true`. Defaults to `false`. + * + * @return self + */ + public function setAllowDecline(?bool $allow_decline) + { + if (is_null($allow_decline)) { + throw new InvalidArgumentException('non-nullable allow_decline cannot be null'); + } + $this->container['allow_decline'] = $allow_decline; + + return $this; + } + + /** + * Gets ccs + * + * @return SubCC[]|null + */ + public function getCcs() + { + return $this->container['ccs']; + } + + /** + * Sets ccs + * + * @param SubCC[]|null $ccs Add CC email recipients. Required when a CC role exists for the Template. + * + * @return self + */ + public function setCcs(?array $ccs) + { + if (is_null($ccs)) { + throw new InvalidArgumentException('non-nullable ccs cannot be null'); + } + $this->container['ccs'] = $ccs; + + return $this; + } + + /** + * Gets custom_fields + * + * @return SubCustomField[]|null + */ + public function getCustomFields() + { + return $this->container['custom_fields']; + } + + /** + * Sets custom_fields + * + * @param SubCustomField[]|null $custom_fields An array defining values and options for custom fields. Required when a custom field exists in the Template. + * + * @return self + */ + public function setCustomFields(?array $custom_fields) + { + if (is_null($custom_fields)) { + throw new InvalidArgumentException('non-nullable custom_fields cannot be null'); + } + $this->container['custom_fields'] = $custom_fields; + + return $this; + } + + /** + * Gets files + * + * @return SplFileObject[]|null + */ + public function getFiles() + { + return $this->container['files']; + } + + /** + * Sets files + * + * @param SplFileObject[]|null $files Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + * + * @return self + */ + public function setFiles(?array $files) + { + if (is_null($files)) { + throw new InvalidArgumentException('non-nullable files cannot be null'); + } + $this->container['files'] = $files; + + return $this; + } + + /** + * Gets file_urls + * + * @return string[]|null + */ + public function getFileUrls() + { + return $this->container['file_urls']; + } + + /** + * Sets file_urls + * + * @param string[]|null $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. + * + * @return self + */ + public function setFileUrls(?array $file_urls) + { + if (is_null($file_urls)) { + throw new InvalidArgumentException('non-nullable file_urls cannot be null'); + } + $this->container['file_urls'] = $file_urls; + + return $this; + } + + /** + * Gets message + * + * @return string|null + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string|null $message the custom message in the email that will be sent to the signers + * + * @return self + */ + public function setMessage(?string $message) + { + if (is_null($message)) { + throw new InvalidArgumentException('non-nullable message cannot be null'); + } + if (mb_strlen($message) > 5000) { + throw new InvalidArgumentException('invalid length for $message when calling SignatureRequestEditEmbeddedWithTemplateRequest., must be smaller than or equal to 5000.'); + } + + $this->container['message'] = $message; + + return $this; + } + + /** + * Gets metadata + * + * @return array|null + */ + public function getMetadata() + { + return $this->container['metadata']; + } + + /** + * Sets metadata + * + * @param array|null $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. + * + * @return self + */ + public function setMetadata(?array $metadata) + { + if (is_null($metadata)) { + throw new InvalidArgumentException('non-nullable metadata cannot be null'); + } + + $this->container['metadata'] = $metadata; + + return $this; + } + + /** + * Gets signing_options + * + * @return SubSigningOptions|null + */ + public function getSigningOptions() + { + return $this->container['signing_options']; + } + + /** + * Sets signing_options + * + * @param SubSigningOptions|null $signing_options signing_options + * + * @return self + */ + public function setSigningOptions(?SubSigningOptions $signing_options) + { + if (is_null($signing_options)) { + throw new InvalidArgumentException('non-nullable signing_options cannot be null'); + } + $this->container['signing_options'] = $signing_options; + + return $this; + } + + /** + * Gets subject + * + * @return string|null + */ + public function getSubject() + { + return $this->container['subject']; + } + + /** + * Sets subject + * + * @param string|null $subject the subject in the email that will be sent to the signers + * + * @return self + */ + public function setSubject(?string $subject) + { + if (is_null($subject)) { + throw new InvalidArgumentException('non-nullable subject cannot be null'); + } + if (mb_strlen($subject) > 255) { + throw new InvalidArgumentException('invalid length for $subject when calling SignatureRequestEditEmbeddedWithTemplateRequest., must be smaller than or equal to 255.'); + } + + $this->container['subject'] = $subject; + + return $this; + } + + /** + * Gets test_mode + * + * @return bool|null + */ + public function getTestMode() + { + return $this->container['test_mode']; + } + + /** + * Sets test_mode + * + * @param bool|null $test_mode Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + * + * @return self + */ + public function setTestMode(?bool $test_mode) + { + if (is_null($test_mode)) { + throw new InvalidArgumentException('non-nullable test_mode cannot be null'); + } + $this->container['test_mode'] = $test_mode; + + return $this; + } + + /** + * Gets title + * + * @return string|null + */ + public function getTitle() + { + return $this->container['title']; + } + + /** + * Sets title + * + * @param string|null $title the title you want to assign to the SignatureRequest + * + * @return self + */ + public function setTitle(?string $title) + { + if (is_null($title)) { + throw new InvalidArgumentException('non-nullable title cannot be null'); + } + if (mb_strlen($title) > 255) { + throw new InvalidArgumentException('invalid length for $title when calling SignatureRequestEditEmbeddedWithTemplateRequest., must be smaller than or equal to 255.'); + } + + $this->container['title'] = $title; + + return $this; + } + + /** + * Gets populate_auto_fill_fields + * + * @return bool|null + */ + public function getPopulateAutoFillFields() + { + return $this->container['populate_auto_fill_fields']; + } + + /** + * Sets populate_auto_fill_fields + * + * @param bool|null $populate_auto_fill_fields 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. + * + * @return self + */ + public function setPopulateAutoFillFields(?bool $populate_auto_fill_fields) + { + if (is_null($populate_auto_fill_fields)) { + throw new InvalidArgumentException('non-nullable populate_auto_fill_fields cannot be null'); + } + $this->container['populate_auto_fill_fields'] = $populate_auto_fill_fields; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + */ + #[ReturnTypeWillChange] + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + */ + #[ReturnTypeWillChange] + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + */ + #[ReturnTypeWillChange] + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @see https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource + */ + #[ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_UNESCAPED_SLASHES + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/src/Model/SignatureRequestEditRequest.php b/src/Model/SignatureRequestEditRequest.php new file mode 100644 index 0000000..131a3e4 --- /dev/null +++ b/src/Model/SignatureRequestEditRequest.php @@ -0,0 +1,1262 @@ + + */ +class SignatureRequestEditRequest implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'SignatureRequestEditRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'files' => '\SplFileObject[]', + 'file_urls' => 'string[]', + 'signers' => '\Dropbox\Sign\Model\SubSignatureRequestSigner[]', + 'grouped_signers' => '\Dropbox\Sign\Model\SubSignatureRequestGroupedSigners[]', + 'allow_decline' => 'bool', + 'allow_reassign' => 'bool', + 'attachments' => '\Dropbox\Sign\Model\SubAttachment[]', + 'cc_email_addresses' => 'string[]', + 'client_id' => 'string', + 'custom_fields' => '\Dropbox\Sign\Model\SubCustomField[]', + 'field_options' => '\Dropbox\Sign\Model\SubFieldOptions', + 'form_field_groups' => '\Dropbox\Sign\Model\SubFormFieldGroup[]', + 'form_field_rules' => '\Dropbox\Sign\Model\SubFormFieldRule[]', + 'form_fields_per_document' => '\Dropbox\Sign\Model\SubFormFieldsPerDocumentBase[]', + 'hide_text_tags' => 'bool', + 'is_eid' => 'bool', + 'message' => 'string', + 'metadata' => 'array', + 'signing_options' => '\Dropbox\Sign\Model\SubSigningOptions', + 'signing_redirect_url' => 'string', + 'subject' => 'string', + 'test_mode' => 'bool', + 'title' => 'string', + 'use_text_tags' => 'bool', + 'expires_at' => 'int', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'files' => 'binary', + 'file_urls' => null, + 'signers' => null, + 'grouped_signers' => null, + 'allow_decline' => null, + 'allow_reassign' => null, + 'attachments' => null, + 'cc_email_addresses' => 'email', + 'client_id' => null, + 'custom_fields' => null, + 'field_options' => null, + 'form_field_groups' => null, + 'form_field_rules' => null, + 'form_fields_per_document' => null, + 'hide_text_tags' => null, + 'is_eid' => null, + 'message' => null, + 'metadata' => null, + 'signing_options' => null, + 'signing_redirect_url' => null, + 'subject' => null, + 'test_mode' => null, + 'title' => null, + 'use_text_tags' => null, + 'expires_at' => null, + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ + protected static array $openAPINullables = [ + 'files' => false, + 'file_urls' => false, + 'signers' => false, + 'grouped_signers' => false, + 'allow_decline' => false, + 'allow_reassign' => false, + 'attachments' => false, + 'cc_email_addresses' => false, + 'client_id' => false, + 'custom_fields' => false, + 'field_options' => false, + 'form_field_groups' => false, + 'form_field_rules' => false, + 'form_fields_per_document' => false, + 'hide_text_tags' => false, + 'is_eid' => false, + 'message' => false, + 'metadata' => false, + 'signing_options' => false, + 'signing_redirect_url' => false, + 'subject' => false, + 'test_mode' => false, + 'title' => false, + 'use_text_tags' => false, + 'expires_at' => true, + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return bool[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + '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_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', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'files' => 'setFiles', + 'file_urls' => 'setFileUrls', + 'signers' => 'setSigners', + 'grouped_signers' => 'setGroupedSigners', + 'allow_decline' => 'setAllowDecline', + 'allow_reassign' => 'setAllowReassign', + 'attachments' => 'setAttachments', + 'cc_email_addresses' => 'setCcEmailAddresses', + 'client_id' => 'setClientId', + 'custom_fields' => 'setCustomFields', + 'field_options' => 'setFieldOptions', + 'form_field_groups' => 'setFormFieldGroups', + 'form_field_rules' => 'setFormFieldRules', + 'form_fields_per_document' => 'setFormFieldsPerDocument', + 'hide_text_tags' => 'setHideTextTags', + 'is_eid' => 'setIsEid', + 'message' => 'setMessage', + 'metadata' => 'setMetadata', + 'signing_options' => 'setSigningOptions', + 'signing_redirect_url' => 'setSigningRedirectUrl', + 'subject' => 'setSubject', + 'test_mode' => 'setTestMode', + 'title' => 'setTitle', + 'use_text_tags' => 'setUseTextTags', + 'expires_at' => 'setExpiresAt', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'files' => 'getFiles', + 'file_urls' => 'getFileUrls', + 'signers' => 'getSigners', + 'grouped_signers' => 'getGroupedSigners', + 'allow_decline' => 'getAllowDecline', + 'allow_reassign' => 'getAllowReassign', + 'attachments' => 'getAttachments', + 'cc_email_addresses' => 'getCcEmailAddresses', + 'client_id' => 'getClientId', + 'custom_fields' => 'getCustomFields', + 'field_options' => 'getFieldOptions', + 'form_field_groups' => 'getFormFieldGroups', + 'form_field_rules' => 'getFormFieldRules', + 'form_fields_per_document' => 'getFormFieldsPerDocument', + 'hide_text_tags' => 'getHideTextTags', + 'is_eid' => 'getIsEid', + 'message' => 'getMessage', + 'metadata' => 'getMetadata', + 'signing_options' => 'getSigningOptions', + 'signing_redirect_url' => 'getSigningRedirectUrl', + 'subject' => 'getSubject', + 'test_mode' => 'getTestMode', + 'title' => 'getTitle', + 'use_text_tags' => 'getUseTextTags', + 'expires_at' => 'getExpiresAt', + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('files', $data ?? [], null); + $this->setIfExists('file_urls', $data ?? [], null); + $this->setIfExists('signers', $data ?? [], null); + $this->setIfExists('grouped_signers', $data ?? [], null); + $this->setIfExists('allow_decline', $data ?? [], false); + $this->setIfExists('allow_reassign', $data ?? [], false); + $this->setIfExists('attachments', $data ?? [], null); + $this->setIfExists('cc_email_addresses', $data ?? [], null); + $this->setIfExists('client_id', $data ?? [], null); + $this->setIfExists('custom_fields', $data ?? [], null); + $this->setIfExists('field_options', $data ?? [], null); + $this->setIfExists('form_field_groups', $data ?? [], null); + $this->setIfExists('form_field_rules', $data ?? [], null); + $this->setIfExists('form_fields_per_document', $data ?? [], null); + $this->setIfExists('hide_text_tags', $data ?? [], false); + $this->setIfExists('is_eid', $data ?? [], false); + $this->setIfExists('message', $data ?? [], null); + $this->setIfExists('metadata', $data ?? [], null); + $this->setIfExists('signing_options', $data ?? [], null); + $this->setIfExists('signing_redirect_url', $data ?? [], null); + $this->setIfExists('subject', $data ?? [], null); + $this->setIfExists('test_mode', $data ?? [], false); + $this->setIfExists('title', $data ?? [], null); + $this->setIfExists('use_text_tags', $data ?? [], false); + $this->setIfExists('expires_at', $data ?? [], null); + } + + /** + * @deprecated use ::init() + */ + public static function fromArray(array $data): SignatureRequestEditRequest + { + return self::init($data); + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + */ + public static function init(array $data): SignatureRequestEditRequest + { + /** @var SignatureRequestEditRequest */ + return ObjectSerializer::deserialize( + $data, + SignatureRequestEditRequest::class, + ); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string|int|object|array|mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if (!is_null($this->container['message']) && (mb_strlen($this->container['message']) > 5000)) { + $invalidProperties[] = "invalid value for 'message', the character length must be smaller than or equal to 5000."; + } + + if (!is_null($this->container['subject']) && (mb_strlen($this->container['subject']) > 255)) { + $invalidProperties[] = "invalid value for 'subject', the character length must be smaller than or equal to 255."; + } + + if (!is_null($this->container['title']) && (mb_strlen($this->container['title']) > 255)) { + $invalidProperties[] = "invalid value for 'title', the character length must be smaller than or equal to 255."; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets files + * + * @return SplFileObject[]|null + */ + public function getFiles() + { + return $this->container['files']; + } + + /** + * Sets files + * + * @param SplFileObject[]|null $files Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + * + * @return self + */ + public function setFiles(?array $files) + { + if (is_null($files)) { + throw new InvalidArgumentException('non-nullable files cannot be null'); + } + $this->container['files'] = $files; + + return $this; + } + + /** + * Gets file_urls + * + * @return string[]|null + */ + public function getFileUrls() + { + return $this->container['file_urls']; + } + + /** + * Sets file_urls + * + * @param string[]|null $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. + * + * @return self + */ + public function setFileUrls(?array $file_urls) + { + if (is_null($file_urls)) { + throw new InvalidArgumentException('non-nullable file_urls cannot be null'); + } + $this->container['file_urls'] = $file_urls; + + return $this; + } + + /** + * Gets signers + * + * @return SubSignatureRequestSigner[]|null + */ + public function getSigners() + { + return $this->container['signers']; + } + + /** + * Sets signers + * + * @param SubSignatureRequestSigner[]|null $signers Add Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. + * + * @return self + */ + public function setSigners(?array $signers) + { + if (is_null($signers)) { + throw new InvalidArgumentException('non-nullable signers cannot be null'); + } + $this->container['signers'] = $signers; + + return $this; + } + + /** + * Gets grouped_signers + * + * @return SubSignatureRequestGroupedSigners[]|null + */ + public function getGroupedSigners() + { + return $this->container['grouped_signers']; + } + + /** + * Sets grouped_signers + * + * @param SubSignatureRequestGroupedSigners[]|null $grouped_signers Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. + * + * @return self + */ + public function setGroupedSigners(?array $grouped_signers) + { + if (is_null($grouped_signers)) { + throw new InvalidArgumentException('non-nullable grouped_signers cannot be null'); + } + $this->container['grouped_signers'] = $grouped_signers; + + return $this; + } + + /** + * Gets allow_decline + * + * @return bool|null + */ + public function getAllowDecline() + { + return $this->container['allow_decline']; + } + + /** + * Sets allow_decline + * + * @param bool|null $allow_decline Allows signers to decline to sign a document if `true`. Defaults to `false`. + * + * @return self + */ + public function setAllowDecline(?bool $allow_decline) + { + if (is_null($allow_decline)) { + throw new InvalidArgumentException('non-nullable allow_decline cannot be null'); + } + $this->container['allow_decline'] = $allow_decline; + + return $this; + } + + /** + * Gets allow_reassign + * + * @return bool|null + */ + public function getAllowReassign() + { + return $this->container['allow_reassign']; + } + + /** + * Sets allow_reassign + * + * @param bool|null $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. + * + * @return self + */ + public function setAllowReassign(?bool $allow_reassign) + { + if (is_null($allow_reassign)) { + throw new InvalidArgumentException('non-nullable allow_reassign cannot be null'); + } + $this->container['allow_reassign'] = $allow_reassign; + + return $this; + } + + /** + * Gets attachments + * + * @return SubAttachment[]|null + */ + public function getAttachments() + { + return $this->container['attachments']; + } + + /** + * Sets attachments + * + * @param SubAttachment[]|null $attachments A list describing the attachments + * + * @return self + */ + public function setAttachments(?array $attachments) + { + if (is_null($attachments)) { + throw new InvalidArgumentException('non-nullable attachments cannot be null'); + } + $this->container['attachments'] = $attachments; + + return $this; + } + + /** + * Gets cc_email_addresses + * + * @return string[]|null + */ + public function getCcEmailAddresses() + { + return $this->container['cc_email_addresses']; + } + + /** + * Sets cc_email_addresses + * + * @param string[]|null $cc_email_addresses the email addresses that should be CCed + * + * @return self + */ + public function setCcEmailAddresses(?array $cc_email_addresses) + { + if (is_null($cc_email_addresses)) { + throw new InvalidArgumentException('non-nullable cc_email_addresses cannot be null'); + } + $this->container['cc_email_addresses'] = $cc_email_addresses; + + return $this; + } + + /** + * Gets client_id + * + * @return string|null + */ + public function getClientId() + { + return $this->container['client_id']; + } + + /** + * Sets client_id + * + * @param string|null $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. + * + * @return self + */ + public function setClientId(?string $client_id) + { + if (is_null($client_id)) { + throw new InvalidArgumentException('non-nullable client_id cannot be null'); + } + $this->container['client_id'] = $client_id; + + return $this; + } + + /** + * Gets custom_fields + * + * @return SubCustomField[]|null + */ + public function getCustomFields() + { + return $this->container['custom_fields']; + } + + /** + * Sets custom_fields + * + * @param SubCustomField[]|null $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. + * + * @return self + */ + public function setCustomFields(?array $custom_fields) + { + if (is_null($custom_fields)) { + throw new InvalidArgumentException('non-nullable custom_fields cannot be null'); + } + $this->container['custom_fields'] = $custom_fields; + + return $this; + } + + /** + * Gets field_options + * + * @return SubFieldOptions|null + */ + public function getFieldOptions() + { + return $this->container['field_options']; + } + + /** + * Sets field_options + * + * @param SubFieldOptions|null $field_options field_options + * + * @return self + */ + public function setFieldOptions(?SubFieldOptions $field_options) + { + if (is_null($field_options)) { + throw new InvalidArgumentException('non-nullable field_options cannot be null'); + } + $this->container['field_options'] = $field_options; + + return $this; + } + + /** + * Gets form_field_groups + * + * @return SubFormFieldGroup[]|null + */ + public function getFormFieldGroups() + { + return $this->container['form_field_groups']; + } + + /** + * Sets form_field_groups + * + * @param SubFormFieldGroup[]|null $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`. + * + * @return self + */ + public function setFormFieldGroups(?array $form_field_groups) + { + if (is_null($form_field_groups)) { + throw new InvalidArgumentException('non-nullable form_field_groups cannot be null'); + } + $this->container['form_field_groups'] = $form_field_groups; + + return $this; + } + + /** + * Gets form_field_rules + * + * @return SubFormFieldRule[]|null + */ + public function getFormFieldRules() + { + return $this->container['form_field_rules']; + } + + /** + * Sets form_field_rules + * + * @param SubFormFieldRule[]|null $form_field_rules conditional Logic rules for fields defined in `form_fields_per_document` + * + * @return self + */ + public function setFormFieldRules(?array $form_field_rules) + { + if (is_null($form_field_rules)) { + throw new InvalidArgumentException('non-nullable form_field_rules cannot be null'); + } + $this->container['form_field_rules'] = $form_field_rules; + + return $this; + } + + /** + * Gets form_fields_per_document + * + * @return SubFormFieldsPerDocumentBase[]|null + */ + public function getFormFieldsPerDocument() + { + return $this->container['form_fields_per_document']; + } + + /** + * Sets form_fields_per_document + * + * @param SubFormFieldsPerDocumentBase[]|null $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` + * + * @return self + */ + public function setFormFieldsPerDocument(?array $form_fields_per_document) + { + if (is_null($form_fields_per_document)) { + throw new InvalidArgumentException('non-nullable form_fields_per_document cannot be null'); + } + $this->container['form_fields_per_document'] = $form_fields_per_document; + + return $this; + } + + /** + * Gets hide_text_tags + * + * @return bool|null + */ + public function getHideTextTags() + { + return $this->container['hide_text_tags']; + } + + /** + * Sets hide_text_tags + * + * @param bool|null $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. + * + * @return self + */ + public function setHideTextTags(?bool $hide_text_tags) + { + if (is_null($hide_text_tags)) { + throw new InvalidArgumentException('non-nullable hide_text_tags cannot be null'); + } + $this->container['hide_text_tags'] = $hide_text_tags; + + return $this; + } + + /** + * Gets is_eid + * + * @return bool|null + */ + public function getIsEid() + { + return $this->container['is_eid']; + } + + /** + * Sets is_eid + * + * @param bool|null $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. + * + * @return self + */ + public function setIsEid(?bool $is_eid) + { + if (is_null($is_eid)) { + throw new InvalidArgumentException('non-nullable is_eid cannot be null'); + } + $this->container['is_eid'] = $is_eid; + + return $this; + } + + /** + * Gets message + * + * @return string|null + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string|null $message the custom message in the email that will be sent to the signers + * + * @return self + */ + public function setMessage(?string $message) + { + if (is_null($message)) { + throw new InvalidArgumentException('non-nullable message cannot be null'); + } + if (mb_strlen($message) > 5000) { + throw new InvalidArgumentException('invalid length for $message when calling SignatureRequestEditRequest., must be smaller than or equal to 5000.'); + } + + $this->container['message'] = $message; + + return $this; + } + + /** + * Gets metadata + * + * @return array|null + */ + public function getMetadata() + { + return $this->container['metadata']; + } + + /** + * Sets metadata + * + * @param array|null $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. + * + * @return self + */ + public function setMetadata(?array $metadata) + { + if (is_null($metadata)) { + throw new InvalidArgumentException('non-nullable metadata cannot be null'); + } + + $this->container['metadata'] = $metadata; + + return $this; + } + + /** + * Gets signing_options + * + * @return SubSigningOptions|null + */ + public function getSigningOptions() + { + return $this->container['signing_options']; + } + + /** + * Sets signing_options + * + * @param SubSigningOptions|null $signing_options signing_options + * + * @return self + */ + public function setSigningOptions(?SubSigningOptions $signing_options) + { + if (is_null($signing_options)) { + throw new InvalidArgumentException('non-nullable signing_options cannot be null'); + } + $this->container['signing_options'] = $signing_options; + + return $this; + } + + /** + * Gets signing_redirect_url + * + * @return string|null + */ + public function getSigningRedirectUrl() + { + return $this->container['signing_redirect_url']; + } + + /** + * Sets signing_redirect_url + * + * @param string|null $signing_redirect_url the URL you want signers redirected to after they successfully sign + * + * @return self + */ + public function setSigningRedirectUrl(?string $signing_redirect_url) + { + if (is_null($signing_redirect_url)) { + throw new InvalidArgumentException('non-nullable signing_redirect_url cannot be null'); + } + $this->container['signing_redirect_url'] = $signing_redirect_url; + + return $this; + } + + /** + * Gets subject + * + * @return string|null + */ + public function getSubject() + { + return $this->container['subject']; + } + + /** + * Sets subject + * + * @param string|null $subject the subject in the email that will be sent to the signers + * + * @return self + */ + public function setSubject(?string $subject) + { + if (is_null($subject)) { + throw new InvalidArgumentException('non-nullable subject cannot be null'); + } + if (mb_strlen($subject) > 255) { + throw new InvalidArgumentException('invalid length for $subject when calling SignatureRequestEditRequest., must be smaller than or equal to 255.'); + } + + $this->container['subject'] = $subject; + + return $this; + } + + /** + * Gets test_mode + * + * @return bool|null + */ + public function getTestMode() + { + return $this->container['test_mode']; + } + + /** + * Sets test_mode + * + * @param bool|null $test_mode Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + * + * @return self + */ + public function setTestMode(?bool $test_mode) + { + if (is_null($test_mode)) { + throw new InvalidArgumentException('non-nullable test_mode cannot be null'); + } + $this->container['test_mode'] = $test_mode; + + return $this; + } + + /** + * Gets title + * + * @return string|null + */ + public function getTitle() + { + return $this->container['title']; + } + + /** + * Sets title + * + * @param string|null $title the title you want to assign to the SignatureRequest + * + * @return self + */ + public function setTitle(?string $title) + { + if (is_null($title)) { + throw new InvalidArgumentException('non-nullable title cannot be null'); + } + if (mb_strlen($title) > 255) { + throw new InvalidArgumentException('invalid length for $title when calling SignatureRequestEditRequest., must be smaller than or equal to 255.'); + } + + $this->container['title'] = $title; + + return $this; + } + + /** + * Gets use_text_tags + * + * @return bool|null + */ + public function getUseTextTags() + { + return $this->container['use_text_tags']; + } + + /** + * Sets use_text_tags + * + * @param bool|null $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`. + * + * @return self + */ + public function setUseTextTags(?bool $use_text_tags) + { + if (is_null($use_text_tags)) { + throw new InvalidArgumentException('non-nullable use_text_tags cannot be null'); + } + $this->container['use_text_tags'] = $use_text_tags; + + return $this; + } + + /** + * Gets expires_at + * + * @return int|null + */ + public function getExpiresAt() + { + return $this->container['expires_at']; + } + + /** + * Sets expires_at + * + * @param int|null $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. + * + * @return self + */ + public function setExpiresAt(?int $expires_at) + { + if (is_null($expires_at)) { + array_push($this->openAPINullablesSetToNull, 'expires_at'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('expires_at', $nullablesSetToNull); + if ($index !== false) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['expires_at'] = $expires_at; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + */ + #[ReturnTypeWillChange] + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + */ + #[ReturnTypeWillChange] + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + */ + #[ReturnTypeWillChange] + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @see https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource + */ + #[ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_UNESCAPED_SLASHES + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/src/Model/SignatureRequestEditWithTemplateRequest.php b/src/Model/SignatureRequestEditWithTemplateRequest.php new file mode 100644 index 0000000..c7f839f --- /dev/null +++ b/src/Model/SignatureRequestEditWithTemplateRequest.php @@ -0,0 +1,956 @@ + + */ +class SignatureRequestEditWithTemplateRequest implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'SignatureRequestEditWithTemplateRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'template_ids' => 'string[]', + 'signers' => '\Dropbox\Sign\Model\SubSignatureRequestTemplateSigner[]', + 'allow_decline' => 'bool', + 'ccs' => '\Dropbox\Sign\Model\SubCC[]', + 'client_id' => 'string', + 'custom_fields' => '\Dropbox\Sign\Model\SubCustomField[]', + 'files' => '\SplFileObject[]', + 'file_urls' => 'string[]', + 'is_eid' => 'bool', + 'message' => 'string', + 'metadata' => 'array', + 'signing_options' => '\Dropbox\Sign\Model\SubSigningOptions', + 'signing_redirect_url' => 'string', + 'subject' => 'string', + 'test_mode' => 'bool', + 'title' => 'string', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'template_ids' => null, + 'signers' => null, + 'allow_decline' => null, + 'ccs' => null, + 'client_id' => null, + 'custom_fields' => null, + 'files' => 'binary', + 'file_urls' => null, + 'is_eid' => null, + 'message' => null, + 'metadata' => null, + 'signing_options' => null, + 'signing_redirect_url' => null, + 'subject' => null, + 'test_mode' => null, + 'title' => null, + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ + protected static array $openAPINullables = [ + 'template_ids' => false, + 'signers' => false, + 'allow_decline' => false, + 'ccs' => false, + 'client_id' => false, + 'custom_fields' => false, + 'files' => false, + 'file_urls' => false, + 'is_eid' => false, + 'message' => false, + 'metadata' => false, + 'signing_options' => false, + 'signing_redirect_url' => false, + 'subject' => false, + 'test_mode' => false, + 'title' => false, + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return bool[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'template_ids' => 'template_ids', + 'signers' => 'signers', + 'allow_decline' => 'allow_decline', + 'ccs' => 'ccs', + 'client_id' => 'client_id', + 'custom_fields' => 'custom_fields', + 'files' => 'files', + 'file_urls' => 'file_urls', + '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', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'template_ids' => 'setTemplateIds', + 'signers' => 'setSigners', + 'allow_decline' => 'setAllowDecline', + 'ccs' => 'setCcs', + 'client_id' => 'setClientId', + 'custom_fields' => 'setCustomFields', + 'files' => 'setFiles', + 'file_urls' => 'setFileUrls', + 'is_eid' => 'setIsEid', + 'message' => 'setMessage', + 'metadata' => 'setMetadata', + 'signing_options' => 'setSigningOptions', + 'signing_redirect_url' => 'setSigningRedirectUrl', + 'subject' => 'setSubject', + 'test_mode' => 'setTestMode', + 'title' => 'setTitle', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'template_ids' => 'getTemplateIds', + 'signers' => 'getSigners', + 'allow_decline' => 'getAllowDecline', + 'ccs' => 'getCcs', + 'client_id' => 'getClientId', + 'custom_fields' => 'getCustomFields', + 'files' => 'getFiles', + 'file_urls' => 'getFileUrls', + 'is_eid' => 'getIsEid', + 'message' => 'getMessage', + 'metadata' => 'getMetadata', + 'signing_options' => 'getSigningOptions', + 'signing_redirect_url' => 'getSigningRedirectUrl', + 'subject' => 'getSubject', + 'test_mode' => 'getTestMode', + 'title' => 'getTitle', + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('template_ids', $data ?? [], null); + $this->setIfExists('signers', $data ?? [], null); + $this->setIfExists('allow_decline', $data ?? [], false); + $this->setIfExists('ccs', $data ?? [], null); + $this->setIfExists('client_id', $data ?? [], null); + $this->setIfExists('custom_fields', $data ?? [], null); + $this->setIfExists('files', $data ?? [], null); + $this->setIfExists('file_urls', $data ?? [], null); + $this->setIfExists('is_eid', $data ?? [], false); + $this->setIfExists('message', $data ?? [], null); + $this->setIfExists('metadata', $data ?? [], null); + $this->setIfExists('signing_options', $data ?? [], null); + $this->setIfExists('signing_redirect_url', $data ?? [], null); + $this->setIfExists('subject', $data ?? [], null); + $this->setIfExists('test_mode', $data ?? [], false); + $this->setIfExists('title', $data ?? [], null); + } + + /** + * @deprecated use ::init() + */ + public static function fromArray(array $data): SignatureRequestEditWithTemplateRequest + { + return self::init($data); + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + */ + public static function init(array $data): SignatureRequestEditWithTemplateRequest + { + /** @var SignatureRequestEditWithTemplateRequest */ + return ObjectSerializer::deserialize( + $data, + SignatureRequestEditWithTemplateRequest::class, + ); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string|int|object|array|mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['template_ids'] === null) { + $invalidProperties[] = "'template_ids' can't be null"; + } + if ($this->container['signers'] === null) { + $invalidProperties[] = "'signers' can't be null"; + } + if (!is_null($this->container['message']) && (mb_strlen($this->container['message']) > 5000)) { + $invalidProperties[] = "invalid value for 'message', the character length must be smaller than or equal to 5000."; + } + + if (!is_null($this->container['subject']) && (mb_strlen($this->container['subject']) > 255)) { + $invalidProperties[] = "invalid value for 'subject', the character length must be smaller than or equal to 255."; + } + + if (!is_null($this->container['title']) && (mb_strlen($this->container['title']) > 255)) { + $invalidProperties[] = "invalid value for 'title', the character length must be smaller than or equal to 255."; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets template_ids + * + * @return string[] + */ + public function getTemplateIds() + { + return $this->container['template_ids']; + } + + /** + * Sets template_ids + * + * @param string[] $template_ids use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used + * + * @return self + */ + public function setTemplateIds(array $template_ids) + { + if (is_null($template_ids)) { + throw new InvalidArgumentException('non-nullable template_ids cannot be null'); + } + $this->container['template_ids'] = $template_ids; + + return $this; + } + + /** + * Gets signers + * + * @return SubSignatureRequestTemplateSigner[] + */ + public function getSigners() + { + return $this->container['signers']; + } + + /** + * Sets signers + * + * @param SubSignatureRequestTemplateSigner[] $signers add Signers to your Templated-based Signature Request + * + * @return self + */ + public function setSigners(array $signers) + { + if (is_null($signers)) { + throw new InvalidArgumentException('non-nullable signers cannot be null'); + } + $this->container['signers'] = $signers; + + return $this; + } + + /** + * Gets allow_decline + * + * @return bool|null + */ + public function getAllowDecline() + { + return $this->container['allow_decline']; + } + + /** + * Sets allow_decline + * + * @param bool|null $allow_decline Allows signers to decline to sign a document if `true`. Defaults to `false`. + * + * @return self + */ + public function setAllowDecline(?bool $allow_decline) + { + if (is_null($allow_decline)) { + throw new InvalidArgumentException('non-nullable allow_decline cannot be null'); + } + $this->container['allow_decline'] = $allow_decline; + + return $this; + } + + /** + * Gets ccs + * + * @return SubCC[]|null + */ + public function getCcs() + { + return $this->container['ccs']; + } + + /** + * Sets ccs + * + * @param SubCC[]|null $ccs Add CC email recipients. Required when a CC role exists for the Template. + * + * @return self + */ + public function setCcs(?array $ccs) + { + if (is_null($ccs)) { + throw new InvalidArgumentException('non-nullable ccs cannot be null'); + } + $this->container['ccs'] = $ccs; + + return $this; + } + + /** + * Gets client_id + * + * @return string|null + */ + public function getClientId() + { + return $this->container['client_id']; + } + + /** + * Sets client_id + * + * @param string|null $client_id Client id of the app to associate with the signature request. Used to apply the branding and callback url defined for the app. + * + * @return self + */ + public function setClientId(?string $client_id) + { + if (is_null($client_id)) { + throw new InvalidArgumentException('non-nullable client_id cannot be null'); + } + $this->container['client_id'] = $client_id; + + return $this; + } + + /** + * Gets custom_fields + * + * @return SubCustomField[]|null + */ + public function getCustomFields() + { + return $this->container['custom_fields']; + } + + /** + * Sets custom_fields + * + * @param SubCustomField[]|null $custom_fields An array defining values and options for custom fields. Required when a custom field exists in the Template. + * + * @return self + */ + public function setCustomFields(?array $custom_fields) + { + if (is_null($custom_fields)) { + throw new InvalidArgumentException('non-nullable custom_fields cannot be null'); + } + $this->container['custom_fields'] = $custom_fields; + + return $this; + } + + /** + * Gets files + * + * @return SplFileObject[]|null + */ + public function getFiles() + { + return $this->container['files']; + } + + /** + * Sets files + * + * @param SplFileObject[]|null $files Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + * + * @return self + */ + public function setFiles(?array $files) + { + if (is_null($files)) { + throw new InvalidArgumentException('non-nullable files cannot be null'); + } + $this->container['files'] = $files; + + return $this; + } + + /** + * Gets file_urls + * + * @return string[]|null + */ + public function getFileUrls() + { + return $this->container['file_urls']; + } + + /** + * Sets file_urls + * + * @param string[]|null $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. + * + * @return self + */ + public function setFileUrls(?array $file_urls) + { + if (is_null($file_urls)) { + throw new InvalidArgumentException('non-nullable file_urls cannot be null'); + } + $this->container['file_urls'] = $file_urls; + + return $this; + } + + /** + * Gets is_eid + * + * @return bool|null + */ + public function getIsEid() + { + return $this->container['is_eid']; + } + + /** + * Sets is_eid + * + * @param bool|null $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. + * + * @return self + */ + public function setIsEid(?bool $is_eid) + { + if (is_null($is_eid)) { + throw new InvalidArgumentException('non-nullable is_eid cannot be null'); + } + $this->container['is_eid'] = $is_eid; + + return $this; + } + + /** + * Gets message + * + * @return string|null + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string|null $message the custom message in the email that will be sent to the signers + * + * @return self + */ + public function setMessage(?string $message) + { + if (is_null($message)) { + throw new InvalidArgumentException('non-nullable message cannot be null'); + } + if (mb_strlen($message) > 5000) { + throw new InvalidArgumentException('invalid length for $message when calling SignatureRequestEditWithTemplateRequest., must be smaller than or equal to 5000.'); + } + + $this->container['message'] = $message; + + return $this; + } + + /** + * Gets metadata + * + * @return array|null + */ + public function getMetadata() + { + return $this->container['metadata']; + } + + /** + * Sets metadata + * + * @param array|null $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. + * + * @return self + */ + public function setMetadata(?array $metadata) + { + if (is_null($metadata)) { + throw new InvalidArgumentException('non-nullable metadata cannot be null'); + } + + $this->container['metadata'] = $metadata; + + return $this; + } + + /** + * Gets signing_options + * + * @return SubSigningOptions|null + */ + public function getSigningOptions() + { + return $this->container['signing_options']; + } + + /** + * Sets signing_options + * + * @param SubSigningOptions|null $signing_options signing_options + * + * @return self + */ + public function setSigningOptions(?SubSigningOptions $signing_options) + { + if (is_null($signing_options)) { + throw new InvalidArgumentException('non-nullable signing_options cannot be null'); + } + $this->container['signing_options'] = $signing_options; + + return $this; + } + + /** + * Gets signing_redirect_url + * + * @return string|null + */ + public function getSigningRedirectUrl() + { + return $this->container['signing_redirect_url']; + } + + /** + * Sets signing_redirect_url + * + * @param string|null $signing_redirect_url the URL you want signers redirected to after they successfully sign + * + * @return self + */ + public function setSigningRedirectUrl(?string $signing_redirect_url) + { + if (is_null($signing_redirect_url)) { + throw new InvalidArgumentException('non-nullable signing_redirect_url cannot be null'); + } + $this->container['signing_redirect_url'] = $signing_redirect_url; + + return $this; + } + + /** + * Gets subject + * + * @return string|null + */ + public function getSubject() + { + return $this->container['subject']; + } + + /** + * Sets subject + * + * @param string|null $subject the subject in the email that will be sent to the signers + * + * @return self + */ + public function setSubject(?string $subject) + { + if (is_null($subject)) { + throw new InvalidArgumentException('non-nullable subject cannot be null'); + } + if (mb_strlen($subject) > 255) { + throw new InvalidArgumentException('invalid length for $subject when calling SignatureRequestEditWithTemplateRequest., must be smaller than or equal to 255.'); + } + + $this->container['subject'] = $subject; + + return $this; + } + + /** + * Gets test_mode + * + * @return bool|null + */ + public function getTestMode() + { + return $this->container['test_mode']; + } + + /** + * Sets test_mode + * + * @param bool|null $test_mode Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + * + * @return self + */ + public function setTestMode(?bool $test_mode) + { + if (is_null($test_mode)) { + throw new InvalidArgumentException('non-nullable test_mode cannot be null'); + } + $this->container['test_mode'] = $test_mode; + + return $this; + } + + /** + * Gets title + * + * @return string|null + */ + public function getTitle() + { + return $this->container['title']; + } + + /** + * Sets title + * + * @param string|null $title the title you want to assign to the SignatureRequest + * + * @return self + */ + public function setTitle(?string $title) + { + if (is_null($title)) { + throw new InvalidArgumentException('non-nullable title cannot be null'); + } + if (mb_strlen($title) > 255) { + throw new InvalidArgumentException('invalid length for $title when calling SignatureRequestEditWithTemplateRequest., must be smaller than or equal to 255.'); + } + + $this->container['title'] = $title; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + */ + #[ReturnTypeWillChange] + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + */ + #[ReturnTypeWillChange] + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + */ + #[ReturnTypeWillChange] + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @see https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource + */ + #[ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_UNESCAPED_SLASHES + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/src/Model/SignatureRequestGetResponse.php b/src/Model/SignatureRequestGetResponse.php index 97f5f7c..d976e49 100644 --- a/src/Model/SignatureRequestGetResponse.php +++ b/src/Model/SignatureRequestGetResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -236,10 +236,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('signature_request', $data ?? [], null); $this->setIfExists('warnings', $data ?? [], null); diff --git a/src/Model/SignatureRequestListResponse.php b/src/Model/SignatureRequestListResponse.php index 6599080..5d9a269 100644 --- a/src/Model/SignatureRequestListResponse.php +++ b/src/Model/SignatureRequestListResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -242,10 +242,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('signature_requests', $data ?? [], null); $this->setIfExists('list_info', $data ?? [], null); diff --git a/src/Model/SignatureRequestRemindRequest.php b/src/Model/SignatureRequestRemindRequest.php index 5662351..1c5eaef 100644 --- a/src/Model/SignatureRequestRemindRequest.php +++ b/src/Model/SignatureRequestRemindRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -236,10 +236,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('email_address', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); diff --git a/src/Model/SignatureRequestResponse.php b/src/Model/SignatureRequestResponse.php index 08442f4..16a8fcc 100644 --- a/src/Model/SignatureRequestResponse.php +++ b/src/Model/SignatureRequestResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -375,10 +375,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('test_mode', $data ?? [], false); $this->setIfExists('signature_request_id', $data ?? [], null); diff --git a/src/Model/SignatureRequestResponseAttachment.php b/src/Model/SignatureRequestResponseAttachment.php index 245930a..8a91a0b 100644 --- a/src/Model/SignatureRequestResponseAttachment.php +++ b/src/Model/SignatureRequestResponseAttachment.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -261,10 +261,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('id', $data ?? [], null); $this->setIfExists('signer', $data ?? [], null); diff --git a/src/Model/SignatureRequestResponseCustomFieldBase.php b/src/Model/SignatureRequestResponseCustomFieldBase.php index bfa753e..9d88d03 100644 --- a/src/Model/SignatureRequestResponseCustomFieldBase.php +++ b/src/Model/SignatureRequestResponseCustomFieldBase.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -255,10 +255,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('type', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); diff --git a/src/Model/SignatureRequestResponseCustomFieldCheckbox.php b/src/Model/SignatureRequestResponseCustomFieldCheckbox.php index d16c804..983134b 100644 --- a/src/Model/SignatureRequestResponseCustomFieldCheckbox.php +++ b/src/Model/SignatureRequestResponseCustomFieldCheckbox.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -228,10 +228,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/src/Model/SignatureRequestResponseCustomFieldText.php b/src/Model/SignatureRequestResponseCustomFieldText.php index 4115fc1..6c4a943 100644 --- a/src/Model/SignatureRequestResponseCustomFieldText.php +++ b/src/Model/SignatureRequestResponseCustomFieldText.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -228,10 +228,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/src/Model/SignatureRequestResponseCustomFieldTypeEnum.php b/src/Model/SignatureRequestResponseCustomFieldTypeEnum.php index c9f4ea0..f441dd5 100644 --- a/src/Model/SignatureRequestResponseCustomFieldTypeEnum.php +++ b/src/Model/SignatureRequestResponseCustomFieldTypeEnum.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** diff --git a/src/Model/SignatureRequestResponseDataBase.php b/src/Model/SignatureRequestResponseDataBase.php index 5f473fe..063b8a1 100644 --- a/src/Model/SignatureRequestResponseDataBase.php +++ b/src/Model/SignatureRequestResponseDataBase.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -255,10 +255,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('api_id', $data ?? [], null); $this->setIfExists('signature_id', $data ?? [], null); diff --git a/src/Model/SignatureRequestResponseDataTypeEnum.php b/src/Model/SignatureRequestResponseDataTypeEnum.php index fd4b6e2..f8768e4 100644 --- a/src/Model/SignatureRequestResponseDataTypeEnum.php +++ b/src/Model/SignatureRequestResponseDataTypeEnum.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** diff --git a/src/Model/SignatureRequestResponseDataValueCheckbox.php b/src/Model/SignatureRequestResponseDataValueCheckbox.php index c64a1fb..e295a3a 100644 --- a/src/Model/SignatureRequestResponseDataValueCheckbox.php +++ b/src/Model/SignatureRequestResponseDataValueCheckbox.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -227,10 +227,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/src/Model/SignatureRequestResponseDataValueCheckboxMerge.php b/src/Model/SignatureRequestResponseDataValueCheckboxMerge.php index 96ac1dd..bb808a6 100644 --- a/src/Model/SignatureRequestResponseDataValueCheckboxMerge.php +++ b/src/Model/SignatureRequestResponseDataValueCheckboxMerge.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -227,10 +227,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/src/Model/SignatureRequestResponseDataValueDateSigned.php b/src/Model/SignatureRequestResponseDataValueDateSigned.php index 78c8794..b422b6f 100644 --- a/src/Model/SignatureRequestResponseDataValueDateSigned.php +++ b/src/Model/SignatureRequestResponseDataValueDateSigned.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -227,10 +227,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/src/Model/SignatureRequestResponseDataValueDropdown.php b/src/Model/SignatureRequestResponseDataValueDropdown.php index 4171a58..e912013 100644 --- a/src/Model/SignatureRequestResponseDataValueDropdown.php +++ b/src/Model/SignatureRequestResponseDataValueDropdown.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -227,10 +227,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/src/Model/SignatureRequestResponseDataValueInitials.php b/src/Model/SignatureRequestResponseDataValueInitials.php index 25ed145..9cd07e0 100644 --- a/src/Model/SignatureRequestResponseDataValueInitials.php +++ b/src/Model/SignatureRequestResponseDataValueInitials.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -233,10 +233,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/src/Model/SignatureRequestResponseDataValueRadio.php b/src/Model/SignatureRequestResponseDataValueRadio.php index 0c05b0b..fcd4570 100644 --- a/src/Model/SignatureRequestResponseDataValueRadio.php +++ b/src/Model/SignatureRequestResponseDataValueRadio.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -227,10 +227,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/src/Model/SignatureRequestResponseDataValueSignature.php b/src/Model/SignatureRequestResponseDataValueSignature.php index b72a8c1..223ca96 100644 --- a/src/Model/SignatureRequestResponseDataValueSignature.php +++ b/src/Model/SignatureRequestResponseDataValueSignature.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -233,10 +233,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/src/Model/SignatureRequestResponseDataValueText.php b/src/Model/SignatureRequestResponseDataValueText.php index f4ddd0f..7c1c97b 100644 --- a/src/Model/SignatureRequestResponseDataValueText.php +++ b/src/Model/SignatureRequestResponseDataValueText.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -227,10 +227,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/src/Model/SignatureRequestResponseDataValueTextMerge.php b/src/Model/SignatureRequestResponseDataValueTextMerge.php index ef64d4b..d8ea246 100644 --- a/src/Model/SignatureRequestResponseDataValueTextMerge.php +++ b/src/Model/SignatureRequestResponseDataValueTextMerge.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -227,10 +227,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/src/Model/SignatureRequestResponseSignatures.php b/src/Model/SignatureRequestResponseSignatures.php index 081ebb6..fa7653f 100644 --- a/src/Model/SignatureRequestResponseSignatures.php +++ b/src/Model/SignatureRequestResponseSignatures.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -339,10 +339,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('signature_id', $data ?? [], null); $this->setIfExists('signer_group_guid', $data ?? [], null); diff --git a/src/Model/SignatureRequestSendRequest.php b/src/Model/SignatureRequestSendRequest.php index 600ee13..f381a8d 100644 --- a/src/Model/SignatureRequestSendRequest.php +++ b/src/Model/SignatureRequestSendRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -381,10 +381,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('files', $data ?? [], null); $this->setIfExists('file_urls', $data ?? [], null); diff --git a/src/Model/SignatureRequestSendWithTemplateRequest.php b/src/Model/SignatureRequestSendWithTemplateRequest.php index c580966..6f4cd28 100644 --- a/src/Model/SignatureRequestSendWithTemplateRequest.php +++ b/src/Model/SignatureRequestSendWithTemplateRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -328,10 +328,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('template_ids', $data ?? [], null); $this->setIfExists('signers', $data ?? [], null); diff --git a/src/Model/SignatureRequestUpdateRequest.php b/src/Model/SignatureRequestUpdateRequest.php index 2a4a33d..c946720 100644 --- a/src/Model/SignatureRequestUpdateRequest.php +++ b/src/Model/SignatureRequestUpdateRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -248,10 +248,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('signature_id', $data ?? [], null); $this->setIfExists('email_address', $data ?? [], null); diff --git a/src/Model/SubAttachment.php b/src/Model/SubAttachment.php index d41f345..ab6bfb5 100644 --- a/src/Model/SubAttachment.php +++ b/src/Model/SubAttachment.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -248,10 +248,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('name', $data ?? [], null); $this->setIfExists('signer_index', $data ?? [], null); diff --git a/src/Model/SubBulkSignerList.php b/src/Model/SubBulkSignerList.php index d9702bb..1ac8d78 100644 --- a/src/Model/SubBulkSignerList.php +++ b/src/Model/SubBulkSignerList.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -236,10 +236,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('custom_fields', $data ?? [], null); $this->setIfExists('signers', $data ?? [], null); diff --git a/src/Model/SubBulkSignerListCustomField.php b/src/Model/SubBulkSignerListCustomField.php index 17f67ac..1f15805 100644 --- a/src/Model/SubBulkSignerListCustomField.php +++ b/src/Model/SubBulkSignerListCustomField.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -236,10 +236,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('name', $data ?? [], null); $this->setIfExists('value', $data ?? [], null); diff --git a/src/Model/SubCC.php b/src/Model/SubCC.php index 0380a38..2febceb 100644 --- a/src/Model/SubCC.php +++ b/src/Model/SubCC.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -236,10 +236,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('role', $data ?? [], null); $this->setIfExists('email_address', $data ?? [], null); diff --git a/src/Model/SubCustomField.php b/src/Model/SubCustomField.php index e853f9e..4cf6ddd 100644 --- a/src/Model/SubCustomField.php +++ b/src/Model/SubCustomField.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -249,10 +249,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('name', $data ?? [], null); $this->setIfExists('editor', $data ?? [], null); diff --git a/src/Model/SubEditorOptions.php b/src/Model/SubEditorOptions.php index cd15d59..dc6d1e5 100644 --- a/src/Model/SubEditorOptions.php +++ b/src/Model/SubEditorOptions.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -237,10 +237,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('allow_edit_signers', $data ?? [], false); $this->setIfExists('allow_edit_documents', $data ?? [], false); diff --git a/src/Model/SubFieldOptions.php b/src/Model/SubFieldOptions.php index 974daa4..a74afbd 100644 --- a/src/Model/SubFieldOptions.php +++ b/src/Model/SubFieldOptions.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -255,10 +255,10 @@ public function getDateFormatAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('date_format', $data ?? [], null); } diff --git a/src/Model/SubFormFieldGroup.php b/src/Model/SubFormFieldGroup.php index 2ff53e1..ba06d9b 100644 --- a/src/Model/SubFormFieldGroup.php +++ b/src/Model/SubFormFieldGroup.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -242,10 +242,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('group_id', $data ?? [], null); $this->setIfExists('group_label', $data ?? [], null); diff --git a/src/Model/SubFormFieldRule.php b/src/Model/SubFormFieldRule.php index 094d821..41c47e6 100644 --- a/src/Model/SubFormFieldRule.php +++ b/src/Model/SubFormFieldRule.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -248,10 +248,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('id', $data ?? [], null); $this->setIfExists('trigger_operator', $data ?? [], 'AND'); diff --git a/src/Model/SubFormFieldRuleAction.php b/src/Model/SubFormFieldRuleAction.php index 458b582..39e7c0c 100644 --- a/src/Model/SubFormFieldRuleAction.php +++ b/src/Model/SubFormFieldRuleAction.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -238,8 +238,10 @@ public function getModelName() return self::$openAPIModelName; } - public const TYPE_FIELD_VISIBILITY = 'change-field-visibility'; - public const TYPE_GROUP_VISIBILITY = 'change-group-visibility'; + public const TYPE_CHANGE_FIELD_VISIBILITY = 'change-field-visibility'; + public const TYPE_FIELD_VISIBILITY = self::TYPE_CHANGE_FIELD_VISIBILITY; + public const TYPE_CHANGE_GROUP_VISIBILITY = 'change-group-visibility'; + public const TYPE_GROUP_VISIBILITY = self::TYPE_CHANGE_GROUP_VISIBILITY; /** * Gets allowable values of the enum @@ -249,8 +251,8 @@ public function getModelName() public function getTypeAllowableValues() { return [ - self::TYPE_FIELD_VISIBILITY, - self::TYPE_GROUP_VISIBILITY, + self::TYPE_CHANGE_FIELD_VISIBILITY, + self::TYPE_CHANGE_GROUP_VISIBILITY, ]; } @@ -264,10 +266,10 @@ public function getTypeAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('hidden', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); diff --git a/src/Model/SubFormFieldRuleTrigger.php b/src/Model/SubFormFieldRuleTrigger.php index 0ab5768..75fecd3 100644 --- a/src/Model/SubFormFieldRuleTrigger.php +++ b/src/Model/SubFormFieldRuleTrigger.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -270,10 +270,10 @@ public function getOperatorAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('id', $data ?? [], null); $this->setIfExists('operator', $data ?? [], null); diff --git a/src/Model/SubFormFieldsPerDocumentBase.php b/src/Model/SubFormFieldsPerDocumentBase.php index 68158bf..085791e 100644 --- a/src/Model/SubFormFieldsPerDocumentBase.php +++ b/src/Model/SubFormFieldsPerDocumentBase.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -291,10 +291,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('document_index', $data ?? [], null); $this->setIfExists('api_id', $data ?? [], null); diff --git a/src/Model/SubFormFieldsPerDocumentCheckbox.php b/src/Model/SubFormFieldsPerDocumentCheckbox.php index c023916..c7610df 100644 --- a/src/Model/SubFormFieldsPerDocumentCheckbox.php +++ b/src/Model/SubFormFieldsPerDocumentCheckbox.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -234,10 +234,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/src/Model/SubFormFieldsPerDocumentCheckboxMerge.php b/src/Model/SubFormFieldsPerDocumentCheckboxMerge.php index c392407..24ddfbf 100644 --- a/src/Model/SubFormFieldsPerDocumentCheckboxMerge.php +++ b/src/Model/SubFormFieldsPerDocumentCheckboxMerge.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -222,10 +222,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/src/Model/SubFormFieldsPerDocumentDateSigned.php b/src/Model/SubFormFieldsPerDocumentDateSigned.php index 5902025..1e917ae 100644 --- a/src/Model/SubFormFieldsPerDocumentDateSigned.php +++ b/src/Model/SubFormFieldsPerDocumentDateSigned.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -278,10 +278,10 @@ public function getFontFamilyAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/src/Model/SubFormFieldsPerDocumentDropdown.php b/src/Model/SubFormFieldsPerDocumentDropdown.php index 121c3eb..f26d663 100644 --- a/src/Model/SubFormFieldsPerDocumentDropdown.php +++ b/src/Model/SubFormFieldsPerDocumentDropdown.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -290,10 +290,10 @@ public function getFontFamilyAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/src/Model/SubFormFieldsPerDocumentFontEnum.php b/src/Model/SubFormFieldsPerDocumentFontEnum.php index bc0eff1..2e9bb51 100644 --- a/src/Model/SubFormFieldsPerDocumentFontEnum.php +++ b/src/Model/SubFormFieldsPerDocumentFontEnum.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** diff --git a/src/Model/SubFormFieldsPerDocumentHyperlink.php b/src/Model/SubFormFieldsPerDocumentHyperlink.php index 924429f..f9c9353 100644 --- a/src/Model/SubFormFieldsPerDocumentHyperlink.php +++ b/src/Model/SubFormFieldsPerDocumentHyperlink.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -290,10 +290,10 @@ public function getFontFamilyAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/src/Model/SubFormFieldsPerDocumentInitials.php b/src/Model/SubFormFieldsPerDocumentInitials.php index cfddb04..d74b4ad 100644 --- a/src/Model/SubFormFieldsPerDocumentInitials.php +++ b/src/Model/SubFormFieldsPerDocumentInitials.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -222,10 +222,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/src/Model/SubFormFieldsPerDocumentRadio.php b/src/Model/SubFormFieldsPerDocumentRadio.php index b506baa..962382c 100644 --- a/src/Model/SubFormFieldsPerDocumentRadio.php +++ b/src/Model/SubFormFieldsPerDocumentRadio.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -234,10 +234,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/src/Model/SubFormFieldsPerDocumentSignature.php b/src/Model/SubFormFieldsPerDocumentSignature.php index 37c6e7a..b4c228b 100644 --- a/src/Model/SubFormFieldsPerDocumentSignature.php +++ b/src/Model/SubFormFieldsPerDocumentSignature.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -222,10 +222,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/src/Model/SubFormFieldsPerDocumentText.php b/src/Model/SubFormFieldsPerDocumentText.php index fa048a1..1cb1f6e 100644 --- a/src/Model/SubFormFieldsPerDocumentText.php +++ b/src/Model/SubFormFieldsPerDocumentText.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -357,10 +357,10 @@ public function getFontFamilyAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/src/Model/SubFormFieldsPerDocumentTextMerge.php b/src/Model/SubFormFieldsPerDocumentTextMerge.php index bfe2242..2f1fb28 100644 --- a/src/Model/SubFormFieldsPerDocumentTextMerge.php +++ b/src/Model/SubFormFieldsPerDocumentTextMerge.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -278,10 +278,10 @@ public function getFontFamilyAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/src/Model/SubFormFieldsPerDocumentTypeEnum.php b/src/Model/SubFormFieldsPerDocumentTypeEnum.php index 4a4294f..47c4c1d 100644 --- a/src/Model/SubFormFieldsPerDocumentTypeEnum.php +++ b/src/Model/SubFormFieldsPerDocumentTypeEnum.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** diff --git a/src/Model/SubMergeField.php b/src/Model/SubMergeField.php index 8631a07..3b72a78 100644 --- a/src/Model/SubMergeField.php +++ b/src/Model/SubMergeField.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -252,10 +252,10 @@ public function getTypeAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('name', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); diff --git a/src/Model/SubOAuth.php b/src/Model/SubOAuth.php index 2bbf855..39c24d8 100644 --- a/src/Model/SubOAuth.php +++ b/src/Model/SubOAuth.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -265,10 +265,10 @@ public function getScopesAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('callback_url', $data ?? [], null); $this->setIfExists('scopes', $data ?? [], null); diff --git a/src/Model/SubOptions.php b/src/Model/SubOptions.php index b86fa5b..4493687 100644 --- a/src/Model/SubOptions.php +++ b/src/Model/SubOptions.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -231,10 +231,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('can_insert_everywhere', $data ?? [], false); } diff --git a/src/Model/SubSignatureRequestGroupedSigners.php b/src/Model/SubSignatureRequestGroupedSigners.php index 2d15bc2..5405a11 100644 --- a/src/Model/SubSignatureRequestGroupedSigners.php +++ b/src/Model/SubSignatureRequestGroupedSigners.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -242,10 +242,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('group', $data ?? [], null); $this->setIfExists('signers', $data ?? [], null); diff --git a/src/Model/SubSignatureRequestSigner.php b/src/Model/SubSignatureRequestSigner.php index 64133e1..23043b1 100644 --- a/src/Model/SubSignatureRequestSigner.php +++ b/src/Model/SubSignatureRequestSigner.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -276,10 +276,10 @@ public function getSmsPhoneNumberTypeAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('name', $data ?? [], null); $this->setIfExists('email_address', $data ?? [], null); diff --git a/src/Model/SubSignatureRequestTemplateSigner.php b/src/Model/SubSignatureRequestTemplateSigner.php index 15070e3..caf7d90 100644 --- a/src/Model/SubSignatureRequestTemplateSigner.php +++ b/src/Model/SubSignatureRequestTemplateSigner.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -276,10 +276,10 @@ public function getSmsPhoneNumberTypeAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('role', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); diff --git a/src/Model/SubSigningOptions.php b/src/Model/SubSigningOptions.php index 8cbaff0..bdb9f4e 100644 --- a/src/Model/SubSigningOptions.php +++ b/src/Model/SubSigningOptions.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -275,10 +275,10 @@ public function getDefaultTypeAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('default_type', $data ?? [], null); $this->setIfExists('draw', $data ?? [], false); diff --git a/src/Model/SubTeamResponse.php b/src/Model/SubTeamResponse.php index 60ecc44..def81af 100644 --- a/src/Model/SubTeamResponse.php +++ b/src/Model/SubTeamResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -236,10 +236,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('team_id', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); diff --git a/src/Model/SubTemplateRole.php b/src/Model/SubTemplateRole.php index 2678da9..489a376 100644 --- a/src/Model/SubTemplateRole.php +++ b/src/Model/SubTemplateRole.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -236,10 +236,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('name', $data ?? [], null); $this->setIfExists('order', $data ?? [], null); diff --git a/src/Model/SubUnclaimedDraftSigner.php b/src/Model/SubUnclaimedDraftSigner.php index acc4663..4d9b3ec 100644 --- a/src/Model/SubUnclaimedDraftSigner.php +++ b/src/Model/SubUnclaimedDraftSigner.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -242,10 +242,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('email_address', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); diff --git a/src/Model/SubUnclaimedDraftTemplateSigner.php b/src/Model/SubUnclaimedDraftTemplateSigner.php index 9daffb1..52544c1 100644 --- a/src/Model/SubUnclaimedDraftTemplateSigner.php +++ b/src/Model/SubUnclaimedDraftTemplateSigner.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -242,10 +242,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('role', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); diff --git a/src/Model/SubWhiteLabelingOptions.php b/src/Model/SubWhiteLabelingOptions.php index 0abcbd1..5eafd34 100644 --- a/src/Model/SubWhiteLabelingOptions.php +++ b/src/Model/SubWhiteLabelingOptions.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -331,10 +331,10 @@ public function getLegalVersionAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('header_background_color', $data ?? [], '#1a1a1a'); $this->setIfExists('legal_version', $data ?? [], 'terms1'); diff --git a/src/Model/TeamAddMemberRequest.php b/src/Model/TeamAddMemberRequest.php index e38abb0..c1fbe01 100644 --- a/src/Model/TeamAddMemberRequest.php +++ b/src/Model/TeamAddMemberRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -262,10 +262,10 @@ public function getRoleAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('account_id', $data ?? [], null); $this->setIfExists('email_address', $data ?? [], null); diff --git a/src/Model/TeamCreateRequest.php b/src/Model/TeamCreateRequest.php index 6ba37cc..791ab93 100644 --- a/src/Model/TeamCreateRequest.php +++ b/src/Model/TeamCreateRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -230,10 +230,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('name', $data ?? [], 'Untitled Team'); } diff --git a/src/Model/TeamGetInfoResponse.php b/src/Model/TeamGetInfoResponse.php index cfac0ef..58c58f6 100644 --- a/src/Model/TeamGetInfoResponse.php +++ b/src/Model/TeamGetInfoResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -236,10 +236,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('team', $data ?? [], null); $this->setIfExists('warnings', $data ?? [], null); diff --git a/src/Model/TeamGetResponse.php b/src/Model/TeamGetResponse.php index 6d23ddc..05624a1 100644 --- a/src/Model/TeamGetResponse.php +++ b/src/Model/TeamGetResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -236,10 +236,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('team', $data ?? [], null); $this->setIfExists('warnings', $data ?? [], null); diff --git a/src/Model/TeamInfoResponse.php b/src/Model/TeamInfoResponse.php index 3d5ad12..7deb94a 100644 --- a/src/Model/TeamInfoResponse.php +++ b/src/Model/TeamInfoResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -254,10 +254,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('team_id', $data ?? [], null); $this->setIfExists('team_parent', $data ?? [], null); diff --git a/src/Model/TeamInviteResponse.php b/src/Model/TeamInviteResponse.php index d37dae0..b9d9165 100644 --- a/src/Model/TeamInviteResponse.php +++ b/src/Model/TeamInviteResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -260,10 +260,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('email_address', $data ?? [], null); $this->setIfExists('team_id', $data ?? [], null); diff --git a/src/Model/TeamInvitesResponse.php b/src/Model/TeamInvitesResponse.php index 31b58b9..5ad2014 100644 --- a/src/Model/TeamInvitesResponse.php +++ b/src/Model/TeamInvitesResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -236,10 +236,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('team_invites', $data ?? [], null); $this->setIfExists('warnings', $data ?? [], null); diff --git a/src/Model/TeamMemberResponse.php b/src/Model/TeamMemberResponse.php index ee61fbd..89141eb 100644 --- a/src/Model/TeamMemberResponse.php +++ b/src/Model/TeamMemberResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -242,10 +242,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('account_id', $data ?? [], null); $this->setIfExists('email_address', $data ?? [], null); diff --git a/src/Model/TeamMembersResponse.php b/src/Model/TeamMembersResponse.php index 681ad9a..87a3fda 100644 --- a/src/Model/TeamMembersResponse.php +++ b/src/Model/TeamMembersResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -242,10 +242,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('team_members', $data ?? [], null); $this->setIfExists('list_info', $data ?? [], null); diff --git a/src/Model/TeamParentResponse.php b/src/Model/TeamParentResponse.php index d0d4472..bfd6cc6 100644 --- a/src/Model/TeamParentResponse.php +++ b/src/Model/TeamParentResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -237,10 +237,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('team_id', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); diff --git a/src/Model/TeamRemoveMemberRequest.php b/src/Model/TeamRemoveMemberRequest.php index 6d74132..6c411d5 100644 --- a/src/Model/TeamRemoveMemberRequest.php +++ b/src/Model/TeamRemoveMemberRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -274,10 +274,10 @@ public function getNewRoleAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('account_id', $data ?? [], null); $this->setIfExists('email_address', $data ?? [], null); diff --git a/src/Model/TeamResponse.php b/src/Model/TeamResponse.php index 402916a..922c408 100644 --- a/src/Model/TeamResponse.php +++ b/src/Model/TeamResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -249,10 +249,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('name', $data ?? [], null); $this->setIfExists('accounts', $data ?? [], null); diff --git a/src/Model/TeamSubTeamsResponse.php b/src/Model/TeamSubTeamsResponse.php index e3e9206..367149d 100644 --- a/src/Model/TeamSubTeamsResponse.php +++ b/src/Model/TeamSubTeamsResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -242,10 +242,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('sub_teams', $data ?? [], null); $this->setIfExists('list_info', $data ?? [], null); diff --git a/src/Model/TeamUpdateRequest.php b/src/Model/TeamUpdateRequest.php index 6606b76..c631146 100644 --- a/src/Model/TeamUpdateRequest.php +++ b/src/Model/TeamUpdateRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -230,10 +230,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('name', $data ?? [], null); } diff --git a/src/Model/TemplateAddUserRequest.php b/src/Model/TemplateAddUserRequest.php index ea87103..fa235f3 100644 --- a/src/Model/TemplateAddUserRequest.php +++ b/src/Model/TemplateAddUserRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -242,10 +242,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('account_id', $data ?? [], null); $this->setIfExists('email_address', $data ?? [], null); diff --git a/src/Model/TemplateCreateEmbeddedDraftRequest.php b/src/Model/TemplateCreateEmbeddedDraftRequest.php index fe626a8..79ce3b2 100644 --- a/src/Model/TemplateCreateEmbeddedDraftRequest.php +++ b/src/Model/TemplateCreateEmbeddedDraftRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -375,10 +375,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('client_id', $data ?? [], null); $this->setIfExists('files', $data ?? [], null); diff --git a/src/Model/TemplateCreateEmbeddedDraftResponse.php b/src/Model/TemplateCreateEmbeddedDraftResponse.php index 49266a6..ca85bf0 100644 --- a/src/Model/TemplateCreateEmbeddedDraftResponse.php +++ b/src/Model/TemplateCreateEmbeddedDraftResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -236,10 +236,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('template', $data ?? [], null); $this->setIfExists('warnings', $data ?? [], null); diff --git a/src/Model/TemplateCreateEmbeddedDraftResponseTemplate.php b/src/Model/TemplateCreateEmbeddedDraftResponseTemplate.php index 44031ce..324766d 100644 --- a/src/Model/TemplateCreateEmbeddedDraftResponseTemplate.php +++ b/src/Model/TemplateCreateEmbeddedDraftResponseTemplate.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -249,10 +249,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('template_id', $data ?? [], null); $this->setIfExists('edit_url', $data ?? [], null); diff --git a/src/Model/TemplateCreateRequest.php b/src/Model/TemplateCreateRequest.php index ec68906..ddeab02 100644 --- a/src/Model/TemplateCreateRequest.php +++ b/src/Model/TemplateCreateRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -333,10 +333,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('form_fields_per_document', $data ?? [], null); $this->setIfExists('signer_roles', $data ?? [], null); diff --git a/src/Model/TemplateCreateResponse.php b/src/Model/TemplateCreateResponse.php index e17ce91..3fe65f1 100644 --- a/src/Model/TemplateCreateResponse.php +++ b/src/Model/TemplateCreateResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -236,10 +236,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('template', $data ?? [], null); $this->setIfExists('warnings', $data ?? [], null); diff --git a/src/Model/TemplateCreateResponseTemplate.php b/src/Model/TemplateCreateResponseTemplate.php index 199aa3f..7baaf00 100644 --- a/src/Model/TemplateCreateResponseTemplate.php +++ b/src/Model/TemplateCreateResponseTemplate.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -231,10 +231,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('template_id', $data ?? [], null); } diff --git a/src/Model/TemplateEditResponse.php b/src/Model/TemplateEditResponse.php index 0ef5462..3374ff2 100644 --- a/src/Model/TemplateEditResponse.php +++ b/src/Model/TemplateEditResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -230,10 +230,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('template_id', $data ?? [], null); } diff --git a/src/Model/TemplateGetResponse.php b/src/Model/TemplateGetResponse.php index 45b89ba..321b667 100644 --- a/src/Model/TemplateGetResponse.php +++ b/src/Model/TemplateGetResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -236,10 +236,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('template', $data ?? [], null); $this->setIfExists('warnings', $data ?? [], null); diff --git a/src/Model/TemplateListResponse.php b/src/Model/TemplateListResponse.php index 4997466..df656f2 100644 --- a/src/Model/TemplateListResponse.php +++ b/src/Model/TemplateListResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -242,10 +242,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('templates', $data ?? [], null); $this->setIfExists('list_info', $data ?? [], null); diff --git a/src/Model/TemplateRemoveUserRequest.php b/src/Model/TemplateRemoveUserRequest.php index d7a8582..29407ca 100644 --- a/src/Model/TemplateRemoveUserRequest.php +++ b/src/Model/TemplateRemoveUserRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -236,10 +236,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('account_id', $data ?? [], null); $this->setIfExists('email_address', $data ?? [], null); diff --git a/src/Model/TemplateResponse.php b/src/Model/TemplateResponse.php index 6bc51cf..69492ed 100644 --- a/src/Model/TemplateResponse.php +++ b/src/Model/TemplateResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -321,10 +321,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('template_id', $data ?? [], null); $this->setIfExists('title', $data ?? [], null); diff --git a/src/Model/TemplateResponseAccount.php b/src/Model/TemplateResponseAccount.php index 47ddefa..c2cc5fb 100644 --- a/src/Model/TemplateResponseAccount.php +++ b/src/Model/TemplateResponseAccount.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -260,10 +260,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('account_id', $data ?? [], null); $this->setIfExists('email_address', $data ?? [], null); diff --git a/src/Model/TemplateResponseAccountQuota.php b/src/Model/TemplateResponseAccountQuota.php index 46386d6..f88bd93 100644 --- a/src/Model/TemplateResponseAccountQuota.php +++ b/src/Model/TemplateResponseAccountQuota.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -249,10 +249,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('templates_left', $data ?? [], null); $this->setIfExists('api_signature_requests_left', $data ?? [], null); diff --git a/src/Model/TemplateResponseCCRole.php b/src/Model/TemplateResponseCCRole.php index 06ee332..a9db018 100644 --- a/src/Model/TemplateResponseCCRole.php +++ b/src/Model/TemplateResponseCCRole.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -230,10 +230,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('name', $data ?? [], null); } diff --git a/src/Model/TemplateResponseDocument.php b/src/Model/TemplateResponseDocument.php index 02a8838..c2f75fc 100644 --- a/src/Model/TemplateResponseDocument.php +++ b/src/Model/TemplateResponseDocument.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -260,10 +260,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('name', $data ?? [], null); $this->setIfExists('index', $data ?? [], null); diff --git a/src/Model/TemplateResponseDocumentCustomFieldBase.php b/src/Model/TemplateResponseDocumentCustomFieldBase.php index 0115025..30dcb7f 100644 --- a/src/Model/TemplateResponseDocumentCustomFieldBase.php +++ b/src/Model/TemplateResponseDocumentCustomFieldBase.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -285,10 +285,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('type', $data ?? [], null); $this->setIfExists('api_id', $data ?? [], null); diff --git a/src/Model/TemplateResponseDocumentCustomFieldCheckbox.php b/src/Model/TemplateResponseDocumentCustomFieldCheckbox.php index 7ec8dc0..28b195c 100644 --- a/src/Model/TemplateResponseDocumentCustomFieldCheckbox.php +++ b/src/Model/TemplateResponseDocumentCustomFieldCheckbox.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -222,10 +222,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/src/Model/TemplateResponseDocumentCustomFieldText.php b/src/Model/TemplateResponseDocumentCustomFieldText.php index e63a739..84beb6e 100644 --- a/src/Model/TemplateResponseDocumentCustomFieldText.php +++ b/src/Model/TemplateResponseDocumentCustomFieldText.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -246,10 +246,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/src/Model/TemplateResponseDocumentFieldGroup.php b/src/Model/TemplateResponseDocumentFieldGroup.php index 5417148..b58429d 100644 --- a/src/Model/TemplateResponseDocumentFieldGroup.php +++ b/src/Model/TemplateResponseDocumentFieldGroup.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -236,10 +236,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('name', $data ?? [], null); $this->setIfExists('rule', $data ?? [], null); diff --git a/src/Model/TemplateResponseDocumentFieldGroupRule.php b/src/Model/TemplateResponseDocumentFieldGroupRule.php index 1bd31bd..6c9324b 100644 --- a/src/Model/TemplateResponseDocumentFieldGroupRule.php +++ b/src/Model/TemplateResponseDocumentFieldGroupRule.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -237,10 +237,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('requirement', $data ?? [], null); $this->setIfExists('group_label', $data ?? [], null); diff --git a/src/Model/TemplateResponseDocumentFormFieldBase.php b/src/Model/TemplateResponseDocumentFormFieldBase.php index ecc03a7..2562903 100644 --- a/src/Model/TemplateResponseDocumentFormFieldBase.php +++ b/src/Model/TemplateResponseDocumentFormFieldBase.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -279,10 +279,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('type', $data ?? [], null); $this->setIfExists('api_id', $data ?? [], null); diff --git a/src/Model/TemplateResponseDocumentFormFieldCheckbox.php b/src/Model/TemplateResponseDocumentFormFieldCheckbox.php index a30010f..3b72e3c 100644 --- a/src/Model/TemplateResponseDocumentFormFieldCheckbox.php +++ b/src/Model/TemplateResponseDocumentFormFieldCheckbox.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -228,10 +228,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/src/Model/TemplateResponseDocumentFormFieldDateSigned.php b/src/Model/TemplateResponseDocumentFormFieldDateSigned.php index bd60723..342281d 100644 --- a/src/Model/TemplateResponseDocumentFormFieldDateSigned.php +++ b/src/Model/TemplateResponseDocumentFormFieldDateSigned.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -228,10 +228,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/src/Model/TemplateResponseDocumentFormFieldDropdown.php b/src/Model/TemplateResponseDocumentFormFieldDropdown.php index 3e4a827..dd4cfc0 100644 --- a/src/Model/TemplateResponseDocumentFormFieldDropdown.php +++ b/src/Model/TemplateResponseDocumentFormFieldDropdown.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -228,10 +228,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/src/Model/TemplateResponseDocumentFormFieldHyperlink.php b/src/Model/TemplateResponseDocumentFormFieldHyperlink.php index 687269f..01e3b91 100644 --- a/src/Model/TemplateResponseDocumentFormFieldHyperlink.php +++ b/src/Model/TemplateResponseDocumentFormFieldHyperlink.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -252,10 +252,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/src/Model/TemplateResponseDocumentFormFieldInitials.php b/src/Model/TemplateResponseDocumentFormFieldInitials.php index 101a6e9..f20e10d 100644 --- a/src/Model/TemplateResponseDocumentFormFieldInitials.php +++ b/src/Model/TemplateResponseDocumentFormFieldInitials.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -228,10 +228,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/src/Model/TemplateResponseDocumentFormFieldRadio.php b/src/Model/TemplateResponseDocumentFormFieldRadio.php index 8fd4946..5052ea6 100644 --- a/src/Model/TemplateResponseDocumentFormFieldRadio.php +++ b/src/Model/TemplateResponseDocumentFormFieldRadio.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -228,10 +228,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/src/Model/TemplateResponseDocumentFormFieldSignature.php b/src/Model/TemplateResponseDocumentFormFieldSignature.php index 7777774..6ba169c 100644 --- a/src/Model/TemplateResponseDocumentFormFieldSignature.php +++ b/src/Model/TemplateResponseDocumentFormFieldSignature.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -228,10 +228,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/src/Model/TemplateResponseDocumentFormFieldText.php b/src/Model/TemplateResponseDocumentFormFieldText.php index 42c15b9..afb4331 100644 --- a/src/Model/TemplateResponseDocumentFormFieldText.php +++ b/src/Model/TemplateResponseDocumentFormFieldText.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -290,10 +290,10 @@ public function getValidationTypeAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/src/Model/TemplateResponseDocumentStaticFieldBase.php b/src/Model/TemplateResponseDocumentStaticFieldBase.php index bd18e18..fc632b9 100644 --- a/src/Model/TemplateResponseDocumentStaticFieldBase.php +++ b/src/Model/TemplateResponseDocumentStaticFieldBase.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -285,10 +285,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('type', $data ?? [], null); $this->setIfExists('api_id', $data ?? [], null); diff --git a/src/Model/TemplateResponseDocumentStaticFieldCheckbox.php b/src/Model/TemplateResponseDocumentStaticFieldCheckbox.php index 9739d2e..1f583ce 100644 --- a/src/Model/TemplateResponseDocumentStaticFieldCheckbox.php +++ b/src/Model/TemplateResponseDocumentStaticFieldCheckbox.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -222,10 +222,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/src/Model/TemplateResponseDocumentStaticFieldDateSigned.php b/src/Model/TemplateResponseDocumentStaticFieldDateSigned.php index 911febf..5ae56b5 100644 --- a/src/Model/TemplateResponseDocumentStaticFieldDateSigned.php +++ b/src/Model/TemplateResponseDocumentStaticFieldDateSigned.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -222,10 +222,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/src/Model/TemplateResponseDocumentStaticFieldDropdown.php b/src/Model/TemplateResponseDocumentStaticFieldDropdown.php index 6022f92..8c424a9 100644 --- a/src/Model/TemplateResponseDocumentStaticFieldDropdown.php +++ b/src/Model/TemplateResponseDocumentStaticFieldDropdown.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -222,10 +222,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/src/Model/TemplateResponseDocumentStaticFieldHyperlink.php b/src/Model/TemplateResponseDocumentStaticFieldHyperlink.php index 246bea4..218bbb0 100644 --- a/src/Model/TemplateResponseDocumentStaticFieldHyperlink.php +++ b/src/Model/TemplateResponseDocumentStaticFieldHyperlink.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -222,10 +222,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/src/Model/TemplateResponseDocumentStaticFieldInitials.php b/src/Model/TemplateResponseDocumentStaticFieldInitials.php index 339b3a2..ce77013 100644 --- a/src/Model/TemplateResponseDocumentStaticFieldInitials.php +++ b/src/Model/TemplateResponseDocumentStaticFieldInitials.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -222,10 +222,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/src/Model/TemplateResponseDocumentStaticFieldRadio.php b/src/Model/TemplateResponseDocumentStaticFieldRadio.php index 8dc1397..ae47e8a 100644 --- a/src/Model/TemplateResponseDocumentStaticFieldRadio.php +++ b/src/Model/TemplateResponseDocumentStaticFieldRadio.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -222,10 +222,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/src/Model/TemplateResponseDocumentStaticFieldSignature.php b/src/Model/TemplateResponseDocumentStaticFieldSignature.php index c86d1c9..c0da5a2 100644 --- a/src/Model/TemplateResponseDocumentStaticFieldSignature.php +++ b/src/Model/TemplateResponseDocumentStaticFieldSignature.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -222,10 +222,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/src/Model/TemplateResponseDocumentStaticFieldText.php b/src/Model/TemplateResponseDocumentStaticFieldText.php index ec89541..246a22d 100644 --- a/src/Model/TemplateResponseDocumentStaticFieldText.php +++ b/src/Model/TemplateResponseDocumentStaticFieldText.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -222,10 +222,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/src/Model/TemplateResponseFieldAvgTextLength.php b/src/Model/TemplateResponseFieldAvgTextLength.php index 9277db2..6fbb12d 100644 --- a/src/Model/TemplateResponseFieldAvgTextLength.php +++ b/src/Model/TemplateResponseFieldAvgTextLength.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -237,10 +237,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('num_lines', $data ?? [], null); $this->setIfExists('num_chars_per_line', $data ?? [], null); diff --git a/src/Model/TemplateResponseSignerRole.php b/src/Model/TemplateResponseSignerRole.php index 98a80c6..9d62bf4 100644 --- a/src/Model/TemplateResponseSignerRole.php +++ b/src/Model/TemplateResponseSignerRole.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -236,10 +236,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('name', $data ?? [], null); $this->setIfExists('order', $data ?? [], null); diff --git a/src/Model/TemplateUpdateFilesRequest.php b/src/Model/TemplateUpdateFilesRequest.php index 7c165ff..2f87773 100644 --- a/src/Model/TemplateUpdateFilesRequest.php +++ b/src/Model/TemplateUpdateFilesRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -261,10 +261,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('client_id', $data ?? [], null); $this->setIfExists('files', $data ?? [], null); diff --git a/src/Model/TemplateUpdateFilesResponse.php b/src/Model/TemplateUpdateFilesResponse.php index d8080fb..de4fb8b 100644 --- a/src/Model/TemplateUpdateFilesResponse.php +++ b/src/Model/TemplateUpdateFilesResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -230,10 +230,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('template', $data ?? [], null); } diff --git a/src/Model/TemplateUpdateFilesResponseTemplate.php b/src/Model/TemplateUpdateFilesResponseTemplate.php index 70d2e87..4f112b6 100644 --- a/src/Model/TemplateUpdateFilesResponseTemplate.php +++ b/src/Model/TemplateUpdateFilesResponseTemplate.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -237,10 +237,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('template_id', $data ?? [], null); $this->setIfExists('warnings', $data ?? [], null); diff --git a/src/Model/UnclaimedDraftCreateEmbeddedRequest.php b/src/Model/UnclaimedDraftCreateEmbeddedRequest.php index 8d4a7e3..9d42586 100644 --- a/src/Model/UnclaimedDraftCreateEmbeddedRequest.php +++ b/src/Model/UnclaimedDraftCreateEmbeddedRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -458,10 +458,10 @@ public function getTypeAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('client_id', $data ?? [], null); $this->setIfExists('requester_email_address', $data ?? [], null); diff --git a/src/Model/UnclaimedDraftCreateEmbeddedWithTemplateRequest.php b/src/Model/UnclaimedDraftCreateEmbeddedWithTemplateRequest.php index df0b1df..b96ad7c 100644 --- a/src/Model/UnclaimedDraftCreateEmbeddedWithTemplateRequest.php +++ b/src/Model/UnclaimedDraftCreateEmbeddedWithTemplateRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -405,10 +405,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('client_id', $data ?? [], null); $this->setIfExists('requester_email_address', $data ?? [], null); diff --git a/src/Model/UnclaimedDraftCreateRequest.php b/src/Model/UnclaimedDraftCreateRequest.php index 1d55c2c..89b665f 100644 --- a/src/Model/UnclaimedDraftCreateRequest.php +++ b/src/Model/UnclaimedDraftCreateRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -386,10 +386,10 @@ public function getTypeAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('type', $data ?? [], null); $this->setIfExists('files', $data ?? [], null); diff --git a/src/Model/UnclaimedDraftCreateResponse.php b/src/Model/UnclaimedDraftCreateResponse.php index fb93528..d6c1043 100644 --- a/src/Model/UnclaimedDraftCreateResponse.php +++ b/src/Model/UnclaimedDraftCreateResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -236,10 +236,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('unclaimed_draft', $data ?? [], null); $this->setIfExists('warnings', $data ?? [], null); diff --git a/src/Model/UnclaimedDraftEditAndResendRequest.php b/src/Model/UnclaimedDraftEditAndResendRequest.php index 5669e48..56a60c5 100644 --- a/src/Model/UnclaimedDraftEditAndResendRequest.php +++ b/src/Model/UnclaimedDraftEditAndResendRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -272,10 +272,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('client_id', $data ?? [], null); $this->setIfExists('editor_options', $data ?? [], null); diff --git a/src/Model/UnclaimedDraftResponse.php b/src/Model/UnclaimedDraftResponse.php index da1c263..774aae3 100644 --- a/src/Model/UnclaimedDraftResponse.php +++ b/src/Model/UnclaimedDraftResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -261,10 +261,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('signature_request_id', $data ?? [], null); $this->setIfExists('claim_url', $data ?? [], null); diff --git a/src/Model/WarningResponse.php b/src/Model/WarningResponse.php index 4c37010..3092773 100644 --- a/src/Model/WarningResponse.php +++ b/src/Model/WarningResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -237,10 +237,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('warning_msg', $data ?? [], null); $this->setIfExists('warning_name', $data ?? [], null); diff --git a/src/ObjectSerializer.php b/src/ObjectSerializer.php index 958cd8e..f802210 100644 --- a/src/ObjectSerializer.php +++ b/src/ObjectSerializer.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -60,12 +60,12 @@ public static function setDateTimeFormat(string $format) * Serialize data * * @param string|int|object|array|mixed $data the data to serialize - * @param string $type the OpenAPIToolsType of the data - * @param string $format the format of the OpenAPITools type of the data + * @param string|null $type the OpenAPIToolsType of the data + * @param string|null $format the format of the OpenAPITools type of the data * * @return scalar|object|array|null serialized form of $data */ - public static function sanitizeForSerialization($data, string $type = null, string $format = null) + public static function sanitizeForSerialization($data, ?string $type = null, ?string $format = null) { if (is_scalar($data) || null === $data) { return $data; @@ -197,6 +197,10 @@ private static function isEmptyValue($value, string $openApiType): bool case 'boolean': return !in_array($value, [false, 0], true); + // For string values, '' is considered empty. + case 'string': + return $value === ''; + // For all the other types, any value at this point can be considered empty. default: return true; @@ -400,11 +404,11 @@ public static function serializeCollection(array $collection, string $style, boo * * @param string|int|object|array|mixed $data object or primitive to be deserialized * @param string $class class name is passed as a string - * @param string[] $httpHeaders HTTP headers + * @param string[]|null $httpHeaders HTTP headers * * @return object|array|null a single or an array of $class instances */ - public static function deserialize($data, string $class, array $httpHeaders = null) + public static function deserialize($data, string $class, ?array $httpHeaders = null) { if (null === $data) { return null; diff --git a/templates/Configuration.mustache b/templates/Configuration.mustache index 1dadde9..384dcfb 100644 --- a/templates/Configuration.mustache +++ b/templates/Configuration.mustache @@ -555,7 +555,7 @@ class Configuration * @param array|null $variables hash of variable and the corresponding value (optional) * @return string URL based on host settings */ - public static function getHostString(array $hostSettings, $hostIndex, array $variables = null) + public static function getHostString(array $hostSettings, $hostIndex, ?array $variables = null) { if (null === $variables) { $variables = []; diff --git a/templates/HeaderSelector.mustache b/templates/HeaderSelector.mustache index 1921b06..d5c284c 100644 --- a/templates/HeaderSelector.mustache +++ b/templates/HeaderSelector.mustache @@ -76,7 +76,7 @@ class HeaderSelector } # If none of the available Accept headers is of type "json", then just use all them - $headersWithJson = preg_grep('~(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$~', $accept); + $headersWithJson = $this->selectJsonMimeList($accept); if (count($headersWithJson) === 0) { return implode(',', $accept); } @@ -86,6 +86,34 @@ class HeaderSelector return $this->getAcceptHeaderWithAdjustedWeight($accept, $headersWithJson); } + /** + * Detects whether a string contains a valid JSON mime type + * + * @param string $searchString + * @return bool + */ + public function isJsonMime(string $searchString): bool + { + return preg_match('~^application/(json|[\w!#$&.+-^_]+\+json)\s*(;|$)~', $searchString) === 1; + } + + /** + * Select all items from a list containing a JSON mime type + * + * @param array $mimeList + * @return array + */ + private function selectJsonMimeList(array $mimeList): array { + $jsonMimeList = []; + foreach ($mimeList as $mime) { + if($this->isJsonMime($mime)) { + $jsonMimeList[] = $mime; + } + } + return $jsonMimeList; + } + + /** * Create an Accept header string from the given "Accept" headers array, recalculating all weights * diff --git a/templates/ObjectSerializer.mustache b/templates/ObjectSerializer.mustache index 281ed61..4437c69 100644 --- a/templates/ObjectSerializer.mustache +++ b/templates/ObjectSerializer.mustache @@ -57,8 +57,8 @@ class ObjectSerializer {{#useCustomTemplateCode}} * @param string|int|object|array|mixed $data the data to serialize {{/useCustomTemplateCode}} - * @param string $type the OpenAPIToolsType of the data - * @param string $format the format of the OpenAPITools type of the data + * @param string|null $type the OpenAPIToolsType of the data + * @param string|null $format the format of the OpenAPITools type of the data * * @return scalar|object|array|null serialized form of $data */ @@ -207,6 +207,10 @@ class ObjectSerializer case 'boolean': return !in_array($value, [false, 0], true); + # For string values, '' is considered empty. + case 'string': + return $value === ''; + # For all the other types, any value at this point can be considered empty. default: return true; @@ -428,7 +432,7 @@ class ObjectSerializer * @param string|int|object|array|mixed $data object or primitive to be deserialized {{/useCustomTemplateCode}} * @param string $class class name is passed as a string - * @param string[] $httpHeaders HTTP headers + * @param string[]|null $httpHeaders HTTP headers * * @return object|array|null a single or an array of $class instances */ diff --git a/templates/api.mustache b/templates/api.mustache index 927ce19..cbcd7ef 100644 --- a/templates/api.mustache +++ b/templates/api.mustache @@ -86,10 +86,10 @@ use Psr\Http\Message\ResponseInterface; * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - ClientInterface $client = null, - Configuration $config = null, - HeaderSelector $selector = null, - $hostIndex = 0 + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, + int $hostIndex = 0 ) { {{/useCustomTemplateCode}} {{#useCustomTemplateCode}} @@ -100,13 +100,16 @@ use Psr\Http\Message\ResponseInterface; * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - Configuration $config = null, - ClientInterface $client = null, - HeaderSelector $selector = null, - $hostIndex = 0 + ?Configuration $config = null, + ?ClientInterface $client = null, + ?HeaderSelector $selector = null, + int $hostIndex = 0 ) { {{/useCustomTemplateCode}} $this->client = $client ?: new Client(); + {{^useCustomTemplateCode}} + $this->config = $config ?: Configuration::getDefaultConfiguration(); + {{/useCustomTemplateCode}} $this->config = $config ?: new Configuration(); $this->headerSelector = $selector ?: new HeaderSelector(); $this->hostIndex = $hostIndex; @@ -193,7 +196,7 @@ use Psr\Http\Message\ResponseInterface; {{/-last}} {{/servers}} {{#allParams}} - * @param {{{dataType}}} ${{paramName}}{{#description}} {{.}}{{/description}}{{^description}} {{paramName}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} + * @param {{{dataType}}}{{^required}}|null{{/required}} ${{paramName}}{{#description}} {{.}}{{/description}}{{^description}} {{paramName}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} {{/allParams}} {{^useCustomTemplateCode}} {{#servers}} @@ -262,7 +265,7 @@ use Psr\Http\Message\ResponseInterface; {{/-last}} {{/servers}} {{#allParams}} - * @param {{{dataType}}} ${{paramName}}{{#description}} {{.}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} + * @param {{{dataType}}}{{^required}}|null{{/required}} ${{paramName}}{{#description}} {{.}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} {{/allParams}} {{#servers}} {{#-first}} @@ -311,18 +314,6 @@ use Psr\Http\Message\ResponseInterface; $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } {{#returnType}} {{#useCustomTemplateCode}} {{#responses}}{{#dataType}}{{#isRange}} @@ -375,6 +366,19 @@ use Psr\Http\Message\ResponseInterface; {{/-last}} {{/responses}} + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + $returnType = '{{{returnType}}}'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer @@ -469,7 +473,7 @@ use Psr\Http\Message\ResponseInterface; {{/-last}} {{/servers}} {{#allParams}} - * @param {{{dataType}}} ${{paramName}}{{#description}} {{.}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} + * @param {{{dataType}}}{{^required}}|null{{/required}} ${{paramName}}{{#description}} {{.}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} {{/allParams}} {{#servers}} {{#-first}} @@ -534,7 +538,7 @@ use Psr\Http\Message\ResponseInterface; {{/-last}} {{/servers}} {{#allParams}} - * @param {{{dataType}}} ${{paramName}}{{#description}} {{.}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} + * @param {{{dataType}}}{{^required}}|null{{/required}} ${{paramName}}{{#description}} {{.}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} {{/allParams}} {{#servers}} {{#-first}} @@ -627,7 +631,7 @@ use Psr\Http\Message\ResponseInterface; {{/-last}} {{/servers}} {{#allParams}} - * @param {{{dataType}}} ${{paramName}}{{#description}} {{.}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} + * @param {{{dataType}}}{{^required}}|null{{/required}} ${{paramName}}{{#description}} {{.}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} {{/allParams}} {{#servers}} {{#-first}} @@ -780,6 +784,11 @@ use Psr\Http\Message\ResponseInterface; } {{/formParams}} + {{^useCustomTemplateCode}} + {{#isMultipart}} + $multipart = true; + {{/isMultipart}} + {{/useCustomTemplateCode}} $headers = $this->headerSelector->selectHeaders( {{^useCustomTemplateCode}} [{{#produces}}'{{{mediaType}}}', {{/produces}}], diff --git a/templates/libraries/psr-18/ApiException.mustache b/templates/libraries/psr-18/ApiException.mustache index 336d8f7..1b7d1a6 100644 --- a/templates/libraries/psr-18/ApiException.mustache +++ b/templates/libraries/psr-18/ApiException.mustache @@ -58,8 +58,8 @@ class ApiException extends RequestException public function __construct( $message, RequestInterface $request, - ResponseInterface $response = null, - Exception $previous = null + ?ResponseInterface $response = null, + ?Exception $previous = null ) { parent::__construct($message, $request, $previous); if ($response) { @@ -90,7 +90,7 @@ class ApiException extends RequestException } /** - * Sets the deseralized response object (during deserialization) + * Sets the deserialized response object (during deserialization) * {{^useCustomTemplateCode}} * @param mixed $obj Deserialized response object @@ -108,7 +108,7 @@ class ApiException extends RequestException } /** - * Gets the deseralized response object (during deserialization) + * Gets the deserialized response object (during deserialization) * * @return mixed the deserialized response object */ diff --git a/templates/libraries/psr-18/api.mustache b/templates/libraries/psr-18/api.mustache index 6138ab1..7b286d9 100644 --- a/templates/libraries/psr-18/api.mustache +++ b/templates/libraries/psr-18/api.mustache @@ -95,13 +95,13 @@ use function sprintf; protected $streamFactory; public function __construct( - ClientInterface $httpClient = null, - Configuration $config = null, - HttpAsyncClient $httpAsyncClient = null, - UriFactoryInterface $uriFactory = null, - RequestFactoryInterface $requestFactory = null, - StreamFactoryInterface $streamFactory = null, - HeaderSelector $selector = null, + ?ClientInterface $httpClient = null, + ?Configuration $config = null, + ?HttpAsyncClient $httpAsyncClient = null, + ?UriFactoryInterface $uriFactory = null, + ?RequestFactoryInterface $requestFactory = null, + ?StreamFactoryInterface $streamFactory = null, + ?HeaderSelector $selector = null, ?array $plugins = null, $hostIndex = 0 ) { @@ -181,7 +181,7 @@ use function sprintf; {{/vendorExtensions.x-group-parameters}} {{#servers}} {{#-first}} - * This oepration contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. {{/-first}} * URL: {{{url}}} {{#-last}} @@ -219,7 +219,7 @@ use function sprintf; {{/vendorExtensions.x-group-parameters}} {{#servers}} {{#-first}} - * This oepration contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. {{/-first}} * URL: {{{url}}} {{#-last}} @@ -342,7 +342,7 @@ use function sprintf; {{/vendorExtensions.x-group-parameters}} {{#servers}} {{#-first}} - * This oepration contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. {{/-first}} * URL: {{{url}}} {{#-last}} @@ -383,7 +383,7 @@ use function sprintf; {{/vendorExtensions.x-group-parameters}} {{#servers}} {{#-first}} - * This oepration contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. {{/-first}} * URL: {{{url}}} {{#-last}} @@ -448,7 +448,7 @@ use function sprintf; {{/vendorExtensions.x-group-parameters}} {{#servers}} {{#-first}} - * This oepration contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. {{/-first}} * URL: {{{url}}} {{#-last}} @@ -613,7 +613,7 @@ use function sprintf; // for model (json/xml) {{#bodyParams}} if (isset(${{paramName}})) { - if ($headers['Content-Type'] === 'application/json') { + if ($this->headerSelector->isJsonMime($headers['Content-Type'])) { $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization(${{paramName}})); } else { $httpBody = ${{paramName}}; @@ -637,7 +637,7 @@ use function sprintf; // for HTTP post (form) $httpBody = new MultipartStream($multipartContents); - } elseif ($headers['Content-Type'] === 'application/json') { + } elseif ($this->headerSelector->isJsonMime($headers['Content-Type'])) { $httpBody = json_encode($formParams); } else { diff --git a/templates/model_enum.mustache b/templates/model_enum.mustache index 77001f2..86d0225 100644 --- a/templates/model_enum.mustache +++ b/templates/model_enum.mustache @@ -5,7 +5,12 @@ class {{classname}} */ {{#allowableValues}} {{#enumVars}} - public const {{^isString}}NUMBER_{{/isString}}{{{name}}} = {{{value}}}; + {{#enumDescription}} + /** + * {{enumDescription}} + */ + {{/enumDescription}} + public const {{{name}}} = {{{value}}}; {{/enumVars}} {{/allowableValues}} @@ -18,7 +23,7 @@ class {{classname}} return [ {{#allowableValues}} {{#enumVars}} - self::{{^isString}}NUMBER_{{/isString}}{{{name}}}{{^-last}}, + self::{{{name}}}{{^-last}}, {{/-last}} {{/enumVars}} {{/allowableValues}} diff --git a/templates/model_generic.mustache b/templates/model_generic.mustache index 3b213dd..8838e18 100644 --- a/templates/model_generic.mustache +++ b/templates/model_generic.mustache @@ -231,10 +231,10 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}}{{/parentSchema}}{{^par /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { {{#parentSchema}} parent::__construct($data); @@ -452,6 +452,10 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}}{{/parentSchema}}{{^par $allowedValues = $this->{{getter}}AllowableValues(); {{^isContainer}} if ({{#isNullable}}!is_null(${{name}}) && {{/isNullable}}!in_array(${{{name}}}, $allowedValues, true)) { + {{#enumUnknownDefaultCase}} + ${{name}} = {{#allowableValues}}{{#enumVars}}{{#-last}}self::{{enumName}}_{{{name}}};{{/-last}}{{/enumVars}}{{/allowableValues}} + {{/enumUnknownDefaultCase}} + {{^enumUnknownDefaultCase}} throw new \InvalidArgumentException( sprintf( "Invalid value '%s' for '{{name}}', must be one of '%s'", @@ -459,6 +463,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}}{{/parentSchema}}{{^par implode("', '", $allowedValues) ) ); + {{/enumUnknownDefaultCase}} } {{/isContainer}} {{#isContainer}} From da250a3f39f2658b0229cc203b1d99aadb30f0df Mon Sep 17 00:00:00 2001 From: Juan Treminio Date: Thu, 15 May 2025 12:43:53 -0500 Subject: [PATCH 2/2] Add edit&resend to OpenAPI docs, and note that it uses quota --- docs/Api/SignatureRequestApi.md | 8 ++++---- openapi-sdk.yaml | 30 ++++++++++++++---------------- 2 files changed, 18 insertions(+), 20 deletions(-) diff --git a/docs/Api/SignatureRequestApi.md b/docs/Api/SignatureRequestApi.md index 72acdcc..3e2c764 100644 --- a/docs/Api/SignatureRequestApi.md +++ b/docs/Api/SignatureRequestApi.md @@ -529,7 +529,7 @@ signatureRequestEdit($signature_request_id, $signature_request_edit_request): \D ``` Edit Signature Request -Edits and sends a 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. **NOTE:** Edit and resend will not deduct your signature request quota. +Edits and sends a 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. **NOTE:** Edit and resend *will* deduct your signature request quota. ### Example @@ -637,7 +637,7 @@ signatureRequestEditEmbedded($signature_request_id, $signature_request_edit_embe ``` Edit Embedded Signature Request -Edits a 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. +Edits a 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. **NOTE:** Edit and resend *will* deduct your signature request quota. ### Example @@ -736,7 +736,7 @@ signatureRequestEditEmbeddedWithTemplate($signature_request_id, $signature_reque ``` Edit Embedded Signature Request with Template -Edits a 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. +Edits a 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. **NOTE:** Edit and resend *will* deduct your signature request quota. ### Example @@ -825,7 +825,7 @@ signatureRequestEditWithTemplate($signature_request_id, $signature_request_edit_ ``` Edit Signature Request With Template -Edits and sends a SignatureRequest based off of the Template(s) specified with the template_ids parameter. **NOTE:** Edit and resend will not deduct your signature request quota. +Edits and sends a SignatureRequest based off of the Template(s) specified with the template_ids parameter. **NOTE:** Edit and resend *will* deduct your signature request quota. ### Example diff --git a/openapi-sdk.yaml b/openapi-sdk.yaml index 2a95555..c832450 100644 --- a/openapi-sdk.yaml +++ b/openapi-sdk.yaml @@ -3414,7 +3414,7 @@ paths: description: |- Edits and sends a 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. - **NOTE:** Edit and resend will not deduct your signature request quota. + **NOTE:** Edit and resend *will* deduct your signature request quota. operationId: signatureRequestEdit parameters: - @@ -3455,7 +3455,7 @@ paths: $ref: '#/components/schemas/SignatureRequestGetResponse' examples: example: - $ref: '#/components/examples/SignatureRequestEditResponse' + $ref: '#/components/examples/SignatureRequestSendResponse' '4XX': description: failed_operation content: @@ -3526,14 +3526,15 @@ paths: seo: title: 'Edit Signature Request | REST API | Dropbox Sign for Developers' description: 'Dropbox Sign API allows you to build custom integrations. To find out how to edit a SignatureRequest with the submitted documents, click here.' - x-hideOn: doc - x-beta: closed '/signature_request/edit_embedded/{signature_request_id}': put: tags: - 'Signature Request' summary: 'Edit Embedded Signature Request' - description: 'Edits a 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.' + description: |- + Edits a 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. + + **NOTE:** Edit and resend *will* deduct your signature request quota. operationId: signatureRequestEditEmbedded parameters: - @@ -3574,7 +3575,7 @@ paths: $ref: '#/components/schemas/SignatureRequestGetResponse' examples: example: - $ref: '#/components/examples/SignatureRequestEditEmbeddedResponse' + $ref: '#/components/examples/SignatureRequestCreateEmbeddedResponse' '4XX': description: failed_operation content: @@ -3644,14 +3645,15 @@ paths: seo: title: 'Edit Embedded Signature Request | Dropbox Sign for Developers' description: 'The RESTful Dropbox Sign API easily allows you to build custom integrations. To find out how to edit a SignatureRequest in an iFrame, click here.' - x-hideOn: doc - x-beta: closed '/signature_request/edit_embedded_with_template/{signature_request_id}': put: tags: - 'Signature Request' summary: 'Edit Embedded Signature Request with Template' - description: 'Edits a 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.' + description: |- + Edits a 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. + + **NOTE:** Edit and resend *will* deduct your signature request quota. operationId: signatureRequestEditEmbeddedWithTemplate parameters: - @@ -3690,7 +3692,7 @@ paths: $ref: '#/components/schemas/SignatureRequestGetResponse' examples: example: - $ref: '#/components/examples/SignatureRequestEditEmbeddedWithTemplateResponse' + $ref: '#/components/examples/SignatureRequestCreateEmbeddedWithTemplateResponse' '4XX': description: failed_operation content: @@ -3760,8 +3762,6 @@ paths: seo: title: 'Signature Request with Template | Dropbox Sign for Developers' description: 'The Dropbox Sign API allows you to build custom integrations. To find out how to edit a SignatureRequest based on the given Template, click here.' - x-hideOn: doc - x-beta: closed '/signature_request/edit_with_template/{signature_request_id}': put: tags: @@ -3770,7 +3770,7 @@ paths: description: |- Edits and sends a SignatureRequest based off of the Template(s) specified with the template_ids parameter. - **NOTE:** Edit and resend will not deduct your signature request quota. + **NOTE:** Edit and resend *will* deduct your signature request quota. operationId: signatureRequestEditWithTemplate parameters: - @@ -3809,7 +3809,7 @@ paths: $ref: '#/components/schemas/SignatureRequestGetResponse' examples: example: - $ref: '#/components/examples/SignatureRequestEditWithTemplateResponse' + $ref: '#/components/examples/SignatureRequestSendWithTemplateResponse' '4XX': description: failed_operation content: @@ -3880,8 +3880,6 @@ paths: seo: title: 'Edit Signature Request with Template | API Documentation | Dropbox Sign for Developers' description: 'Dropbox Sign API allows you to build custom integrations. To find out how to edit a SignatureRequest based off of the Template, click here.' - x-hideOn: doc - x-beta: closed '/signature_request/files/{signature_request_id}': get: tags: