diff --git a/sdks/php/README.md b/sdks/php/README.md index 57e6ab2f0..daa9d415e 100644 --- a/sdks/php/README.md +++ b/sdks/php/README.md @@ -44,7 +44,7 @@ this command. ### Requirements -PHP 7.4 and later. +PHP 8.1 and later. ### Composer @@ -452,5 +452,5 @@ This PHP package is automatically generated by the [OpenAPI Generator](https://o - API version: `3.0.0` - Package version: `1.11-dev` - - Generator version: `7.12.0` + - Generator version: `7.26.0` - Build package: `org.openapitools.codegen.languages.PhpClientCodegen` diff --git a/sdks/php/bin/php b/sdks/php/bin/php index 9e31aee11..289b6ca34 100755 --- a/sdks/php/bin/php +++ b/sdks/php/bin/php @@ -15,7 +15,7 @@ if [[ "$PHP_USE_NATIVE" -ne 1 ]]; then -v "dropbox-sign-sdk-composer-cache:/.composer" \ -w "${WORKING_DIR}" \ -u root:root \ - jtreminio/php-cli:7.4 "$@" + jtreminio/php-cli:8.1 "$@" exit 0 fi diff --git a/sdks/php/composer.json b/sdks/php/composer.json index 5d496c4ec..22ccc9de5 100644 --- a/sdks/php/composer.json +++ b/sdks/php/composer.json @@ -22,7 +22,7 @@ } ], "require": { - "php": "^7.4 || ^8.0", + "php": "^8.1", "ext-curl": "*", "ext-json": "*", "ext-mbstring": "*", diff --git a/sdks/php/docs/Api/AccountApi.md b/sdks/php/docs/Api/AccountApi.md index 6d0f700ef..c2030309e 100644 --- a/sdks/php/docs/Api/AccountApi.md +++ b/sdks/php/docs/Api/AccountApi.md @@ -1,5 +1,7 @@ # Dropbox\Sign\AccountApi + + All URIs are relative to https://api.hellosign.com/v3. | Method | HTTP request | Description | diff --git a/sdks/php/docs/Api/ApiAppApi.md b/sdks/php/docs/Api/ApiAppApi.md index eb5e933ca..8004eac8a 100644 --- a/sdks/php/docs/Api/ApiAppApi.md +++ b/sdks/php/docs/Api/ApiAppApi.md @@ -1,5 +1,7 @@ # Dropbox\Sign\ApiAppApi + + All URIs are relative to https://api.hellosign.com/v3. | Method | HTTP request | Description | diff --git a/sdks/php/docs/Api/BulkSendJobApi.md b/sdks/php/docs/Api/BulkSendJobApi.md index a58d6349b..bc94e1ab4 100644 --- a/sdks/php/docs/Api/BulkSendJobApi.md +++ b/sdks/php/docs/Api/BulkSendJobApi.md @@ -1,5 +1,7 @@ # Dropbox\Sign\BulkSendJobApi + + All URIs are relative to https://api.hellosign.com/v3. | Method | HTTP request | Description | diff --git a/sdks/php/docs/Api/DocumentApi.md b/sdks/php/docs/Api/DocumentApi.md index 668f2d3f8..6c8233051 100644 --- a/sdks/php/docs/Api/DocumentApi.md +++ b/sdks/php/docs/Api/DocumentApi.md @@ -1,5 +1,7 @@ # Dropbox\Sign\DocumentApi + + All URIs are relative to https://api.hellosign.com/v3. | Method | HTTP request | Description | diff --git a/sdks/php/docs/Api/EmbeddedApi.md b/sdks/php/docs/Api/EmbeddedApi.md index c186d9420..6337677e9 100644 --- a/sdks/php/docs/Api/EmbeddedApi.md +++ b/sdks/php/docs/Api/EmbeddedApi.md @@ -1,5 +1,7 @@ # Dropbox\Sign\EmbeddedApi + + All URIs are relative to https://api.hellosign.com/v3. | Method | HTTP request | Description | diff --git a/sdks/php/docs/Api/FaxApi.md b/sdks/php/docs/Api/FaxApi.md index aeb7a3949..421be1055 100644 --- a/sdks/php/docs/Api/FaxApi.md +++ b/sdks/php/docs/Api/FaxApi.md @@ -1,5 +1,7 @@ # Dropbox\Sign\FaxApi + + All URIs are relative to https://api.hellosign.com/v3. | Method | HTTP request | Description | diff --git a/sdks/php/docs/Api/FaxLineApi.md b/sdks/php/docs/Api/FaxLineApi.md index 123fd3c96..3a1635584 100644 --- a/sdks/php/docs/Api/FaxLineApi.md +++ b/sdks/php/docs/Api/FaxLineApi.md @@ -1,5 +1,7 @@ # Dropbox\Sign\FaxLineApi + + All URIs are relative to https://api.hellosign.com/v3. | Method | HTTP request | Description | diff --git a/sdks/php/docs/Api/OAuthApi.md b/sdks/php/docs/Api/OAuthApi.md index 398664ffb..44db605f1 100644 --- a/sdks/php/docs/Api/OAuthApi.md +++ b/sdks/php/docs/Api/OAuthApi.md @@ -1,5 +1,7 @@ # Dropbox\Sign\OAuthApi + + All URIs are relative to https://api.hellosign.com/v3. | Method | HTTP request | Description | diff --git a/sdks/php/docs/Api/ReportApi.md b/sdks/php/docs/Api/ReportApi.md index 2609a12d9..100cd5b8b 100644 --- a/sdks/php/docs/Api/ReportApi.md +++ b/sdks/php/docs/Api/ReportApi.md @@ -1,5 +1,7 @@ # Dropbox\Sign\ReportApi + + All URIs are relative to https://api.hellosign.com/v3. | Method | HTTP request | Description | diff --git a/sdks/php/docs/Api/SignatureRequestApi.md b/sdks/php/docs/Api/SignatureRequestApi.md index 5e395b147..2ada3bc44 100644 --- a/sdks/php/docs/Api/SignatureRequestApi.md +++ b/sdks/php/docs/Api/SignatureRequestApi.md @@ -1,5 +1,7 @@ # Dropbox\Sign\SignatureRequestApi + + All URIs are relative to https://api.hellosign.com/v3. | Method | HTTP request | Description | diff --git a/sdks/php/docs/Api/TeamApi.md b/sdks/php/docs/Api/TeamApi.md index 059036e13..c27fb861b 100644 --- a/sdks/php/docs/Api/TeamApi.md +++ b/sdks/php/docs/Api/TeamApi.md @@ -1,5 +1,7 @@ # Dropbox\Sign\TeamApi + + All URIs are relative to https://api.hellosign.com/v3. | Method | HTTP request | Description | diff --git a/sdks/php/docs/Api/TemplateApi.md b/sdks/php/docs/Api/TemplateApi.md index 2215c078c..c31023e6a 100644 --- a/sdks/php/docs/Api/TemplateApi.md +++ b/sdks/php/docs/Api/TemplateApi.md @@ -1,5 +1,7 @@ # Dropbox\Sign\TemplateApi + + All URIs are relative to https://api.hellosign.com/v3. | Method | HTTP request | Description | diff --git a/sdks/php/docs/Api/UnclaimedDraftApi.md b/sdks/php/docs/Api/UnclaimedDraftApi.md index caf17af70..01bfc299c 100644 --- a/sdks/php/docs/Api/UnclaimedDraftApi.md +++ b/sdks/php/docs/Api/UnclaimedDraftApi.md @@ -1,5 +1,7 @@ # Dropbox\Sign\UnclaimedDraftApi + + All URIs are relative to https://api.hellosign.com/v3. | Method | HTTP request | Description | diff --git a/sdks/php/docs/Model/AccountCreateRequest.md b/sdks/php/docs/Model/AccountCreateRequest.md index 4fb7caf90..e7d820da0 100644 --- a/sdks/php/docs/Model/AccountCreateRequest.md +++ b/sdks/php/docs/Model/AccountCreateRequest.md @@ -1,4 +1,4 @@ -# # AccountCreateRequest +# AccountCreateRequest diff --git a/sdks/php/docs/Model/AccountCreateResponse.md b/sdks/php/docs/Model/AccountCreateResponse.md index bf38de482..4e14fb8d4 100644 --- a/sdks/php/docs/Model/AccountCreateResponse.md +++ b/sdks/php/docs/Model/AccountCreateResponse.md @@ -1,4 +1,4 @@ -# # AccountCreateResponse +# AccountCreateResponse diff --git a/sdks/php/docs/Model/AccountGetResponse.md b/sdks/php/docs/Model/AccountGetResponse.md index e7cecaf5d..75956c239 100644 --- a/sdks/php/docs/Model/AccountGetResponse.md +++ b/sdks/php/docs/Model/AccountGetResponse.md @@ -1,4 +1,4 @@ -# # AccountGetResponse +# AccountGetResponse diff --git a/sdks/php/docs/Model/AccountResponse.md b/sdks/php/docs/Model/AccountResponse.md index 8cabded2a..f49981054 100644 --- a/sdks/php/docs/Model/AccountResponse.md +++ b/sdks/php/docs/Model/AccountResponse.md @@ -1,4 +1,4 @@ -# # AccountResponse +# AccountResponse diff --git a/sdks/php/docs/Model/AccountResponseQuotas.md b/sdks/php/docs/Model/AccountResponseQuotas.md index 96399403d..f426e1cd7 100644 --- a/sdks/php/docs/Model/AccountResponseQuotas.md +++ b/sdks/php/docs/Model/AccountResponseQuotas.md @@ -1,4 +1,4 @@ -# # AccountResponseQuotas +# AccountResponseQuotas Details concerning remaining monthly quotas. diff --git a/sdks/php/docs/Model/AccountResponseSettings.md b/sdks/php/docs/Model/AccountResponseSettings.md index 913c6584a..467847fd3 100644 --- a/sdks/php/docs/Model/AccountResponseSettings.md +++ b/sdks/php/docs/Model/AccountResponseSettings.md @@ -1,4 +1,4 @@ -# # AccountResponseSettings +# AccountResponseSettings Subset of configured settings diff --git a/sdks/php/docs/Model/AccountResponseUsage.md b/sdks/php/docs/Model/AccountResponseUsage.md index 3d8c992c2..3637e2e54 100644 --- a/sdks/php/docs/Model/AccountResponseUsage.md +++ b/sdks/php/docs/Model/AccountResponseUsage.md @@ -1,4 +1,4 @@ -# # AccountResponseUsage +# AccountResponseUsage Details concerning monthly usage diff --git a/sdks/php/docs/Model/AccountUpdateRequest.md b/sdks/php/docs/Model/AccountUpdateRequest.md index 2eb446a53..69ea59fb1 100644 --- a/sdks/php/docs/Model/AccountUpdateRequest.md +++ b/sdks/php/docs/Model/AccountUpdateRequest.md @@ -1,4 +1,4 @@ -# # AccountUpdateRequest +# AccountUpdateRequest diff --git a/sdks/php/docs/Model/AccountVerifyRequest.md b/sdks/php/docs/Model/AccountVerifyRequest.md index 756432934..2b5e56cde 100644 --- a/sdks/php/docs/Model/AccountVerifyRequest.md +++ b/sdks/php/docs/Model/AccountVerifyRequest.md @@ -1,4 +1,4 @@ -# # AccountVerifyRequest +# AccountVerifyRequest diff --git a/sdks/php/docs/Model/AccountVerifyResponse.md b/sdks/php/docs/Model/AccountVerifyResponse.md index 6e7849d15..d2f0277c5 100644 --- a/sdks/php/docs/Model/AccountVerifyResponse.md +++ b/sdks/php/docs/Model/AccountVerifyResponse.md @@ -1,4 +1,4 @@ -# # AccountVerifyResponse +# AccountVerifyResponse diff --git a/sdks/php/docs/Model/AccountVerifyResponseAccount.md b/sdks/php/docs/Model/AccountVerifyResponseAccount.md index ce3508004..461eaef1a 100644 --- a/sdks/php/docs/Model/AccountVerifyResponseAccount.md +++ b/sdks/php/docs/Model/AccountVerifyResponseAccount.md @@ -1,4 +1,4 @@ -# # AccountVerifyResponseAccount +# AccountVerifyResponseAccount diff --git a/sdks/php/docs/Model/ApiAppCreateRequest.md b/sdks/php/docs/Model/ApiAppCreateRequest.md index 09a285a60..2bb7d3e66 100644 --- a/sdks/php/docs/Model/ApiAppCreateRequest.md +++ b/sdks/php/docs/Model/ApiAppCreateRequest.md @@ -1,4 +1,4 @@ -# # ApiAppCreateRequest +# ApiAppCreateRequest diff --git a/sdks/php/docs/Model/ApiAppGetResponse.md b/sdks/php/docs/Model/ApiAppGetResponse.md index b47e35c20..60bfb0cd2 100644 --- a/sdks/php/docs/Model/ApiAppGetResponse.md +++ b/sdks/php/docs/Model/ApiAppGetResponse.md @@ -1,4 +1,4 @@ -# # ApiAppGetResponse +# ApiAppGetResponse diff --git a/sdks/php/docs/Model/ApiAppListResponse.md b/sdks/php/docs/Model/ApiAppListResponse.md index 2eb8ae3c9..279de9df7 100644 --- a/sdks/php/docs/Model/ApiAppListResponse.md +++ b/sdks/php/docs/Model/ApiAppListResponse.md @@ -1,4 +1,4 @@ -# # ApiAppListResponse +# ApiAppListResponse diff --git a/sdks/php/docs/Model/ApiAppResponse.md b/sdks/php/docs/Model/ApiAppResponse.md index 975df4b5c..ece6dd36b 100644 --- a/sdks/php/docs/Model/ApiAppResponse.md +++ b/sdks/php/docs/Model/ApiAppResponse.md @@ -1,4 +1,4 @@ -# # ApiAppResponse +# ApiAppResponse Contains information about an API App. diff --git a/sdks/php/docs/Model/ApiAppResponseOAuth.md b/sdks/php/docs/Model/ApiAppResponseOAuth.md index f6010fe20..f0af7bf71 100644 --- a/sdks/php/docs/Model/ApiAppResponseOAuth.md +++ b/sdks/php/docs/Model/ApiAppResponseOAuth.md @@ -1,4 +1,4 @@ -# # ApiAppResponseOAuth +# ApiAppResponseOAuth An object describing the app's OAuth properties, or null if OAuth is not configured for the app. diff --git a/sdks/php/docs/Model/ApiAppResponseOptions.md b/sdks/php/docs/Model/ApiAppResponseOptions.md index 872e8ed0f..ed2eb327e 100644 --- a/sdks/php/docs/Model/ApiAppResponseOptions.md +++ b/sdks/php/docs/Model/ApiAppResponseOptions.md @@ -1,4 +1,4 @@ -# # ApiAppResponseOptions +# ApiAppResponseOptions An object with options that override account settings. diff --git a/sdks/php/docs/Model/ApiAppResponseOwnerAccount.md b/sdks/php/docs/Model/ApiAppResponseOwnerAccount.md index 8f1ce1963..b76275f42 100644 --- a/sdks/php/docs/Model/ApiAppResponseOwnerAccount.md +++ b/sdks/php/docs/Model/ApiAppResponseOwnerAccount.md @@ -1,4 +1,4 @@ -# # ApiAppResponseOwnerAccount +# ApiAppResponseOwnerAccount An object describing the app's owner diff --git a/sdks/php/docs/Model/ApiAppResponseWhiteLabelingOptions.md b/sdks/php/docs/Model/ApiAppResponseWhiteLabelingOptions.md index 6e963383c..6d6383d27 100644 --- a/sdks/php/docs/Model/ApiAppResponseWhiteLabelingOptions.md +++ b/sdks/php/docs/Model/ApiAppResponseWhiteLabelingOptions.md @@ -1,4 +1,4 @@ -# # ApiAppResponseWhiteLabelingOptions +# ApiAppResponseWhiteLabelingOptions An object with options to customize the app's signer page diff --git a/sdks/php/docs/Model/ApiAppUpdateRequest.md b/sdks/php/docs/Model/ApiAppUpdateRequest.md index b20923db0..d5dc9a0be 100644 --- a/sdks/php/docs/Model/ApiAppUpdateRequest.md +++ b/sdks/php/docs/Model/ApiAppUpdateRequest.md @@ -1,4 +1,4 @@ -# # ApiAppUpdateRequest +# ApiAppUpdateRequest diff --git a/sdks/php/docs/Model/BulkSendJobGetResponse.md b/sdks/php/docs/Model/BulkSendJobGetResponse.md index ec44f5b9a..8b30d6b27 100644 --- a/sdks/php/docs/Model/BulkSendJobGetResponse.md +++ b/sdks/php/docs/Model/BulkSendJobGetResponse.md @@ -1,4 +1,4 @@ -# # BulkSendJobGetResponse +# BulkSendJobGetResponse diff --git a/sdks/php/docs/Model/BulkSendJobGetResponseSignatureRequests.md b/sdks/php/docs/Model/BulkSendJobGetResponseSignatureRequests.md index 247951d28..b47a3240d 100644 --- a/sdks/php/docs/Model/BulkSendJobGetResponseSignatureRequests.md +++ b/sdks/php/docs/Model/BulkSendJobGetResponseSignatureRequests.md @@ -1,4 +1,4 @@ -# # BulkSendJobGetResponseSignatureRequests +# BulkSendJobGetResponseSignatureRequests diff --git a/sdks/php/docs/Model/BulkSendJobListResponse.md b/sdks/php/docs/Model/BulkSendJobListResponse.md index 470448cd9..b19ae8e6c 100644 --- a/sdks/php/docs/Model/BulkSendJobListResponse.md +++ b/sdks/php/docs/Model/BulkSendJobListResponse.md @@ -1,4 +1,4 @@ -# # BulkSendJobListResponse +# BulkSendJobListResponse diff --git a/sdks/php/docs/Model/BulkSendJobResponse.md b/sdks/php/docs/Model/BulkSendJobResponse.md index 16194fdd3..4cb784d0c 100644 --- a/sdks/php/docs/Model/BulkSendJobResponse.md +++ b/sdks/php/docs/Model/BulkSendJobResponse.md @@ -1,4 +1,4 @@ -# # BulkSendJobResponse +# BulkSendJobResponse Contains information about the BulkSendJob such as when it was created and how many signature requests are queued. diff --git a/sdks/php/docs/Model/BulkSendJobSendResponse.md b/sdks/php/docs/Model/BulkSendJobSendResponse.md index 83f1c7f8b..e9adec4eb 100644 --- a/sdks/php/docs/Model/BulkSendJobSendResponse.md +++ b/sdks/php/docs/Model/BulkSendJobSendResponse.md @@ -1,4 +1,4 @@ -# # BulkSendJobSendResponse +# BulkSendJobSendResponse diff --git a/sdks/php/docs/Model/DocumentFieldDetectionRequest.md b/sdks/php/docs/Model/DocumentFieldDetectionRequest.md index 728d7b104..3a9c7da65 100644 --- a/sdks/php/docs/Model/DocumentFieldDetectionRequest.md +++ b/sdks/php/docs/Model/DocumentFieldDetectionRequest.md @@ -1,4 +1,4 @@ -# # DocumentFieldDetectionRequest +# DocumentFieldDetectionRequest diff --git a/sdks/php/docs/Model/DocumentFieldDetectionResponse.md b/sdks/php/docs/Model/DocumentFieldDetectionResponse.md index f4dedb084..7d055e33f 100644 --- a/sdks/php/docs/Model/DocumentFieldDetectionResponse.md +++ b/sdks/php/docs/Model/DocumentFieldDetectionResponse.md @@ -1,4 +1,4 @@ -# # DocumentFieldDetectionResponse +# DocumentFieldDetectionResponse diff --git a/sdks/php/docs/Model/DocumentFieldDetectionResponseDetectionResult.md b/sdks/php/docs/Model/DocumentFieldDetectionResponseDetectionResult.md index 9035cbec4..7d147790e 100644 --- a/sdks/php/docs/Model/DocumentFieldDetectionResponseDetectionResult.md +++ b/sdks/php/docs/Model/DocumentFieldDetectionResponseDetectionResult.md @@ -1,4 +1,4 @@ -# # DocumentFieldDetectionResponseDetectionResult +# DocumentFieldDetectionResponseDetectionResult diff --git a/sdks/php/docs/Model/EmbeddedEditUrlRequest.md b/sdks/php/docs/Model/EmbeddedEditUrlRequest.md index ad008f66e..c6667481c 100644 --- a/sdks/php/docs/Model/EmbeddedEditUrlRequest.md +++ b/sdks/php/docs/Model/EmbeddedEditUrlRequest.md @@ -1,4 +1,4 @@ -# # EmbeddedEditUrlRequest +# EmbeddedEditUrlRequest diff --git a/sdks/php/docs/Model/EmbeddedEditUrlResponse.md b/sdks/php/docs/Model/EmbeddedEditUrlResponse.md index 75b539197..11a20276b 100644 --- a/sdks/php/docs/Model/EmbeddedEditUrlResponse.md +++ b/sdks/php/docs/Model/EmbeddedEditUrlResponse.md @@ -1,4 +1,4 @@ -# # EmbeddedEditUrlResponse +# EmbeddedEditUrlResponse diff --git a/sdks/php/docs/Model/EmbeddedEditUrlResponseEmbedded.md b/sdks/php/docs/Model/EmbeddedEditUrlResponseEmbedded.md index 03d32b4ef..f89d0e9cb 100644 --- a/sdks/php/docs/Model/EmbeddedEditUrlResponseEmbedded.md +++ b/sdks/php/docs/Model/EmbeddedEditUrlResponseEmbedded.md @@ -1,4 +1,4 @@ -# # EmbeddedEditUrlResponseEmbedded +# EmbeddedEditUrlResponseEmbedded An embedded template object. diff --git a/sdks/php/docs/Model/EmbeddedSignUrlResponse.md b/sdks/php/docs/Model/EmbeddedSignUrlResponse.md index bbf44ed90..becd53e38 100644 --- a/sdks/php/docs/Model/EmbeddedSignUrlResponse.md +++ b/sdks/php/docs/Model/EmbeddedSignUrlResponse.md @@ -1,4 +1,4 @@ -# # EmbeddedSignUrlResponse +# EmbeddedSignUrlResponse diff --git a/sdks/php/docs/Model/EmbeddedSignUrlResponseEmbedded.md b/sdks/php/docs/Model/EmbeddedSignUrlResponseEmbedded.md index a3794eb9e..2d97a09d8 100644 --- a/sdks/php/docs/Model/EmbeddedSignUrlResponseEmbedded.md +++ b/sdks/php/docs/Model/EmbeddedSignUrlResponseEmbedded.md @@ -1,4 +1,4 @@ -# # EmbeddedSignUrlResponseEmbedded +# EmbeddedSignUrlResponseEmbedded An object that contains necessary information to set up embedded signing. diff --git a/sdks/php/docs/Model/ErrorResponse.md b/sdks/php/docs/Model/ErrorResponse.md index bfc306713..44e0d9110 100644 --- a/sdks/php/docs/Model/ErrorResponse.md +++ b/sdks/php/docs/Model/ErrorResponse.md @@ -1,4 +1,4 @@ -# # ErrorResponse +# ErrorResponse diff --git a/sdks/php/docs/Model/ErrorResponseError.md b/sdks/php/docs/Model/ErrorResponseError.md index 09b0a2ac8..0e527a0ae 100644 --- a/sdks/php/docs/Model/ErrorResponseError.md +++ b/sdks/php/docs/Model/ErrorResponseError.md @@ -1,4 +1,4 @@ -# # ErrorResponseError +# ErrorResponseError Contains information about an error that occurred. diff --git a/sdks/php/docs/Model/EventCallbackRequest.md b/sdks/php/docs/Model/EventCallbackRequest.md index aeac7154b..0cbc2e440 100644 --- a/sdks/php/docs/Model/EventCallbackRequest.md +++ b/sdks/php/docs/Model/EventCallbackRequest.md @@ -1,4 +1,4 @@ -# # EventCallbackRequest +# EventCallbackRequest diff --git a/sdks/php/docs/Model/EventCallbackRequestEvent.md b/sdks/php/docs/Model/EventCallbackRequestEvent.md index 84a3f872f..1641ce3cc 100644 --- a/sdks/php/docs/Model/EventCallbackRequestEvent.md +++ b/sdks/php/docs/Model/EventCallbackRequestEvent.md @@ -1,4 +1,4 @@ -# # EventCallbackRequestEvent +# EventCallbackRequestEvent Basic information about the event that occurred. diff --git a/sdks/php/docs/Model/EventCallbackRequestEventMetadata.md b/sdks/php/docs/Model/EventCallbackRequestEventMetadata.md index 1b7e08e01..b8468abb3 100644 --- a/sdks/php/docs/Model/EventCallbackRequestEventMetadata.md +++ b/sdks/php/docs/Model/EventCallbackRequestEventMetadata.md @@ -1,4 +1,4 @@ -# # EventCallbackRequestEventMetadata +# EventCallbackRequestEventMetadata Specific metadata about the event. diff --git a/sdks/php/docs/Model/FaxGetResponse.md b/sdks/php/docs/Model/FaxGetResponse.md index 59bea7dc3..37d63f5d4 100644 --- a/sdks/php/docs/Model/FaxGetResponse.md +++ b/sdks/php/docs/Model/FaxGetResponse.md @@ -1,4 +1,4 @@ -# # FaxGetResponse +# FaxGetResponse diff --git a/sdks/php/docs/Model/FaxLineAddUserRequest.md b/sdks/php/docs/Model/FaxLineAddUserRequest.md index 966ac619f..a476bc168 100644 --- a/sdks/php/docs/Model/FaxLineAddUserRequest.md +++ b/sdks/php/docs/Model/FaxLineAddUserRequest.md @@ -1,4 +1,4 @@ -# # FaxLineAddUserRequest +# FaxLineAddUserRequest diff --git a/sdks/php/docs/Model/FaxLineAreaCodeGetCountryEnum.md b/sdks/php/docs/Model/FaxLineAreaCodeGetCountryEnum.md index 91b758d8f..b60caf908 100644 --- a/sdks/php/docs/Model/FaxLineAreaCodeGetCountryEnum.md +++ b/sdks/php/docs/Model/FaxLineAreaCodeGetCountryEnum.md @@ -1,4 +1,4 @@ -# # FaxLineAreaCodeGetCountryEnum +# FaxLineAreaCodeGetCountryEnum diff --git a/sdks/php/docs/Model/FaxLineAreaCodeGetProvinceEnum.md b/sdks/php/docs/Model/FaxLineAreaCodeGetProvinceEnum.md index 369a34359..5f7258d39 100644 --- a/sdks/php/docs/Model/FaxLineAreaCodeGetProvinceEnum.md +++ b/sdks/php/docs/Model/FaxLineAreaCodeGetProvinceEnum.md @@ -1,4 +1,4 @@ -# # FaxLineAreaCodeGetProvinceEnum +# FaxLineAreaCodeGetProvinceEnum diff --git a/sdks/php/docs/Model/FaxLineAreaCodeGetResponse.md b/sdks/php/docs/Model/FaxLineAreaCodeGetResponse.md index 3f1d9039a..b7509b353 100644 --- a/sdks/php/docs/Model/FaxLineAreaCodeGetResponse.md +++ b/sdks/php/docs/Model/FaxLineAreaCodeGetResponse.md @@ -1,4 +1,4 @@ -# # FaxLineAreaCodeGetResponse +# FaxLineAreaCodeGetResponse diff --git a/sdks/php/docs/Model/FaxLineAreaCodeGetStateEnum.md b/sdks/php/docs/Model/FaxLineAreaCodeGetStateEnum.md index f978b75a2..9cd0d6506 100644 --- a/sdks/php/docs/Model/FaxLineAreaCodeGetStateEnum.md +++ b/sdks/php/docs/Model/FaxLineAreaCodeGetStateEnum.md @@ -1,4 +1,4 @@ -# # FaxLineAreaCodeGetStateEnum +# FaxLineAreaCodeGetStateEnum diff --git a/sdks/php/docs/Model/FaxLineCreateRequest.md b/sdks/php/docs/Model/FaxLineCreateRequest.md index 3483d66d8..60883864e 100644 --- a/sdks/php/docs/Model/FaxLineCreateRequest.md +++ b/sdks/php/docs/Model/FaxLineCreateRequest.md @@ -1,4 +1,4 @@ -# # FaxLineCreateRequest +# FaxLineCreateRequest diff --git a/sdks/php/docs/Model/FaxLineDeleteRequest.md b/sdks/php/docs/Model/FaxLineDeleteRequest.md index fed4ee118..be487f099 100644 --- a/sdks/php/docs/Model/FaxLineDeleteRequest.md +++ b/sdks/php/docs/Model/FaxLineDeleteRequest.md @@ -1,4 +1,4 @@ -# # FaxLineDeleteRequest +# FaxLineDeleteRequest diff --git a/sdks/php/docs/Model/FaxLineListResponse.md b/sdks/php/docs/Model/FaxLineListResponse.md index 3b6398939..c28d9ca50 100644 --- a/sdks/php/docs/Model/FaxLineListResponse.md +++ b/sdks/php/docs/Model/FaxLineListResponse.md @@ -1,4 +1,4 @@ -# # FaxLineListResponse +# FaxLineListResponse diff --git a/sdks/php/docs/Model/FaxLineRemoveUserRequest.md b/sdks/php/docs/Model/FaxLineRemoveUserRequest.md index d5b79cefa..7b7620326 100644 --- a/sdks/php/docs/Model/FaxLineRemoveUserRequest.md +++ b/sdks/php/docs/Model/FaxLineRemoveUserRequest.md @@ -1,4 +1,4 @@ -# # FaxLineRemoveUserRequest +# FaxLineRemoveUserRequest diff --git a/sdks/php/docs/Model/FaxLineResponse.md b/sdks/php/docs/Model/FaxLineResponse.md index 372b1d043..e1c6fd2c9 100644 --- a/sdks/php/docs/Model/FaxLineResponse.md +++ b/sdks/php/docs/Model/FaxLineResponse.md @@ -1,4 +1,4 @@ -# # FaxLineResponse +# FaxLineResponse diff --git a/sdks/php/docs/Model/FaxLineResponseFaxLine.md b/sdks/php/docs/Model/FaxLineResponseFaxLine.md index 51f479adc..a4571d8f9 100644 --- a/sdks/php/docs/Model/FaxLineResponseFaxLine.md +++ b/sdks/php/docs/Model/FaxLineResponseFaxLine.md @@ -1,4 +1,4 @@ -# # FaxLineResponseFaxLine +# FaxLineResponseFaxLine diff --git a/sdks/php/docs/Model/FaxListResponse.md b/sdks/php/docs/Model/FaxListResponse.md index 5ccdafc91..2bdce7a52 100644 --- a/sdks/php/docs/Model/FaxListResponse.md +++ b/sdks/php/docs/Model/FaxListResponse.md @@ -1,4 +1,4 @@ -# # FaxListResponse +# FaxListResponse diff --git a/sdks/php/docs/Model/FaxResponse.md b/sdks/php/docs/Model/FaxResponse.md index 2d1865fde..491e0019f 100644 --- a/sdks/php/docs/Model/FaxResponse.md +++ b/sdks/php/docs/Model/FaxResponse.md @@ -1,4 +1,4 @@ -# # FaxResponse +# FaxResponse diff --git a/sdks/php/docs/Model/FaxResponseTransmission.md b/sdks/php/docs/Model/FaxResponseTransmission.md index 353e745f0..6c41ef57c 100644 --- a/sdks/php/docs/Model/FaxResponseTransmission.md +++ b/sdks/php/docs/Model/FaxResponseTransmission.md @@ -1,4 +1,4 @@ -# # FaxResponseTransmission +# FaxResponseTransmission diff --git a/sdks/php/docs/Model/FaxSendRequest.md b/sdks/php/docs/Model/FaxSendRequest.md index 432fd5ef6..51baabce7 100644 --- a/sdks/php/docs/Model/FaxSendRequest.md +++ b/sdks/php/docs/Model/FaxSendRequest.md @@ -1,4 +1,4 @@ -# # FaxSendRequest +# FaxSendRequest diff --git a/sdks/php/docs/Model/FileResponse.md b/sdks/php/docs/Model/FileResponse.md index 5803b6565..0e913d145 100644 --- a/sdks/php/docs/Model/FileResponse.md +++ b/sdks/php/docs/Model/FileResponse.md @@ -1,4 +1,4 @@ -# # FileResponse +# FileResponse diff --git a/sdks/php/docs/Model/FileResponseDataUri.md b/sdks/php/docs/Model/FileResponseDataUri.md index dbead09b0..dab7e90f7 100644 --- a/sdks/php/docs/Model/FileResponseDataUri.md +++ b/sdks/php/docs/Model/FileResponseDataUri.md @@ -1,4 +1,4 @@ -# # FileResponseDataUri +# FileResponseDataUri diff --git a/sdks/php/docs/Model/ListInfoResponse.md b/sdks/php/docs/Model/ListInfoResponse.md index 872ace684..f601c23cd 100644 --- a/sdks/php/docs/Model/ListInfoResponse.md +++ b/sdks/php/docs/Model/ListInfoResponse.md @@ -1,4 +1,4 @@ -# # ListInfoResponse +# ListInfoResponse Contains pagination information about the data returned. diff --git a/sdks/php/docs/Model/OAuthTokenGenerateRequest.md b/sdks/php/docs/Model/OAuthTokenGenerateRequest.md index 40eaf49f9..2d9b44c73 100644 --- a/sdks/php/docs/Model/OAuthTokenGenerateRequest.md +++ b/sdks/php/docs/Model/OAuthTokenGenerateRequest.md @@ -1,4 +1,4 @@ -# # OAuthTokenGenerateRequest +# OAuthTokenGenerateRequest diff --git a/sdks/php/docs/Model/OAuthTokenRefreshRequest.md b/sdks/php/docs/Model/OAuthTokenRefreshRequest.md index 590ca4bc3..9cdf52668 100644 --- a/sdks/php/docs/Model/OAuthTokenRefreshRequest.md +++ b/sdks/php/docs/Model/OAuthTokenRefreshRequest.md @@ -1,4 +1,4 @@ -# # OAuthTokenRefreshRequest +# OAuthTokenRefreshRequest diff --git a/sdks/php/docs/Model/OAuthTokenResponse.md b/sdks/php/docs/Model/OAuthTokenResponse.md index 016f00e9b..24d74980d 100644 --- a/sdks/php/docs/Model/OAuthTokenResponse.md +++ b/sdks/php/docs/Model/OAuthTokenResponse.md @@ -1,4 +1,4 @@ -# # OAuthTokenResponse +# OAuthTokenResponse diff --git a/sdks/php/docs/Model/ReportCreateRequest.md b/sdks/php/docs/Model/ReportCreateRequest.md index 490958a41..880812d04 100644 --- a/sdks/php/docs/Model/ReportCreateRequest.md +++ b/sdks/php/docs/Model/ReportCreateRequest.md @@ -1,4 +1,4 @@ -# # ReportCreateRequest +# ReportCreateRequest diff --git a/sdks/php/docs/Model/ReportCreateResponse.md b/sdks/php/docs/Model/ReportCreateResponse.md index 335d94a47..34505760b 100644 --- a/sdks/php/docs/Model/ReportCreateResponse.md +++ b/sdks/php/docs/Model/ReportCreateResponse.md @@ -1,4 +1,4 @@ -# # ReportCreateResponse +# ReportCreateResponse diff --git a/sdks/php/docs/Model/ReportResponse.md b/sdks/php/docs/Model/ReportResponse.md index 3b253ce4e..881c1d46a 100644 --- a/sdks/php/docs/Model/ReportResponse.md +++ b/sdks/php/docs/Model/ReportResponse.md @@ -1,4 +1,4 @@ -# # ReportResponse +# ReportResponse Contains information about the report request. diff --git a/sdks/php/docs/Model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md b/sdks/php/docs/Model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md index 73430a885..53b01889a 100644 --- a/sdks/php/docs/Model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md +++ b/sdks/php/docs/Model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md @@ -1,4 +1,4 @@ -# # SignatureRequestBulkCreateEmbeddedWithTemplateRequest +# SignatureRequestBulkCreateEmbeddedWithTemplateRequest diff --git a/sdks/php/docs/Model/SignatureRequestBulkSendWithTemplateRequest.md b/sdks/php/docs/Model/SignatureRequestBulkSendWithTemplateRequest.md index 99c568f22..178ebaaa4 100644 --- a/sdks/php/docs/Model/SignatureRequestBulkSendWithTemplateRequest.md +++ b/sdks/php/docs/Model/SignatureRequestBulkSendWithTemplateRequest.md @@ -1,4 +1,4 @@ -# # SignatureRequestBulkSendWithTemplateRequest +# SignatureRequestBulkSendWithTemplateRequest diff --git a/sdks/php/docs/Model/SignatureRequestCreateEmbeddedRequest.md b/sdks/php/docs/Model/SignatureRequestCreateEmbeddedRequest.md index 639123f60..8cbb91942 100644 --- a/sdks/php/docs/Model/SignatureRequestCreateEmbeddedRequest.md +++ b/sdks/php/docs/Model/SignatureRequestCreateEmbeddedRequest.md @@ -1,4 +1,4 @@ -# # SignatureRequestCreateEmbeddedRequest +# SignatureRequestCreateEmbeddedRequest diff --git a/sdks/php/docs/Model/SignatureRequestCreateEmbeddedWithTemplateRequest.md b/sdks/php/docs/Model/SignatureRequestCreateEmbeddedWithTemplateRequest.md index a876a41ad..b2d22eda4 100644 --- a/sdks/php/docs/Model/SignatureRequestCreateEmbeddedWithTemplateRequest.md +++ b/sdks/php/docs/Model/SignatureRequestCreateEmbeddedWithTemplateRequest.md @@ -1,4 +1,4 @@ -# # SignatureRequestCreateEmbeddedWithTemplateRequest +# SignatureRequestCreateEmbeddedWithTemplateRequest diff --git a/sdks/php/docs/Model/SignatureRequestEditEmbeddedRequest.md b/sdks/php/docs/Model/SignatureRequestEditEmbeddedRequest.md index 772db7145..c686754ab 100644 --- a/sdks/php/docs/Model/SignatureRequestEditEmbeddedRequest.md +++ b/sdks/php/docs/Model/SignatureRequestEditEmbeddedRequest.md @@ -1,4 +1,4 @@ -# # SignatureRequestEditEmbeddedRequest +# SignatureRequestEditEmbeddedRequest diff --git a/sdks/php/docs/Model/SignatureRequestEditEmbeddedWithTemplateRequest.md b/sdks/php/docs/Model/SignatureRequestEditEmbeddedWithTemplateRequest.md index 3b9df4cac..e9bf18580 100644 --- a/sdks/php/docs/Model/SignatureRequestEditEmbeddedWithTemplateRequest.md +++ b/sdks/php/docs/Model/SignatureRequestEditEmbeddedWithTemplateRequest.md @@ -1,4 +1,4 @@ -# # SignatureRequestEditEmbeddedWithTemplateRequest +# SignatureRequestEditEmbeddedWithTemplateRequest diff --git a/sdks/php/docs/Model/SignatureRequestEditRequest.md b/sdks/php/docs/Model/SignatureRequestEditRequest.md index e4139fe04..4a8a5db52 100644 --- a/sdks/php/docs/Model/SignatureRequestEditRequest.md +++ b/sdks/php/docs/Model/SignatureRequestEditRequest.md @@ -1,4 +1,4 @@ -# # SignatureRequestEditRequest +# SignatureRequestEditRequest diff --git a/sdks/php/docs/Model/SignatureRequestEditWithTemplateRequest.md b/sdks/php/docs/Model/SignatureRequestEditWithTemplateRequest.md index 835ab98ea..7d642a410 100644 --- a/sdks/php/docs/Model/SignatureRequestEditWithTemplateRequest.md +++ b/sdks/php/docs/Model/SignatureRequestEditWithTemplateRequest.md @@ -1,4 +1,4 @@ -# # SignatureRequestEditWithTemplateRequest +# SignatureRequestEditWithTemplateRequest diff --git a/sdks/php/docs/Model/SignatureRequestGetResponse.md b/sdks/php/docs/Model/SignatureRequestGetResponse.md index c2f3c97b7..104958bc6 100644 --- a/sdks/php/docs/Model/SignatureRequestGetResponse.md +++ b/sdks/php/docs/Model/SignatureRequestGetResponse.md @@ -1,4 +1,4 @@ -# # SignatureRequestGetResponse +# SignatureRequestGetResponse diff --git a/sdks/php/docs/Model/SignatureRequestListResponse.md b/sdks/php/docs/Model/SignatureRequestListResponse.md index c0aae36cd..22879b986 100644 --- a/sdks/php/docs/Model/SignatureRequestListResponse.md +++ b/sdks/php/docs/Model/SignatureRequestListResponse.md @@ -1,4 +1,4 @@ -# # SignatureRequestListResponse +# SignatureRequestListResponse diff --git a/sdks/php/docs/Model/SignatureRequestRemindRequest.md b/sdks/php/docs/Model/SignatureRequestRemindRequest.md index e8b9292f8..25afe5bc2 100644 --- a/sdks/php/docs/Model/SignatureRequestRemindRequest.md +++ b/sdks/php/docs/Model/SignatureRequestRemindRequest.md @@ -1,4 +1,4 @@ -# # SignatureRequestRemindRequest +# SignatureRequestRemindRequest diff --git a/sdks/php/docs/Model/SignatureRequestResponse.md b/sdks/php/docs/Model/SignatureRequestResponse.md index bb04b5d30..89b6a5a40 100644 --- a/sdks/php/docs/Model/SignatureRequestResponse.md +++ b/sdks/php/docs/Model/SignatureRequestResponse.md @@ -1,4 +1,4 @@ -# # SignatureRequestResponse +# SignatureRequestResponse Contains information about a signature request. diff --git a/sdks/php/docs/Model/SignatureRequestResponseAttachment.md b/sdks/php/docs/Model/SignatureRequestResponseAttachment.md index 6e84393ae..528f868fc 100644 --- a/sdks/php/docs/Model/SignatureRequestResponseAttachment.md +++ b/sdks/php/docs/Model/SignatureRequestResponseAttachment.md @@ -1,4 +1,4 @@ -# # SignatureRequestResponseAttachment +# SignatureRequestResponseAttachment Signer attachments. diff --git a/sdks/php/docs/Model/SignatureRequestResponseCustomFieldBase.md b/sdks/php/docs/Model/SignatureRequestResponseCustomFieldBase.md index 40685da58..d10c794ec 100644 --- a/sdks/php/docs/Model/SignatureRequestResponseCustomFieldBase.md +++ b/sdks/php/docs/Model/SignatureRequestResponseCustomFieldBase.md @@ -1,4 +1,4 @@ -# # SignatureRequestResponseCustomFieldBase +# SignatureRequestResponseCustomFieldBase An array of Custom Field objects containing the name and type of each custom field. diff --git a/sdks/php/docs/Model/SignatureRequestResponseCustomFieldCheckbox.md b/sdks/php/docs/Model/SignatureRequestResponseCustomFieldCheckbox.md index 08c64f658..1bbb8636a 100644 --- a/sdks/php/docs/Model/SignatureRequestResponseCustomFieldCheckbox.md +++ b/sdks/php/docs/Model/SignatureRequestResponseCustomFieldCheckbox.md @@ -1,4 +1,4 @@ -# # SignatureRequestResponseCustomFieldCheckbox +# SignatureRequestResponseCustomFieldCheckbox This class extends `SignatureRequestResponseCustomFieldBase`. diff --git a/sdks/php/docs/Model/SignatureRequestResponseCustomFieldText.md b/sdks/php/docs/Model/SignatureRequestResponseCustomFieldText.md index 38486e804..525c7c5eb 100644 --- a/sdks/php/docs/Model/SignatureRequestResponseCustomFieldText.md +++ b/sdks/php/docs/Model/SignatureRequestResponseCustomFieldText.md @@ -1,4 +1,4 @@ -# # SignatureRequestResponseCustomFieldText +# SignatureRequestResponseCustomFieldText This class extends `SignatureRequestResponseCustomFieldBase`. diff --git a/sdks/php/docs/Model/SignatureRequestResponseCustomFieldTypeEnum.md b/sdks/php/docs/Model/SignatureRequestResponseCustomFieldTypeEnum.md index 190540b9f..d37f36075 100644 --- a/sdks/php/docs/Model/SignatureRequestResponseCustomFieldTypeEnum.md +++ b/sdks/php/docs/Model/SignatureRequestResponseCustomFieldTypeEnum.md @@ -1,4 +1,4 @@ -# # SignatureRequestResponseCustomFieldTypeEnum +# SignatureRequestResponseCustomFieldTypeEnum diff --git a/sdks/php/docs/Model/SignatureRequestResponseDataBase.md b/sdks/php/docs/Model/SignatureRequestResponseDataBase.md index 7a1f3ef03..7bbb5a732 100644 --- a/sdks/php/docs/Model/SignatureRequestResponseDataBase.md +++ b/sdks/php/docs/Model/SignatureRequestResponseDataBase.md @@ -1,4 +1,4 @@ -# # SignatureRequestResponseDataBase +# SignatureRequestResponseDataBase An array of form field objects containing the name, value, and type of each textbox or checkmark field filled in by the signers. diff --git a/sdks/php/docs/Model/SignatureRequestResponseDataTypeEnum.md b/sdks/php/docs/Model/SignatureRequestResponseDataTypeEnum.md index 38e9d1e01..9f7c905cd 100644 --- a/sdks/php/docs/Model/SignatureRequestResponseDataTypeEnum.md +++ b/sdks/php/docs/Model/SignatureRequestResponseDataTypeEnum.md @@ -1,4 +1,4 @@ -# # SignatureRequestResponseDataTypeEnum +# SignatureRequestResponseDataTypeEnum diff --git a/sdks/php/docs/Model/SignatureRequestResponseDataValueCheckbox.md b/sdks/php/docs/Model/SignatureRequestResponseDataValueCheckbox.md index dfdc66f06..e439b4a38 100644 --- a/sdks/php/docs/Model/SignatureRequestResponseDataValueCheckbox.md +++ b/sdks/php/docs/Model/SignatureRequestResponseDataValueCheckbox.md @@ -1,4 +1,4 @@ -# # SignatureRequestResponseDataValueCheckbox +# SignatureRequestResponseDataValueCheckbox diff --git a/sdks/php/docs/Model/SignatureRequestResponseDataValueCheckboxMerge.md b/sdks/php/docs/Model/SignatureRequestResponseDataValueCheckboxMerge.md index 00475b7bd..e063ac0a2 100644 --- a/sdks/php/docs/Model/SignatureRequestResponseDataValueCheckboxMerge.md +++ b/sdks/php/docs/Model/SignatureRequestResponseDataValueCheckboxMerge.md @@ -1,4 +1,4 @@ -# # SignatureRequestResponseDataValueCheckboxMerge +# SignatureRequestResponseDataValueCheckboxMerge diff --git a/sdks/php/docs/Model/SignatureRequestResponseDataValueDateSigned.md b/sdks/php/docs/Model/SignatureRequestResponseDataValueDateSigned.md index 56a613c94..f093d1450 100644 --- a/sdks/php/docs/Model/SignatureRequestResponseDataValueDateSigned.md +++ b/sdks/php/docs/Model/SignatureRequestResponseDataValueDateSigned.md @@ -1,4 +1,4 @@ -# # SignatureRequestResponseDataValueDateSigned +# SignatureRequestResponseDataValueDateSigned diff --git a/sdks/php/docs/Model/SignatureRequestResponseDataValueDropdown.md b/sdks/php/docs/Model/SignatureRequestResponseDataValueDropdown.md index 61ddaae67..88c8e4e77 100644 --- a/sdks/php/docs/Model/SignatureRequestResponseDataValueDropdown.md +++ b/sdks/php/docs/Model/SignatureRequestResponseDataValueDropdown.md @@ -1,4 +1,4 @@ -# # SignatureRequestResponseDataValueDropdown +# SignatureRequestResponseDataValueDropdown diff --git a/sdks/php/docs/Model/SignatureRequestResponseDataValueInitials.md b/sdks/php/docs/Model/SignatureRequestResponseDataValueInitials.md index f4bf660f6..6af35b102 100644 --- a/sdks/php/docs/Model/SignatureRequestResponseDataValueInitials.md +++ b/sdks/php/docs/Model/SignatureRequestResponseDataValueInitials.md @@ -1,4 +1,4 @@ -# # SignatureRequestResponseDataValueInitials +# SignatureRequestResponseDataValueInitials diff --git a/sdks/php/docs/Model/SignatureRequestResponseDataValueRadio.md b/sdks/php/docs/Model/SignatureRequestResponseDataValueRadio.md index e5de3e9af..629f6be7e 100644 --- a/sdks/php/docs/Model/SignatureRequestResponseDataValueRadio.md +++ b/sdks/php/docs/Model/SignatureRequestResponseDataValueRadio.md @@ -1,4 +1,4 @@ -# # SignatureRequestResponseDataValueRadio +# SignatureRequestResponseDataValueRadio diff --git a/sdks/php/docs/Model/SignatureRequestResponseDataValueSignature.md b/sdks/php/docs/Model/SignatureRequestResponseDataValueSignature.md index 877febbcd..38dbc27c3 100644 --- a/sdks/php/docs/Model/SignatureRequestResponseDataValueSignature.md +++ b/sdks/php/docs/Model/SignatureRequestResponseDataValueSignature.md @@ -1,4 +1,4 @@ -# # SignatureRequestResponseDataValueSignature +# SignatureRequestResponseDataValueSignature diff --git a/sdks/php/docs/Model/SignatureRequestResponseDataValueText.md b/sdks/php/docs/Model/SignatureRequestResponseDataValueText.md index 6058f2017..a229af1ca 100644 --- a/sdks/php/docs/Model/SignatureRequestResponseDataValueText.md +++ b/sdks/php/docs/Model/SignatureRequestResponseDataValueText.md @@ -1,4 +1,4 @@ -# # SignatureRequestResponseDataValueText +# SignatureRequestResponseDataValueText diff --git a/sdks/php/docs/Model/SignatureRequestResponseDataValueTextMerge.md b/sdks/php/docs/Model/SignatureRequestResponseDataValueTextMerge.md index e1b140727..a09ba416e 100644 --- a/sdks/php/docs/Model/SignatureRequestResponseDataValueTextMerge.md +++ b/sdks/php/docs/Model/SignatureRequestResponseDataValueTextMerge.md @@ -1,4 +1,4 @@ -# # SignatureRequestResponseDataValueTextMerge +# SignatureRequestResponseDataValueTextMerge diff --git a/sdks/php/docs/Model/SignatureRequestResponseSignatures.md b/sdks/php/docs/Model/SignatureRequestResponseSignatures.md index 6d49a3089..4027db2ee 100644 --- a/sdks/php/docs/Model/SignatureRequestResponseSignatures.md +++ b/sdks/php/docs/Model/SignatureRequestResponseSignatures.md @@ -1,4 +1,4 @@ -# # SignatureRequestResponseSignatures +# SignatureRequestResponseSignatures An array of signature objects, 1 for each signer. diff --git a/sdks/php/docs/Model/SignatureRequestSendRequest.md b/sdks/php/docs/Model/SignatureRequestSendRequest.md index 2d3e247a8..d68fa70f7 100644 --- a/sdks/php/docs/Model/SignatureRequestSendRequest.md +++ b/sdks/php/docs/Model/SignatureRequestSendRequest.md @@ -1,4 +1,4 @@ -# # SignatureRequestSendRequest +# SignatureRequestSendRequest diff --git a/sdks/php/docs/Model/SignatureRequestSendWithTemplateRequest.md b/sdks/php/docs/Model/SignatureRequestSendWithTemplateRequest.md index 73dcb88c5..e69a11340 100644 --- a/sdks/php/docs/Model/SignatureRequestSendWithTemplateRequest.md +++ b/sdks/php/docs/Model/SignatureRequestSendWithTemplateRequest.md @@ -1,4 +1,4 @@ -# # SignatureRequestSendWithTemplateRequest +# SignatureRequestSendWithTemplateRequest diff --git a/sdks/php/docs/Model/SignatureRequestUpdateRequest.md b/sdks/php/docs/Model/SignatureRequestUpdateRequest.md index abccc2572..26f9edf84 100644 --- a/sdks/php/docs/Model/SignatureRequestUpdateRequest.md +++ b/sdks/php/docs/Model/SignatureRequestUpdateRequest.md @@ -1,4 +1,4 @@ -# # SignatureRequestUpdateRequest +# SignatureRequestUpdateRequest diff --git a/sdks/php/docs/Model/SubAttachment.md b/sdks/php/docs/Model/SubAttachment.md index 3f87942f8..d807d46fb 100644 --- a/sdks/php/docs/Model/SubAttachment.md +++ b/sdks/php/docs/Model/SubAttachment.md @@ -1,4 +1,4 @@ -# # SubAttachment +# SubAttachment diff --git a/sdks/php/docs/Model/SubBulkSignerList.md b/sdks/php/docs/Model/SubBulkSignerList.md index 9842742e5..aebb4cd91 100644 --- a/sdks/php/docs/Model/SubBulkSignerList.md +++ b/sdks/php/docs/Model/SubBulkSignerList.md @@ -1,4 +1,4 @@ -# # SubBulkSignerList +# SubBulkSignerList diff --git a/sdks/php/docs/Model/SubBulkSignerListCustomField.md b/sdks/php/docs/Model/SubBulkSignerListCustomField.md index 0eca191cb..e5cebea7e 100644 --- a/sdks/php/docs/Model/SubBulkSignerListCustomField.md +++ b/sdks/php/docs/Model/SubBulkSignerListCustomField.md @@ -1,4 +1,4 @@ -# # SubBulkSignerListCustomField +# SubBulkSignerListCustomField diff --git a/sdks/php/docs/Model/SubCC.md b/sdks/php/docs/Model/SubCC.md index 2f77e26db..14a5a5e26 100644 --- a/sdks/php/docs/Model/SubCC.md +++ b/sdks/php/docs/Model/SubCC.md @@ -1,4 +1,4 @@ -# # SubCC +# SubCC diff --git a/sdks/php/docs/Model/SubCustomField.md b/sdks/php/docs/Model/SubCustomField.md index ff1b713d7..a0eb8d170 100644 --- a/sdks/php/docs/Model/SubCustomField.md +++ b/sdks/php/docs/Model/SubCustomField.md @@ -1,4 +1,4 @@ -# # SubCustomField +# SubCustomField When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. diff --git a/sdks/php/docs/Model/SubEditorOptions.md b/sdks/php/docs/Model/SubEditorOptions.md index 2cffacfa1..e6864a785 100644 --- a/sdks/php/docs/Model/SubEditorOptions.md +++ b/sdks/php/docs/Model/SubEditorOptions.md @@ -1,4 +1,4 @@ -# # SubEditorOptions +# SubEditorOptions This allows the requester to specify editor options when a preparing a document diff --git a/sdks/php/docs/Model/SubFieldOptions.md b/sdks/php/docs/Model/SubFieldOptions.md index f8f275ebe..ac0fb8462 100644 --- a/sdks/php/docs/Model/SubFieldOptions.md +++ b/sdks/php/docs/Model/SubFieldOptions.md @@ -1,4 +1,4 @@ -# # SubFieldOptions +# SubFieldOptions This allows the requester to specify field options for a signature request. diff --git a/sdks/php/docs/Model/SubFormFieldGroup.md b/sdks/php/docs/Model/SubFormFieldGroup.md index 006da0dc1..8786f6ea9 100644 --- a/sdks/php/docs/Model/SubFormFieldGroup.md +++ b/sdks/php/docs/Model/SubFormFieldGroup.md @@ -1,4 +1,4 @@ -# # SubFormFieldGroup +# SubFormFieldGroup diff --git a/sdks/php/docs/Model/SubFormFieldRule.md b/sdks/php/docs/Model/SubFormFieldRule.md index fca10b343..375eb7136 100644 --- a/sdks/php/docs/Model/SubFormFieldRule.md +++ b/sdks/php/docs/Model/SubFormFieldRule.md @@ -1,4 +1,4 @@ -# # SubFormFieldRule +# SubFormFieldRule diff --git a/sdks/php/docs/Model/SubFormFieldRuleAction.md b/sdks/php/docs/Model/SubFormFieldRuleAction.md index 0c4b275a6..0dbd608cd 100644 --- a/sdks/php/docs/Model/SubFormFieldRuleAction.md +++ b/sdks/php/docs/Model/SubFormFieldRuleAction.md @@ -1,4 +1,4 @@ -# # SubFormFieldRuleAction +# SubFormFieldRuleAction diff --git a/sdks/php/docs/Model/SubFormFieldRuleTrigger.md b/sdks/php/docs/Model/SubFormFieldRuleTrigger.md index da2141ef0..d0af00804 100644 --- a/sdks/php/docs/Model/SubFormFieldRuleTrigger.md +++ b/sdks/php/docs/Model/SubFormFieldRuleTrigger.md @@ -1,4 +1,4 @@ -# # SubFormFieldRuleTrigger +# SubFormFieldRuleTrigger diff --git a/sdks/php/docs/Model/SubFormFieldsPerDocumentBase.md b/sdks/php/docs/Model/SubFormFieldsPerDocumentBase.md index 7c7f4c293..e608f71bd 100644 --- a/sdks/php/docs/Model/SubFormFieldsPerDocumentBase.md +++ b/sdks/php/docs/Model/SubFormFieldsPerDocumentBase.md @@ -1,4 +1,4 @@ -# # SubFormFieldsPerDocumentBase +# SubFormFieldsPerDocumentBase The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) diff --git a/sdks/php/docs/Model/SubFormFieldsPerDocumentCheckbox.md b/sdks/php/docs/Model/SubFormFieldsPerDocumentCheckbox.md index 57e306cbf..871f92fc1 100644 --- a/sdks/php/docs/Model/SubFormFieldsPerDocumentCheckbox.md +++ b/sdks/php/docs/Model/SubFormFieldsPerDocumentCheckbox.md @@ -1,4 +1,4 @@ -# # SubFormFieldsPerDocumentCheckbox +# SubFormFieldsPerDocumentCheckbox This class extends `SubFormFieldsPerDocumentBase`. diff --git a/sdks/php/docs/Model/SubFormFieldsPerDocumentCheckboxMerge.md b/sdks/php/docs/Model/SubFormFieldsPerDocumentCheckboxMerge.md index d959793a0..ab7443349 100644 --- a/sdks/php/docs/Model/SubFormFieldsPerDocumentCheckboxMerge.md +++ b/sdks/php/docs/Model/SubFormFieldsPerDocumentCheckboxMerge.md @@ -1,4 +1,4 @@ -# # SubFormFieldsPerDocumentCheckboxMerge +# SubFormFieldsPerDocumentCheckboxMerge This class extends `SubFormFieldsPerDocumentBase`. diff --git a/sdks/php/docs/Model/SubFormFieldsPerDocumentDateSigned.md b/sdks/php/docs/Model/SubFormFieldsPerDocumentDateSigned.md index d33f346ce..4dcc7e23c 100644 --- a/sdks/php/docs/Model/SubFormFieldsPerDocumentDateSigned.md +++ b/sdks/php/docs/Model/SubFormFieldsPerDocumentDateSigned.md @@ -1,4 +1,4 @@ -# # SubFormFieldsPerDocumentDateSigned +# SubFormFieldsPerDocumentDateSigned This class extends `SubFormFieldsPerDocumentBase`. diff --git a/sdks/php/docs/Model/SubFormFieldsPerDocumentDropdown.md b/sdks/php/docs/Model/SubFormFieldsPerDocumentDropdown.md index c670a097e..13d8bd20a 100644 --- a/sdks/php/docs/Model/SubFormFieldsPerDocumentDropdown.md +++ b/sdks/php/docs/Model/SubFormFieldsPerDocumentDropdown.md @@ -1,4 +1,4 @@ -# # SubFormFieldsPerDocumentDropdown +# SubFormFieldsPerDocumentDropdown This class extends `SubFormFieldsPerDocumentBase`. diff --git a/sdks/php/docs/Model/SubFormFieldsPerDocumentFontEnum.md b/sdks/php/docs/Model/SubFormFieldsPerDocumentFontEnum.md index f4cef17da..d33a9c5cd 100644 --- a/sdks/php/docs/Model/SubFormFieldsPerDocumentFontEnum.md +++ b/sdks/php/docs/Model/SubFormFieldsPerDocumentFontEnum.md @@ -1,4 +1,4 @@ -# # SubFormFieldsPerDocumentFontEnum +# SubFormFieldsPerDocumentFontEnum diff --git a/sdks/php/docs/Model/SubFormFieldsPerDocumentHyperlink.md b/sdks/php/docs/Model/SubFormFieldsPerDocumentHyperlink.md index 0cb90a64f..ebacd2ef2 100644 --- a/sdks/php/docs/Model/SubFormFieldsPerDocumentHyperlink.md +++ b/sdks/php/docs/Model/SubFormFieldsPerDocumentHyperlink.md @@ -1,4 +1,4 @@ -# # SubFormFieldsPerDocumentHyperlink +# SubFormFieldsPerDocumentHyperlink This class extends `SubFormFieldsPerDocumentBase`. diff --git a/sdks/php/docs/Model/SubFormFieldsPerDocumentInitials.md b/sdks/php/docs/Model/SubFormFieldsPerDocumentInitials.md index ccb50121e..c00dcc9ad 100644 --- a/sdks/php/docs/Model/SubFormFieldsPerDocumentInitials.md +++ b/sdks/php/docs/Model/SubFormFieldsPerDocumentInitials.md @@ -1,4 +1,4 @@ -# # SubFormFieldsPerDocumentInitials +# SubFormFieldsPerDocumentInitials This class extends `SubFormFieldsPerDocumentBase`. diff --git a/sdks/php/docs/Model/SubFormFieldsPerDocumentRadio.md b/sdks/php/docs/Model/SubFormFieldsPerDocumentRadio.md index 6d40f86e6..5a076b4a1 100644 --- a/sdks/php/docs/Model/SubFormFieldsPerDocumentRadio.md +++ b/sdks/php/docs/Model/SubFormFieldsPerDocumentRadio.md @@ -1,4 +1,4 @@ -# # SubFormFieldsPerDocumentRadio +# SubFormFieldsPerDocumentRadio This class extends `SubFormFieldsPerDocumentBase`. diff --git a/sdks/php/docs/Model/SubFormFieldsPerDocumentSignature.md b/sdks/php/docs/Model/SubFormFieldsPerDocumentSignature.md index 9b800232f..90fae952d 100644 --- a/sdks/php/docs/Model/SubFormFieldsPerDocumentSignature.md +++ b/sdks/php/docs/Model/SubFormFieldsPerDocumentSignature.md @@ -1,4 +1,4 @@ -# # SubFormFieldsPerDocumentSignature +# SubFormFieldsPerDocumentSignature This class extends `SubFormFieldsPerDocumentBase`. diff --git a/sdks/php/docs/Model/SubFormFieldsPerDocumentText.md b/sdks/php/docs/Model/SubFormFieldsPerDocumentText.md index c41a60817..6e70ea13a 100644 --- a/sdks/php/docs/Model/SubFormFieldsPerDocumentText.md +++ b/sdks/php/docs/Model/SubFormFieldsPerDocumentText.md @@ -1,4 +1,4 @@ -# # SubFormFieldsPerDocumentText +# SubFormFieldsPerDocumentText This class extends `SubFormFieldsPerDocumentBase`. diff --git a/sdks/php/docs/Model/SubFormFieldsPerDocumentTextMerge.md b/sdks/php/docs/Model/SubFormFieldsPerDocumentTextMerge.md index 40c07308f..e8ab9dc86 100644 --- a/sdks/php/docs/Model/SubFormFieldsPerDocumentTextMerge.md +++ b/sdks/php/docs/Model/SubFormFieldsPerDocumentTextMerge.md @@ -1,4 +1,4 @@ -# # SubFormFieldsPerDocumentTextMerge +# SubFormFieldsPerDocumentTextMerge This class extends `SubFormFieldsPerDocumentBase`. diff --git a/sdks/php/docs/Model/SubFormFieldsPerDocumentTypeEnum.md b/sdks/php/docs/Model/SubFormFieldsPerDocumentTypeEnum.md index 5ce40d466..4cbbea62b 100644 --- a/sdks/php/docs/Model/SubFormFieldsPerDocumentTypeEnum.md +++ b/sdks/php/docs/Model/SubFormFieldsPerDocumentTypeEnum.md @@ -1,4 +1,4 @@ -# # SubFormFieldsPerDocumentTypeEnum +# SubFormFieldsPerDocumentTypeEnum diff --git a/sdks/php/docs/Model/SubMergeField.md b/sdks/php/docs/Model/SubMergeField.md index 1114a084b..e968ffb68 100644 --- a/sdks/php/docs/Model/SubMergeField.md +++ b/sdks/php/docs/Model/SubMergeField.md @@ -1,4 +1,4 @@ -# # SubMergeField +# SubMergeField diff --git a/sdks/php/docs/Model/SubOAuth.md b/sdks/php/docs/Model/SubOAuth.md index 26088e668..7a9ac9df0 100644 --- a/sdks/php/docs/Model/SubOAuth.md +++ b/sdks/php/docs/Model/SubOAuth.md @@ -1,4 +1,4 @@ -# # SubOAuth +# SubOAuth OAuth related parameters. diff --git a/sdks/php/docs/Model/SubOptions.md b/sdks/php/docs/Model/SubOptions.md index 926c89eab..ed747d433 100644 --- a/sdks/php/docs/Model/SubOptions.md +++ b/sdks/php/docs/Model/SubOptions.md @@ -1,4 +1,4 @@ -# # SubOptions +# SubOptions Additional options supported by API App. diff --git a/sdks/php/docs/Model/SubSignatureRequestGroupedSigners.md b/sdks/php/docs/Model/SubSignatureRequestGroupedSigners.md index 69275147a..13ef067a7 100644 --- a/sdks/php/docs/Model/SubSignatureRequestGroupedSigners.md +++ b/sdks/php/docs/Model/SubSignatureRequestGroupedSigners.md @@ -1,4 +1,4 @@ -# # SubSignatureRequestGroupedSigners +# SubSignatureRequestGroupedSigners diff --git a/sdks/php/docs/Model/SubSignatureRequestSigner.md b/sdks/php/docs/Model/SubSignatureRequestSigner.md index 8ba880dd0..161466303 100644 --- a/sdks/php/docs/Model/SubSignatureRequestSigner.md +++ b/sdks/php/docs/Model/SubSignatureRequestSigner.md @@ -1,4 +1,4 @@ -# # SubSignatureRequestSigner +# SubSignatureRequestSigner diff --git a/sdks/php/docs/Model/SubSignatureRequestTemplateSigner.md b/sdks/php/docs/Model/SubSignatureRequestTemplateSigner.md index 5b1995c0b..38027d15e 100644 --- a/sdks/php/docs/Model/SubSignatureRequestTemplateSigner.md +++ b/sdks/php/docs/Model/SubSignatureRequestTemplateSigner.md @@ -1,4 +1,4 @@ -# # SubSignatureRequestTemplateSigner +# SubSignatureRequestTemplateSigner diff --git a/sdks/php/docs/Model/SubSigningOptions.md b/sdks/php/docs/Model/SubSigningOptions.md index 0a3d3a40e..3e7526d14 100644 --- a/sdks/php/docs/Model/SubSigningOptions.md +++ b/sdks/php/docs/Model/SubSigningOptions.md @@ -1,4 +1,4 @@ -# # SubSigningOptions +# SubSigningOptions This allows the requester to specify the types allowed for creating a signature and specify another signing options. diff --git a/sdks/php/docs/Model/SubTeamResponse.md b/sdks/php/docs/Model/SubTeamResponse.md index e0c954d29..90fafc801 100644 --- a/sdks/php/docs/Model/SubTeamResponse.md +++ b/sdks/php/docs/Model/SubTeamResponse.md @@ -1,4 +1,4 @@ -# # SubTeamResponse +# SubTeamResponse diff --git a/sdks/php/docs/Model/SubTemplateRole.md b/sdks/php/docs/Model/SubTemplateRole.md index 062527156..1ef19b7d5 100644 --- a/sdks/php/docs/Model/SubTemplateRole.md +++ b/sdks/php/docs/Model/SubTemplateRole.md @@ -1,4 +1,4 @@ -# # SubTemplateRole +# SubTemplateRole diff --git a/sdks/php/docs/Model/SubUnclaimedDraftSigner.md b/sdks/php/docs/Model/SubUnclaimedDraftSigner.md index d5849d712..d995666d8 100644 --- a/sdks/php/docs/Model/SubUnclaimedDraftSigner.md +++ b/sdks/php/docs/Model/SubUnclaimedDraftSigner.md @@ -1,4 +1,4 @@ -# # SubUnclaimedDraftSigner +# SubUnclaimedDraftSigner diff --git a/sdks/php/docs/Model/SubUnclaimedDraftTemplateSigner.md b/sdks/php/docs/Model/SubUnclaimedDraftTemplateSigner.md index 3c20fd2e7..361c31928 100644 --- a/sdks/php/docs/Model/SubUnclaimedDraftTemplateSigner.md +++ b/sdks/php/docs/Model/SubUnclaimedDraftTemplateSigner.md @@ -1,4 +1,4 @@ -# # SubUnclaimedDraftTemplateSigner +# SubUnclaimedDraftTemplateSigner diff --git a/sdks/php/docs/Model/SubWhiteLabelingOptions.md b/sdks/php/docs/Model/SubWhiteLabelingOptions.md index 976f55aaa..947aa1a5b 100644 --- a/sdks/php/docs/Model/SubWhiteLabelingOptions.md +++ b/sdks/php/docs/Model/SubWhiteLabelingOptions.md @@ -1,4 +1,4 @@ -# # SubWhiteLabelingOptions +# SubWhiteLabelingOptions An array of elements and values serialized to a string, to be used to customize the app's signer page. (Only applies to some API plans) diff --git a/sdks/php/docs/Model/TeamAddMemberRequest.md b/sdks/php/docs/Model/TeamAddMemberRequest.md index 4606ecdcb..ca93af29a 100644 --- a/sdks/php/docs/Model/TeamAddMemberRequest.md +++ b/sdks/php/docs/Model/TeamAddMemberRequest.md @@ -1,4 +1,4 @@ -# # TeamAddMemberRequest +# TeamAddMemberRequest diff --git a/sdks/php/docs/Model/TeamCreateRequest.md b/sdks/php/docs/Model/TeamCreateRequest.md index 29c05f9a3..4af0b5773 100644 --- a/sdks/php/docs/Model/TeamCreateRequest.md +++ b/sdks/php/docs/Model/TeamCreateRequest.md @@ -1,4 +1,4 @@ -# # TeamCreateRequest +# TeamCreateRequest diff --git a/sdks/php/docs/Model/TeamGetInfoResponse.md b/sdks/php/docs/Model/TeamGetInfoResponse.md index 6250ae721..f86ea3aae 100644 --- a/sdks/php/docs/Model/TeamGetInfoResponse.md +++ b/sdks/php/docs/Model/TeamGetInfoResponse.md @@ -1,4 +1,4 @@ -# # TeamGetInfoResponse +# TeamGetInfoResponse diff --git a/sdks/php/docs/Model/TeamGetResponse.md b/sdks/php/docs/Model/TeamGetResponse.md index 0d65f9000..4ebec087d 100644 --- a/sdks/php/docs/Model/TeamGetResponse.md +++ b/sdks/php/docs/Model/TeamGetResponse.md @@ -1,4 +1,4 @@ -# # TeamGetResponse +# TeamGetResponse diff --git a/sdks/php/docs/Model/TeamInfoResponse.md b/sdks/php/docs/Model/TeamInfoResponse.md index 6db4a64c2..ce54912f4 100644 --- a/sdks/php/docs/Model/TeamInfoResponse.md +++ b/sdks/php/docs/Model/TeamInfoResponse.md @@ -1,4 +1,4 @@ -# # TeamInfoResponse +# TeamInfoResponse diff --git a/sdks/php/docs/Model/TeamInviteResponse.md b/sdks/php/docs/Model/TeamInviteResponse.md index 6ca84d844..93a22135c 100644 --- a/sdks/php/docs/Model/TeamInviteResponse.md +++ b/sdks/php/docs/Model/TeamInviteResponse.md @@ -1,4 +1,4 @@ -# # TeamInviteResponse +# TeamInviteResponse diff --git a/sdks/php/docs/Model/TeamInvitesResponse.md b/sdks/php/docs/Model/TeamInvitesResponse.md index 64d96b25b..aa71b551a 100644 --- a/sdks/php/docs/Model/TeamInvitesResponse.md +++ b/sdks/php/docs/Model/TeamInvitesResponse.md @@ -1,4 +1,4 @@ -# # TeamInvitesResponse +# TeamInvitesResponse diff --git a/sdks/php/docs/Model/TeamMemberResponse.md b/sdks/php/docs/Model/TeamMemberResponse.md index 2ff4a44f9..a760a05d3 100644 --- a/sdks/php/docs/Model/TeamMemberResponse.md +++ b/sdks/php/docs/Model/TeamMemberResponse.md @@ -1,4 +1,4 @@ -# # TeamMemberResponse +# TeamMemberResponse diff --git a/sdks/php/docs/Model/TeamMembersResponse.md b/sdks/php/docs/Model/TeamMembersResponse.md index 0474722c4..c6ca1756d 100644 --- a/sdks/php/docs/Model/TeamMembersResponse.md +++ b/sdks/php/docs/Model/TeamMembersResponse.md @@ -1,4 +1,4 @@ -# # TeamMembersResponse +# TeamMembersResponse diff --git a/sdks/php/docs/Model/TeamParentResponse.md b/sdks/php/docs/Model/TeamParentResponse.md index 376880069..a0e7c867b 100644 --- a/sdks/php/docs/Model/TeamParentResponse.md +++ b/sdks/php/docs/Model/TeamParentResponse.md @@ -1,4 +1,4 @@ -# # TeamParentResponse +# TeamParentResponse Information about the parent team if a team has one, set to `null` otherwise. diff --git a/sdks/php/docs/Model/TeamRemoveMemberRequest.md b/sdks/php/docs/Model/TeamRemoveMemberRequest.md index 39672f4b2..4d6f0a022 100644 --- a/sdks/php/docs/Model/TeamRemoveMemberRequest.md +++ b/sdks/php/docs/Model/TeamRemoveMemberRequest.md @@ -1,4 +1,4 @@ -# # TeamRemoveMemberRequest +# TeamRemoveMemberRequest diff --git a/sdks/php/docs/Model/TeamResponse.md b/sdks/php/docs/Model/TeamResponse.md index 4aea582c9..9621ec630 100644 --- a/sdks/php/docs/Model/TeamResponse.md +++ b/sdks/php/docs/Model/TeamResponse.md @@ -1,4 +1,4 @@ -# # TeamResponse +# TeamResponse Contains information about your team and its members diff --git a/sdks/php/docs/Model/TeamSubTeamsResponse.md b/sdks/php/docs/Model/TeamSubTeamsResponse.md index 9a37ce150..4390835a0 100644 --- a/sdks/php/docs/Model/TeamSubTeamsResponse.md +++ b/sdks/php/docs/Model/TeamSubTeamsResponse.md @@ -1,4 +1,4 @@ -# # TeamSubTeamsResponse +# TeamSubTeamsResponse diff --git a/sdks/php/docs/Model/TeamUpdateRequest.md b/sdks/php/docs/Model/TeamUpdateRequest.md index 604a6012f..a002b2ae0 100644 --- a/sdks/php/docs/Model/TeamUpdateRequest.md +++ b/sdks/php/docs/Model/TeamUpdateRequest.md @@ -1,4 +1,4 @@ -# # TeamUpdateRequest +# TeamUpdateRequest diff --git a/sdks/php/docs/Model/TemplateAddUserRequest.md b/sdks/php/docs/Model/TemplateAddUserRequest.md index e552d463d..9eec76307 100644 --- a/sdks/php/docs/Model/TemplateAddUserRequest.md +++ b/sdks/php/docs/Model/TemplateAddUserRequest.md @@ -1,4 +1,4 @@ -# # TemplateAddUserRequest +# TemplateAddUserRequest diff --git a/sdks/php/docs/Model/TemplateCreateEmbeddedDraftRequest.md b/sdks/php/docs/Model/TemplateCreateEmbeddedDraftRequest.md index 26e5e7d41..b86a55f89 100644 --- a/sdks/php/docs/Model/TemplateCreateEmbeddedDraftRequest.md +++ b/sdks/php/docs/Model/TemplateCreateEmbeddedDraftRequest.md @@ -1,4 +1,4 @@ -# # TemplateCreateEmbeddedDraftRequest +# TemplateCreateEmbeddedDraftRequest diff --git a/sdks/php/docs/Model/TemplateCreateEmbeddedDraftResponse.md b/sdks/php/docs/Model/TemplateCreateEmbeddedDraftResponse.md index 439aa708e..a641b0192 100644 --- a/sdks/php/docs/Model/TemplateCreateEmbeddedDraftResponse.md +++ b/sdks/php/docs/Model/TemplateCreateEmbeddedDraftResponse.md @@ -1,4 +1,4 @@ -# # TemplateCreateEmbeddedDraftResponse +# TemplateCreateEmbeddedDraftResponse diff --git a/sdks/php/docs/Model/TemplateCreateEmbeddedDraftResponseTemplate.md b/sdks/php/docs/Model/TemplateCreateEmbeddedDraftResponseTemplate.md index 7604fd299..0b59130a1 100644 --- a/sdks/php/docs/Model/TemplateCreateEmbeddedDraftResponseTemplate.md +++ b/sdks/php/docs/Model/TemplateCreateEmbeddedDraftResponseTemplate.md @@ -1,4 +1,4 @@ -# # TemplateCreateEmbeddedDraftResponseTemplate +# TemplateCreateEmbeddedDraftResponseTemplate Template object with parameters: `template_id`, `edit_url`, `expires_at`. diff --git a/sdks/php/docs/Model/TemplateCreateRequest.md b/sdks/php/docs/Model/TemplateCreateRequest.md index 44696baa1..6b148b265 100644 --- a/sdks/php/docs/Model/TemplateCreateRequest.md +++ b/sdks/php/docs/Model/TemplateCreateRequest.md @@ -1,4 +1,4 @@ -# # TemplateCreateRequest +# TemplateCreateRequest diff --git a/sdks/php/docs/Model/TemplateCreateResponse.md b/sdks/php/docs/Model/TemplateCreateResponse.md index 676d2acca..a0141b8e9 100644 --- a/sdks/php/docs/Model/TemplateCreateResponse.md +++ b/sdks/php/docs/Model/TemplateCreateResponse.md @@ -1,4 +1,4 @@ -# # TemplateCreateResponse +# TemplateCreateResponse diff --git a/sdks/php/docs/Model/TemplateCreateResponseTemplate.md b/sdks/php/docs/Model/TemplateCreateResponseTemplate.md index 0f25586c5..7ad8c6fb3 100644 --- a/sdks/php/docs/Model/TemplateCreateResponseTemplate.md +++ b/sdks/php/docs/Model/TemplateCreateResponseTemplate.md @@ -1,4 +1,4 @@ -# # TemplateCreateResponseTemplate +# TemplateCreateResponseTemplate Template object with parameters: `template_id`. diff --git a/sdks/php/docs/Model/TemplateGetResponse.md b/sdks/php/docs/Model/TemplateGetResponse.md index 0aba7b381..3005773db 100644 --- a/sdks/php/docs/Model/TemplateGetResponse.md +++ b/sdks/php/docs/Model/TemplateGetResponse.md @@ -1,4 +1,4 @@ -# # TemplateGetResponse +# TemplateGetResponse diff --git a/sdks/php/docs/Model/TemplateListResponse.md b/sdks/php/docs/Model/TemplateListResponse.md index 9723b1385..f49ec2244 100644 --- a/sdks/php/docs/Model/TemplateListResponse.md +++ b/sdks/php/docs/Model/TemplateListResponse.md @@ -1,4 +1,4 @@ -# # TemplateListResponse +# TemplateListResponse diff --git a/sdks/php/docs/Model/TemplateRemoveUserRequest.md b/sdks/php/docs/Model/TemplateRemoveUserRequest.md index 591eb5d25..f9d4a482c 100644 --- a/sdks/php/docs/Model/TemplateRemoveUserRequest.md +++ b/sdks/php/docs/Model/TemplateRemoveUserRequest.md @@ -1,4 +1,4 @@ -# # TemplateRemoveUserRequest +# TemplateRemoveUserRequest diff --git a/sdks/php/docs/Model/TemplateResponse.md b/sdks/php/docs/Model/TemplateResponse.md index 3a7dc2f03..6d7307c85 100644 --- a/sdks/php/docs/Model/TemplateResponse.md +++ b/sdks/php/docs/Model/TemplateResponse.md @@ -1,4 +1,4 @@ -# # TemplateResponse +# TemplateResponse Contains information about the templates you and your team have created. diff --git a/sdks/php/docs/Model/TemplateResponseAccount.md b/sdks/php/docs/Model/TemplateResponseAccount.md index fb9563bbc..278af980d 100644 --- a/sdks/php/docs/Model/TemplateResponseAccount.md +++ b/sdks/php/docs/Model/TemplateResponseAccount.md @@ -1,4 +1,4 @@ -# # TemplateResponseAccount +# TemplateResponseAccount diff --git a/sdks/php/docs/Model/TemplateResponseAccountQuota.md b/sdks/php/docs/Model/TemplateResponseAccountQuota.md index 7b106a9ac..dc4574338 100644 --- a/sdks/php/docs/Model/TemplateResponseAccountQuota.md +++ b/sdks/php/docs/Model/TemplateResponseAccountQuota.md @@ -1,4 +1,4 @@ -# # TemplateResponseAccountQuota +# TemplateResponseAccountQuota An array of the designated CC roles that must be specified when sending a SignatureRequest using this Template. diff --git a/sdks/php/docs/Model/TemplateResponseCCRole.md b/sdks/php/docs/Model/TemplateResponseCCRole.md index 32ad82ef9..4447a9b68 100644 --- a/sdks/php/docs/Model/TemplateResponseCCRole.md +++ b/sdks/php/docs/Model/TemplateResponseCCRole.md @@ -1,4 +1,4 @@ -# # TemplateResponseCCRole +# TemplateResponseCCRole diff --git a/sdks/php/docs/Model/TemplateResponseDocument.md b/sdks/php/docs/Model/TemplateResponseDocument.md index ab0518d3a..a693bfedf 100644 --- a/sdks/php/docs/Model/TemplateResponseDocument.md +++ b/sdks/php/docs/Model/TemplateResponseDocument.md @@ -1,4 +1,4 @@ -# # TemplateResponseDocument +# TemplateResponseDocument diff --git a/sdks/php/docs/Model/TemplateResponseDocumentCustomFieldBase.md b/sdks/php/docs/Model/TemplateResponseDocumentCustomFieldBase.md index 47b5bad52..76f78dead 100644 --- a/sdks/php/docs/Model/TemplateResponseDocumentCustomFieldBase.md +++ b/sdks/php/docs/Model/TemplateResponseDocumentCustomFieldBase.md @@ -1,4 +1,4 @@ -# # TemplateResponseDocumentCustomFieldBase +# TemplateResponseDocumentCustomFieldBase An array of Form Field objects containing the name and type of each named field. diff --git a/sdks/php/docs/Model/TemplateResponseDocumentCustomFieldCheckbox.md b/sdks/php/docs/Model/TemplateResponseDocumentCustomFieldCheckbox.md index 4b1e53fb0..6e84aed4d 100644 --- a/sdks/php/docs/Model/TemplateResponseDocumentCustomFieldCheckbox.md +++ b/sdks/php/docs/Model/TemplateResponseDocumentCustomFieldCheckbox.md @@ -1,4 +1,4 @@ -# # TemplateResponseDocumentCustomFieldCheckbox +# TemplateResponseDocumentCustomFieldCheckbox This class extends `TemplateResponseDocumentCustomFieldBase` diff --git a/sdks/php/docs/Model/TemplateResponseDocumentCustomFieldText.md b/sdks/php/docs/Model/TemplateResponseDocumentCustomFieldText.md index 68e40af6b..8e361f72c 100644 --- a/sdks/php/docs/Model/TemplateResponseDocumentCustomFieldText.md +++ b/sdks/php/docs/Model/TemplateResponseDocumentCustomFieldText.md @@ -1,4 +1,4 @@ -# # TemplateResponseDocumentCustomFieldText +# TemplateResponseDocumentCustomFieldText This class extends `TemplateResponseDocumentCustomFieldBase` diff --git a/sdks/php/docs/Model/TemplateResponseDocumentFieldGroup.md b/sdks/php/docs/Model/TemplateResponseDocumentFieldGroup.md index 233352654..31c1398fb 100644 --- a/sdks/php/docs/Model/TemplateResponseDocumentFieldGroup.md +++ b/sdks/php/docs/Model/TemplateResponseDocumentFieldGroup.md @@ -1,4 +1,4 @@ -# # TemplateResponseDocumentFieldGroup +# TemplateResponseDocumentFieldGroup diff --git a/sdks/php/docs/Model/TemplateResponseDocumentFieldGroupRule.md b/sdks/php/docs/Model/TemplateResponseDocumentFieldGroupRule.md index ad79e834e..0fb700ec7 100644 --- a/sdks/php/docs/Model/TemplateResponseDocumentFieldGroupRule.md +++ b/sdks/php/docs/Model/TemplateResponseDocumentFieldGroupRule.md @@ -1,4 +1,4 @@ -# # TemplateResponseDocumentFieldGroupRule +# TemplateResponseDocumentFieldGroupRule The rule used to validate checkboxes in the form field group. See [checkbox field grouping](/api/reference/constants/#checkbox-field-grouping). diff --git a/sdks/php/docs/Model/TemplateResponseDocumentFormFieldBase.md b/sdks/php/docs/Model/TemplateResponseDocumentFormFieldBase.md index f792fdfed..ed3b3e392 100644 --- a/sdks/php/docs/Model/TemplateResponseDocumentFormFieldBase.md +++ b/sdks/php/docs/Model/TemplateResponseDocumentFormFieldBase.md @@ -1,4 +1,4 @@ -# # TemplateResponseDocumentFormFieldBase +# TemplateResponseDocumentFormFieldBase An array of Form Field objects containing the name and type of each named field. diff --git a/sdks/php/docs/Model/TemplateResponseDocumentFormFieldCheckbox.md b/sdks/php/docs/Model/TemplateResponseDocumentFormFieldCheckbox.md index 2ee1b9e5e..47d9339be 100644 --- a/sdks/php/docs/Model/TemplateResponseDocumentFormFieldCheckbox.md +++ b/sdks/php/docs/Model/TemplateResponseDocumentFormFieldCheckbox.md @@ -1,4 +1,4 @@ -# # TemplateResponseDocumentFormFieldCheckbox +# TemplateResponseDocumentFormFieldCheckbox This class extends `TemplateResponseDocumentFormFieldBase` diff --git a/sdks/php/docs/Model/TemplateResponseDocumentFormFieldDateSigned.md b/sdks/php/docs/Model/TemplateResponseDocumentFormFieldDateSigned.md index 8996ce7a3..2e3a99ddb 100644 --- a/sdks/php/docs/Model/TemplateResponseDocumentFormFieldDateSigned.md +++ b/sdks/php/docs/Model/TemplateResponseDocumentFormFieldDateSigned.md @@ -1,4 +1,4 @@ -# # TemplateResponseDocumentFormFieldDateSigned +# TemplateResponseDocumentFormFieldDateSigned This class extends `TemplateResponseDocumentFormFieldBase` diff --git a/sdks/php/docs/Model/TemplateResponseDocumentFormFieldDropdown.md b/sdks/php/docs/Model/TemplateResponseDocumentFormFieldDropdown.md index 61b05aed0..0466db526 100644 --- a/sdks/php/docs/Model/TemplateResponseDocumentFormFieldDropdown.md +++ b/sdks/php/docs/Model/TemplateResponseDocumentFormFieldDropdown.md @@ -1,4 +1,4 @@ -# # TemplateResponseDocumentFormFieldDropdown +# TemplateResponseDocumentFormFieldDropdown This class extends `TemplateResponseDocumentFormFieldBase` diff --git a/sdks/php/docs/Model/TemplateResponseDocumentFormFieldHyperlink.md b/sdks/php/docs/Model/TemplateResponseDocumentFormFieldHyperlink.md index ce0ff23b5..99bf1502f 100644 --- a/sdks/php/docs/Model/TemplateResponseDocumentFormFieldHyperlink.md +++ b/sdks/php/docs/Model/TemplateResponseDocumentFormFieldHyperlink.md @@ -1,4 +1,4 @@ -# # TemplateResponseDocumentFormFieldHyperlink +# TemplateResponseDocumentFormFieldHyperlink This class extends `TemplateResponseDocumentFormFieldBase` diff --git a/sdks/php/docs/Model/TemplateResponseDocumentFormFieldInitials.md b/sdks/php/docs/Model/TemplateResponseDocumentFormFieldInitials.md index ab0ccda06..8f06159f5 100644 --- a/sdks/php/docs/Model/TemplateResponseDocumentFormFieldInitials.md +++ b/sdks/php/docs/Model/TemplateResponseDocumentFormFieldInitials.md @@ -1,4 +1,4 @@ -# # TemplateResponseDocumentFormFieldInitials +# TemplateResponseDocumentFormFieldInitials This class extends `TemplateResponseDocumentFormFieldBase` diff --git a/sdks/php/docs/Model/TemplateResponseDocumentFormFieldRadio.md b/sdks/php/docs/Model/TemplateResponseDocumentFormFieldRadio.md index 3b888caf7..145b828b8 100644 --- a/sdks/php/docs/Model/TemplateResponseDocumentFormFieldRadio.md +++ b/sdks/php/docs/Model/TemplateResponseDocumentFormFieldRadio.md @@ -1,4 +1,4 @@ -# # TemplateResponseDocumentFormFieldRadio +# TemplateResponseDocumentFormFieldRadio This class extends `TemplateResponseDocumentFormFieldBase` diff --git a/sdks/php/docs/Model/TemplateResponseDocumentFormFieldSignature.md b/sdks/php/docs/Model/TemplateResponseDocumentFormFieldSignature.md index b46f1d963..5a4d84217 100644 --- a/sdks/php/docs/Model/TemplateResponseDocumentFormFieldSignature.md +++ b/sdks/php/docs/Model/TemplateResponseDocumentFormFieldSignature.md @@ -1,4 +1,4 @@ -# # TemplateResponseDocumentFormFieldSignature +# TemplateResponseDocumentFormFieldSignature This class extends `TemplateResponseDocumentFormFieldBase` diff --git a/sdks/php/docs/Model/TemplateResponseDocumentFormFieldText.md b/sdks/php/docs/Model/TemplateResponseDocumentFormFieldText.md index 630c7a032..ac1e6337b 100644 --- a/sdks/php/docs/Model/TemplateResponseDocumentFormFieldText.md +++ b/sdks/php/docs/Model/TemplateResponseDocumentFormFieldText.md @@ -1,4 +1,4 @@ -# # TemplateResponseDocumentFormFieldText +# TemplateResponseDocumentFormFieldText This class extends `TemplateResponseDocumentFormFieldBase` diff --git a/sdks/php/docs/Model/TemplateResponseDocumentStaticFieldBase.md b/sdks/php/docs/Model/TemplateResponseDocumentStaticFieldBase.md index 3a7a044a4..02d9dc7c8 100644 --- a/sdks/php/docs/Model/TemplateResponseDocumentStaticFieldBase.md +++ b/sdks/php/docs/Model/TemplateResponseDocumentStaticFieldBase.md @@ -1,4 +1,4 @@ -# # TemplateResponseDocumentStaticFieldBase +# TemplateResponseDocumentStaticFieldBase An array describing static overlay fields. **NOTE:** Only available for certain subscriptions. diff --git a/sdks/php/docs/Model/TemplateResponseDocumentStaticFieldCheckbox.md b/sdks/php/docs/Model/TemplateResponseDocumentStaticFieldCheckbox.md index 4a23cb66b..d71e80a72 100644 --- a/sdks/php/docs/Model/TemplateResponseDocumentStaticFieldCheckbox.md +++ b/sdks/php/docs/Model/TemplateResponseDocumentStaticFieldCheckbox.md @@ -1,4 +1,4 @@ -# # TemplateResponseDocumentStaticFieldCheckbox +# TemplateResponseDocumentStaticFieldCheckbox This class extends `TemplateResponseDocumentStaticFieldBase` diff --git a/sdks/php/docs/Model/TemplateResponseDocumentStaticFieldDateSigned.md b/sdks/php/docs/Model/TemplateResponseDocumentStaticFieldDateSigned.md index 9c9d86fb4..2f8b2ae84 100644 --- a/sdks/php/docs/Model/TemplateResponseDocumentStaticFieldDateSigned.md +++ b/sdks/php/docs/Model/TemplateResponseDocumentStaticFieldDateSigned.md @@ -1,4 +1,4 @@ -# # TemplateResponseDocumentStaticFieldDateSigned +# TemplateResponseDocumentStaticFieldDateSigned This class extends `TemplateResponseDocumentStaticFieldBase` diff --git a/sdks/php/docs/Model/TemplateResponseDocumentStaticFieldDropdown.md b/sdks/php/docs/Model/TemplateResponseDocumentStaticFieldDropdown.md index d5cdc36da..8fdf88f1c 100644 --- a/sdks/php/docs/Model/TemplateResponseDocumentStaticFieldDropdown.md +++ b/sdks/php/docs/Model/TemplateResponseDocumentStaticFieldDropdown.md @@ -1,4 +1,4 @@ -# # TemplateResponseDocumentStaticFieldDropdown +# TemplateResponseDocumentStaticFieldDropdown This class extends `TemplateResponseDocumentStaticFieldBase` diff --git a/sdks/php/docs/Model/TemplateResponseDocumentStaticFieldHyperlink.md b/sdks/php/docs/Model/TemplateResponseDocumentStaticFieldHyperlink.md index 304d2e082..a1d0a14bd 100644 --- a/sdks/php/docs/Model/TemplateResponseDocumentStaticFieldHyperlink.md +++ b/sdks/php/docs/Model/TemplateResponseDocumentStaticFieldHyperlink.md @@ -1,4 +1,4 @@ -# # TemplateResponseDocumentStaticFieldHyperlink +# TemplateResponseDocumentStaticFieldHyperlink This class extends `TemplateResponseDocumentStaticFieldBase` diff --git a/sdks/php/docs/Model/TemplateResponseDocumentStaticFieldInitials.md b/sdks/php/docs/Model/TemplateResponseDocumentStaticFieldInitials.md index 9f112d1f3..762e41f40 100644 --- a/sdks/php/docs/Model/TemplateResponseDocumentStaticFieldInitials.md +++ b/sdks/php/docs/Model/TemplateResponseDocumentStaticFieldInitials.md @@ -1,4 +1,4 @@ -# # TemplateResponseDocumentStaticFieldInitials +# TemplateResponseDocumentStaticFieldInitials This class extends `TemplateResponseDocumentStaticFieldBase` diff --git a/sdks/php/docs/Model/TemplateResponseDocumentStaticFieldRadio.md b/sdks/php/docs/Model/TemplateResponseDocumentStaticFieldRadio.md index 1225138aa..7a6ad1714 100644 --- a/sdks/php/docs/Model/TemplateResponseDocumentStaticFieldRadio.md +++ b/sdks/php/docs/Model/TemplateResponseDocumentStaticFieldRadio.md @@ -1,4 +1,4 @@ -# # TemplateResponseDocumentStaticFieldRadio +# TemplateResponseDocumentStaticFieldRadio This class extends `TemplateResponseDocumentStaticFieldBase` diff --git a/sdks/php/docs/Model/TemplateResponseDocumentStaticFieldSignature.md b/sdks/php/docs/Model/TemplateResponseDocumentStaticFieldSignature.md index 661b84cfd..f777ec975 100644 --- a/sdks/php/docs/Model/TemplateResponseDocumentStaticFieldSignature.md +++ b/sdks/php/docs/Model/TemplateResponseDocumentStaticFieldSignature.md @@ -1,4 +1,4 @@ -# # TemplateResponseDocumentStaticFieldSignature +# TemplateResponseDocumentStaticFieldSignature This class extends `TemplateResponseDocumentStaticFieldBase` diff --git a/sdks/php/docs/Model/TemplateResponseDocumentStaticFieldText.md b/sdks/php/docs/Model/TemplateResponseDocumentStaticFieldText.md index fa528fb68..968fae0db 100644 --- a/sdks/php/docs/Model/TemplateResponseDocumentStaticFieldText.md +++ b/sdks/php/docs/Model/TemplateResponseDocumentStaticFieldText.md @@ -1,4 +1,4 @@ -# # TemplateResponseDocumentStaticFieldText +# TemplateResponseDocumentStaticFieldText This class extends `TemplateResponseDocumentStaticFieldBase` diff --git a/sdks/php/docs/Model/TemplateResponseFieldAvgTextLength.md b/sdks/php/docs/Model/TemplateResponseFieldAvgTextLength.md index b9db83c57..39413c155 100644 --- a/sdks/php/docs/Model/TemplateResponseFieldAvgTextLength.md +++ b/sdks/php/docs/Model/TemplateResponseFieldAvgTextLength.md @@ -1,4 +1,4 @@ -# # TemplateResponseFieldAvgTextLength +# TemplateResponseFieldAvgTextLength Average text length in this field. diff --git a/sdks/php/docs/Model/TemplateResponseSignerRole.md b/sdks/php/docs/Model/TemplateResponseSignerRole.md index fdf2f15d0..ed7f492c3 100644 --- a/sdks/php/docs/Model/TemplateResponseSignerRole.md +++ b/sdks/php/docs/Model/TemplateResponseSignerRole.md @@ -1,4 +1,4 @@ -# # TemplateResponseSignerRole +# TemplateResponseSignerRole diff --git a/sdks/php/docs/Model/TemplateUpdateFilesRequest.md b/sdks/php/docs/Model/TemplateUpdateFilesRequest.md index 322110dd6..e998307fb 100644 --- a/sdks/php/docs/Model/TemplateUpdateFilesRequest.md +++ b/sdks/php/docs/Model/TemplateUpdateFilesRequest.md @@ -1,4 +1,4 @@ -# # TemplateUpdateFilesRequest +# TemplateUpdateFilesRequest diff --git a/sdks/php/docs/Model/TemplateUpdateFilesResponse.md b/sdks/php/docs/Model/TemplateUpdateFilesResponse.md index 5d28cef0d..b8c86df68 100644 --- a/sdks/php/docs/Model/TemplateUpdateFilesResponse.md +++ b/sdks/php/docs/Model/TemplateUpdateFilesResponse.md @@ -1,4 +1,4 @@ -# # TemplateUpdateFilesResponse +# TemplateUpdateFilesResponse diff --git a/sdks/php/docs/Model/TemplateUpdateFilesResponseTemplate.md b/sdks/php/docs/Model/TemplateUpdateFilesResponseTemplate.md index b8fb3f5c2..e5f08e323 100644 --- a/sdks/php/docs/Model/TemplateUpdateFilesResponseTemplate.md +++ b/sdks/php/docs/Model/TemplateUpdateFilesResponseTemplate.md @@ -1,4 +1,4 @@ -# # TemplateUpdateFilesResponseTemplate +# TemplateUpdateFilesResponseTemplate Contains template id diff --git a/sdks/php/docs/Model/UnclaimedDraftCreateEmbeddedRequest.md b/sdks/php/docs/Model/UnclaimedDraftCreateEmbeddedRequest.md index 161bdf331..9bfe0e029 100644 --- a/sdks/php/docs/Model/UnclaimedDraftCreateEmbeddedRequest.md +++ b/sdks/php/docs/Model/UnclaimedDraftCreateEmbeddedRequest.md @@ -1,4 +1,4 @@ -# # UnclaimedDraftCreateEmbeddedRequest +# UnclaimedDraftCreateEmbeddedRequest diff --git a/sdks/php/docs/Model/UnclaimedDraftCreateEmbeddedWithTemplateRequest.md b/sdks/php/docs/Model/UnclaimedDraftCreateEmbeddedWithTemplateRequest.md index 1d09deee9..5a7ab05f8 100644 --- a/sdks/php/docs/Model/UnclaimedDraftCreateEmbeddedWithTemplateRequest.md +++ b/sdks/php/docs/Model/UnclaimedDraftCreateEmbeddedWithTemplateRequest.md @@ -1,4 +1,4 @@ -# # UnclaimedDraftCreateEmbeddedWithTemplateRequest +# UnclaimedDraftCreateEmbeddedWithTemplateRequest diff --git a/sdks/php/docs/Model/UnclaimedDraftCreateRequest.md b/sdks/php/docs/Model/UnclaimedDraftCreateRequest.md index 493645760..d05c637b2 100644 --- a/sdks/php/docs/Model/UnclaimedDraftCreateRequest.md +++ b/sdks/php/docs/Model/UnclaimedDraftCreateRequest.md @@ -1,4 +1,4 @@ -# # UnclaimedDraftCreateRequest +# UnclaimedDraftCreateRequest diff --git a/sdks/php/docs/Model/UnclaimedDraftCreateResponse.md b/sdks/php/docs/Model/UnclaimedDraftCreateResponse.md index 666b4ae1f..cb872d48c 100644 --- a/sdks/php/docs/Model/UnclaimedDraftCreateResponse.md +++ b/sdks/php/docs/Model/UnclaimedDraftCreateResponse.md @@ -1,4 +1,4 @@ -# # UnclaimedDraftCreateResponse +# UnclaimedDraftCreateResponse diff --git a/sdks/php/docs/Model/UnclaimedDraftEditAndResendRequest.md b/sdks/php/docs/Model/UnclaimedDraftEditAndResendRequest.md index 2ff47860e..ce245a24a 100644 --- a/sdks/php/docs/Model/UnclaimedDraftEditAndResendRequest.md +++ b/sdks/php/docs/Model/UnclaimedDraftEditAndResendRequest.md @@ -1,4 +1,4 @@ -# # UnclaimedDraftEditAndResendRequest +# UnclaimedDraftEditAndResendRequest diff --git a/sdks/php/docs/Model/UnclaimedDraftResponse.md b/sdks/php/docs/Model/UnclaimedDraftResponse.md index 36989223b..cb69f8a58 100644 --- a/sdks/php/docs/Model/UnclaimedDraftResponse.md +++ b/sdks/php/docs/Model/UnclaimedDraftResponse.md @@ -1,4 +1,4 @@ -# # UnclaimedDraftResponse +# UnclaimedDraftResponse A group of documents that a user can take ownership of via the claim URL. diff --git a/sdks/php/docs/Model/WarningResponse.md b/sdks/php/docs/Model/WarningResponse.md index 8bec8a324..5f90c87a6 100644 --- a/sdks/php/docs/Model/WarningResponse.md +++ b/sdks/php/docs/Model/WarningResponse.md @@ -1,4 +1,4 @@ -# # WarningResponse +# WarningResponse A list of warnings. diff --git a/sdks/php/openapi-config.yaml b/sdks/php/openapi-config.yaml index 9ca2503f1..1a840fc85 100644 --- a/sdks/php/openapi-config.yaml +++ b/sdks/php/openapi-config.yaml @@ -6,7 +6,7 @@ additionalProperties: invokerPackage: "Dropbox\\Sign" sortModelPropertiesByRequiredFlag: true srcBasePath: src - phpVersion: 7.4 + phpVersion: 8.1 composerPackageName: "dropbox/sign" artifactUrl: "https://hellosign.com" licenseName: "MIT" @@ -31,6 +31,8 @@ files: dropbox-VERSION.mustache: templateType: SupportingFiles destinationFilename: VERSION +enumNameMappings: + match: MATCH globalProperties: apiTests: false modelTests: false diff --git a/sdks/php/run-build b/sdks/php/run-build index dd69c1ae1..40fcce856 100755 --- a/sdks/php/run-build +++ b/sdks/php/run-build @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# see https://github.com/OpenAPITools/openapi-generator/tree/v7.8.0/modules/openapi-generator/src/main/resources/php +# see https://github.com/OpenAPITools/openapi-generator/tree/v7.26.0/modules/openapi-generator/src/main/resources/php set -e @@ -20,7 +20,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.12.0 generate \ + openapitools/openapi-generator-cli:v7.26.0 generate \ -i "/local/openapi-sdk.yaml" \ -c "/local/openapi-config.yaml" \ -t "/local/templates" \ diff --git a/sdks/php/src/Api/AccountApi.php b/sdks/php/src/Api/AccountApi.php index 81a201bd4..8df04bac7 100644 --- a/sdks/php/src/Api/AccountApi.php +++ b/sdks/php/src/Api/AccountApi.php @@ -1,7 +1,7 @@ getBody(); // stream goes to serializer - } else { - $content = (string)$response->getBody(); - if ('\Dropbox\Sign\Model\AccountCreateResponse' !== '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 $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\AccountCreateResponse', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\AccountCreateResponse', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -250,33 +238,11 @@ public function accountCreateWithHttpInfo(Model\AccountCreateRequest $account_cr ); } - $returnType = '\Dropbox\Sign\Model\AccountCreateResponse'; - 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(), - ]; + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\AccountCreateResponse', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -289,8 +255,19 @@ public function accountCreateWithHttpInfo(Model\AccountCreateRequest $account_cr $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + throw $e; } } @@ -416,7 +393,11 @@ public function accountCreateRequest(Model\AccountCreateRequest $account_create_ 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($account_create_request)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($account_create_request), JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $account_create_request; } @@ -447,7 +428,11 @@ public function accountCreateRequest(Model\AccountCreateRequest $account_create_ $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -558,32 +543,19 @@ public function accountGetWithHttpInfo(?string $account_id = null, ?string $emai switch ($statusCode) { case 200: - if ('\Dropbox\Sign\Model\AccountGetResponse' === '\SplFileObject') { - $content = $response->getBody(); // stream goes to serializer - } else { - $content = (string)$response->getBody(); - if ('\Dropbox\Sign\Model\AccountGetResponse' !== '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 $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\AccountGetResponse', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\AccountGetResponse', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -599,33 +571,11 @@ public function accountGetWithHttpInfo(?string $account_id = null, ?string $emai ); } - $returnType = '\Dropbox\Sign\Model\AccountGetResponse'; - 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(), - ]; + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\AccountGetResponse', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -638,8 +588,19 @@ public function accountGetWithHttpInfo(?string $account_id = null, ?string $emai $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; + } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; } + throw $e; } } @@ -795,7 +756,11 @@ public function accountGetRequest(?string $account_id = null, ?string $email_add $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -904,32 +869,19 @@ public function accountUpdateWithHttpInfo(Model\AccountUpdateRequest $account_up switch ($statusCode) { case 200: - if ('\Dropbox\Sign\Model\AccountGetResponse' === '\SplFileObject') { - $content = $response->getBody(); // stream goes to serializer - } else { - $content = (string)$response->getBody(); - if ('\Dropbox\Sign\Model\AccountGetResponse' !== '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 $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\AccountGetResponse', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\AccountGetResponse', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -945,33 +897,11 @@ public function accountUpdateWithHttpInfo(Model\AccountUpdateRequest $account_up ); } - $returnType = '\Dropbox\Sign\Model\AccountGetResponse'; - 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(), - ]; + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\AccountGetResponse', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -984,8 +914,19 @@ public function accountUpdateWithHttpInfo(Model\AccountUpdateRequest $account_up $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; + } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; } + throw $e; } } @@ -1111,7 +1052,11 @@ public function accountUpdateRequest(Model\AccountUpdateRequest $account_update_ 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($account_update_request)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($account_update_request), JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $account_update_request; } @@ -1142,7 +1087,11 @@ public function accountUpdateRequest(Model\AccountUpdateRequest $account_update_ $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -1251,32 +1200,19 @@ public function accountVerifyWithHttpInfo(Model\AccountVerifyRequest $account_ve switch ($statusCode) { case 200: - if ('\Dropbox\Sign\Model\AccountVerifyResponse' === '\SplFileObject') { - $content = $response->getBody(); // stream goes to serializer - } else { - $content = (string)$response->getBody(); - if ('\Dropbox\Sign\Model\AccountVerifyResponse' !== '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 $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\AccountVerifyResponse', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\AccountVerifyResponse', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -1292,33 +1228,11 @@ public function accountVerifyWithHttpInfo(Model\AccountVerifyRequest $account_ve ); } - $returnType = '\Dropbox\Sign\Model\AccountVerifyResponse'; - 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(), - ]; + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\AccountVerifyResponse', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -1331,8 +1245,19 @@ public function accountVerifyWithHttpInfo(Model\AccountVerifyRequest $account_ve $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + throw $e; } } @@ -1458,7 +1383,11 @@ public function accountVerifyRequest(Model\AccountVerifyRequest $account_verify_ 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($account_verify_request)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($account_verify_request), JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $account_verify_request; } @@ -1489,7 +1418,11 @@ public function accountVerifyRequest(Model\AccountVerifyRequest $account_verify_ $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -1542,6 +1475,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } @@ -1606,4 +1547,47 @@ private function handleRangeCodeException( return true; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response + ): array { + if ($dataType === '\SplFileObject') { + $content = $response->getBody(); // stream goes to serializer + } else { + $content = (string)$response->getBody(); + if ($dataType !== '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() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode + ): bool { + $left = (int)($rangeCode[0] . '00'); + $right = (int)($rangeCode[0] . '99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/sdks/php/src/Api/ApiAppApi.php b/sdks/php/src/Api/ApiAppApi.php index 16c1a3617..7185ae5af 100644 --- a/sdks/php/src/Api/ApiAppApi.php +++ b/sdks/php/src/Api/ApiAppApi.php @@ -1,7 +1,7 @@ getBody(); // stream goes to serializer - } else { - $content = (string)$response->getBody(); - if ('\Dropbox\Sign\Model\ApiAppGetResponse' !== '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 $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ApiAppGetResponse', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\ApiAppGetResponse', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -255,33 +243,11 @@ public function apiAppCreateWithHttpInfo(Model\ApiAppCreateRequest $api_app_crea ); } - $returnType = '\Dropbox\Sign\Model\ApiAppGetResponse'; - 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(), - ]; + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ApiAppGetResponse', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -294,8 +260,19 @@ public function apiAppCreateWithHttpInfo(Model\ApiAppCreateRequest $api_app_crea $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + throw $e; } } @@ -421,7 +398,11 @@ public function apiAppCreateRequest(Model\ApiAppCreateRequest $api_app_create_re 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($api_app_create_request)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($api_app_create_request), JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $api_app_create_request; } @@ -452,7 +433,11 @@ public function apiAppCreateRequest(Model\ApiAppCreateRequest $api_app_create_re $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -555,6 +540,17 @@ public function apiAppDeleteWithHttpInfo(string $client_id, string $contentType } switch ($e->getCode()) { } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + throw $e; } } @@ -691,7 +687,11 @@ public function apiAppDeleteRequest(string $client_id, string $contentType = sel $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -800,32 +800,19 @@ public function apiAppGetWithHttpInfo(string $client_id, string $contentType = s switch ($statusCode) { case 200: - if ('\Dropbox\Sign\Model\ApiAppGetResponse' === '\SplFileObject') { - $content = $response->getBody(); // stream goes to serializer - } else { - $content = (string)$response->getBody(); - if ('\Dropbox\Sign\Model\ApiAppGetResponse' !== '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 $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ApiAppGetResponse', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\ApiAppGetResponse', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -841,33 +828,11 @@ public function apiAppGetWithHttpInfo(string $client_id, string $contentType = s ); } - $returnType = '\Dropbox\Sign\Model\ApiAppGetResponse'; - 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(), - ]; + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ApiAppGetResponse', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -880,8 +845,19 @@ public function apiAppGetWithHttpInfo(string $client_id, string $contentType = s $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; + } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; } + throw $e; } } @@ -1031,7 +1007,11 @@ public function apiAppGetRequest(string $client_id, string $contentType = self:: $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -1142,32 +1122,19 @@ public function apiAppListWithHttpInfo(?int $page = 1, ?int $page_size = 20, str switch ($statusCode) { case 200: - if ('\Dropbox\Sign\Model\ApiAppListResponse' === '\SplFileObject') { - $content = $response->getBody(); // stream goes to serializer - } else { - $content = (string)$response->getBody(); - if ('\Dropbox\Sign\Model\ApiAppListResponse' !== '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 $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ApiAppListResponse', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\ApiAppListResponse', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -1183,33 +1150,11 @@ public function apiAppListWithHttpInfo(?int $page = 1, ?int $page_size = 20, str ); } - $returnType = '\Dropbox\Sign\Model\ApiAppListResponse'; - 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(), - ]; + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ApiAppListResponse', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -1222,8 +1167,19 @@ public function apiAppListWithHttpInfo(?int $page = 1, ?int $page_size = 20, str $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; + } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; } + throw $e; } } @@ -1379,7 +1335,11 @@ public function apiAppListRequest(?int $page = 1, ?int $page_size = 20, string $ $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -1490,32 +1450,19 @@ public function apiAppUpdateWithHttpInfo(string $client_id, Model\ApiAppUpdateRe switch ($statusCode) { case 200: - if ('\Dropbox\Sign\Model\ApiAppGetResponse' === '\SplFileObject') { - $content = $response->getBody(); // stream goes to serializer - } else { - $content = (string)$response->getBody(); - if ('\Dropbox\Sign\Model\ApiAppGetResponse' !== '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 $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ApiAppGetResponse', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\ApiAppGetResponse', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -1531,33 +1478,11 @@ public function apiAppUpdateWithHttpInfo(string $client_id, Model\ApiAppUpdateRe ); } - $returnType = '\Dropbox\Sign\Model\ApiAppGetResponse'; - 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(), - ]; + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ApiAppGetResponse', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -1570,8 +1495,19 @@ public function apiAppUpdateWithHttpInfo(string $client_id, Model\ApiAppUpdateRe $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; + } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; } + throw $e; } } @@ -1716,7 +1652,11 @@ public function apiAppUpdateRequest(string $client_id, Model\ApiAppUpdateRequest 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($api_app_update_request)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($api_app_update_request), JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $api_app_update_request; } @@ -1747,7 +1687,11 @@ public function apiAppUpdateRequest(string $client_id, Model\ApiAppUpdateRequest $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -1800,6 +1744,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } @@ -1864,4 +1816,47 @@ private function handleRangeCodeException( return true; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response + ): array { + if ($dataType === '\SplFileObject') { + $content = $response->getBody(); // stream goes to serializer + } else { + $content = (string)$response->getBody(); + if ($dataType !== '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() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode + ): bool { + $left = (int)($rangeCode[0] . '00'); + $right = (int)($rangeCode[0] . '99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/sdks/php/src/Api/BulkSendJobApi.php b/sdks/php/src/Api/BulkSendJobApi.php index 188e57a27..98043468a 100644 --- a/sdks/php/src/Api/BulkSendJobApi.php +++ b/sdks/php/src/Api/BulkSendJobApi.php @@ -1,7 +1,7 @@ getBody(); // stream goes to serializer - } else { - $content = (string)$response->getBody(); - if ('\Dropbox\Sign\Model\BulkSendJobGetResponse' !== '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 $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\BulkSendJobGetResponse', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\BulkSendJobGetResponse', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -248,33 +236,11 @@ public function bulkSendJobGetWithHttpInfo(string $bulk_send_job_id, ?int $page ); } - $returnType = '\Dropbox\Sign\Model\BulkSendJobGetResponse'; - 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(), - ]; + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\BulkSendJobGetResponse', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -287,8 +253,19 @@ public function bulkSendJobGetWithHttpInfo(string $bulk_send_job_id, ?int $page $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + throw $e; } } @@ -463,7 +440,11 @@ public function bulkSendJobGetRequest(string $bulk_send_job_id, ?int $page = 1, $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -574,32 +555,19 @@ public function bulkSendJobListWithHttpInfo(?int $page = 1, ?int $page_size = 20 switch ($statusCode) { case 200: - if ('\Dropbox\Sign\Model\BulkSendJobListResponse' === '\SplFileObject') { - $content = $response->getBody(); // stream goes to serializer - } else { - $content = (string)$response->getBody(); - if ('\Dropbox\Sign\Model\BulkSendJobListResponse' !== '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 $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\BulkSendJobListResponse', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\BulkSendJobListResponse', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -615,33 +583,11 @@ public function bulkSendJobListWithHttpInfo(?int $page = 1, ?int $page_size = 20 ); } - $returnType = '\Dropbox\Sign\Model\BulkSendJobListResponse'; - 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(), - ]; + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\BulkSendJobListResponse', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -654,8 +600,19 @@ public function bulkSendJobListWithHttpInfo(?int $page = 1, ?int $page_size = 20 $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; + } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; } + throw $e; } } @@ -811,7 +768,11 @@ public function bulkSendJobListRequest(?int $page = 1, ?int $page_size = 20, str $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -864,6 +825,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } @@ -928,4 +897,47 @@ private function handleRangeCodeException( return true; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response + ): array { + if ($dataType === '\SplFileObject') { + $content = $response->getBody(); // stream goes to serializer + } else { + $content = (string)$response->getBody(); + if ($dataType !== '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() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode + ): bool { + $left = (int)($rangeCode[0] . '00'); + $right = (int)($rangeCode[0] . '99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/sdks/php/src/Api/DocumentApi.php b/sdks/php/src/Api/DocumentApi.php index ca075b351..b310e7997 100644 --- a/sdks/php/src/Api/DocumentApi.php +++ b/sdks/php/src/Api/DocumentApi.php @@ -1,7 +1,7 @@ getBody(); // stream goes to serializer - } else { - $content = (string)$response->getBody(); - if ('\Dropbox\Sign\Model\DocumentFieldDetectionResponse' !== '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 $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\DocumentFieldDetectionResponse', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\DocumentFieldDetectionResponse', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -242,33 +230,11 @@ public function documentDetectFieldsWithHttpInfo(Model\DocumentFieldDetectionReq ); } - $returnType = '\Dropbox\Sign\Model\DocumentFieldDetectionResponse'; - 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(), - ]; + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\DocumentFieldDetectionResponse', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -281,8 +247,19 @@ public function documentDetectFieldsWithHttpInfo(Model\DocumentFieldDetectionReq $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + throw $e; } } @@ -408,7 +385,11 @@ public function documentDetectFieldsRequest(Model\DocumentFieldDetectionRequest 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($document_field_detection_request)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($document_field_detection_request), JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $document_field_detection_request; } @@ -439,7 +420,11 @@ public function documentDetectFieldsRequest(Model\DocumentFieldDetectionRequest $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -492,6 +477,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } @@ -556,4 +549,47 @@ private function handleRangeCodeException( return true; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response + ): array { + if ($dataType === '\SplFileObject') { + $content = $response->getBody(); // stream goes to serializer + } else { + $content = (string)$response->getBody(); + if ($dataType !== '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() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode + ): bool { + $left = (int)($rangeCode[0] . '00'); + $right = (int)($rangeCode[0] . '99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/sdks/php/src/Api/EmbeddedApi.php b/sdks/php/src/Api/EmbeddedApi.php index 1aef64edb..72029fd95 100644 --- a/sdks/php/src/Api/EmbeddedApi.php +++ b/sdks/php/src/Api/EmbeddedApi.php @@ -1,7 +1,7 @@ getBody(); // stream goes to serializer - } else { - $content = (string)$response->getBody(); - if ('\Dropbox\Sign\Model\EmbeddedEditUrlResponse' !== '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 $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\EmbeddedEditUrlResponse', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\EmbeddedEditUrlResponse', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -246,33 +234,11 @@ public function embeddedEditUrlWithHttpInfo(string $template_id, Model\EmbeddedE ); } - $returnType = '\Dropbox\Sign\Model\EmbeddedEditUrlResponse'; - 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(), - ]; + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\EmbeddedEditUrlResponse', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -285,8 +251,19 @@ public function embeddedEditUrlWithHttpInfo(string $template_id, Model\EmbeddedE $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + throw $e; } } @@ -431,7 +408,11 @@ public function embeddedEditUrlRequest(string $template_id, Model\EmbeddedEditUr 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($embedded_edit_url_request)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($embedded_edit_url_request), JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $embedded_edit_url_request; } @@ -462,7 +443,11 @@ public function embeddedEditUrlRequest(string $template_id, Model\EmbeddedEditUr $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -571,32 +556,19 @@ public function embeddedSignUrlWithHttpInfo(string $signature_id, string $conten switch ($statusCode) { case 200: - if ('\Dropbox\Sign\Model\EmbeddedSignUrlResponse' === '\SplFileObject') { - $content = $response->getBody(); // stream goes to serializer - } else { - $content = (string)$response->getBody(); - if ('\Dropbox\Sign\Model\EmbeddedSignUrlResponse' !== '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 $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\EmbeddedSignUrlResponse', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\EmbeddedSignUrlResponse', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -612,33 +584,11 @@ public function embeddedSignUrlWithHttpInfo(string $signature_id, string $conten ); } - $returnType = '\Dropbox\Sign\Model\EmbeddedSignUrlResponse'; - 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(), - ]; + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\EmbeddedSignUrlResponse', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -651,8 +601,19 @@ public function embeddedSignUrlWithHttpInfo(string $signature_id, string $conten $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + throw $e; } } @@ -802,7 +763,11 @@ public function embeddedSignUrlRequest(string $signature_id, string $contentType $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -855,6 +820,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } @@ -919,4 +892,47 @@ private function handleRangeCodeException( return true; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response + ): array { + if ($dataType === '\SplFileObject') { + $content = $response->getBody(); // stream goes to serializer + } else { + $content = (string)$response->getBody(); + if ($dataType !== '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() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode + ): bool { + $left = (int)($rangeCode[0] . '00'); + $right = (int)($rangeCode[0] . '99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/sdks/php/src/Api/FaxApi.php b/sdks/php/src/Api/FaxApi.php index e41132916..d12e61384 100644 --- a/sdks/php/src/Api/FaxApi.php +++ b/sdks/php/src/Api/FaxApi.php @@ -1,7 +1,7 @@ getCode()) { } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + throw $e; } } @@ -344,7 +356,11 @@ public function faxDeleteRequest(string $fax_id, string $contentType = self::con $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -449,32 +465,19 @@ public function faxFilesWithHttpInfo(string $fax_id, string $contentType = self: 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 $this->handleResponseWithDataType( + '\SplFileObject', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\SplFileObject', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -490,33 +493,11 @@ public function faxFilesWithHttpInfo(string $fax_id, string $contentType = self: ); } - $returnType = '\SplFileObject'; - 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(), - ]; + return $this->handleResponseWithDataType( + '\SplFileObject', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -529,8 +510,19 @@ public function faxFilesWithHttpInfo(string $fax_id, string $contentType = self: $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + throw $e; } } @@ -680,7 +672,11 @@ public function faxFilesRequest(string $fax_id, string $contentType = self::cont $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -785,32 +781,19 @@ public function faxGetWithHttpInfo(string $fax_id, string $contentType = self::c switch ($statusCode) { case 200: - if ('\Dropbox\Sign\Model\FaxGetResponse' === '\SplFileObject') { - $content = $response->getBody(); // stream goes to serializer - } else { - $content = (string)$response->getBody(); - if ('\Dropbox\Sign\Model\FaxGetResponse' !== '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 $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\FaxGetResponse', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\FaxGetResponse', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -826,33 +809,11 @@ public function faxGetWithHttpInfo(string $fax_id, string $contentType = self::c ); } - $returnType = '\Dropbox\Sign\Model\FaxGetResponse'; - 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(), - ]; + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\FaxGetResponse', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -865,8 +826,19 @@ public function faxGetWithHttpInfo(string $fax_id, string $contentType = self::c $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + throw $e; } } @@ -1016,7 +988,11 @@ public function faxGetRequest(string $fax_id, string $contentType = self::conten $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -1123,32 +1099,19 @@ public function faxListWithHttpInfo(?int $page = 1, ?int $page_size = 20, string switch ($statusCode) { case 200: - if ('\Dropbox\Sign\Model\FaxListResponse' === '\SplFileObject') { - $content = $response->getBody(); // stream goes to serializer - } else { - $content = (string)$response->getBody(); - if ('\Dropbox\Sign\Model\FaxListResponse' !== '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 $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\FaxListResponse', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\FaxListResponse', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -1164,33 +1127,11 @@ public function faxListWithHttpInfo(?int $page = 1, ?int $page_size = 20, string ); } - $returnType = '\Dropbox\Sign\Model\FaxListResponse'; - 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(), - ]; + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\FaxListResponse', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -1203,8 +1144,19 @@ public function faxListWithHttpInfo(?int $page = 1, ?int $page_size = 20, string $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; + } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; } + throw $e; } } @@ -1371,7 +1323,11 @@ public function faxListRequest(?int $page = 1, ?int $page_size = 20, string $con $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -1476,32 +1432,19 @@ public function faxSendWithHttpInfo(Model\FaxSendRequest $fax_send_request, stri switch ($statusCode) { case 200: - if ('\Dropbox\Sign\Model\FaxGetResponse' === '\SplFileObject') { - $content = $response->getBody(); // stream goes to serializer - } else { - $content = (string)$response->getBody(); - if ('\Dropbox\Sign\Model\FaxGetResponse' !== '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 $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\FaxGetResponse', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\FaxGetResponse', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -1517,33 +1460,11 @@ public function faxSendWithHttpInfo(Model\FaxSendRequest $fax_send_request, stri ); } - $returnType = '\Dropbox\Sign\Model\FaxGetResponse'; - 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(), - ]; + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\FaxGetResponse', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -1556,8 +1477,19 @@ public function faxSendWithHttpInfo(Model\FaxSendRequest $fax_send_request, stri $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; + } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; } + throw $e; } } @@ -1683,7 +1615,11 @@ public function faxSendRequest(Model\FaxSendRequest $fax_send_request, string $c 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($fax_send_request)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($fax_send_request), JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $fax_send_request; } @@ -1714,7 +1650,11 @@ public function faxSendRequest(Model\FaxSendRequest $fax_send_request, string $c $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -1763,6 +1703,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } @@ -1827,4 +1775,47 @@ private function handleRangeCodeException( return true; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response + ): array { + if ($dataType === '\SplFileObject') { + $content = $response->getBody(); // stream goes to serializer + } else { + $content = (string)$response->getBody(); + if ($dataType !== '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() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode + ): bool { + $left = (int)($rangeCode[0] . '00'); + $right = (int)($rangeCode[0] . '99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/sdks/php/src/Api/FaxLineApi.php b/sdks/php/src/Api/FaxLineApi.php index 2882dc492..0d7485c74 100644 --- a/sdks/php/src/Api/FaxLineApi.php +++ b/sdks/php/src/Api/FaxLineApi.php @@ -1,7 +1,7 @@ getBody(); // stream goes to serializer - } else { - $content = (string)$response->getBody(); - if ('\Dropbox\Sign\Model\FaxLineResponse' !== '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 $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\FaxLineResponse', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\FaxLineResponse', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -259,33 +247,11 @@ public function faxLineAddUserWithHttpInfo(Model\FaxLineAddUserRequest $fax_line ); } - $returnType = '\Dropbox\Sign\Model\FaxLineResponse'; - 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(), - ]; + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\FaxLineResponse', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -298,8 +264,19 @@ public function faxLineAddUserWithHttpInfo(Model\FaxLineAddUserRequest $fax_line $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; + } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; } + throw $e; } } @@ -425,7 +402,11 @@ public function faxLineAddUserRequest(Model\FaxLineAddUserRequest $fax_line_add_ 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($fax_line_add_user_request)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($fax_line_add_user_request), JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $fax_line_add_user_request; } @@ -456,7 +437,11 @@ public function faxLineAddUserRequest(Model\FaxLineAddUserRequest $fax_line_add_ $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -567,32 +552,19 @@ public function faxLineAreaCodeGetWithHttpInfo(string $country, ?string $state = switch ($statusCode) { case 200: - if ('\Dropbox\Sign\Model\FaxLineAreaCodeGetResponse' === '\SplFileObject') { - $content = $response->getBody(); // stream goes to serializer - } else { - $content = (string)$response->getBody(); - if ('\Dropbox\Sign\Model\FaxLineAreaCodeGetResponse' !== '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 $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\FaxLineAreaCodeGetResponse', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\FaxLineAreaCodeGetResponse', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -608,33 +580,11 @@ public function faxLineAreaCodeGetWithHttpInfo(string $country, ?string $state = ); } - $returnType = '\Dropbox\Sign\Model\FaxLineAreaCodeGetResponse'; - 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(), - ]; + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\FaxLineAreaCodeGetResponse', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -647,8 +597,19 @@ public function faxLineAreaCodeGetWithHttpInfo(string $country, ?string $state = $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; + } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; } + throw $e; } } @@ -835,7 +796,11 @@ public function faxLineAreaCodeGetRequest(string $country, ?string $state = null $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -940,32 +905,19 @@ public function faxLineCreateWithHttpInfo(Model\FaxLineCreateRequest $fax_line_c switch ($statusCode) { case 200: - if ('\Dropbox\Sign\Model\FaxLineResponse' === '\SplFileObject') { - $content = $response->getBody(); // stream goes to serializer - } else { - $content = (string)$response->getBody(); - if ('\Dropbox\Sign\Model\FaxLineResponse' !== '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 $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\FaxLineResponse', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\FaxLineResponse', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -981,33 +933,11 @@ public function faxLineCreateWithHttpInfo(Model\FaxLineCreateRequest $fax_line_c ); } - $returnType = '\Dropbox\Sign\Model\FaxLineResponse'; - 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(), - ]; + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\FaxLineResponse', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -1020,8 +950,19 @@ public function faxLineCreateWithHttpInfo(Model\FaxLineCreateRequest $fax_line_c $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + throw $e; } } @@ -1147,7 +1088,11 @@ public function faxLineCreateRequest(Model\FaxLineCreateRequest $fax_line_create 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($fax_line_create_request)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($fax_line_create_request), JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $fax_line_create_request; } @@ -1178,7 +1123,11 @@ public function faxLineCreateRequest(Model\FaxLineCreateRequest $fax_line_create $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -1277,6 +1226,17 @@ public function faxLineDeleteWithHttpInfo(Model\FaxLineDeleteRequest $fax_line_d } switch ($e->getCode()) { } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + throw $e; } } @@ -1389,7 +1349,11 @@ public function faxLineDeleteRequest(Model\FaxLineDeleteRequest $fax_line_delete 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($fax_line_delete_request)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($fax_line_delete_request), JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $fax_line_delete_request; } @@ -1420,7 +1384,11 @@ public function faxLineDeleteRequest(Model\FaxLineDeleteRequest $fax_line_delete $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -1525,32 +1493,19 @@ public function faxLineGetWithHttpInfo(string $number, string $contentType = sel switch ($statusCode) { case 200: - if ('\Dropbox\Sign\Model\FaxLineResponse' === '\SplFileObject') { - $content = $response->getBody(); // stream goes to serializer - } else { - $content = (string)$response->getBody(); - if ('\Dropbox\Sign\Model\FaxLineResponse' !== '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 $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\FaxLineResponse', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\FaxLineResponse', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -1566,33 +1521,11 @@ public function faxLineGetWithHttpInfo(string $number, string $contentType = sel ); } - $returnType = '\Dropbox\Sign\Model\FaxLineResponse'; - 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(), - ]; + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\FaxLineResponse', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -1605,8 +1538,19 @@ public function faxLineGetWithHttpInfo(string $number, string $contentType = sel $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + throw $e; } } @@ -1757,7 +1701,11 @@ public function faxLineGetRequest(string $number, string $contentType = self::co $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -1868,32 +1816,19 @@ public function faxLineListWithHttpInfo(?string $account_id = null, ?int $page = switch ($statusCode) { case 200: - if ('\Dropbox\Sign\Model\FaxLineListResponse' === '\SplFileObject') { - $content = $response->getBody(); // stream goes to serializer - } else { - $content = (string)$response->getBody(); - if ('\Dropbox\Sign\Model\FaxLineListResponse' !== '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 $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\FaxLineListResponse', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\FaxLineListResponse', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -1909,33 +1844,11 @@ public function faxLineListWithHttpInfo(?string $account_id = null, ?int $page = ); } - $returnType = '\Dropbox\Sign\Model\FaxLineListResponse'; - 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(), - ]; + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\FaxLineListResponse', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -1948,8 +1861,19 @@ public function faxLineListWithHttpInfo(?string $account_id = null, ?int $page = $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + throw $e; } } @@ -2129,7 +2053,11 @@ public function faxLineListRequest(?string $account_id = null, ?int $page = 1, ? $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -2234,32 +2162,19 @@ public function faxLineRemoveUserWithHttpInfo(Model\FaxLineRemoveUserRequest $fa switch ($statusCode) { case 200: - if ('\Dropbox\Sign\Model\FaxLineResponse' === '\SplFileObject') { - $content = $response->getBody(); // stream goes to serializer - } else { - $content = (string)$response->getBody(); - if ('\Dropbox\Sign\Model\FaxLineResponse' !== '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 $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\FaxLineResponse', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\FaxLineResponse', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -2275,33 +2190,11 @@ public function faxLineRemoveUserWithHttpInfo(Model\FaxLineRemoveUserRequest $fa ); } - $returnType = '\Dropbox\Sign\Model\FaxLineResponse'; - 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(), - ]; + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\FaxLineResponse', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -2314,8 +2207,19 @@ public function faxLineRemoveUserWithHttpInfo(Model\FaxLineRemoveUserRequest $fa $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; + } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; } + throw $e; } } @@ -2441,7 +2345,11 @@ public function faxLineRemoveUserRequest(Model\FaxLineRemoveUserRequest $fax_lin 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($fax_line_remove_user_request)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($fax_line_remove_user_request), JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $fax_line_remove_user_request; } @@ -2472,7 +2380,11 @@ public function faxLineRemoveUserRequest(Model\FaxLineRemoveUserRequest $fax_lin $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -2521,6 +2433,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } @@ -2585,4 +2505,47 @@ private function handleRangeCodeException( return true; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response + ): array { + if ($dataType === '\SplFileObject') { + $content = $response->getBody(); // stream goes to serializer + } else { + $content = (string)$response->getBody(); + if ($dataType !== '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() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode + ): bool { + $left = (int)($rangeCode[0] . '00'); + $right = (int)($rangeCode[0] . '99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/sdks/php/src/Api/OAuthApi.php b/sdks/php/src/Api/OAuthApi.php index 95bbf72e6..665cd468b 100644 --- a/sdks/php/src/Api/OAuthApi.php +++ b/sdks/php/src/Api/OAuthApi.php @@ -1,7 +1,7 @@ getBody(); // stream goes to serializer - } else { - $content = (string)$response->getBody(); - if ('\Dropbox\Sign\Model\OAuthTokenResponse' !== '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 $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\OAuthTokenResponse', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\OAuthTokenResponse', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -254,33 +242,11 @@ public function oauthTokenGenerateWithHttpInfo(Model\OAuthTokenGenerateRequest $ ); } - $returnType = '\Dropbox\Sign\Model\OAuthTokenResponse'; - 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(), - ]; + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\OAuthTokenResponse', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -293,8 +259,19 @@ public function oauthTokenGenerateWithHttpInfo(Model\OAuthTokenGenerateRequest $ $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + throw $e; } } @@ -438,7 +415,11 @@ public function oauthTokenGenerateRequest(Model\OAuthTokenGenerateRequest $o_aut 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($o_auth_token_generate_request)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($o_auth_token_generate_request), JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $o_auth_token_generate_request; } @@ -469,7 +450,11 @@ public function oauthTokenGenerateRequest(Model\OAuthTokenGenerateRequest $o_aut $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -604,32 +589,19 @@ public function oauthTokenRefreshWithHttpInfo(Model\OAuthTokenRefreshRequest $o_ switch ($statusCode) { case 200: - if ('\Dropbox\Sign\Model\OAuthTokenResponse' === '\SplFileObject') { - $content = $response->getBody(); // stream goes to serializer - } else { - $content = (string)$response->getBody(); - if ('\Dropbox\Sign\Model\OAuthTokenResponse' !== '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 $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\OAuthTokenResponse', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\OAuthTokenResponse', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -645,33 +617,11 @@ public function oauthTokenRefreshWithHttpInfo(Model\OAuthTokenRefreshRequest $o_ ); } - $returnType = '\Dropbox\Sign\Model\OAuthTokenResponse'; - 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(), - ]; + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\OAuthTokenResponse', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -684,8 +634,19 @@ public function oauthTokenRefreshWithHttpInfo(Model\OAuthTokenRefreshRequest $o_ $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; + } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; } + throw $e; } } @@ -829,7 +790,11 @@ public function oauthTokenRefreshRequest(Model\OAuthTokenRefreshRequest $o_auth_ 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($o_auth_token_refresh_request)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($o_auth_token_refresh_request), JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $o_auth_token_refresh_request; } @@ -860,7 +825,11 @@ public function oauthTokenRefreshRequest(Model\OAuthTokenRefreshRequest $o_auth_ $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -929,6 +898,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } @@ -993,4 +970,47 @@ private function handleRangeCodeException( return true; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response + ): array { + if ($dataType === '\SplFileObject') { + $content = $response->getBody(); // stream goes to serializer + } else { + $content = (string)$response->getBody(); + if ($dataType !== '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() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode + ): bool { + $left = (int)($rangeCode[0] . '00'); + $right = (int)($rangeCode[0] . '99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/sdks/php/src/Api/ReportApi.php b/sdks/php/src/Api/ReportApi.php index 942e18e3b..9e2a10e67 100644 --- a/sdks/php/src/Api/ReportApi.php +++ b/sdks/php/src/Api/ReportApi.php @@ -1,7 +1,7 @@ getBody(); // stream goes to serializer - } else { - $content = (string)$response->getBody(); - if ('\Dropbox\Sign\Model\ReportCreateResponse' !== '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 $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ReportCreateResponse', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\ReportCreateResponse', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -241,33 +229,11 @@ public function reportCreateWithHttpInfo(Model\ReportCreateRequest $report_creat ); } - $returnType = '\Dropbox\Sign\Model\ReportCreateResponse'; - 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(), - ]; + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ReportCreateResponse', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -280,8 +246,19 @@ public function reportCreateWithHttpInfo(Model\ReportCreateRequest $report_creat $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + throw $e; } } @@ -407,7 +384,11 @@ public function reportCreateRequest(Model\ReportCreateRequest $report_create_req 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($report_create_request)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($report_create_request), JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $report_create_request; } @@ -438,7 +419,11 @@ public function reportCreateRequest(Model\ReportCreateRequest $report_create_req $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -487,6 +472,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } @@ -551,4 +544,47 @@ private function handleRangeCodeException( return true; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response + ): array { + if ($dataType === '\SplFileObject') { + $content = $response->getBody(); // stream goes to serializer + } else { + $content = (string)$response->getBody(); + if ($dataType !== '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() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode + ): bool { + $left = (int)($rangeCode[0] . '00'); + $right = (int)($rangeCode[0] . '99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/sdks/php/src/Api/SignatureRequestApi.php b/sdks/php/src/Api/SignatureRequestApi.php index 0abcb76c2..a2aeed10b 100644 --- a/sdks/php/src/Api/SignatureRequestApi.php +++ b/sdks/php/src/Api/SignatureRequestApi.php @@ -1,7 +1,7 @@ getBody(); // stream goes to serializer - } else { - $content = (string)$response->getBody(); - if ('\Dropbox\Sign\Model\BulkSendJobSendResponse' !== '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 $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\BulkSendJobSendResponse', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\BulkSendJobSendResponse', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -309,33 +297,11 @@ public function signatureRequestBulkCreateEmbeddedWithTemplateWithHttpInfo(Model ); } - $returnType = '\Dropbox\Sign\Model\BulkSendJobSendResponse'; - 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(), - ]; + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\BulkSendJobSendResponse', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -348,8 +314,19 @@ public function signatureRequestBulkCreateEmbeddedWithTemplateWithHttpInfo(Model $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + throw $e; } } @@ -475,7 +452,11 @@ public function signatureRequestBulkCreateEmbeddedWithTemplateRequest(Model\Sign 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_bulk_create_embedded_with_template_request)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($signature_request_bulk_create_embedded_with_template_request), JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $signature_request_bulk_create_embedded_with_template_request; } @@ -506,7 +487,11 @@ public function signatureRequestBulkCreateEmbeddedWithTemplateRequest(Model\Sign $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -611,32 +596,19 @@ public function signatureRequestBulkSendWithTemplateWithHttpInfo(Model\Signature switch ($statusCode) { case 200: - if ('\Dropbox\Sign\Model\BulkSendJobSendResponse' === '\SplFileObject') { - $content = $response->getBody(); // stream goes to serializer - } else { - $content = (string)$response->getBody(); - if ('\Dropbox\Sign\Model\BulkSendJobSendResponse' !== '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 $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\BulkSendJobSendResponse', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\BulkSendJobSendResponse', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -652,33 +624,11 @@ public function signatureRequestBulkSendWithTemplateWithHttpInfo(Model\Signature ); } - $returnType = '\Dropbox\Sign\Model\BulkSendJobSendResponse'; - 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(), - ]; + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\BulkSendJobSendResponse', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -691,8 +641,19 @@ public function signatureRequestBulkSendWithTemplateWithHttpInfo(Model\Signature $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + throw $e; } } @@ -818,7 +779,11 @@ public function signatureRequestBulkSendWithTemplateRequest(Model\SignatureReque 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_bulk_send_with_template_request)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($signature_request_bulk_send_with_template_request), JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $signature_request_bulk_send_with_template_request; } @@ -849,7 +814,11 @@ public function signatureRequestBulkSendWithTemplateRequest(Model\SignatureReque $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -952,6 +921,17 @@ public function signatureRequestCancelWithHttpInfo(string $signature_request_id, } switch ($e->getCode()) { } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + throw $e; } } @@ -1088,7 +1068,11 @@ public function signatureRequestCancelRequest(string $signature_request_id, stri $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -1197,32 +1181,19 @@ public function signatureRequestCreateEmbeddedWithHttpInfo(Model\SignatureReques 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 $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\SignatureRequestGetResponse', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\SignatureRequestGetResponse', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -1238,33 +1209,11 @@ public function signatureRequestCreateEmbeddedWithHttpInfo(Model\SignatureReques ); } - $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(), - ]; + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\SignatureRequestGetResponse', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -1277,8 +1226,19 @@ public function signatureRequestCreateEmbeddedWithHttpInfo(Model\SignatureReques $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + throw $e; } } @@ -1404,7 +1364,11 @@ public function signatureRequestCreateEmbeddedRequest(Model\SignatureRequestCrea 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_create_embedded_request)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($signature_request_create_embedded_request), JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $signature_request_create_embedded_request; } @@ -1435,7 +1399,11 @@ public function signatureRequestCreateEmbeddedRequest(Model\SignatureRequestCrea $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -1544,32 +1512,19 @@ public function signatureRequestCreateEmbeddedWithTemplateWithHttpInfo(Model\Sig 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 $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\SignatureRequestGetResponse', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\SignatureRequestGetResponse', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -1585,33 +1540,11 @@ public function signatureRequestCreateEmbeddedWithTemplateWithHttpInfo(Model\Sig ); } - $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(), - ]; + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\SignatureRequestGetResponse', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -1624,8 +1557,19 @@ public function signatureRequestCreateEmbeddedWithTemplateWithHttpInfo(Model\Sig $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; + } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; } + throw $e; } } @@ -1751,7 +1695,11 @@ public function signatureRequestCreateEmbeddedWithTemplateRequest(Model\Signatur 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_create_embedded_with_template_request)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($signature_request_create_embedded_with_template_request), JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $signature_request_create_embedded_with_template_request; } @@ -1782,7 +1730,11 @@ public function signatureRequestCreateEmbeddedWithTemplateRequest(Model\Signatur $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -1893,32 +1845,19 @@ public function signatureRequestEditWithHttpInfo(string $signature_request_id, M 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 $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\SignatureRequestGetResponse', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\SignatureRequestGetResponse', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -1934,33 +1873,11 @@ public function signatureRequestEditWithHttpInfo(string $signature_request_id, M ); } - $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(), - ]; + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\SignatureRequestGetResponse', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -1973,8 +1890,19 @@ public function signatureRequestEditWithHttpInfo(string $signature_request_id, M $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + throw $e; } } @@ -2119,7 +2047,11 @@ public function signatureRequestEditRequest(string $signature_request_id, Model\ 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)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($signature_request_edit_request), JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $signature_request_edit_request; } @@ -2150,7 +2082,11 @@ public function signatureRequestEditRequest(string $signature_request_id, Model\ $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -2261,32 +2197,19 @@ public function signatureRequestEditEmbeddedWithHttpInfo(string $signature_reque 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 $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\SignatureRequestGetResponse', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\SignatureRequestGetResponse', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -2302,33 +2225,11 @@ public function signatureRequestEditEmbeddedWithHttpInfo(string $signature_reque ); } - $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(), - ]; + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\SignatureRequestGetResponse', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -2341,8 +2242,19 @@ public function signatureRequestEditEmbeddedWithHttpInfo(string $signature_reque $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + throw $e; } } @@ -2487,7 +2399,11 @@ public function signatureRequestEditEmbeddedRequest(string $signature_request_id 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)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($signature_request_edit_embedded_request), JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $signature_request_edit_embedded_request; } @@ -2518,7 +2434,11 @@ public function signatureRequestEditEmbeddedRequest(string $signature_request_id $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -2629,32 +2549,19 @@ public function signatureRequestEditEmbeddedWithTemplateWithHttpInfo(string $sig 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 $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\SignatureRequestGetResponse', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\SignatureRequestGetResponse', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -2670,33 +2577,11 @@ public function signatureRequestEditEmbeddedWithTemplateWithHttpInfo(string $sig ); } - $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(), - ]; + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\SignatureRequestGetResponse', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -2709,8 +2594,19 @@ public function signatureRequestEditEmbeddedWithTemplateWithHttpInfo(string $sig $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; + } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; } + throw $e; } } @@ -2855,7 +2751,11 @@ public function signatureRequestEditEmbeddedWithTemplateRequest(string $signatur 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)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($signature_request_edit_embedded_with_template_request), JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $signature_request_edit_embedded_with_template_request; } @@ -2886,7 +2786,11 @@ public function signatureRequestEditEmbeddedWithTemplateRequest(string $signatur $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -2997,32 +2901,19 @@ public function signatureRequestEditWithTemplateWithHttpInfo(string $signature_r 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 $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\SignatureRequestGetResponse', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\SignatureRequestGetResponse', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -3038,33 +2929,11 @@ public function signatureRequestEditWithTemplateWithHttpInfo(string $signature_r ); } - $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(), - ]; + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\SignatureRequestGetResponse', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -3077,8 +2946,19 @@ public function signatureRequestEditWithTemplateWithHttpInfo(string $signature_r $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + throw $e; } } @@ -3223,7 +3103,11 @@ public function signatureRequestEditWithTemplateRequest(string $signature_reques 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)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($signature_request_edit_with_template_request), JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $signature_request_edit_with_template_request; } @@ -3254,7 +3138,11 @@ public function signatureRequestEditWithTemplateRequest(string $signature_reques $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -3365,32 +3253,19 @@ public function signatureRequestFilesWithHttpInfo(string $signature_request_id, 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 $this->handleResponseWithDataType( + '\SplFileObject', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\SplFileObject', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -3406,33 +3281,11 @@ public function signatureRequestFilesWithHttpInfo(string $signature_request_id, ); } - $returnType = '\SplFileObject'; - 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(), - ]; + return $this->handleResponseWithDataType( + '\SplFileObject', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -3445,8 +3298,19 @@ public function signatureRequestFilesWithHttpInfo(string $signature_request_id, $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; + } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; } + throw $e; } } @@ -3609,7 +3473,11 @@ public function signatureRequestFilesRequest(string $signature_request_id, ?stri $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -3718,32 +3586,19 @@ public function signatureRequestFilesAsDataUriWithHttpInfo(string $signature_req switch ($statusCode) { case 200: - if ('\Dropbox\Sign\Model\FileResponseDataUri' === '\SplFileObject') { - $content = $response->getBody(); // stream goes to serializer - } else { - $content = (string)$response->getBody(); - if ('\Dropbox\Sign\Model\FileResponseDataUri' !== '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 $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\FileResponseDataUri', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\FileResponseDataUri', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -3759,33 +3614,11 @@ public function signatureRequestFilesAsDataUriWithHttpInfo(string $signature_req ); } - $returnType = '\Dropbox\Sign\Model\FileResponseDataUri'; - 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(), - ]; + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\FileResponseDataUri', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -3798,8 +3631,19 @@ public function signatureRequestFilesAsDataUriWithHttpInfo(string $signature_req $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; + } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; } + throw $e; } } @@ -3949,7 +3793,11 @@ public function signatureRequestFilesAsDataUriRequest(string $signature_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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -4060,32 +3908,19 @@ public function signatureRequestFilesAsFileUrlWithHttpInfo(string $signature_req switch ($statusCode) { case 200: - if ('\Dropbox\Sign\Model\FileResponse' === '\SplFileObject') { - $content = $response->getBody(); // stream goes to serializer - } else { - $content = (string)$response->getBody(); - if ('\Dropbox\Sign\Model\FileResponse' !== '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 $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\FileResponse', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\FileResponse', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -4101,33 +3936,11 @@ public function signatureRequestFilesAsFileUrlWithHttpInfo(string $signature_req ); } - $returnType = '\Dropbox\Sign\Model\FileResponse'; - 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(), - ]; + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\FileResponse', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -4140,8 +3953,19 @@ public function signatureRequestFilesAsFileUrlWithHttpInfo(string $signature_req $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + throw $e; } } @@ -4304,7 +4128,11 @@ public function signatureRequestFilesAsFileUrlRequest(string $signature_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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -4413,32 +4241,19 @@ public function signatureRequestGetWithHttpInfo(string $signature_request_id, st 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 $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\SignatureRequestGetResponse', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\SignatureRequestGetResponse', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -4454,33 +4269,11 @@ public function signatureRequestGetWithHttpInfo(string $signature_request_id, st ); } - $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(), - ]; + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\SignatureRequestGetResponse', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -4493,8 +4286,19 @@ public function signatureRequestGetWithHttpInfo(string $signature_request_id, st $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; + } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; } + throw $e; } } @@ -4644,7 +4448,11 @@ public function signatureRequestGetRequest(string $signature_request_id, string $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -4759,32 +4567,19 @@ public function signatureRequestListWithHttpInfo(?string $account_id = null, ?in switch ($statusCode) { case 200: - if ('\Dropbox\Sign\Model\SignatureRequestListResponse' === '\SplFileObject') { - $content = $response->getBody(); // stream goes to serializer - } else { - $content = (string)$response->getBody(); - if ('\Dropbox\Sign\Model\SignatureRequestListResponse' !== '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 $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\SignatureRequestListResponse', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\SignatureRequestListResponse', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -4800,33 +4595,11 @@ public function signatureRequestListWithHttpInfo(?string $account_id = null, ?in ); } - $returnType = '\Dropbox\Sign\Model\SignatureRequestListResponse'; - 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(), - ]; + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\SignatureRequestListResponse', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -4839,8 +4612,19 @@ public function signatureRequestListWithHttpInfo(?string $account_id = null, ?in $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; + } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; } + throw $e; } } @@ -5020,7 +4804,11 @@ public function signatureRequestListRequest(?string $account_id = null, ?int $pa $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -5129,32 +4917,19 @@ public function signatureRequestReleaseHoldWithHttpInfo(string $signature_reques 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 $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\SignatureRequestGetResponse', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\SignatureRequestGetResponse', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -5170,33 +4945,11 @@ public function signatureRequestReleaseHoldWithHttpInfo(string $signature_reques ); } - $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(), - ]; + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\SignatureRequestGetResponse', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -5209,8 +4962,19 @@ public function signatureRequestReleaseHoldWithHttpInfo(string $signature_reques $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; + } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; } + throw $e; } } @@ -5360,7 +5124,11 @@ public function signatureRequestReleaseHoldRequest(string $signature_request_id, $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -5471,32 +5239,19 @@ public function signatureRequestRemindWithHttpInfo(string $signature_request_id, 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 $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\SignatureRequestGetResponse', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\SignatureRequestGetResponse', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -5512,33 +5267,11 @@ public function signatureRequestRemindWithHttpInfo(string $signature_request_id, ); } - $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(), - ]; + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\SignatureRequestGetResponse', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -5551,8 +5284,19 @@ public function signatureRequestRemindWithHttpInfo(string $signature_request_id, $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; + } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; } + throw $e; } } @@ -5697,7 +5441,11 @@ public function signatureRequestRemindRequest(string $signature_request_id, Mode 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_remind_request)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($signature_request_remind_request), JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $signature_request_remind_request; } @@ -5728,7 +5476,11 @@ public function signatureRequestRemindRequest(string $signature_request_id, Mode $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -5831,6 +5583,17 @@ public function signatureRequestRemoveWithHttpInfo(string $signature_request_id, } switch ($e->getCode()) { } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + throw $e; } } @@ -5967,7 +5730,11 @@ public function signatureRequestRemoveRequest(string $signature_request_id, stri $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -6072,32 +5839,19 @@ public function signatureRequestSendWithHttpInfo(Model\SignatureRequestSendReque 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 $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\SignatureRequestGetResponse', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\SignatureRequestGetResponse', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -6113,33 +5867,11 @@ public function signatureRequestSendWithHttpInfo(Model\SignatureRequestSendReque ); } - $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(), - ]; + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\SignatureRequestGetResponse', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -6152,8 +5884,19 @@ public function signatureRequestSendWithHttpInfo(Model\SignatureRequestSendReque $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; + } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; } + throw $e; } } @@ -6279,7 +6022,11 @@ public function signatureRequestSendRequest(Model\SignatureRequestSendRequest $s 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_send_request)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($signature_request_send_request), JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $signature_request_send_request; } @@ -6310,7 +6057,11 @@ public function signatureRequestSendRequest(Model\SignatureRequestSendRequest $s $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -6419,32 +6170,19 @@ public function signatureRequestSendWithTemplateWithHttpInfo(Model\SignatureRequ 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 $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\SignatureRequestGetResponse', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\SignatureRequestGetResponse', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -6460,33 +6198,11 @@ public function signatureRequestSendWithTemplateWithHttpInfo(Model\SignatureRequ ); } - $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(), - ]; + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\SignatureRequestGetResponse', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -6499,8 +6215,19 @@ public function signatureRequestSendWithTemplateWithHttpInfo(Model\SignatureRequ $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; + } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; } + throw $e; } } @@ -6626,7 +6353,11 @@ public function signatureRequestSendWithTemplateRequest(Model\SignatureRequestSe 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_send_with_template_request)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($signature_request_send_with_template_request), JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $signature_request_send_with_template_request; } @@ -6657,7 +6388,11 @@ public function signatureRequestSendWithTemplateRequest(Model\SignatureRequestSe $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -6768,32 +6503,19 @@ public function signatureRequestUpdateWithHttpInfo(string $signature_request_id, 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 $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\SignatureRequestGetResponse', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\SignatureRequestGetResponse', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -6809,33 +6531,11 @@ public function signatureRequestUpdateWithHttpInfo(string $signature_request_id, ); } - $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(), - ]; + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\SignatureRequestGetResponse', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -6848,8 +6548,19 @@ public function signatureRequestUpdateWithHttpInfo(string $signature_request_id, $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; + } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; } + throw $e; } } @@ -6994,7 +6705,11 @@ public function signatureRequestUpdateRequest(string $signature_request_id, Mode 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_update_request)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($signature_request_update_request), JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $signature_request_update_request; } @@ -7025,7 +6740,11 @@ public function signatureRequestUpdateRequest(string $signature_request_id, Mode $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -7078,6 +6797,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } @@ -7142,4 +6869,47 @@ private function handleRangeCodeException( return true; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response + ): array { + if ($dataType === '\SplFileObject') { + $content = $response->getBody(); // stream goes to serializer + } else { + $content = (string)$response->getBody(); + if ($dataType !== '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() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode + ): bool { + $left = (int)($rangeCode[0] . '00'); + $right = (int)($rangeCode[0] . '99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/sdks/php/src/Api/TeamApi.php b/sdks/php/src/Api/TeamApi.php index 93652aeb9..0e313aaf8 100644 --- a/sdks/php/src/Api/TeamApi.php +++ b/sdks/php/src/Api/TeamApi.php @@ -1,7 +1,7 @@ getBody(); // stream goes to serializer - } else { - $content = (string)$response->getBody(); - if ('\Dropbox\Sign\Model\TeamGetResponse' !== '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 $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\TeamGetResponse', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\TeamGetResponse', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -270,33 +258,11 @@ public function teamAddMemberWithHttpInfo(Model\TeamAddMemberRequest $team_add_m ); } - $returnType = '\Dropbox\Sign\Model\TeamGetResponse'; - 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(), - ]; + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\TeamGetResponse', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -309,8 +275,19 @@ public function teamAddMemberWithHttpInfo(Model\TeamAddMemberRequest $team_add_m $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + throw $e; } } @@ -448,7 +425,11 @@ public function teamAddMemberRequest(Model\TeamAddMemberRequest $team_add_member 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($team_add_member_request)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($team_add_member_request), JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $team_add_member_request; } @@ -479,7 +460,11 @@ public function teamAddMemberRequest(Model\TeamAddMemberRequest $team_add_member $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -588,32 +573,19 @@ public function teamCreateWithHttpInfo(Model\TeamCreateRequest $team_create_requ switch ($statusCode) { case 200: - if ('\Dropbox\Sign\Model\TeamGetResponse' === '\SplFileObject') { - $content = $response->getBody(); // stream goes to serializer - } else { - $content = (string)$response->getBody(); - if ('\Dropbox\Sign\Model\TeamGetResponse' !== '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 $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\TeamGetResponse', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\TeamGetResponse', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -629,33 +601,11 @@ public function teamCreateWithHttpInfo(Model\TeamCreateRequest $team_create_requ ); } - $returnType = '\Dropbox\Sign\Model\TeamGetResponse'; - 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(), - ]; + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\TeamGetResponse', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -668,8 +618,19 @@ public function teamCreateWithHttpInfo(Model\TeamCreateRequest $team_create_requ $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; + } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; } + throw $e; } } @@ -795,7 +756,11 @@ public function teamCreateRequest(Model\TeamCreateRequest $team_create_request, 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($team_create_request)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($team_create_request), JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $team_create_request; } @@ -826,7 +791,11 @@ public function teamCreateRequest(Model\TeamCreateRequest $team_create_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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -926,6 +895,17 @@ public function teamDeleteWithHttpInfo(string $contentType = self::contentTypes[ } switch ($e->getCode()) { } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + throw $e; } } @@ -1043,7 +1023,11 @@ public function teamDeleteRequest(string $contentType = self::contentTypes['team $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -1149,32 +1133,19 @@ public function teamGetWithHttpInfo(string $contentType = self::contentTypes['te switch ($statusCode) { case 200: - if ('\Dropbox\Sign\Model\TeamGetResponse' === '\SplFileObject') { - $content = $response->getBody(); // stream goes to serializer - } else { - $content = (string)$response->getBody(); - if ('\Dropbox\Sign\Model\TeamGetResponse' !== '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 $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\TeamGetResponse', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\TeamGetResponse', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -1190,33 +1161,11 @@ public function teamGetWithHttpInfo(string $contentType = self::contentTypes['te ); } - $returnType = '\Dropbox\Sign\Model\TeamGetResponse'; - 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(), - ]; + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\TeamGetResponse', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -1229,8 +1178,19 @@ public function teamGetWithHttpInfo(string $contentType = self::contentTypes['te $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + throw $e; } } @@ -1361,7 +1321,11 @@ public function teamGetRequest(string $contentType = self::contentTypes['teamGet $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -1470,32 +1434,19 @@ public function teamInfoWithHttpInfo(?string $team_id = null, string $contentTyp switch ($statusCode) { case 200: - if ('\Dropbox\Sign\Model\TeamGetInfoResponse' === '\SplFileObject') { - $content = $response->getBody(); // stream goes to serializer - } else { - $content = (string)$response->getBody(); - if ('\Dropbox\Sign\Model\TeamGetInfoResponse' !== '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 $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\TeamGetInfoResponse', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\TeamGetInfoResponse', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -1511,33 +1462,11 @@ public function teamInfoWithHttpInfo(?string $team_id = null, string $contentTyp ); } - $returnType = '\Dropbox\Sign\Model\TeamGetInfoResponse'; - 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(), - ]; + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\TeamGetInfoResponse', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -1550,8 +1479,19 @@ public function teamInfoWithHttpInfo(?string $team_id = null, string $contentTyp $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; + } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; } + throw $e; } } @@ -1695,7 +1635,11 @@ public function teamInfoRequest(?string $team_id = null, string $contentType = s $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -1804,32 +1748,19 @@ public function teamInvitesWithHttpInfo(?string $email_address = null, string $c switch ($statusCode) { case 200: - if ('\Dropbox\Sign\Model\TeamInvitesResponse' === '\SplFileObject') { - $content = $response->getBody(); // stream goes to serializer - } else { - $content = (string)$response->getBody(); - if ('\Dropbox\Sign\Model\TeamInvitesResponse' !== '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 $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\TeamInvitesResponse', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\TeamInvitesResponse', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -1845,33 +1776,11 @@ public function teamInvitesWithHttpInfo(?string $email_address = null, string $c ); } - $returnType = '\Dropbox\Sign\Model\TeamInvitesResponse'; - 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(), - ]; + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\TeamInvitesResponse', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -1884,8 +1793,19 @@ public function teamInvitesWithHttpInfo(?string $email_address = null, string $c $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; + } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; } + throw $e; } } @@ -2029,7 +1949,11 @@ public function teamInvitesRequest(?string $email_address = null, string $conten $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -2142,32 +2066,19 @@ public function teamMembersWithHttpInfo(string $team_id, ?int $page = 1, ?int $p switch ($statusCode) { case 200: - if ('\Dropbox\Sign\Model\TeamMembersResponse' === '\SplFileObject') { - $content = $response->getBody(); // stream goes to serializer - } else { - $content = (string)$response->getBody(); - if ('\Dropbox\Sign\Model\TeamMembersResponse' !== '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 $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\TeamMembersResponse', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\TeamMembersResponse', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -2183,33 +2094,11 @@ public function teamMembersWithHttpInfo(string $team_id, ?int $page = 1, ?int $p ); } - $returnType = '\Dropbox\Sign\Model\TeamMembersResponse'; - 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(), - ]; + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\TeamMembersResponse', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -2222,8 +2111,19 @@ public function teamMembersWithHttpInfo(string $team_id, ?int $page = 1, ?int $p $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + throw $e; } } @@ -2405,7 +2305,11 @@ public function teamMembersRequest(string $team_id, ?int $page = 1, ?int $page_s $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -2514,32 +2418,19 @@ public function teamRemoveMemberWithHttpInfo(Model\TeamRemoveMemberRequest $team switch ($statusCode) { case 201: - if ('\Dropbox\Sign\Model\TeamGetResponse' === '\SplFileObject') { - $content = $response->getBody(); // stream goes to serializer - } else { - $content = (string)$response->getBody(); - if ('\Dropbox\Sign\Model\TeamGetResponse' !== '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 $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\TeamGetResponse', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\TeamGetResponse', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -2555,33 +2446,11 @@ public function teamRemoveMemberWithHttpInfo(Model\TeamRemoveMemberRequest $team ); } - $returnType = '\Dropbox\Sign\Model\TeamGetResponse'; - 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(), - ]; + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\TeamGetResponse', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -2594,8 +2463,19 @@ public function teamRemoveMemberWithHttpInfo(Model\TeamRemoveMemberRequest $team $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + throw $e; } } @@ -2721,7 +2601,11 @@ public function teamRemoveMemberRequest(Model\TeamRemoveMemberRequest $team_remo 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($team_remove_member_request)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($team_remove_member_request), JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $team_remove_member_request; } @@ -2752,7 +2636,11 @@ public function teamRemoveMemberRequest(Model\TeamRemoveMemberRequest $team_remo $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -2865,32 +2753,19 @@ public function teamSubTeamsWithHttpInfo(string $team_id, ?int $page = 1, ?int $ switch ($statusCode) { case 200: - if ('\Dropbox\Sign\Model\TeamSubTeamsResponse' === '\SplFileObject') { - $content = $response->getBody(); // stream goes to serializer - } else { - $content = (string)$response->getBody(); - if ('\Dropbox\Sign\Model\TeamSubTeamsResponse' !== '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 $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\TeamSubTeamsResponse', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\TeamSubTeamsResponse', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -2906,33 +2781,11 @@ public function teamSubTeamsWithHttpInfo(string $team_id, ?int $page = 1, ?int $ ); } - $returnType = '\Dropbox\Sign\Model\TeamSubTeamsResponse'; - 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(), - ]; + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\TeamSubTeamsResponse', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -2945,8 +2798,19 @@ public function teamSubTeamsWithHttpInfo(string $team_id, ?int $page = 1, ?int $ $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + throw $e; } } @@ -3128,7 +2992,11 @@ public function teamSubTeamsRequest(string $team_id, ?int $page = 1, ?int $page_ $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -3237,32 +3105,19 @@ public function teamUpdateWithHttpInfo(Model\TeamUpdateRequest $team_update_requ switch ($statusCode) { case 200: - if ('\Dropbox\Sign\Model\TeamGetResponse' === '\SplFileObject') { - $content = $response->getBody(); // stream goes to serializer - } else { - $content = (string)$response->getBody(); - if ('\Dropbox\Sign\Model\TeamGetResponse' !== '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 $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\TeamGetResponse', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\TeamGetResponse', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -3278,33 +3133,11 @@ public function teamUpdateWithHttpInfo(Model\TeamUpdateRequest $team_update_requ ); } - $returnType = '\Dropbox\Sign\Model\TeamGetResponse'; - 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(), - ]; + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\TeamGetResponse', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -3317,8 +3150,19 @@ public function teamUpdateWithHttpInfo(Model\TeamUpdateRequest $team_update_requ $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; + } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; } + throw $e; } } @@ -3444,7 +3288,11 @@ public function teamUpdateRequest(Model\TeamUpdateRequest $team_update_request, 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($team_update_request)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($team_update_request), JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $team_update_request; } @@ -3475,7 +3323,11 @@ public function teamUpdateRequest(Model\TeamUpdateRequest $team_update_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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -3528,6 +3380,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } @@ -3592,4 +3452,47 @@ private function handleRangeCodeException( return true; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response + ): array { + if ($dataType === '\SplFileObject') { + $content = $response->getBody(); // stream goes to serializer + } else { + $content = (string)$response->getBody(); + if ($dataType !== '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() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode + ): bool { + $left = (int)($rangeCode[0] . '00'); + $right = (int)($rangeCode[0] . '99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/sdks/php/src/Api/TemplateApi.php b/sdks/php/src/Api/TemplateApi.php index 515142ada..507240d8d 100644 --- a/sdks/php/src/Api/TemplateApi.php +++ b/sdks/php/src/Api/TemplateApi.php @@ -1,7 +1,7 @@ getBody(); // stream goes to serializer - } else { - $content = (string)$response->getBody(); - if ('\Dropbox\Sign\Model\TemplateGetResponse' !== '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 $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\TemplateGetResponse', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\TemplateGetResponse', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -277,33 +265,11 @@ public function templateAddUserWithHttpInfo(string $template_id, Model\TemplateA ); } - $returnType = '\Dropbox\Sign\Model\TemplateGetResponse'; - 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(), - ]; + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\TemplateGetResponse', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -316,8 +282,19 @@ public function templateAddUserWithHttpInfo(string $template_id, Model\TemplateA $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; + } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; } + throw $e; } } @@ -462,7 +439,11 @@ public function templateAddUserRequest(string $template_id, Model\TemplateAddUse 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($template_add_user_request)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($template_add_user_request), JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $template_add_user_request; } @@ -493,7 +474,11 @@ public function templateAddUserRequest(string $template_id, Model\TemplateAddUse $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -602,32 +587,19 @@ public function templateCreateWithHttpInfo(Model\TemplateCreateRequest $template switch ($statusCode) { case 200: - if ('\Dropbox\Sign\Model\TemplateCreateResponse' === '\SplFileObject') { - $content = $response->getBody(); // stream goes to serializer - } else { - $content = (string)$response->getBody(); - if ('\Dropbox\Sign\Model\TemplateCreateResponse' !== '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 $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\TemplateCreateResponse', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\TemplateCreateResponse', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -643,33 +615,11 @@ public function templateCreateWithHttpInfo(Model\TemplateCreateRequest $template ); } - $returnType = '\Dropbox\Sign\Model\TemplateCreateResponse'; - 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(), - ]; + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\TemplateCreateResponse', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -682,8 +632,19 @@ public function templateCreateWithHttpInfo(Model\TemplateCreateRequest $template $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + throw $e; } } @@ -809,7 +770,11 @@ public function templateCreateRequest(Model\TemplateCreateRequest $template_crea 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($template_create_request)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($template_create_request), JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $template_create_request; } @@ -840,7 +805,11 @@ public function templateCreateRequest(Model\TemplateCreateRequest $template_crea $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -949,32 +918,19 @@ public function templateCreateEmbeddedDraftWithHttpInfo(Model\TemplateCreateEmbe switch ($statusCode) { case 200: - if ('\Dropbox\Sign\Model\TemplateCreateEmbeddedDraftResponse' === '\SplFileObject') { - $content = $response->getBody(); // stream goes to serializer - } else { - $content = (string)$response->getBody(); - if ('\Dropbox\Sign\Model\TemplateCreateEmbeddedDraftResponse' !== '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 $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\TemplateCreateEmbeddedDraftResponse', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\TemplateCreateEmbeddedDraftResponse', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -990,33 +946,11 @@ public function templateCreateEmbeddedDraftWithHttpInfo(Model\TemplateCreateEmbe ); } - $returnType = '\Dropbox\Sign\Model\TemplateCreateEmbeddedDraftResponse'; - 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(), - ]; + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\TemplateCreateEmbeddedDraftResponse', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -1029,8 +963,19 @@ public function templateCreateEmbeddedDraftWithHttpInfo(Model\TemplateCreateEmbe $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + throw $e; } } @@ -1156,7 +1101,11 @@ public function templateCreateEmbeddedDraftRequest(Model\TemplateCreateEmbeddedD 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($template_create_embedded_draft_request)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($template_create_embedded_draft_request), JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $template_create_embedded_draft_request; } @@ -1187,7 +1136,11 @@ public function templateCreateEmbeddedDraftRequest(Model\TemplateCreateEmbeddedD $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -1290,6 +1243,17 @@ public function templateDeleteWithHttpInfo(string $template_id, string $contentT } switch ($e->getCode()) { } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + throw $e; } } @@ -1426,7 +1390,11 @@ public function templateDeleteRequest(string $template_id, string $contentType = $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -1537,32 +1505,19 @@ public function templateFilesWithHttpInfo(string $template_id, ?string $file_typ 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 $this->handleResponseWithDataType( + '\SplFileObject', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\SplFileObject', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -1578,33 +1533,11 @@ public function templateFilesWithHttpInfo(string $template_id, ?string $file_typ ); } - $returnType = '\SplFileObject'; - 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(), - ]; + return $this->handleResponseWithDataType( + '\SplFileObject', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -1617,8 +1550,19 @@ public function templateFilesWithHttpInfo(string $template_id, ?string $file_typ $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + throw $e; } } @@ -1781,7 +1725,11 @@ public function templateFilesRequest(string $template_id, ?string $file_type = n $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -1890,32 +1838,19 @@ public function templateFilesAsDataUriWithHttpInfo(string $template_id, string $ switch ($statusCode) { case 200: - if ('\Dropbox\Sign\Model\FileResponseDataUri' === '\SplFileObject') { - $content = $response->getBody(); // stream goes to serializer - } else { - $content = (string)$response->getBody(); - if ('\Dropbox\Sign\Model\FileResponseDataUri' !== '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 $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\FileResponseDataUri', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\FileResponseDataUri', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -1931,33 +1866,11 @@ public function templateFilesAsDataUriWithHttpInfo(string $template_id, string $ ); } - $returnType = '\Dropbox\Sign\Model\FileResponseDataUri'; - 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(), - ]; + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\FileResponseDataUri', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -1970,8 +1883,19 @@ public function templateFilesAsDataUriWithHttpInfo(string $template_id, string $ $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; + } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; } + throw $e; } } @@ -2121,7 +2045,11 @@ public function templateFilesAsDataUriRequest(string $template_id, string $conte $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -2232,32 +2160,19 @@ public function templateFilesAsFileUrlWithHttpInfo(string $template_id, ?int $fo switch ($statusCode) { case 200: - if ('\Dropbox\Sign\Model\FileResponse' === '\SplFileObject') { - $content = $response->getBody(); // stream goes to serializer - } else { - $content = (string)$response->getBody(); - if ('\Dropbox\Sign\Model\FileResponse' !== '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 $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\FileResponse', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\FileResponse', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -2273,33 +2188,11 @@ public function templateFilesAsFileUrlWithHttpInfo(string $template_id, ?int $fo ); } - $returnType = '\Dropbox\Sign\Model\FileResponse'; - 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(), - ]; + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\FileResponse', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -2312,8 +2205,19 @@ public function templateFilesAsFileUrlWithHttpInfo(string $template_id, ?int $fo $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; + } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; } + throw $e; } } @@ -2476,7 +2380,11 @@ public function templateFilesAsFileUrlRequest(string $template_id, ?int $force_d $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -2585,32 +2493,19 @@ public function templateGetWithHttpInfo(string $template_id, string $contentType switch ($statusCode) { case 200: - if ('\Dropbox\Sign\Model\TemplateGetResponse' === '\SplFileObject') { - $content = $response->getBody(); // stream goes to serializer - } else { - $content = (string)$response->getBody(); - if ('\Dropbox\Sign\Model\TemplateGetResponse' !== '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 $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\TemplateGetResponse', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\TemplateGetResponse', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -2626,33 +2521,11 @@ public function templateGetWithHttpInfo(string $template_id, string $contentType ); } - $returnType = '\Dropbox\Sign\Model\TemplateGetResponse'; - 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(), - ]; + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\TemplateGetResponse', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -2665,8 +2538,19 @@ public function templateGetWithHttpInfo(string $template_id, string $contentType $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + throw $e; } } @@ -2816,7 +2700,11 @@ public function templateGetRequest(string $template_id, string $contentType = se $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -2931,32 +2819,19 @@ public function templateListWithHttpInfo(?string $account_id = null, ?int $page switch ($statusCode) { case 200: - if ('\Dropbox\Sign\Model\TemplateListResponse' === '\SplFileObject') { - $content = $response->getBody(); // stream goes to serializer - } else { - $content = (string)$response->getBody(); - if ('\Dropbox\Sign\Model\TemplateListResponse' !== '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 $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\TemplateListResponse', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\TemplateListResponse', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -2972,33 +2847,11 @@ public function templateListWithHttpInfo(?string $account_id = null, ?int $page ); } - $returnType = '\Dropbox\Sign\Model\TemplateListResponse'; - 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(), - ]; + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\TemplateListResponse', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -3011,8 +2864,19 @@ public function templateListWithHttpInfo(?string $account_id = null, ?int $page $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + throw $e; } } @@ -3199,7 +3063,11 @@ public function templateListRequest(?string $account_id = null, ?int $page = 1, $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -3310,32 +3178,19 @@ public function templateRemoveUserWithHttpInfo(string $template_id, Model\Templa switch ($statusCode) { case 200: - if ('\Dropbox\Sign\Model\TemplateGetResponse' === '\SplFileObject') { - $content = $response->getBody(); // stream goes to serializer - } else { - $content = (string)$response->getBody(); - if ('\Dropbox\Sign\Model\TemplateGetResponse' !== '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 $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\TemplateGetResponse', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\TemplateGetResponse', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -3351,33 +3206,11 @@ public function templateRemoveUserWithHttpInfo(string $template_id, Model\Templa ); } - $returnType = '\Dropbox\Sign\Model\TemplateGetResponse'; - 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(), - ]; + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\TemplateGetResponse', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -3390,8 +3223,19 @@ public function templateRemoveUserWithHttpInfo(string $template_id, Model\Templa $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + throw $e; } } @@ -3536,7 +3380,11 @@ public function templateRemoveUserRequest(string $template_id, Model\TemplateRem 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($template_remove_user_request)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($template_remove_user_request), JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $template_remove_user_request; } @@ -3567,7 +3415,11 @@ public function templateRemoveUserRequest(string $template_id, Model\TemplateRem $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -3678,32 +3530,19 @@ public function templateUpdateFilesWithHttpInfo(string $template_id, Model\Templ switch ($statusCode) { case 200: - if ('\Dropbox\Sign\Model\TemplateUpdateFilesResponse' === '\SplFileObject') { - $content = $response->getBody(); // stream goes to serializer - } else { - $content = (string)$response->getBody(); - if ('\Dropbox\Sign\Model\TemplateUpdateFilesResponse' !== '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 $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\TemplateUpdateFilesResponse', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\TemplateUpdateFilesResponse', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -3719,33 +3558,11 @@ public function templateUpdateFilesWithHttpInfo(string $template_id, Model\Templ ); } - $returnType = '\Dropbox\Sign\Model\TemplateUpdateFilesResponse'; - 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(), - ]; + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\TemplateUpdateFilesResponse', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -3758,8 +3575,19 @@ public function templateUpdateFilesWithHttpInfo(string $template_id, Model\Templ $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; + } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; } + throw $e; } } @@ -3904,7 +3732,11 @@ public function templateUpdateFilesRequest(string $template_id, Model\TemplateUp 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($template_update_files_request)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($template_update_files_request), JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $template_update_files_request; } @@ -3935,7 +3767,11 @@ public function templateUpdateFilesRequest(string $template_id, Model\TemplateUp $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -3988,6 +3824,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } @@ -4052,4 +3896,47 @@ private function handleRangeCodeException( return true; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response + ): array { + if ($dataType === '\SplFileObject') { + $content = $response->getBody(); // stream goes to serializer + } else { + $content = (string)$response->getBody(); + if ($dataType !== '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() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode + ): bool { + $left = (int)($rangeCode[0] . '00'); + $right = (int)($rangeCode[0] . '99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/sdks/php/src/Api/UnclaimedDraftApi.php b/sdks/php/src/Api/UnclaimedDraftApi.php index fbc0a7768..e25632a42 100644 --- a/sdks/php/src/Api/UnclaimedDraftApi.php +++ b/sdks/php/src/Api/UnclaimedDraftApi.php @@ -1,7 +1,7 @@ getBody(); // stream goes to serializer - } else { - $content = (string)$response->getBody(); - if ('\Dropbox\Sign\Model\UnclaimedDraftCreateResponse' !== '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 $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\UnclaimedDraftCreateResponse', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\UnclaimedDraftCreateResponse', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -253,33 +241,11 @@ public function unclaimedDraftCreateWithHttpInfo(Model\UnclaimedDraftCreateReque ); } - $returnType = '\Dropbox\Sign\Model\UnclaimedDraftCreateResponse'; - 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(), - ]; + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\UnclaimedDraftCreateResponse', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -292,8 +258,19 @@ public function unclaimedDraftCreateWithHttpInfo(Model\UnclaimedDraftCreateReque $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + throw $e; } } @@ -419,7 +396,11 @@ public function unclaimedDraftCreateRequest(Model\UnclaimedDraftCreateRequest $u 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($unclaimed_draft_create_request)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($unclaimed_draft_create_request), JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $unclaimed_draft_create_request; } @@ -450,7 +431,11 @@ public function unclaimedDraftCreateRequest(Model\UnclaimedDraftCreateRequest $u $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -559,32 +544,19 @@ public function unclaimedDraftCreateEmbeddedWithHttpInfo(Model\UnclaimedDraftCre switch ($statusCode) { case 200: - if ('\Dropbox\Sign\Model\UnclaimedDraftCreateResponse' === '\SplFileObject') { - $content = $response->getBody(); // stream goes to serializer - } else { - $content = (string)$response->getBody(); - if ('\Dropbox\Sign\Model\UnclaimedDraftCreateResponse' !== '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 $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\UnclaimedDraftCreateResponse', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\UnclaimedDraftCreateResponse', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -600,33 +572,11 @@ public function unclaimedDraftCreateEmbeddedWithHttpInfo(Model\UnclaimedDraftCre ); } - $returnType = '\Dropbox\Sign\Model\UnclaimedDraftCreateResponse'; - 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(), - ]; + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\UnclaimedDraftCreateResponse', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -639,8 +589,19 @@ public function unclaimedDraftCreateEmbeddedWithHttpInfo(Model\UnclaimedDraftCre $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; + } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; } + throw $e; } } @@ -766,7 +727,11 @@ public function unclaimedDraftCreateEmbeddedRequest(Model\UnclaimedDraftCreateEm 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($unclaimed_draft_create_embedded_request)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($unclaimed_draft_create_embedded_request), JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $unclaimed_draft_create_embedded_request; } @@ -797,7 +762,11 @@ public function unclaimedDraftCreateEmbeddedRequest(Model\UnclaimedDraftCreateEm $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -906,32 +875,19 @@ public function unclaimedDraftCreateEmbeddedWithTemplateWithHttpInfo(Model\Uncla switch ($statusCode) { case 200: - if ('\Dropbox\Sign\Model\UnclaimedDraftCreateResponse' === '\SplFileObject') { - $content = $response->getBody(); // stream goes to serializer - } else { - $content = (string)$response->getBody(); - if ('\Dropbox\Sign\Model\UnclaimedDraftCreateResponse' !== '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 $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\UnclaimedDraftCreateResponse', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\UnclaimedDraftCreateResponse', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -947,33 +903,11 @@ public function unclaimedDraftCreateEmbeddedWithTemplateWithHttpInfo(Model\Uncla ); } - $returnType = '\Dropbox\Sign\Model\UnclaimedDraftCreateResponse'; - 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(), - ]; + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\UnclaimedDraftCreateResponse', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -986,8 +920,19 @@ public function unclaimedDraftCreateEmbeddedWithTemplateWithHttpInfo(Model\Uncla $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; + } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; } + throw $e; } } @@ -1113,7 +1058,11 @@ public function unclaimedDraftCreateEmbeddedWithTemplateRequest(Model\UnclaimedD 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($unclaimed_draft_create_embedded_with_template_request)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($unclaimed_draft_create_embedded_with_template_request), JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $unclaimed_draft_create_embedded_with_template_request; } @@ -1144,7 +1093,11 @@ public function unclaimedDraftCreateEmbeddedWithTemplateRequest(Model\UnclaimedD $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -1255,32 +1208,19 @@ public function unclaimedDraftEditAndResendWithHttpInfo(string $signature_reques switch ($statusCode) { case 200: - if ('\Dropbox\Sign\Model\UnclaimedDraftCreateResponse' === '\SplFileObject') { - $content = $response->getBody(); // stream goes to serializer - } else { - $content = (string)$response->getBody(); - if ('\Dropbox\Sign\Model\UnclaimedDraftCreateResponse' !== '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 $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\UnclaimedDraftCreateResponse', + $request, + $response, + ); + } - return [ - ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\UnclaimedDraftCreateResponse', []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + if ($this->responseWithinRangeCode('4XX', $statusCode)) { + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -1296,33 +1236,11 @@ public function unclaimedDraftEditAndResendWithHttpInfo(string $signature_reques ); } - $returnType = '\Dropbox\Sign\Model\UnclaimedDraftCreateResponse'; - 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(), - ]; + return $this->handleResponseWithDataType( + '\Dropbox\Sign\Model\UnclaimedDraftCreateResponse', + $request, + $response, + ); } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; @@ -1335,8 +1253,19 @@ public function unclaimedDraftEditAndResendWithHttpInfo(string $signature_reques $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + if ($this->responseWithinRangeCode('4XX', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + throw $e; } } @@ -1481,7 +1410,11 @@ public function unclaimedDraftEditAndResendRequest(string $signature_request_id, 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($unclaimed_draft_edit_and_resend_request)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($unclaimed_draft_edit_and_resend_request), JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $unclaimed_draft_edit_and_resend_request; } @@ -1512,7 +1445,11 @@ public function unclaimedDraftEditAndResendRequest(string $signature_request_id, $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); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -1565,6 +1502,14 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } @@ -1629,4 +1574,47 @@ private function handleRangeCodeException( return true; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response + ): array { + if ($dataType === '\SplFileObject') { + $content = $response->getBody(); // stream goes to serializer + } else { + $content = (string)$response->getBody(); + if ($dataType !== '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() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode + ): bool { + $left = (int)($rangeCode[0] . '00'); + $right = (int)($rangeCode[0] . '99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/sdks/php/src/ApiException.php b/sdks/php/src/ApiException.php index 88738d79b..204d55193 100644 --- a/sdks/php/src/ApiException.php +++ b/sdks/php/src/ApiException.php @@ -1,7 +1,7 @@ tempFolderPath; } + /** + * Sets the certificate file path, for mTLS + * + * @return $this + */ + public function setCertFile(mixed $certFile) + { + $this->certFile = $certFile; + return $this; + } + + /** + * Gets the certificate file path, for mTLS + * + * @return string Certificate file path + */ + public function getCertFile() + { + return $this->certFile; + } + + /** + * Sets the certificate key path, for mTLS + * + * @return $this + */ + public function setKeyFile(mixed $keyFile) + { + $this->keyFile = $keyFile; + return $this; + } + + /** + * Gets the certificate key path, for mTLS + * + * @return string Certificate key path + */ + public function getKeyFile() + { + return $this->keyFile; + } + /** * Gets the default configuration instance * diff --git a/sdks/php/src/EventCallbackHelper.php b/sdks/php/src/EventCallbackHelper.php index f15373332..df82fb89a 100644 --- a/sdks/php/src/EventCallbackHelper.php +++ b/sdks/php/src/EventCallbackHelper.php @@ -2,7 +2,7 @@ /** * EventCallbackValidate * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -16,9 +16,8 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.26.0 */ - /** * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/sdks/php/src/FormDataProcessor.php b/sdks/php/src/FormDataProcessor.php new file mode 100644 index 000000000..7db629544 --- /dev/null +++ b/sdks/php/src/FormDataProcessor.php @@ -0,0 +1,244 @@ + $values the value of the form parameter + * + * @return array [key => value] of formdata + */ + public function prepare(array $values): array + { + $this->has_file = false; + $result = []; + + foreach ($values as $k => $v) { + if ($v === null) { + continue; + } + + $result[$k] = $this->makeFormSafe($v); + } + + return $result; + } + + /** + * Flattens a multi-level array of data and generates a single-level array + * compatible with formdata - a single-level array where the keys use bracket + * notation to signify nested data. + * + * credit: https://github.com/FranBar1966/FlatPHP + */ + public static function flatten(array $source, string $start = ''): array + { + $opt = [ + 'prefix' => '[', + 'suffix' => ']', + 'suffix-end' => true, + 'prefix-list' => '[', + 'suffix-list' => ']', + 'suffix-list-end' => true, + ]; + + if ($start === '') { + $currentPrefix = ''; + $currentSuffix = ''; + $currentSuffixEnd = false; + } elseif (array_is_list($source)) { + $currentPrefix = $opt['prefix-list']; + $currentSuffix = $opt['suffix-list']; + $currentSuffixEnd = $opt['suffix-list-end']; + } else { + $currentPrefix = $opt['prefix']; + $currentSuffix = $opt['suffix']; + $currentSuffixEnd = $opt['suffix-end']; + } + + $currentName = $start; + $result = []; + + foreach ($source as $key => $val) { + $currentName .= $currentPrefix . $key; + + if (is_array($val) && !empty($val)) { + $currentName .= $currentSuffix; + $result += self::flatten($val, $currentName); + } else { + if ($currentSuffixEnd) { + $currentName .= $currentSuffix; + } + + if (is_resource($val)) { + $result[$currentName] = $val; + } else { + $result[$currentName] = ObjectSerializer::toString($val); + } + } + + $currentName = $start; + } + + return $result; + } + + /** + * formdata must be limited to scalars or arrays of scalar values, + * or a resource for a file upload. Here we iterate through all available + * data and identify how to handle each scenario + */ + protected function makeFormSafe(mixed $value) + { + if ($value instanceof SplFileObject) { + return $this->processFiles([$value])[0]; + } + + if (is_resource($value)) { + $this->has_file = true; + + return $value; + } + + if ($value instanceof ModelInterface) { + return $this->processModel($value); + } + + if (is_array($value) || (is_object($value) && !$value instanceof DateTimeInterface)) { + $data = []; + + foreach ($value as $k => $v) { + $data[$k] = $this->makeFormSafe($v); + } + + return $data; + } + + return ObjectSerializer::toString($value); + } + + /** + * We are able to handle nested ModelInterface. We do not simply call + * json_decode(json_encode()) because any given model may have binary data + * or other data that cannot be serialized to a JSON string + */ + protected function processModel(ModelInterface $model): array + { + $result = []; + + foreach ($model::openAPITypes() as $name => $type) { + $value = $model->offsetGet($name); + + if ($value === null) { + continue; + } + + if (strpos($type, '\SplFileObject') !== false) { + $file = is_array($value) ? $value : [$value]; + $result[$name] = $this->processFiles($file); + + continue; + } + + if ($value instanceof ModelInterface) { + $result[$name] = $this->processModel($value); + + continue; + } + + if (is_array($value) || is_object($value)) { + $result[$name] = $this->makeFormSafe($value); + + continue; + } + + $result[$name] = ObjectSerializer::toString($value); + } + + return $result; + } + + /** + * Handle file data + */ + protected function processFiles(array $files): array + { + $this->has_file = true; + + $result = []; + + foreach ($files as $i => $file) { + if (is_array($file)) { + $result[$i] = $this->processFiles($file); + + continue; + } + + if ($file instanceof StreamInterface) { + $result[$i] = $file; + + continue; + } + + if ($file instanceof SplFileObject) { + $result[$i] = $this->tryFopen($file); + } + } + + return $result; + } + + private function tryFopen(SplFileObject $file) + { + return Utils::tryFopen($file->getRealPath(), 'rb'); + } +} diff --git a/sdks/php/src/HeaderSelector.php b/sdks/php/src/HeaderSelector.php index 9f16eda5a..e16c306a9 100644 --- a/sdks/php/src/HeaderSelector.php +++ b/sdks/php/src/HeaderSelector.php @@ -1,7 +1,7 @@ container[$offset]); } @@ -443,12 +443,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -472,10 +472,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/AccountCreateResponse.php b/sdks/php/src/Model/AccountCreateResponse.php index bd28ca3e5..860879cbc 100644 --- a/sdks/php/src/Model/AccountCreateResponse.php +++ b/sdks/php/src/Model/AccountCreateResponse.php @@ -2,7 +2,7 @@ /** * AccountCreateResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -398,10 +398,10 @@ public function setWarnings(?array $warnings) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -409,12 +409,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -438,10 +438,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/AccountGetResponse.php b/sdks/php/src/Model/AccountGetResponse.php index fa4404d96..ebdb4d95a 100644 --- a/sdks/php/src/Model/AccountGetResponse.php +++ b/sdks/php/src/Model/AccountGetResponse.php @@ -2,7 +2,7 @@ /** * AccountGetResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -364,10 +364,10 @@ public function setWarnings(?array $warnings) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -375,12 +375,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -404,10 +404,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/AccountResponse.php b/sdks/php/src/Model/AccountResponse.php index 25a88c24f..7979bd5b6 100644 --- a/sdks/php/src/Model/AccountResponse.php +++ b/sdks/php/src/Model/AccountResponse.php @@ -2,7 +2,7 @@ /** * AccountResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -727,10 +727,10 @@ public function setSettings(?AccountResponseSettings $settings) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -738,12 +738,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -767,10 +767,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/AccountResponseQuotas.php b/sdks/php/src/Model/AccountResponseQuotas.php index 467ee663d..e2068e9ea 100644 --- a/sdks/php/src/Model/AccountResponseQuotas.php +++ b/sdks/php/src/Model/AccountResponseQuotas.php @@ -2,7 +2,7 @@ /** * AccountResponseQuotas * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -537,10 +537,10 @@ public function setNumFaxPagesLeft(?int $num_fax_pages_left) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -548,12 +548,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -577,10 +577,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/AccountResponseSettings.php b/sdks/php/src/Model/AccountResponseSettings.php index b150e8088..9d2d02bd9 100644 --- a/sdks/php/src/Model/AccountResponseSettings.php +++ b/sdks/php/src/Model/AccountResponseSettings.php @@ -2,7 +2,7 @@ /** * AccountResponseSettings * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -394,10 +394,10 @@ public function setSmsAuthentication(?bool $sms_authentication) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -405,12 +405,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -434,10 +434,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/AccountResponseUsage.php b/sdks/php/src/Model/AccountResponseUsage.php index 813c9120e..227c3e2eb 100644 --- a/sdks/php/src/Model/AccountResponseUsage.php +++ b/sdks/php/src/Model/AccountResponseUsage.php @@ -2,7 +2,7 @@ /** * AccountResponseUsage * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -332,10 +332,10 @@ public function setFaxPagesSent(?int $fax_pages_sent) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -343,12 +343,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -372,10 +372,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/AccountUpdateRequest.php b/sdks/php/src/Model/AccountUpdateRequest.php index 47b5c378c..9bfc86340 100644 --- a/sdks/php/src/Model/AccountUpdateRequest.php +++ b/sdks/php/src/Model/AccountUpdateRequest.php @@ -2,7 +2,7 @@ /** * AccountUpdateRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -400,10 +400,10 @@ public function setLocale(?string $locale) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -411,12 +411,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -440,10 +440,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/AccountVerifyRequest.php b/sdks/php/src/Model/AccountVerifyRequest.php index 6b1f18897..b8bbc0d09 100644 --- a/sdks/php/src/Model/AccountVerifyRequest.php +++ b/sdks/php/src/Model/AccountVerifyRequest.php @@ -2,7 +2,7 @@ /** * AccountVerifyRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -330,10 +330,10 @@ public function setEmailAddress(string $email_address) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -341,12 +341,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -370,10 +370,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/AccountVerifyResponse.php b/sdks/php/src/Model/AccountVerifyResponse.php index 6d013466c..5fac2224a 100644 --- a/sdks/php/src/Model/AccountVerifyResponse.php +++ b/sdks/php/src/Model/AccountVerifyResponse.php @@ -2,7 +2,7 @@ /** * AccountVerifyResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -359,10 +359,10 @@ public function setWarnings(?array $warnings) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -370,12 +370,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -399,10 +399,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/AccountVerifyResponseAccount.php b/sdks/php/src/Model/AccountVerifyResponseAccount.php index 12eb76917..7ae70bdf6 100644 --- a/sdks/php/src/Model/AccountVerifyResponseAccount.php +++ b/sdks/php/src/Model/AccountVerifyResponseAccount.php @@ -2,7 +2,7 @@ /** * AccountVerifyResponseAccount * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -325,10 +325,10 @@ public function setEmailAddress(?string $email_address) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -336,12 +336,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -365,10 +365,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/ApiAppCreateRequest.php b/sdks/php/src/Model/ApiAppCreateRequest.php index 87ca45abf..9ef1f3f9e 100644 --- a/sdks/php/src/Model/ApiAppCreateRequest.php +++ b/sdks/php/src/Model/ApiAppCreateRequest.php @@ -2,7 +2,7 @@ /** * ApiAppCreateRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -376,7 +376,6 @@ public function setDomains(array $domains) if (is_null($domains)) { throw new InvalidArgumentException('non-nullable domains cannot be null'); } - if (count($domains) > 10) { throw new InvalidArgumentException('invalid value for $domains when calling ApiAppCreateRequest., number of items must be less than or equal to 10.'); } @@ -553,10 +552,10 @@ public function setWhiteLabelingOptions(?SubWhiteLabelingOptions $white_labeling /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -564,12 +563,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -593,10 +592,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/ApiAppGetResponse.php b/sdks/php/src/Model/ApiAppGetResponse.php index 97f83a440..2f8c19957 100644 --- a/sdks/php/src/Model/ApiAppGetResponse.php +++ b/sdks/php/src/Model/ApiAppGetResponse.php @@ -2,7 +2,7 @@ /** * ApiAppGetResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -364,10 +364,10 @@ public function setWarnings(?array $warnings) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -375,12 +375,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -404,10 +404,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/ApiAppListResponse.php b/sdks/php/src/Model/ApiAppListResponse.php index 02fd9cb6c..187f54901 100644 --- a/sdks/php/src/Model/ApiAppListResponse.php +++ b/sdks/php/src/Model/ApiAppListResponse.php @@ -2,7 +2,7 @@ /** * ApiAppListResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -401,10 +401,10 @@ public function setWarnings(?array $warnings) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -412,12 +412,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -441,10 +441,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/ApiAppResponse.php b/sdks/php/src/Model/ApiAppResponse.php index 1cc11bec7..a719d260c 100644 --- a/sdks/php/src/Model/ApiAppResponse.php +++ b/sdks/php/src/Model/ApiAppResponse.php @@ -2,7 +2,7 @@ /** * ApiAppResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -660,10 +660,10 @@ public function setWhiteLabelingOptions(?ApiAppResponseWhiteLabelingOptions $whi /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -671,12 +671,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -700,10 +700,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/ApiAppResponseOAuth.php b/sdks/php/src/Model/ApiAppResponseOAuth.php index a72ba7137..5debecdeb 100644 --- a/sdks/php/src/Model/ApiAppResponseOAuth.php +++ b/sdks/php/src/Model/ApiAppResponseOAuth.php @@ -2,7 +2,7 @@ /** * ApiAppResponseOAuth * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -435,10 +435,10 @@ public function setChargesUsers(?bool $charges_users) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -446,12 +446,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -475,10 +475,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/ApiAppResponseOptions.php b/sdks/php/src/Model/ApiAppResponseOptions.php index 94e0cf604..624ad9eaf 100644 --- a/sdks/php/src/Model/ApiAppResponseOptions.php +++ b/sdks/php/src/Model/ApiAppResponseOptions.php @@ -2,7 +2,7 @@ /** * ApiAppResponseOptions * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -326,10 +326,10 @@ public function setCanInsertEverywhere(?bool $can_insert_everywhere) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -337,12 +337,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -366,10 +366,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/ApiAppResponseOwnerAccount.php b/sdks/php/src/Model/ApiAppResponseOwnerAccount.php index 438799c08..a70e95145 100644 --- a/sdks/php/src/Model/ApiAppResponseOwnerAccount.php +++ b/sdks/php/src/Model/ApiAppResponseOwnerAccount.php @@ -2,7 +2,7 @@ /** * ApiAppResponseOwnerAccount * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -360,10 +360,10 @@ public function setEmailAddress(?string $email_address) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -400,10 +400,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/ApiAppResponseWhiteLabelingOptions.php b/sdks/php/src/Model/ApiAppResponseWhiteLabelingOptions.php index 64c21a391..ad9e6d7b6 100644 --- a/sdks/php/src/Model/ApiAppResponseWhiteLabelingOptions.php +++ b/sdks/php/src/Model/ApiAppResponseWhiteLabelingOptions.php @@ -2,7 +2,7 @@ /** * ApiAppResponseWhiteLabelingOptions * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -768,10 +768,10 @@ public function setTextColor2(?string $text_color2) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -779,12 +779,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -808,10 +808,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/ApiAppUpdateRequest.php b/sdks/php/src/Model/ApiAppUpdateRequest.php index 2f0ba9565..a9c962278 100644 --- a/sdks/php/src/Model/ApiAppUpdateRequest.php +++ b/sdks/php/src/Model/ApiAppUpdateRequest.php @@ -2,7 +2,7 @@ /** * ApiAppUpdateRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -420,7 +420,6 @@ public function setDomains(?array $domains) if (is_null($domains)) { throw new InvalidArgumentException('non-nullable domains cannot be null'); } - if (count($domains) > 10) { throw new InvalidArgumentException('invalid value for $domains when calling ApiAppUpdateRequest., number of items must be less than or equal to 10.'); } @@ -540,10 +539,10 @@ public function setWhiteLabelingOptions(?SubWhiteLabelingOptions $white_labeling /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -551,12 +550,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -580,10 +579,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/BulkSendJobGetResponse.php b/sdks/php/src/Model/BulkSendJobGetResponse.php index affadf1f2..1f0e672c4 100644 --- a/sdks/php/src/Model/BulkSendJobGetResponse.php +++ b/sdks/php/src/Model/BulkSendJobGetResponse.php @@ -2,7 +2,7 @@ /** * BulkSendJobGetResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -438,10 +438,10 @@ public function setWarnings(?array $warnings) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -449,12 +449,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -478,10 +478,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/BulkSendJobGetResponseSignatureRequests.php b/sdks/php/src/Model/BulkSendJobGetResponseSignatureRequests.php index f40d42b60..982d38429 100644 --- a/sdks/php/src/Model/BulkSendJobGetResponseSignatureRequests.php +++ b/sdks/php/src/Model/BulkSendJobGetResponseSignatureRequests.php @@ -2,7 +2,7 @@ /** * BulkSendJobGetResponseSignatureRequests * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -1218,10 +1218,10 @@ public function setBulkSendJobId(?string $bulk_send_job_id) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -1229,12 +1229,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -1258,10 +1258,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/BulkSendJobListResponse.php b/sdks/php/src/Model/BulkSendJobListResponse.php index 0b4d49484..f82b5bd71 100644 --- a/sdks/php/src/Model/BulkSendJobListResponse.php +++ b/sdks/php/src/Model/BulkSendJobListResponse.php @@ -2,7 +2,7 @@ /** * BulkSendJobListResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -401,10 +401,10 @@ public function setWarnings(?array $warnings) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -412,12 +412,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -441,10 +441,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/BulkSendJobResponse.php b/sdks/php/src/Model/BulkSendJobResponse.php index a503c7546..a6b53a2c9 100644 --- a/sdks/php/src/Model/BulkSendJobResponse.php +++ b/sdks/php/src/Model/BulkSendJobResponse.php @@ -2,7 +2,7 @@ /** * BulkSendJobResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -435,10 +435,10 @@ public function setCreatedAt(?int $created_at) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -446,12 +446,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -475,10 +475,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/BulkSendJobSendResponse.php b/sdks/php/src/Model/BulkSendJobSendResponse.php index b503daa06..2ec27c516 100644 --- a/sdks/php/src/Model/BulkSendJobSendResponse.php +++ b/sdks/php/src/Model/BulkSendJobSendResponse.php @@ -2,7 +2,7 @@ /** * BulkSendJobSendResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -364,10 +364,10 @@ public function setWarnings(?array $warnings) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -375,12 +375,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -404,10 +404,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/DocumentFieldDetectionRequest.php b/sdks/php/src/Model/DocumentFieldDetectionRequest.php index edadee4e7..bffc1bc50 100644 --- a/sdks/php/src/Model/DocumentFieldDetectionRequest.php +++ b/sdks/php/src/Model/DocumentFieldDetectionRequest.php @@ -2,7 +2,7 @@ /** * DocumentFieldDetectionRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -442,10 +442,10 @@ public function setPageRange(?string $page_range) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -453,12 +453,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -482,10 +482,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/DocumentFieldDetectionResponse.php b/sdks/php/src/Model/DocumentFieldDetectionResponse.php index 1d6f2d14c..e2a325605 100644 --- a/sdks/php/src/Model/DocumentFieldDetectionResponse.php +++ b/sdks/php/src/Model/DocumentFieldDetectionResponse.php @@ -2,7 +2,7 @@ /** * DocumentFieldDetectionResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -364,10 +364,10 @@ public function setWarnings(?array $warnings) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -375,12 +375,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -404,10 +404,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/DocumentFieldDetectionResponseDetectionResult.php b/sdks/php/src/Model/DocumentFieldDetectionResponseDetectionResult.php index 95232f20e..cec1d059a 100644 --- a/sdks/php/src/Model/DocumentFieldDetectionResponseDetectionResult.php +++ b/sdks/php/src/Model/DocumentFieldDetectionResponseDetectionResult.php @@ -2,7 +2,7 @@ /** * DocumentFieldDetectionResponseDetectionResult * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -485,7 +485,6 @@ public function setPageCount(int $page_count) if (is_null($page_count)) { throw new InvalidArgumentException('non-nullable page_count cannot be null'); } - if ($page_count < 0) { throw new InvalidArgumentException('invalid value for $page_count when calling DocumentFieldDetectionResponseDetectionResult., must be bigger than or equal to 0.'); } @@ -687,10 +686,10 @@ public function setSuggestions(array $suggestions) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -698,12 +697,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -727,10 +726,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/EmbeddedEditUrlRequest.php b/sdks/php/src/Model/EmbeddedEditUrlRequest.php index 4a76a2c94..5ffc075b4 100644 --- a/sdks/php/src/Model/EmbeddedEditUrlRequest.php +++ b/sdks/php/src/Model/EmbeddedEditUrlRequest.php @@ -2,7 +2,7 @@ /** * EmbeddedEditUrlRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -631,10 +631,10 @@ public function setTestMode(?bool $test_mode) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -642,12 +642,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -671,10 +671,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/EmbeddedEditUrlResponse.php b/sdks/php/src/Model/EmbeddedEditUrlResponse.php index 7a18ae864..f094ba990 100644 --- a/sdks/php/src/Model/EmbeddedEditUrlResponse.php +++ b/sdks/php/src/Model/EmbeddedEditUrlResponse.php @@ -2,7 +2,7 @@ /** * EmbeddedEditUrlResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -364,10 +364,10 @@ public function setWarnings(?array $warnings) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -375,12 +375,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -404,10 +404,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/EmbeddedEditUrlResponseEmbedded.php b/sdks/php/src/Model/EmbeddedEditUrlResponseEmbedded.php index c02df3186..7b99275e9 100644 --- a/sdks/php/src/Model/EmbeddedEditUrlResponseEmbedded.php +++ b/sdks/php/src/Model/EmbeddedEditUrlResponseEmbedded.php @@ -2,7 +2,7 @@ /** * EmbeddedEditUrlResponseEmbedded * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -360,10 +360,10 @@ public function setExpiresAt(?int $expires_at) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -400,10 +400,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/EmbeddedSignUrlResponse.php b/sdks/php/src/Model/EmbeddedSignUrlResponse.php index 2162bc5cd..de0411e0c 100644 --- a/sdks/php/src/Model/EmbeddedSignUrlResponse.php +++ b/sdks/php/src/Model/EmbeddedSignUrlResponse.php @@ -2,7 +2,7 @@ /** * EmbeddedSignUrlResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -364,10 +364,10 @@ public function setWarnings(?array $warnings) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -375,12 +375,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -404,10 +404,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/EmbeddedSignUrlResponseEmbedded.php b/sdks/php/src/Model/EmbeddedSignUrlResponseEmbedded.php index d4f1b1cbf..a91d8c1fa 100644 --- a/sdks/php/src/Model/EmbeddedSignUrlResponseEmbedded.php +++ b/sdks/php/src/Model/EmbeddedSignUrlResponseEmbedded.php @@ -2,7 +2,7 @@ /** * EmbeddedSignUrlResponseEmbedded * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -360,10 +360,10 @@ public function setExpiresAt(?int $expires_at) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -400,10 +400,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/ErrorResponse.php b/sdks/php/src/Model/ErrorResponse.php index 17faeebd3..667274ead 100644 --- a/sdks/php/src/Model/ErrorResponse.php +++ b/sdks/php/src/Model/ErrorResponse.php @@ -2,7 +2,7 @@ /** * ErrorResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -330,10 +330,10 @@ public function setError(ErrorResponseError $error) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -341,12 +341,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -370,10 +370,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/ErrorResponseError.php b/sdks/php/src/Model/ErrorResponseError.php index 527d8c0dc..270435043 100644 --- a/sdks/php/src/Model/ErrorResponseError.php +++ b/sdks/php/src/Model/ErrorResponseError.php @@ -2,7 +2,7 @@ /** * ErrorResponseError * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -402,10 +402,10 @@ public function setErrorPath(?string $error_path) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -413,12 +413,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -442,10 +442,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/EventCallbackRequest.php b/sdks/php/src/Model/EventCallbackRequest.php index 894600a10..020412ebf 100644 --- a/sdks/php/src/Model/EventCallbackRequest.php +++ b/sdks/php/src/Model/EventCallbackRequest.php @@ -2,7 +2,7 @@ /** * EventCallbackRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -432,10 +432,10 @@ public function setTemplate(?TemplateResponse $template) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -443,12 +443,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -472,10 +472,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/EventCallbackRequestEvent.php b/sdks/php/src/Model/EventCallbackRequestEvent.php index 5e7ed0095..594fffbb7 100644 --- a/sdks/php/src/Model/EventCallbackRequestEvent.php +++ b/sdks/php/src/Model/EventCallbackRequestEvent.php @@ -2,7 +2,7 @@ /** * EventCallbackRequestEvent * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -530,10 +530,10 @@ public function setEventMetadata(?EventCallbackRequestEventMetadata $event_metad /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -541,12 +541,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -570,10 +570,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/EventCallbackRequestEventMetadata.php b/sdks/php/src/Model/EventCallbackRequestEventMetadata.php index a738a6810..96ede6c78 100644 --- a/sdks/php/src/Model/EventCallbackRequestEventMetadata.php +++ b/sdks/php/src/Model/EventCallbackRequestEventMetadata.php @@ -2,7 +2,7 @@ /** * EventCallbackRequestEventMetadata * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -455,10 +455,10 @@ public function setEventMessage(?string $event_message) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -466,12 +466,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -495,10 +495,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/FaxGetResponse.php b/sdks/php/src/Model/FaxGetResponse.php index 366456942..4fcf9853b 100644 --- a/sdks/php/src/Model/FaxGetResponse.php +++ b/sdks/php/src/Model/FaxGetResponse.php @@ -2,7 +2,7 @@ /** * FaxGetResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -364,10 +364,10 @@ public function setWarnings(?array $warnings) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -375,12 +375,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -404,10 +404,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/FaxLineAddUserRequest.php b/sdks/php/src/Model/FaxLineAddUserRequest.php index 740aad78d..1b339ec25 100644 --- a/sdks/php/src/Model/FaxLineAddUserRequest.php +++ b/sdks/php/src/Model/FaxLineAddUserRequest.php @@ -2,7 +2,7 @@ /** * FaxLineAddUserRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -398,10 +398,10 @@ public function setEmailAddress(?string $email_address) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -409,12 +409,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -438,10 +438,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/FaxLineAreaCodeGetCountryEnum.php b/sdks/php/src/Model/FaxLineAreaCodeGetCountryEnum.php index 68597df2e..ef1be8433 100644 --- a/sdks/php/src/Model/FaxLineAreaCodeGetCountryEnum.php +++ b/sdks/php/src/Model/FaxLineAreaCodeGetCountryEnum.php @@ -2,7 +2,7 @@ /** * FaxLineAreaCodeGetCountryEnum * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** diff --git a/sdks/php/src/Model/FaxLineAreaCodeGetProvinceEnum.php b/sdks/php/src/Model/FaxLineAreaCodeGetProvinceEnum.php index 159986583..1e12a298e 100644 --- a/sdks/php/src/Model/FaxLineAreaCodeGetProvinceEnum.php +++ b/sdks/php/src/Model/FaxLineAreaCodeGetProvinceEnum.php @@ -2,7 +2,7 @@ /** * FaxLineAreaCodeGetProvinceEnum * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** diff --git a/sdks/php/src/Model/FaxLineAreaCodeGetResponse.php b/sdks/php/src/Model/FaxLineAreaCodeGetResponse.php index aa6b96bd7..7ad63919f 100644 --- a/sdks/php/src/Model/FaxLineAreaCodeGetResponse.php +++ b/sdks/php/src/Model/FaxLineAreaCodeGetResponse.php @@ -2,7 +2,7 @@ /** * FaxLineAreaCodeGetResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -330,10 +330,10 @@ public function setAreaCodes(array $area_codes) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -341,12 +341,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -370,10 +370,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/FaxLineAreaCodeGetStateEnum.php b/sdks/php/src/Model/FaxLineAreaCodeGetStateEnum.php index 3ce60e6f5..5832d204f 100644 --- a/sdks/php/src/Model/FaxLineAreaCodeGetStateEnum.php +++ b/sdks/php/src/Model/FaxLineAreaCodeGetStateEnum.php @@ -2,7 +2,7 @@ /** * FaxLineAreaCodeGetStateEnum * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** diff --git a/sdks/php/src/Model/FaxLineCreateRequest.php b/sdks/php/src/Model/FaxLineCreateRequest.php index 0cfac5e18..d0e9c73c9 100644 --- a/sdks/php/src/Model/FaxLineCreateRequest.php +++ b/sdks/php/src/Model/FaxLineCreateRequest.php @@ -2,7 +2,7 @@ /** * FaxLineCreateRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -472,10 +472,10 @@ public function setAccountId(?string $account_id) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -483,12 +483,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -512,10 +512,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/FaxLineDeleteRequest.php b/sdks/php/src/Model/FaxLineDeleteRequest.php index 759313a8d..f1ae39efa 100644 --- a/sdks/php/src/Model/FaxLineDeleteRequest.php +++ b/sdks/php/src/Model/FaxLineDeleteRequest.php @@ -2,7 +2,7 @@ /** * FaxLineDeleteRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -330,10 +330,10 @@ public function setNumber(string $number) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -341,12 +341,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -370,10 +370,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/FaxLineListResponse.php b/sdks/php/src/Model/FaxLineListResponse.php index 324078fde..5a374b26a 100644 --- a/sdks/php/src/Model/FaxLineListResponse.php +++ b/sdks/php/src/Model/FaxLineListResponse.php @@ -2,7 +2,7 @@ /** * FaxLineListResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -401,10 +401,10 @@ public function setWarnings(?WarningResponse $warnings) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -412,12 +412,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -441,10 +441,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/FaxLineRemoveUserRequest.php b/sdks/php/src/Model/FaxLineRemoveUserRequest.php index 12336cdc0..a7b82a3cf 100644 --- a/sdks/php/src/Model/FaxLineRemoveUserRequest.php +++ b/sdks/php/src/Model/FaxLineRemoveUserRequest.php @@ -2,7 +2,7 @@ /** * FaxLineRemoveUserRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -398,10 +398,10 @@ public function setEmailAddress(?string $email_address) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -409,12 +409,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -438,10 +438,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/FaxLineResponse.php b/sdks/php/src/Model/FaxLineResponse.php index 0a3eaca57..c74f4110c 100644 --- a/sdks/php/src/Model/FaxLineResponse.php +++ b/sdks/php/src/Model/FaxLineResponse.php @@ -2,7 +2,7 @@ /** * FaxLineResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -364,10 +364,10 @@ public function setWarnings(?WarningResponse $warnings) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -375,12 +375,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -404,10 +404,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/FaxLineResponseFaxLine.php b/sdks/php/src/Model/FaxLineResponseFaxLine.php index c48c13a4f..76b5b945f 100644 --- a/sdks/php/src/Model/FaxLineResponseFaxLine.php +++ b/sdks/php/src/Model/FaxLineResponseFaxLine.php @@ -2,7 +2,7 @@ /** * FaxLineResponseFaxLine * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -427,10 +427,10 @@ public function setAccounts(?array $accounts) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -438,12 +438,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -467,10 +467,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/FaxListResponse.php b/sdks/php/src/Model/FaxListResponse.php index e0b18f042..40f3adeb6 100644 --- a/sdks/php/src/Model/FaxListResponse.php +++ b/sdks/php/src/Model/FaxListResponse.php @@ -2,7 +2,7 @@ /** * FaxListResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -367,10 +367,10 @@ public function setListInfo(ListInfoResponse $list_info) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -378,12 +378,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -407,10 +407,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/FaxResponse.php b/sdks/php/src/Model/FaxResponse.php index 2c260c385..ea932ee6c 100644 --- a/sdks/php/src/Model/FaxResponse.php +++ b/sdks/php/src/Model/FaxResponse.php @@ -2,7 +2,7 @@ /** * FaxResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -749,10 +749,10 @@ public function setFinalCopyUri(?string $final_copy_uri) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -760,12 +760,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -789,10 +789,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/FaxResponseTransmission.php b/sdks/php/src/Model/FaxResponseTransmission.php index 1a7e4e83b..0fb92eaf4 100644 --- a/sdks/php/src/Model/FaxResponseTransmission.php +++ b/sdks/php/src/Model/FaxResponseTransmission.php @@ -2,7 +2,7 @@ /** * FaxResponseTransmission * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -448,10 +448,10 @@ public function setSentAt(?int $sent_at) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -459,12 +459,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -488,10 +488,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/FaxSendRequest.php b/sdks/php/src/Model/FaxSendRequest.php index 6bcbf952b..062ef2dfa 100644 --- a/sdks/php/src/Model/FaxSendRequest.php +++ b/sdks/php/src/Model/FaxSendRequest.php @@ -2,7 +2,7 @@ /** * FaxSendRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -603,10 +603,10 @@ public function setTitle(?string $title) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -614,12 +614,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -643,10 +643,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/FileResponse.php b/sdks/php/src/Model/FileResponse.php index 3deb3bdb3..0f553c05e 100644 --- a/sdks/php/src/Model/FileResponse.php +++ b/sdks/php/src/Model/FileResponse.php @@ -2,7 +2,7 @@ /** * FileResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -367,10 +367,10 @@ public function setExpiresAt(int $expires_at) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -378,12 +378,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -407,10 +407,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/FileResponseDataUri.php b/sdks/php/src/Model/FileResponseDataUri.php index a18618abc..5bd6861d9 100644 --- a/sdks/php/src/Model/FileResponseDataUri.php +++ b/sdks/php/src/Model/FileResponseDataUri.php @@ -2,7 +2,7 @@ /** * FileResponseDataUri * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -330,10 +330,10 @@ public function setDataUri(string $data_uri) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -341,12 +341,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -370,10 +370,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/ListInfoResponse.php b/sdks/php/src/Model/ListInfoResponse.php index 0c0fc96fc..3248d1ceb 100644 --- a/sdks/php/src/Model/ListInfoResponse.php +++ b/sdks/php/src/Model/ListInfoResponse.php @@ -2,7 +2,7 @@ /** * ListInfoResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -435,10 +435,10 @@ public function setPageSize(?int $page_size) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -446,12 +446,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -475,10 +475,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/ModelInterface.php b/sdks/php/src/Model/ModelInterface.php index 1df0ec6c4..4dd153e2e 100644 --- a/sdks/php/src/Model/ModelInterface.php +++ b/sdks/php/src/Model/ModelInterface.php @@ -2,7 +2,7 @@ /** * ModelInterface * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** diff --git a/sdks/php/src/Model/OAuthTokenGenerateRequest.php b/sdks/php/src/Model/OAuthTokenGenerateRequest.php index 8574b0f61..433aaa0d9 100644 --- a/sdks/php/src/Model/OAuthTokenGenerateRequest.php +++ b/sdks/php/src/Model/OAuthTokenGenerateRequest.php @@ -2,7 +2,7 @@ /** * OAuthTokenGenerateRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -478,10 +478,10 @@ public function setState(string $state) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -489,12 +489,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -518,10 +518,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/OAuthTokenRefreshRequest.php b/sdks/php/src/Model/OAuthTokenRefreshRequest.php index 8736361b2..321aaedaf 100644 --- a/sdks/php/src/Model/OAuthTokenRefreshRequest.php +++ b/sdks/php/src/Model/OAuthTokenRefreshRequest.php @@ -2,7 +2,7 @@ /** * OAuthTokenRefreshRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -435,10 +435,10 @@ public function setClientSecret(?string $client_secret) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -446,12 +446,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -475,10 +475,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/OAuthTokenResponse.php b/sdks/php/src/Model/OAuthTokenResponse.php index 9b87870ab..a4444e08d 100644 --- a/sdks/php/src/Model/OAuthTokenResponse.php +++ b/sdks/php/src/Model/OAuthTokenResponse.php @@ -2,7 +2,7 @@ /** * OAuthTokenResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -468,10 +468,10 @@ public function setState(?string $state) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -479,12 +479,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -508,10 +508,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/ReportCreateRequest.php b/sdks/php/src/Model/ReportCreateRequest.php index 6b693ecb2..ef3e1d767 100644 --- a/sdks/php/src/Model/ReportCreateRequest.php +++ b/sdks/php/src/Model/ReportCreateRequest.php @@ -2,7 +2,7 @@ /** * ReportCreateRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -406,7 +406,6 @@ public function setReportType(array $report_type) ) ); } - if (count($report_type) > 2) { throw new InvalidArgumentException('invalid value for $report_type when calling ReportCreateRequest., number of items must be less than or equal to 2.'); } @@ -448,10 +447,10 @@ public function setStartDate(string $start_date) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -459,12 +458,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -488,10 +487,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/ReportCreateResponse.php b/sdks/php/src/Model/ReportCreateResponse.php index e6972d57a..74ed5c670 100644 --- a/sdks/php/src/Model/ReportCreateResponse.php +++ b/sdks/php/src/Model/ReportCreateResponse.php @@ -2,7 +2,7 @@ /** * ReportCreateResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -364,10 +364,10 @@ public function setWarnings(?array $warnings) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -375,12 +375,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -404,10 +404,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/ReportResponse.php b/sdks/php/src/Model/ReportResponse.php index 4354b4f39..d3b158948 100644 --- a/sdks/php/src/Model/ReportResponse.php +++ b/sdks/php/src/Model/ReportResponse.php @@ -2,7 +2,7 @@ /** * ReportResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -457,10 +457,10 @@ public function setReportType(?array $report_type) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -468,12 +468,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -497,10 +497,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.php b/sdks/php/src/Model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.php index ce85cb62f..69b9cb58c 100644 --- a/sdks/php/src/Model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.php +++ b/sdks/php/src/Model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.php @@ -2,7 +2,7 @@ /** * SignatureRequestBulkCreateEmbeddedWithTemplateRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -808,10 +808,10 @@ public function setExpiresAt(?int $expires_at) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -819,12 +819,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -848,10 +848,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/SignatureRequestBulkSendWithTemplateRequest.php b/sdks/php/src/Model/SignatureRequestBulkSendWithTemplateRequest.php index 13c584b47..9ce32bebf 100644 --- a/sdks/php/src/Model/SignatureRequestBulkSendWithTemplateRequest.php +++ b/sdks/php/src/Model/SignatureRequestBulkSendWithTemplateRequest.php @@ -2,7 +2,7 @@ /** * SignatureRequestBulkSendWithTemplateRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -805,10 +805,10 @@ public function setExpiresAt(?int $expires_at) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -816,12 +816,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -845,10 +845,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/SignatureRequestCreateEmbeddedRequest.php b/sdks/php/src/Model/SignatureRequestCreateEmbeddedRequest.php index 1da278f10..aad1c5247 100644 --- a/sdks/php/src/Model/SignatureRequestCreateEmbeddedRequest.php +++ b/sdks/php/src/Model/SignatureRequestCreateEmbeddedRequest.php @@ -2,7 +2,7 @@ /** * SignatureRequestCreateEmbeddedRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -1179,10 +1179,10 @@ public function setExpiresAt(?int $expires_at) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -1190,12 +1190,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -1219,10 +1219,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/SignatureRequestCreateEmbeddedWithTemplateRequest.php b/sdks/php/src/Model/SignatureRequestCreateEmbeddedWithTemplateRequest.php index ffd796b62..ee4f15151 100644 --- a/sdks/php/src/Model/SignatureRequestCreateEmbeddedWithTemplateRequest.php +++ b/sdks/php/src/Model/SignatureRequestCreateEmbeddedWithTemplateRequest.php @@ -2,7 +2,7 @@ /** * SignatureRequestCreateEmbeddedWithTemplateRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -879,10 +879,10 @@ public function setExpiresAt(?int $expires_at) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -890,12 +890,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -919,10 +919,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/SignatureRequestEditEmbeddedRequest.php b/sdks/php/src/Model/SignatureRequestEditEmbeddedRequest.php index 3a1902156..a9c3e0ef5 100644 --- a/sdks/php/src/Model/SignatureRequestEditEmbeddedRequest.php +++ b/sdks/php/src/Model/SignatureRequestEditEmbeddedRequest.php @@ -2,7 +2,7 @@ /** * SignatureRequestEditEmbeddedRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -1179,10 +1179,10 @@ public function setExpiresAt(?int $expires_at) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -1190,12 +1190,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -1219,10 +1219,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/SignatureRequestEditEmbeddedWithTemplateRequest.php b/sdks/php/src/Model/SignatureRequestEditEmbeddedWithTemplateRequest.php index 05fbee5e9..f9d9a869c 100644 --- a/sdks/php/src/Model/SignatureRequestEditEmbeddedWithTemplateRequest.php +++ b/sdks/php/src/Model/SignatureRequestEditEmbeddedWithTemplateRequest.php @@ -2,7 +2,7 @@ /** * SignatureRequestEditEmbeddedWithTemplateRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -838,10 +838,10 @@ public function setPopulateAutoFillFields(?bool $populate_auto_fill_fields) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -849,12 +849,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -878,10 +878,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/SignatureRequestEditRequest.php b/sdks/php/src/Model/SignatureRequestEditRequest.php index b23ca78fc..aa2aef687 100644 --- a/sdks/php/src/Model/SignatureRequestEditRequest.php +++ b/sdks/php/src/Model/SignatureRequestEditRequest.php @@ -2,7 +2,7 @@ /** * SignatureRequestEditRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -1210,10 +1210,10 @@ public function setExpiresAt(?int $expires_at) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -1221,12 +1221,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -1250,10 +1250,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/SignatureRequestEditWithTemplateRequest.php b/sdks/php/src/Model/SignatureRequestEditWithTemplateRequest.php index 990405643..6f323c9e0 100644 --- a/sdks/php/src/Model/SignatureRequestEditWithTemplateRequest.php +++ b/sdks/php/src/Model/SignatureRequestEditWithTemplateRequest.php @@ -2,7 +2,7 @@ /** * SignatureRequestEditWithTemplateRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -870,10 +870,10 @@ public function setTitle(?string $title) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -881,12 +881,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -910,10 +910,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/SignatureRequestGetResponse.php b/sdks/php/src/Model/SignatureRequestGetResponse.php index 341dbe531..b1fca9744 100644 --- a/sdks/php/src/Model/SignatureRequestGetResponse.php +++ b/sdks/php/src/Model/SignatureRequestGetResponse.php @@ -2,7 +2,7 @@ /** * SignatureRequestGetResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -364,10 +364,10 @@ public function setWarnings(?array $warnings) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -375,12 +375,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -404,10 +404,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/SignatureRequestListResponse.php b/sdks/php/src/Model/SignatureRequestListResponse.php index f67e7ed94..7e11eeef7 100644 --- a/sdks/php/src/Model/SignatureRequestListResponse.php +++ b/sdks/php/src/Model/SignatureRequestListResponse.php @@ -2,7 +2,7 @@ /** * SignatureRequestListResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -401,10 +401,10 @@ public function setWarnings(?array $warnings) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -412,12 +412,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -441,10 +441,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/SignatureRequestRemindRequest.php b/sdks/php/src/Model/SignatureRequestRemindRequest.php index 18e8e89fc..b7e5c16bc 100644 --- a/sdks/php/src/Model/SignatureRequestRemindRequest.php +++ b/sdks/php/src/Model/SignatureRequestRemindRequest.php @@ -2,7 +2,7 @@ /** * SignatureRequestRemindRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -364,10 +364,10 @@ public function setName(?string $name) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -375,12 +375,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -404,10 +404,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/SignatureRequestResponse.php b/sdks/php/src/Model/SignatureRequestResponse.php index 6993121e8..f062d253d 100644 --- a/sdks/php/src/Model/SignatureRequestResponse.php +++ b/sdks/php/src/Model/SignatureRequestResponse.php @@ -2,7 +2,7 @@ /** * SignatureRequestResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -1226,10 +1226,10 @@ public function setBulkSendJobId(?string $bulk_send_job_id) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -1237,12 +1237,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -1266,10 +1266,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/SignatureRequestResponseAttachment.php b/sdks/php/src/Model/SignatureRequestResponseAttachment.php index 4d2c1709b..d8cef8a9c 100644 --- a/sdks/php/src/Model/SignatureRequestResponseAttachment.php +++ b/sdks/php/src/Model/SignatureRequestResponseAttachment.php @@ -2,7 +2,7 @@ /** * SignatureRequestResponseAttachment * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -524,10 +524,10 @@ public function setUploadedAt(?int $uploaded_at) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -535,12 +535,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -564,10 +564,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/SignatureRequestResponseCustomFieldBase.php b/sdks/php/src/Model/SignatureRequestResponseCustomFieldBase.php index ef7c53b14..5245bf814 100644 --- a/sdks/php/src/Model/SignatureRequestResponseCustomFieldBase.php +++ b/sdks/php/src/Model/SignatureRequestResponseCustomFieldBase.php @@ -2,7 +2,7 @@ /** * SignatureRequestResponseCustomFieldBase * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -476,10 +476,10 @@ public function setEditor(?string $editor) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -487,12 +487,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -516,10 +516,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/SignatureRequestResponseCustomFieldCheckbox.php b/sdks/php/src/Model/SignatureRequestResponseCustomFieldCheckbox.php index 644d9b0ed..0566fcacb 100644 --- a/sdks/php/src/Model/SignatureRequestResponseCustomFieldCheckbox.php +++ b/sdks/php/src/Model/SignatureRequestResponseCustomFieldCheckbox.php @@ -2,7 +2,7 @@ /** * SignatureRequestResponseCustomFieldCheckbox * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -359,10 +359,10 @@ public function setValue(?bool $value) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -370,12 +370,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -399,10 +399,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/SignatureRequestResponseCustomFieldText.php b/sdks/php/src/Model/SignatureRequestResponseCustomFieldText.php index 4bc5e3107..fd3f6da95 100644 --- a/sdks/php/src/Model/SignatureRequestResponseCustomFieldText.php +++ b/sdks/php/src/Model/SignatureRequestResponseCustomFieldText.php @@ -2,7 +2,7 @@ /** * SignatureRequestResponseCustomFieldText * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -359,10 +359,10 @@ public function setValue(?string $value) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -370,12 +370,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -399,10 +399,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/SignatureRequestResponseCustomFieldTypeEnum.php b/sdks/php/src/Model/SignatureRequestResponseCustomFieldTypeEnum.php index f441dd572..b3a245919 100644 --- a/sdks/php/src/Model/SignatureRequestResponseCustomFieldTypeEnum.php +++ b/sdks/php/src/Model/SignatureRequestResponseCustomFieldTypeEnum.php @@ -2,7 +2,7 @@ /** * SignatureRequestResponseCustomFieldTypeEnum * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** diff --git a/sdks/php/src/Model/SignatureRequestResponseDataBase.php b/sdks/php/src/Model/SignatureRequestResponseDataBase.php index 376d10302..0a831f528 100644 --- a/sdks/php/src/Model/SignatureRequestResponseDataBase.php +++ b/sdks/php/src/Model/SignatureRequestResponseDataBase.php @@ -2,7 +2,7 @@ /** * SignatureRequestResponseDataBase * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -482,10 +482,10 @@ public function setType(?string $type) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -493,12 +493,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -522,10 +522,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/SignatureRequestResponseDataTypeEnum.php b/sdks/php/src/Model/SignatureRequestResponseDataTypeEnum.php index f8768e419..96a648a40 100644 --- a/sdks/php/src/Model/SignatureRequestResponseDataTypeEnum.php +++ b/sdks/php/src/Model/SignatureRequestResponseDataTypeEnum.php @@ -2,7 +2,7 @@ /** * SignatureRequestResponseDataTypeEnum * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** diff --git a/sdks/php/src/Model/SignatureRequestResponseDataValueCheckbox.php b/sdks/php/src/Model/SignatureRequestResponseDataValueCheckbox.php index 514dc1cf5..e78dd702e 100644 --- a/sdks/php/src/Model/SignatureRequestResponseDataValueCheckbox.php +++ b/sdks/php/src/Model/SignatureRequestResponseDataValueCheckbox.php @@ -2,7 +2,7 @@ /** * SignatureRequestResponseDataValueCheckbox * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -353,10 +353,10 @@ public function setValue(?bool $value) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -364,12 +364,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -393,10 +393,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/SignatureRequestResponseDataValueCheckboxMerge.php b/sdks/php/src/Model/SignatureRequestResponseDataValueCheckboxMerge.php index 6d2125da1..1a3804d38 100644 --- a/sdks/php/src/Model/SignatureRequestResponseDataValueCheckboxMerge.php +++ b/sdks/php/src/Model/SignatureRequestResponseDataValueCheckboxMerge.php @@ -2,7 +2,7 @@ /** * SignatureRequestResponseDataValueCheckboxMerge * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -353,10 +353,10 @@ public function setValue(?string $value) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -364,12 +364,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -393,10 +393,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/SignatureRequestResponseDataValueDateSigned.php b/sdks/php/src/Model/SignatureRequestResponseDataValueDateSigned.php index 9de94dbcc..04315215b 100644 --- a/sdks/php/src/Model/SignatureRequestResponseDataValueDateSigned.php +++ b/sdks/php/src/Model/SignatureRequestResponseDataValueDateSigned.php @@ -2,7 +2,7 @@ /** * SignatureRequestResponseDataValueDateSigned * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -353,10 +353,10 @@ public function setValue(?string $value) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -364,12 +364,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -393,10 +393,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/SignatureRequestResponseDataValueDropdown.php b/sdks/php/src/Model/SignatureRequestResponseDataValueDropdown.php index 554a523a5..deb50b59f 100644 --- a/sdks/php/src/Model/SignatureRequestResponseDataValueDropdown.php +++ b/sdks/php/src/Model/SignatureRequestResponseDataValueDropdown.php @@ -2,7 +2,7 @@ /** * SignatureRequestResponseDataValueDropdown * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -353,10 +353,10 @@ public function setValue(?string $value) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -364,12 +364,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -393,10 +393,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/SignatureRequestResponseDataValueInitials.php b/sdks/php/src/Model/SignatureRequestResponseDataValueInitials.php index 1dc12cd21..cc1d65d67 100644 --- a/sdks/php/src/Model/SignatureRequestResponseDataValueInitials.php +++ b/sdks/php/src/Model/SignatureRequestResponseDataValueInitials.php @@ -2,7 +2,7 @@ /** * SignatureRequestResponseDataValueInitials * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -394,10 +394,10 @@ public function setIsSigned(?bool $is_signed) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -405,12 +405,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -434,10 +434,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/SignatureRequestResponseDataValueRadio.php b/sdks/php/src/Model/SignatureRequestResponseDataValueRadio.php index a4f6b0013..f33c4c8c1 100644 --- a/sdks/php/src/Model/SignatureRequestResponseDataValueRadio.php +++ b/sdks/php/src/Model/SignatureRequestResponseDataValueRadio.php @@ -2,7 +2,7 @@ /** * SignatureRequestResponseDataValueRadio * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -353,10 +353,10 @@ public function setValue(?bool $value) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -364,12 +364,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -393,10 +393,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/SignatureRequestResponseDataValueSignature.php b/sdks/php/src/Model/SignatureRequestResponseDataValueSignature.php index f166fbc05..781d9df7f 100644 --- a/sdks/php/src/Model/SignatureRequestResponseDataValueSignature.php +++ b/sdks/php/src/Model/SignatureRequestResponseDataValueSignature.php @@ -2,7 +2,7 @@ /** * SignatureRequestResponseDataValueSignature * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -394,10 +394,10 @@ public function setIsSigned(?bool $is_signed) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -405,12 +405,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -434,10 +434,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/SignatureRequestResponseDataValueText.php b/sdks/php/src/Model/SignatureRequestResponseDataValueText.php index efdc08a8e..b36deff3f 100644 --- a/sdks/php/src/Model/SignatureRequestResponseDataValueText.php +++ b/sdks/php/src/Model/SignatureRequestResponseDataValueText.php @@ -2,7 +2,7 @@ /** * SignatureRequestResponseDataValueText * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -353,10 +353,10 @@ public function setValue(?string $value) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -364,12 +364,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -393,10 +393,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/SignatureRequestResponseDataValueTextMerge.php b/sdks/php/src/Model/SignatureRequestResponseDataValueTextMerge.php index ae1221e81..11e182c23 100644 --- a/sdks/php/src/Model/SignatureRequestResponseDataValueTextMerge.php +++ b/sdks/php/src/Model/SignatureRequestResponseDataValueTextMerge.php @@ -2,7 +2,7 @@ /** * SignatureRequestResponseDataValueTextMerge * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -353,10 +353,10 @@ public function setValue(?string $value) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -364,12 +364,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -393,10 +393,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/SignatureRequestResponseSignatures.php b/sdks/php/src/Model/SignatureRequestResponseSignatures.php index b8271d499..d4f6056e0 100644 --- a/sdks/php/src/Model/SignatureRequestResponseSignatures.php +++ b/sdks/php/src/Model/SignatureRequestResponseSignatures.php @@ -2,7 +2,7 @@ /** * SignatureRequestResponseSignatures * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -1043,10 +1043,10 @@ public function setError(?string $error) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -1054,12 +1054,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -1083,10 +1083,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/SignatureRequestSendRequest.php b/sdks/php/src/Model/SignatureRequestSendRequest.php index 823c7eaa7..d6d784acf 100644 --- a/sdks/php/src/Model/SignatureRequestSendRequest.php +++ b/sdks/php/src/Model/SignatureRequestSendRequest.php @@ -2,7 +2,7 @@ /** * SignatureRequestSendRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -1246,10 +1246,10 @@ public function setExpiresAt(?int $expires_at) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -1257,12 +1257,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -1286,10 +1286,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/SignatureRequestSendWithTemplateRequest.php b/sdks/php/src/Model/SignatureRequestSendWithTemplateRequest.php index 04c560341..b03435b0f 100644 --- a/sdks/php/src/Model/SignatureRequestSendWithTemplateRequest.php +++ b/sdks/php/src/Model/SignatureRequestSendWithTemplateRequest.php @@ -2,7 +2,7 @@ /** * SignatureRequestSendWithTemplateRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -947,10 +947,10 @@ public function setExpiresAt(?int $expires_at) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -958,12 +958,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -987,10 +987,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/SignatureRequestUpdateRequest.php b/sdks/php/src/Model/SignatureRequestUpdateRequest.php index dd412e8b1..719644746 100644 --- a/sdks/php/src/Model/SignatureRequestUpdateRequest.php +++ b/sdks/php/src/Model/SignatureRequestUpdateRequest.php @@ -2,7 +2,7 @@ /** * SignatureRequestUpdateRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -439,10 +439,10 @@ public function setExpiresAt(?int $expires_at) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -450,12 +450,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -479,10 +479,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/SubAttachment.php b/sdks/php/src/Model/SubAttachment.php index 0d34a8068..a29150633 100644 --- a/sdks/php/src/Model/SubAttachment.php +++ b/sdks/php/src/Model/SubAttachment.php @@ -2,7 +2,7 @@ /** * SubAttachment * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -435,10 +435,10 @@ public function setRequired(?bool $required) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -446,12 +446,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -475,10 +475,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/SubBulkSignerList.php b/sdks/php/src/Model/SubBulkSignerList.php index 795441cb3..d7ffd1cb9 100644 --- a/sdks/php/src/Model/SubBulkSignerList.php +++ b/sdks/php/src/Model/SubBulkSignerList.php @@ -2,7 +2,7 @@ /** * SubBulkSignerList * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -359,10 +359,10 @@ public function setSigners(?array $signers) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -370,12 +370,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -399,10 +399,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/SubBulkSignerListCustomField.php b/sdks/php/src/Model/SubBulkSignerListCustomField.php index c614f52d0..ff198344e 100644 --- a/sdks/php/src/Model/SubBulkSignerListCustomField.php +++ b/sdks/php/src/Model/SubBulkSignerListCustomField.php @@ -2,7 +2,7 @@ /** * SubBulkSignerListCustomField * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -367,10 +367,10 @@ public function setValue(string $value) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -378,12 +378,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -407,10 +407,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/SubCC.php b/sdks/php/src/Model/SubCC.php index a2ddd60af..4d472c376 100644 --- a/sdks/php/src/Model/SubCC.php +++ b/sdks/php/src/Model/SubCC.php @@ -2,7 +2,7 @@ /** * SubCC * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -367,10 +367,10 @@ public function setEmailAddress(string $email_address) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -378,12 +378,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -407,10 +407,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/SubCustomField.php b/sdks/php/src/Model/SubCustomField.php index 6bb11a51e..381431469 100644 --- a/sdks/php/src/Model/SubCustomField.php +++ b/sdks/php/src/Model/SubCustomField.php @@ -2,7 +2,7 @@ /** * SubCustomField * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -433,10 +433,10 @@ public function setValue(?string $value) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -444,12 +444,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -473,10 +473,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/SubEditorOptions.php b/sdks/php/src/Model/SubEditorOptions.php index 82cd02d9a..b3e86111f 100644 --- a/sdks/php/src/Model/SubEditorOptions.php +++ b/sdks/php/src/Model/SubEditorOptions.php @@ -2,7 +2,7 @@ /** * SubEditorOptions * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -360,10 +360,10 @@ public function setAllowEditDocuments(?bool $allow_edit_documents) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -400,10 +400,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/SubFieldOptions.php b/sdks/php/src/Model/SubFieldOptions.php index 3fa684abe..fcd231bfe 100644 --- a/sdks/php/src/Model/SubFieldOptions.php +++ b/sdks/php/src/Model/SubFieldOptions.php @@ -2,7 +2,7 @@ /** * SubFieldOptions * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -374,10 +374,10 @@ public function setDateFormat(string $date_format) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -385,12 +385,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -414,10 +414,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/SubFormFieldGroup.php b/sdks/php/src/Model/SubFormFieldGroup.php index d9a8d0dbf..7034263b4 100644 --- a/sdks/php/src/Model/SubFormFieldGroup.php +++ b/sdks/php/src/Model/SubFormFieldGroup.php @@ -2,7 +2,7 @@ /** * SubFormFieldGroup * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -404,10 +404,10 @@ public function setRequirement(string $requirement) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -415,12 +415,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -444,10 +444,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/SubFormFieldRule.php b/sdks/php/src/Model/SubFormFieldRule.php index 0f42be213..1498d122c 100644 --- a/sdks/php/src/Model/SubFormFieldRule.php +++ b/sdks/php/src/Model/SubFormFieldRule.php @@ -2,7 +2,7 @@ /** * SubFormFieldRule * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -418,7 +418,6 @@ public function setTriggers(array $triggers) if (is_null($triggers)) { throw new InvalidArgumentException('non-nullable triggers cannot be null'); } - if (count($triggers) > 1) { throw new InvalidArgumentException('invalid value for $triggers when calling SubFormFieldRule., number of items must be less than or equal to 1.'); } @@ -464,10 +463,10 @@ public function setActions(array $actions) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -475,12 +474,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -504,10 +503,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/SubFormFieldRuleAction.php b/sdks/php/src/Model/SubFormFieldRuleAction.php index cb9926586..0cea17a9c 100644 --- a/sdks/php/src/Model/SubFormFieldRuleAction.php +++ b/sdks/php/src/Model/SubFormFieldRuleAction.php @@ -2,7 +2,7 @@ /** * SubFormFieldRuleAction * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -472,10 +472,10 @@ public function setGroupId(?string $group_id) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -483,12 +483,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -512,10 +512,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/SubFormFieldRuleTrigger.php b/sdks/php/src/Model/SubFormFieldRuleTrigger.php index 9ca39534f..8703d3f8c 100644 --- a/sdks/php/src/Model/SubFormFieldRuleTrigger.php +++ b/sdks/php/src/Model/SubFormFieldRuleTrigger.php @@ -2,7 +2,7 @@ /** * SubFormFieldRuleTrigger * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -476,10 +476,10 @@ public function setValues(?array $values) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -487,12 +487,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -516,10 +516,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/SubFormFieldsPerDocumentBase.php b/sdks/php/src/Model/SubFormFieldsPerDocumentBase.php index c80d788e9..a0601389c 100644 --- a/sdks/php/src/Model/SubFormFieldsPerDocumentBase.php +++ b/sdks/php/src/Model/SubFormFieldsPerDocumentBase.php @@ -2,7 +2,7 @@ /** * SubFormFieldsPerDocumentBase * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -725,10 +725,10 @@ public function setPage(?int $page) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -736,12 +736,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -765,10 +765,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/SubFormFieldsPerDocumentCheckbox.php b/sdks/php/src/Model/SubFormFieldsPerDocumentCheckbox.php index 228dfadc2..f149f1ae9 100644 --- a/sdks/php/src/Model/SubFormFieldsPerDocumentCheckbox.php +++ b/sdks/php/src/Model/SubFormFieldsPerDocumentCheckbox.php @@ -2,7 +2,7 @@ /** * SubFormFieldsPerDocumentCheckbox * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -396,10 +396,10 @@ public function setGroup(?string $group) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -407,12 +407,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -436,10 +436,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/SubFormFieldsPerDocumentCheckboxMerge.php b/sdks/php/src/Model/SubFormFieldsPerDocumentCheckboxMerge.php index 9f60bf61c..f8aa823e9 100644 --- a/sdks/php/src/Model/SubFormFieldsPerDocumentCheckboxMerge.php +++ b/sdks/php/src/Model/SubFormFieldsPerDocumentCheckboxMerge.php @@ -2,7 +2,7 @@ /** * SubFormFieldsPerDocumentCheckboxMerge * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -325,10 +325,10 @@ public function setType(string $type) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -336,12 +336,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -365,10 +365,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/SubFormFieldsPerDocumentDateSigned.php b/sdks/php/src/Model/SubFormFieldsPerDocumentDateSigned.php index d7b97704b..4014e40ad 100644 --- a/sdks/php/src/Model/SubFormFieldsPerDocumentDateSigned.php +++ b/sdks/php/src/Model/SubFormFieldsPerDocumentDateSigned.php @@ -2,7 +2,7 @@ /** * SubFormFieldsPerDocumentDateSigned * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -456,10 +456,10 @@ public function setFontSize(?int $font_size) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -467,12 +467,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -496,10 +496,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/SubFormFieldsPerDocumentDropdown.php b/sdks/php/src/Model/SubFormFieldsPerDocumentDropdown.php index e57b50b92..e6989e1a1 100644 --- a/sdks/php/src/Model/SubFormFieldsPerDocumentDropdown.php +++ b/sdks/php/src/Model/SubFormFieldsPerDocumentDropdown.php @@ -2,7 +2,7 @@ /** * SubFormFieldsPerDocumentDropdown * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -535,10 +535,10 @@ public function setFontSize(?int $font_size) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -546,12 +546,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -575,10 +575,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/SubFormFieldsPerDocumentFontEnum.php b/sdks/php/src/Model/SubFormFieldsPerDocumentFontEnum.php index 2e9bb512f..7e5af3d5f 100644 --- a/sdks/php/src/Model/SubFormFieldsPerDocumentFontEnum.php +++ b/sdks/php/src/Model/SubFormFieldsPerDocumentFontEnum.php @@ -2,7 +2,7 @@ /** * SubFormFieldsPerDocumentFontEnum * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** diff --git a/sdks/php/src/Model/SubFormFieldsPerDocumentHyperlink.php b/sdks/php/src/Model/SubFormFieldsPerDocumentHyperlink.php index fad1fa883..65c1a1fe7 100644 --- a/sdks/php/src/Model/SubFormFieldsPerDocumentHyperlink.php +++ b/sdks/php/src/Model/SubFormFieldsPerDocumentHyperlink.php @@ -2,7 +2,7 @@ /** * SubFormFieldsPerDocumentHyperlink * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -530,10 +530,10 @@ public function setFontSize(?int $font_size) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -541,12 +541,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -570,10 +570,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/SubFormFieldsPerDocumentInitials.php b/sdks/php/src/Model/SubFormFieldsPerDocumentInitials.php index 1afccce6f..38acef9f4 100644 --- a/sdks/php/src/Model/SubFormFieldsPerDocumentInitials.php +++ b/sdks/php/src/Model/SubFormFieldsPerDocumentInitials.php @@ -2,7 +2,7 @@ /** * SubFormFieldsPerDocumentInitials * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -325,10 +325,10 @@ public function setType(string $type) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -336,12 +336,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -365,10 +365,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/SubFormFieldsPerDocumentRadio.php b/sdks/php/src/Model/SubFormFieldsPerDocumentRadio.php index 6a2961055..82af4aa9d 100644 --- a/sdks/php/src/Model/SubFormFieldsPerDocumentRadio.php +++ b/sdks/php/src/Model/SubFormFieldsPerDocumentRadio.php @@ -2,7 +2,7 @@ /** * SubFormFieldsPerDocumentRadio * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -399,10 +399,10 @@ public function setIsChecked(bool $is_checked) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -410,12 +410,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -439,10 +439,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/SubFormFieldsPerDocumentSignature.php b/sdks/php/src/Model/SubFormFieldsPerDocumentSignature.php index fe944e6a9..1acbbc894 100644 --- a/sdks/php/src/Model/SubFormFieldsPerDocumentSignature.php +++ b/sdks/php/src/Model/SubFormFieldsPerDocumentSignature.php @@ -2,7 +2,7 @@ /** * SubFormFieldsPerDocumentSignature * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -325,10 +325,10 @@ public function setType(string $type) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -336,12 +336,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -365,10 +365,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/SubFormFieldsPerDocumentText.php b/sdks/php/src/Model/SubFormFieldsPerDocumentText.php index 90794efef..3c4a49e6a 100644 --- a/sdks/php/src/Model/SubFormFieldsPerDocumentText.php +++ b/sdks/php/src/Model/SubFormFieldsPerDocumentText.php @@ -2,7 +2,7 @@ /** * SubFormFieldsPerDocumentText * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -778,10 +778,10 @@ public function setFontSize(?int $font_size) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -789,12 +789,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -818,10 +818,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/SubFormFieldsPerDocumentTextMerge.php b/sdks/php/src/Model/SubFormFieldsPerDocumentTextMerge.php index 4fe9e34cf..e4638b4e1 100644 --- a/sdks/php/src/Model/SubFormFieldsPerDocumentTextMerge.php +++ b/sdks/php/src/Model/SubFormFieldsPerDocumentTextMerge.php @@ -2,7 +2,7 @@ /** * SubFormFieldsPerDocumentTextMerge * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -456,10 +456,10 @@ public function setFontSize(?int $font_size) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -467,12 +467,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -496,10 +496,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/SubFormFieldsPerDocumentTypeEnum.php b/sdks/php/src/Model/SubFormFieldsPerDocumentTypeEnum.php index 47c4c1d45..b33a385d9 100644 --- a/sdks/php/src/Model/SubFormFieldsPerDocumentTypeEnum.php +++ b/sdks/php/src/Model/SubFormFieldsPerDocumentTypeEnum.php @@ -2,7 +2,7 @@ /** * SubFormFieldsPerDocumentTypeEnum * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** diff --git a/sdks/php/src/Model/SubMergeField.php b/sdks/php/src/Model/SubMergeField.php index 2880c9a3e..a39a6dabf 100644 --- a/sdks/php/src/Model/SubMergeField.php +++ b/sdks/php/src/Model/SubMergeField.php @@ -2,7 +2,7 @@ /** * SubMergeField * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -402,10 +402,10 @@ public function setType(string $type) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -413,12 +413,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -442,10 +442,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/SubOAuth.php b/sdks/php/src/Model/SubOAuth.php index ea8ef7c8a..4b7659782 100644 --- a/sdks/php/src/Model/SubOAuth.php +++ b/sdks/php/src/Model/SubOAuth.php @@ -2,7 +2,7 @@ /** * SubOAuth * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -397,10 +397,10 @@ public function setScopes(?array $scopes) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -408,12 +408,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -437,10 +437,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/SubOptions.php b/sdks/php/src/Model/SubOptions.php index a3e433ec1..b54f3cffe 100644 --- a/sdks/php/src/Model/SubOptions.php +++ b/sdks/php/src/Model/SubOptions.php @@ -2,7 +2,7 @@ /** * SubOptions * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -326,10 +326,10 @@ public function setCanInsertEverywhere(?bool $can_insert_everywhere) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -337,12 +337,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -366,10 +366,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/SubSignatureRequestGroupedSigners.php b/sdks/php/src/Model/SubSignatureRequestGroupedSigners.php index 98a9cc866..66266347d 100644 --- a/sdks/php/src/Model/SubSignatureRequestGroupedSigners.php +++ b/sdks/php/src/Model/SubSignatureRequestGroupedSigners.php @@ -2,7 +2,7 @@ /** * SubSignatureRequestGroupedSigners * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -408,10 +408,10 @@ public function setOrder(?int $order) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -419,12 +419,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -448,10 +448,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/SubSignatureRequestSigner.php b/sdks/php/src/Model/SubSignatureRequestSigner.php index e64799e6a..89324caea 100644 --- a/sdks/php/src/Model/SubSignatureRequestSigner.php +++ b/sdks/php/src/Model/SubSignatureRequestSigner.php @@ -2,7 +2,7 @@ /** * SubSignatureRequestSigner * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -560,10 +560,10 @@ public function setSmsPhoneNumberType(?string $sms_phone_number_type) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -571,12 +571,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -600,10 +600,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/SubSignatureRequestTemplateSigner.php b/sdks/php/src/Model/SubSignatureRequestTemplateSigner.php index adcdf8809..a199259bb 100644 --- a/sdks/php/src/Model/SubSignatureRequestTemplateSigner.php +++ b/sdks/php/src/Model/SubSignatureRequestTemplateSigner.php @@ -2,7 +2,7 @@ /** * SubSignatureRequestTemplateSigner * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -556,10 +556,10 @@ public function setSmsPhoneNumberType(?string $sms_phone_number_type) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -567,12 +567,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -596,10 +596,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/SubSigningOptions.php b/sdks/php/src/Model/SubSigningOptions.php index 445065b20..94fff587d 100644 --- a/sdks/php/src/Model/SubSigningOptions.php +++ b/sdks/php/src/Model/SubSigningOptions.php @@ -2,7 +2,7 @@ /** * SubSigningOptions * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -540,10 +540,10 @@ public function setForceAdvancedSignatureDetails(?bool $force_advanced_signature /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -551,12 +551,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -580,10 +580,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/SubTeamResponse.php b/sdks/php/src/Model/SubTeamResponse.php index 127f49e77..d42588a8a 100644 --- a/sdks/php/src/Model/SubTeamResponse.php +++ b/sdks/php/src/Model/SubTeamResponse.php @@ -2,7 +2,7 @@ /** * SubTeamResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -359,10 +359,10 @@ public function setName(?string $name) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -370,12 +370,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -399,10 +399,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/SubTemplateRole.php b/sdks/php/src/Model/SubTemplateRole.php index 835a1eba9..1172c07c1 100644 --- a/sdks/php/src/Model/SubTemplateRole.php +++ b/sdks/php/src/Model/SubTemplateRole.php @@ -2,7 +2,7 @@ /** * SubTemplateRole * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -366,10 +366,10 @@ public function setOrder(?int $order) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -377,12 +377,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -406,10 +406,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/SubUnclaimedDraftSigner.php b/sdks/php/src/Model/SubUnclaimedDraftSigner.php index 2a5db01dc..73899eac7 100644 --- a/sdks/php/src/Model/SubUnclaimedDraftSigner.php +++ b/sdks/php/src/Model/SubUnclaimedDraftSigner.php @@ -2,7 +2,7 @@ /** * SubUnclaimedDraftSigner * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -408,10 +408,10 @@ public function setOrder(?int $order) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -419,12 +419,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -448,10 +448,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/SubUnclaimedDraftTemplateSigner.php b/sdks/php/src/Model/SubUnclaimedDraftTemplateSigner.php index 9b9c8241c..ddc8d8191 100644 --- a/sdks/php/src/Model/SubUnclaimedDraftTemplateSigner.php +++ b/sdks/php/src/Model/SubUnclaimedDraftTemplateSigner.php @@ -2,7 +2,7 @@ /** * SubUnclaimedDraftTemplateSigner * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -404,10 +404,10 @@ public function setEmailAddress(string $email_address) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -415,12 +415,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -444,10 +444,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/SubWhiteLabelingOptions.php b/sdks/php/src/Model/SubWhiteLabelingOptions.php index f4ce70700..e7854e608 100644 --- a/sdks/php/src/Model/SubWhiteLabelingOptions.php +++ b/sdks/php/src/Model/SubWhiteLabelingOptions.php @@ -2,7 +2,7 @@ /** * SubWhiteLabelingOptions * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -839,10 +839,10 @@ public function setResetToDefault(?bool $reset_to_default) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -850,12 +850,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -879,10 +879,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/TeamAddMemberRequest.php b/sdks/php/src/Model/TeamAddMemberRequest.php index 146ae4f9c..4b7c9378c 100644 --- a/sdks/php/src/Model/TeamAddMemberRequest.php +++ b/sdks/php/src/Model/TeamAddMemberRequest.php @@ -2,7 +2,7 @@ /** * TeamAddMemberRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -434,10 +434,10 @@ public function setRole(?string $role) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -445,12 +445,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -474,10 +474,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/TeamCreateRequest.php b/sdks/php/src/Model/TeamCreateRequest.php index 452badc96..3787cb718 100644 --- a/sdks/php/src/Model/TeamCreateRequest.php +++ b/sdks/php/src/Model/TeamCreateRequest.php @@ -2,7 +2,7 @@ /** * TeamCreateRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -325,10 +325,10 @@ public function setName(?string $name) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -336,12 +336,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -365,10 +365,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/TeamGetInfoResponse.php b/sdks/php/src/Model/TeamGetInfoResponse.php index d14d4aa98..8076345e8 100644 --- a/sdks/php/src/Model/TeamGetInfoResponse.php +++ b/sdks/php/src/Model/TeamGetInfoResponse.php @@ -2,7 +2,7 @@ /** * TeamGetInfoResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -364,10 +364,10 @@ public function setWarnings(?array $warnings) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -375,12 +375,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -404,10 +404,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/TeamGetResponse.php b/sdks/php/src/Model/TeamGetResponse.php index 28d96ff9e..dae5f974a 100644 --- a/sdks/php/src/Model/TeamGetResponse.php +++ b/sdks/php/src/Model/TeamGetResponse.php @@ -2,7 +2,7 @@ /** * TeamGetResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -364,10 +364,10 @@ public function setWarnings(?array $warnings) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -375,12 +375,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -404,10 +404,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/TeamInfoResponse.php b/sdks/php/src/Model/TeamInfoResponse.php index 13499bb6c..2dc9a7fae 100644 --- a/sdks/php/src/Model/TeamInfoResponse.php +++ b/sdks/php/src/Model/TeamInfoResponse.php @@ -2,7 +2,7 @@ /** * TeamInfoResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -468,10 +468,10 @@ public function setNumSubTeams(?int $num_sub_teams) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -479,12 +479,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -508,10 +508,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/TeamInviteResponse.php b/sdks/php/src/Model/TeamInviteResponse.php index 78dbf9222..f4b33e7dd 100644 --- a/sdks/php/src/Model/TeamInviteResponse.php +++ b/sdks/php/src/Model/TeamInviteResponse.php @@ -2,7 +2,7 @@ /** * TeamInviteResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -495,10 +495,10 @@ public function setExpiresAt(?int $expires_at) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -506,12 +506,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -535,10 +535,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/TeamInvitesResponse.php b/sdks/php/src/Model/TeamInvitesResponse.php index 2ee6b901a..c8553e7a9 100644 --- a/sdks/php/src/Model/TeamInvitesResponse.php +++ b/sdks/php/src/Model/TeamInvitesResponse.php @@ -2,7 +2,7 @@ /** * TeamInvitesResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -364,10 +364,10 @@ public function setWarnings(?array $warnings) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -375,12 +375,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -404,10 +404,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/TeamMemberResponse.php b/sdks/php/src/Model/TeamMemberResponse.php index b41307213..7405958e2 100644 --- a/sdks/php/src/Model/TeamMemberResponse.php +++ b/sdks/php/src/Model/TeamMemberResponse.php @@ -2,7 +2,7 @@ /** * TeamMemberResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -393,10 +393,10 @@ public function setRole(?string $role) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -404,12 +404,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -433,10 +433,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/TeamMembersResponse.php b/sdks/php/src/Model/TeamMembersResponse.php index dce332535..ccaf82abd 100644 --- a/sdks/php/src/Model/TeamMembersResponse.php +++ b/sdks/php/src/Model/TeamMembersResponse.php @@ -2,7 +2,7 @@ /** * TeamMembersResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -401,10 +401,10 @@ public function setWarnings(?array $warnings) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -412,12 +412,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -441,10 +441,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/TeamParentResponse.php b/sdks/php/src/Model/TeamParentResponse.php index ccc57f870..0363195c7 100644 --- a/sdks/php/src/Model/TeamParentResponse.php +++ b/sdks/php/src/Model/TeamParentResponse.php @@ -2,7 +2,7 @@ /** * TeamParentResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -360,10 +360,10 @@ public function setName(?string $name) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -400,10 +400,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/TeamRemoveMemberRequest.php b/sdks/php/src/Model/TeamRemoveMemberRequest.php index 8d994a38a..579cae5d2 100644 --- a/sdks/php/src/Model/TeamRemoveMemberRequest.php +++ b/sdks/php/src/Model/TeamRemoveMemberRequest.php @@ -2,7 +2,7 @@ /** * TeamRemoveMemberRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -502,10 +502,10 @@ public function setNewRole(?string $new_role) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -513,12 +513,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -542,10 +542,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/TeamResponse.php b/sdks/php/src/Model/TeamResponse.php index ca161d761..2d95db76e 100644 --- a/sdks/php/src/Model/TeamResponse.php +++ b/sdks/php/src/Model/TeamResponse.php @@ -2,7 +2,7 @@ /** * TeamResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -428,10 +428,10 @@ public function setInvitedEmails(?array $invited_emails) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -439,12 +439,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -468,10 +468,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/TeamSubTeamsResponse.php b/sdks/php/src/Model/TeamSubTeamsResponse.php index fa6893502..7c5b22666 100644 --- a/sdks/php/src/Model/TeamSubTeamsResponse.php +++ b/sdks/php/src/Model/TeamSubTeamsResponse.php @@ -2,7 +2,7 @@ /** * TeamSubTeamsResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -401,10 +401,10 @@ public function setWarnings(?array $warnings) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -412,12 +412,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -441,10 +441,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/TeamUpdateRequest.php b/sdks/php/src/Model/TeamUpdateRequest.php index a8787a96a..de8b40140 100644 --- a/sdks/php/src/Model/TeamUpdateRequest.php +++ b/sdks/php/src/Model/TeamUpdateRequest.php @@ -2,7 +2,7 @@ /** * TeamUpdateRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -325,10 +325,10 @@ public function setName(?string $name) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -336,12 +336,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -365,10 +365,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/TemplateAddUserRequest.php b/sdks/php/src/Model/TemplateAddUserRequest.php index c55c3ed82..5773d2209 100644 --- a/sdks/php/src/Model/TemplateAddUserRequest.php +++ b/sdks/php/src/Model/TemplateAddUserRequest.php @@ -2,7 +2,7 @@ /** * TemplateAddUserRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -393,10 +393,10 @@ public function setSkipNotification(?bool $skip_notification) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -404,12 +404,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -433,10 +433,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/TemplateCreateEmbeddedDraftRequest.php b/sdks/php/src/Model/TemplateCreateEmbeddedDraftRequest.php index b8bf15992..0698c3da2 100644 --- a/sdks/php/src/Model/TemplateCreateEmbeddedDraftRequest.php +++ b/sdks/php/src/Model/TemplateCreateEmbeddedDraftRequest.php @@ -2,7 +2,7 @@ /** * TemplateCreateEmbeddedDraftRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -1198,10 +1198,10 @@ public function setIgnoreTextTagsExtractionErrors(?bool $ignore_text_tags_extrac /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -1209,12 +1209,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -1238,10 +1238,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/TemplateCreateEmbeddedDraftResponse.php b/sdks/php/src/Model/TemplateCreateEmbeddedDraftResponse.php index 4ef1c7c26..582882f91 100644 --- a/sdks/php/src/Model/TemplateCreateEmbeddedDraftResponse.php +++ b/sdks/php/src/Model/TemplateCreateEmbeddedDraftResponse.php @@ -2,7 +2,7 @@ /** * TemplateCreateEmbeddedDraftResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -364,10 +364,10 @@ public function setWarnings(?array $warnings) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -375,12 +375,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -404,10 +404,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/TemplateCreateEmbeddedDraftResponseTemplate.php b/sdks/php/src/Model/TemplateCreateEmbeddedDraftResponseTemplate.php index fb6238ed3..fa53dd09c 100644 --- a/sdks/php/src/Model/TemplateCreateEmbeddedDraftResponseTemplate.php +++ b/sdks/php/src/Model/TemplateCreateEmbeddedDraftResponseTemplate.php @@ -2,7 +2,7 @@ /** * TemplateCreateEmbeddedDraftResponseTemplate * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -430,10 +430,10 @@ public function setWarnings(?array $warnings) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -441,12 +441,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -470,10 +470,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/TemplateCreateRequest.php b/sdks/php/src/Model/TemplateCreateRequest.php index 52625c60b..7e6877c17 100644 --- a/sdks/php/src/Model/TemplateCreateRequest.php +++ b/sdks/php/src/Model/TemplateCreateRequest.php @@ -2,7 +2,7 @@ /** * TemplateCreateRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -963,10 +963,10 @@ public function setIgnoreTextTagsExtractionErrors(?bool $ignore_text_tags_extrac /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -974,12 +974,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -1003,10 +1003,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/TemplateCreateResponse.php b/sdks/php/src/Model/TemplateCreateResponse.php index db35aec21..e36aaff4c 100644 --- a/sdks/php/src/Model/TemplateCreateResponse.php +++ b/sdks/php/src/Model/TemplateCreateResponse.php @@ -2,7 +2,7 @@ /** * TemplateCreateResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -364,10 +364,10 @@ public function setWarnings(?array $warnings) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -375,12 +375,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -404,10 +404,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/TemplateCreateResponseTemplate.php b/sdks/php/src/Model/TemplateCreateResponseTemplate.php index 6777be75e..32c155ff0 100644 --- a/sdks/php/src/Model/TemplateCreateResponseTemplate.php +++ b/sdks/php/src/Model/TemplateCreateResponseTemplate.php @@ -2,7 +2,7 @@ /** * TemplateCreateResponseTemplate * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -326,10 +326,10 @@ public function setTemplateId(?string $template_id) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -337,12 +337,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -366,10 +366,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/TemplateGetResponse.php b/sdks/php/src/Model/TemplateGetResponse.php index b9f006f4e..fa24103da 100644 --- a/sdks/php/src/Model/TemplateGetResponse.php +++ b/sdks/php/src/Model/TemplateGetResponse.php @@ -2,7 +2,7 @@ /** * TemplateGetResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -364,10 +364,10 @@ public function setWarnings(?array $warnings) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -375,12 +375,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -404,10 +404,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/TemplateListResponse.php b/sdks/php/src/Model/TemplateListResponse.php index 4d4b367f2..371ecfa64 100644 --- a/sdks/php/src/Model/TemplateListResponse.php +++ b/sdks/php/src/Model/TemplateListResponse.php @@ -2,7 +2,7 @@ /** * TemplateListResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -401,10 +401,10 @@ public function setWarnings(?array $warnings) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -412,12 +412,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -441,10 +441,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/TemplateRemoveUserRequest.php b/sdks/php/src/Model/TemplateRemoveUserRequest.php index 1e5f3abb7..9d467ac53 100644 --- a/sdks/php/src/Model/TemplateRemoveUserRequest.php +++ b/sdks/php/src/Model/TemplateRemoveUserRequest.php @@ -2,7 +2,7 @@ /** * TemplateRemoveUserRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -359,10 +359,10 @@ public function setEmailAddress(?string $email_address) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -370,12 +370,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -399,10 +399,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/TemplateResponse.php b/sdks/php/src/Model/TemplateResponse.php index 3eac21041..ba46a4df5 100644 --- a/sdks/php/src/Model/TemplateResponse.php +++ b/sdks/php/src/Model/TemplateResponse.php @@ -2,7 +2,7 @@ /** * TemplateResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -861,10 +861,10 @@ public function setAttachments(?array $attachments) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -872,12 +872,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -901,10 +901,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/TemplateResponseAccount.php b/sdks/php/src/Model/TemplateResponseAccount.php index 126b68de8..83cd06cc4 100644 --- a/sdks/php/src/Model/TemplateResponseAccount.php +++ b/sdks/php/src/Model/TemplateResponseAccount.php @@ -2,7 +2,7 @@ /** * TemplateResponseAccount * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -495,10 +495,10 @@ public function setQuotas(?TemplateResponseAccountQuota $quotas) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -506,12 +506,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -535,10 +535,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/TemplateResponseAccountQuota.php b/sdks/php/src/Model/TemplateResponseAccountQuota.php index 24b742111..7f0eac55c 100644 --- a/sdks/php/src/Model/TemplateResponseAccountQuota.php +++ b/sdks/php/src/Model/TemplateResponseAccountQuota.php @@ -2,7 +2,7 @@ /** * TemplateResponseAccountQuota * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -428,10 +428,10 @@ public function setSmsVerificationsLeft(?int $sms_verifications_left) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -439,12 +439,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -468,10 +468,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/TemplateResponseCCRole.php b/sdks/php/src/Model/TemplateResponseCCRole.php index 8a0f4358c..d93120da7 100644 --- a/sdks/php/src/Model/TemplateResponseCCRole.php +++ b/sdks/php/src/Model/TemplateResponseCCRole.php @@ -2,7 +2,7 @@ /** * TemplateResponseCCRole * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -325,10 +325,10 @@ public function setName(?string $name) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -336,12 +336,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -365,10 +365,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/TemplateResponseDocument.php b/sdks/php/src/Model/TemplateResponseDocument.php index 26887c92c..a217edc1e 100644 --- a/sdks/php/src/Model/TemplateResponseDocument.php +++ b/sdks/php/src/Model/TemplateResponseDocument.php @@ -2,7 +2,7 @@ /** * TemplateResponseDocument * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -495,10 +495,10 @@ public function setStaticFields(?array $static_fields) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -506,12 +506,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -535,10 +535,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/TemplateResponseDocumentCustomFieldBase.php b/sdks/php/src/Model/TemplateResponseDocumentCustomFieldBase.php index 28ebc6249..72c0250aa 100644 --- a/sdks/php/src/Model/TemplateResponseDocumentCustomFieldBase.php +++ b/sdks/php/src/Model/TemplateResponseDocumentCustomFieldBase.php @@ -2,7 +2,7 @@ /** * TemplateResponseDocumentCustomFieldBase * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -650,10 +650,10 @@ public function setGroup(?string $group) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -661,12 +661,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -690,10 +690,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/TemplateResponseDocumentCustomFieldCheckbox.php b/sdks/php/src/Model/TemplateResponseDocumentCustomFieldCheckbox.php index bc054a3ed..87eecfa1a 100644 --- a/sdks/php/src/Model/TemplateResponseDocumentCustomFieldCheckbox.php +++ b/sdks/php/src/Model/TemplateResponseDocumentCustomFieldCheckbox.php @@ -2,7 +2,7 @@ /** * TemplateResponseDocumentCustomFieldCheckbox * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -325,10 +325,10 @@ public function setType(string $type) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -336,12 +336,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -365,10 +365,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/TemplateResponseDocumentCustomFieldText.php b/sdks/php/src/Model/TemplateResponseDocumentCustomFieldText.php index 4b9ef0ff0..3660b3c58 100644 --- a/sdks/php/src/Model/TemplateResponseDocumentCustomFieldText.php +++ b/sdks/php/src/Model/TemplateResponseDocumentCustomFieldText.php @@ -2,7 +2,7 @@ /** * TemplateResponseDocumentCustomFieldText * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -461,10 +461,10 @@ public function setFontFamily(?string $font_family) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -472,12 +472,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -501,10 +501,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/TemplateResponseDocumentFieldGroup.php b/sdks/php/src/Model/TemplateResponseDocumentFieldGroup.php index 9e7266a6e..4a3563a12 100644 --- a/sdks/php/src/Model/TemplateResponseDocumentFieldGroup.php +++ b/sdks/php/src/Model/TemplateResponseDocumentFieldGroup.php @@ -2,7 +2,7 @@ /** * TemplateResponseDocumentFieldGroup * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -359,10 +359,10 @@ public function setRule(?TemplateResponseDocumentFieldGroupRule $rule) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -370,12 +370,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -399,10 +399,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/TemplateResponseDocumentFieldGroupRule.php b/sdks/php/src/Model/TemplateResponseDocumentFieldGroupRule.php index ce4cbbec6..9149d2d8a 100644 --- a/sdks/php/src/Model/TemplateResponseDocumentFieldGroupRule.php +++ b/sdks/php/src/Model/TemplateResponseDocumentFieldGroupRule.php @@ -2,7 +2,7 @@ /** * TemplateResponseDocumentFieldGroupRule * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -360,10 +360,10 @@ public function setGroupLabel(?string $group_label) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -400,10 +400,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/TemplateResponseDocumentFormFieldBase.php b/sdks/php/src/Model/TemplateResponseDocumentFormFieldBase.php index 9158def09..fcf533ae8 100644 --- a/sdks/php/src/Model/TemplateResponseDocumentFormFieldBase.php +++ b/sdks/php/src/Model/TemplateResponseDocumentFormFieldBase.php @@ -2,7 +2,7 @@ /** * TemplateResponseDocumentFormFieldBase * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -620,10 +620,10 @@ public function setRequired(?bool $required) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -631,12 +631,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -660,10 +660,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/TemplateResponseDocumentFormFieldCheckbox.php b/sdks/php/src/Model/TemplateResponseDocumentFormFieldCheckbox.php index 5c09e726d..58df24e29 100644 --- a/sdks/php/src/Model/TemplateResponseDocumentFormFieldCheckbox.php +++ b/sdks/php/src/Model/TemplateResponseDocumentFormFieldCheckbox.php @@ -2,7 +2,7 @@ /** * TemplateResponseDocumentFormFieldCheckbox * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -366,10 +366,10 @@ public function setGroup(?string $group) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -377,12 +377,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -406,10 +406,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/TemplateResponseDocumentFormFieldDateSigned.php b/sdks/php/src/Model/TemplateResponseDocumentFormFieldDateSigned.php index 04b0ba065..9ba177d50 100644 --- a/sdks/php/src/Model/TemplateResponseDocumentFormFieldDateSigned.php +++ b/sdks/php/src/Model/TemplateResponseDocumentFormFieldDateSigned.php @@ -2,7 +2,7 @@ /** * TemplateResponseDocumentFormFieldDateSigned * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -366,10 +366,10 @@ public function setGroup(?string $group) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -377,12 +377,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -406,10 +406,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/TemplateResponseDocumentFormFieldDropdown.php b/sdks/php/src/Model/TemplateResponseDocumentFormFieldDropdown.php index f4b334aba..1912fe321 100644 --- a/sdks/php/src/Model/TemplateResponseDocumentFormFieldDropdown.php +++ b/sdks/php/src/Model/TemplateResponseDocumentFormFieldDropdown.php @@ -2,7 +2,7 @@ /** * TemplateResponseDocumentFormFieldDropdown * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -400,10 +400,10 @@ public function setOptions(?array $options) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -411,12 +411,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -440,10 +440,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/TemplateResponseDocumentFormFieldHyperlink.php b/sdks/php/src/Model/TemplateResponseDocumentFormFieldHyperlink.php index 136d33a7f..c2596696d 100644 --- a/sdks/php/src/Model/TemplateResponseDocumentFormFieldHyperlink.php +++ b/sdks/php/src/Model/TemplateResponseDocumentFormFieldHyperlink.php @@ -2,7 +2,7 @@ /** * TemplateResponseDocumentFormFieldHyperlink * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -502,10 +502,10 @@ public function setGroup(?string $group) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -513,12 +513,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -542,10 +542,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/TemplateResponseDocumentFormFieldInitials.php b/sdks/php/src/Model/TemplateResponseDocumentFormFieldInitials.php index 3f26239fa..ed53ad8df 100644 --- a/sdks/php/src/Model/TemplateResponseDocumentFormFieldInitials.php +++ b/sdks/php/src/Model/TemplateResponseDocumentFormFieldInitials.php @@ -2,7 +2,7 @@ /** * TemplateResponseDocumentFormFieldInitials * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -366,10 +366,10 @@ public function setGroup(?string $group) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -377,12 +377,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -406,10 +406,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/TemplateResponseDocumentFormFieldRadio.php b/sdks/php/src/Model/TemplateResponseDocumentFormFieldRadio.php index 3e3bbc92d..c93f1526f 100644 --- a/sdks/php/src/Model/TemplateResponseDocumentFormFieldRadio.php +++ b/sdks/php/src/Model/TemplateResponseDocumentFormFieldRadio.php @@ -2,7 +2,7 @@ /** * TemplateResponseDocumentFormFieldRadio * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -362,10 +362,10 @@ public function setGroup(string $group) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -373,12 +373,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -402,10 +402,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/TemplateResponseDocumentFormFieldSignature.php b/sdks/php/src/Model/TemplateResponseDocumentFormFieldSignature.php index 0358b8a77..1d831206a 100644 --- a/sdks/php/src/Model/TemplateResponseDocumentFormFieldSignature.php +++ b/sdks/php/src/Model/TemplateResponseDocumentFormFieldSignature.php @@ -2,7 +2,7 @@ /** * TemplateResponseDocumentFormFieldSignature * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -366,10 +366,10 @@ public function setGroup(?string $group) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -377,12 +377,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -406,10 +406,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/TemplateResponseDocumentFormFieldText.php b/sdks/php/src/Model/TemplateResponseDocumentFormFieldText.php index 72820f63d..90a72120e 100644 --- a/sdks/php/src/Model/TemplateResponseDocumentFormFieldText.php +++ b/sdks/php/src/Model/TemplateResponseDocumentFormFieldText.php @@ -2,7 +2,7 @@ /** * TemplateResponseDocumentFormFieldText * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -676,10 +676,10 @@ public function setGroup(?string $group) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -687,12 +687,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -716,10 +716,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/TemplateResponseDocumentStaticFieldBase.php b/sdks/php/src/Model/TemplateResponseDocumentStaticFieldBase.php index cf8391b15..e1b6a7939 100644 --- a/sdks/php/src/Model/TemplateResponseDocumentStaticFieldBase.php +++ b/sdks/php/src/Model/TemplateResponseDocumentStaticFieldBase.php @@ -2,7 +2,7 @@ /** * TemplateResponseDocumentStaticFieldBase * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -661,10 +661,10 @@ public function setGroup(?string $group) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -672,12 +672,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -701,10 +701,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/TemplateResponseDocumentStaticFieldCheckbox.php b/sdks/php/src/Model/TemplateResponseDocumentStaticFieldCheckbox.php index 3fea149c8..eb11dcad0 100644 --- a/sdks/php/src/Model/TemplateResponseDocumentStaticFieldCheckbox.php +++ b/sdks/php/src/Model/TemplateResponseDocumentStaticFieldCheckbox.php @@ -2,7 +2,7 @@ /** * TemplateResponseDocumentStaticFieldCheckbox * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -325,10 +325,10 @@ public function setType(string $type) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -336,12 +336,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -365,10 +365,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/TemplateResponseDocumentStaticFieldDateSigned.php b/sdks/php/src/Model/TemplateResponseDocumentStaticFieldDateSigned.php index a8b175efa..4f9b36673 100644 --- a/sdks/php/src/Model/TemplateResponseDocumentStaticFieldDateSigned.php +++ b/sdks/php/src/Model/TemplateResponseDocumentStaticFieldDateSigned.php @@ -2,7 +2,7 @@ /** * TemplateResponseDocumentStaticFieldDateSigned * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -325,10 +325,10 @@ public function setType(string $type) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -336,12 +336,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -365,10 +365,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/TemplateResponseDocumentStaticFieldDropdown.php b/sdks/php/src/Model/TemplateResponseDocumentStaticFieldDropdown.php index f3f64587a..3abeb8509 100644 --- a/sdks/php/src/Model/TemplateResponseDocumentStaticFieldDropdown.php +++ b/sdks/php/src/Model/TemplateResponseDocumentStaticFieldDropdown.php @@ -2,7 +2,7 @@ /** * TemplateResponseDocumentStaticFieldDropdown * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -325,10 +325,10 @@ public function setType(string $type) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -336,12 +336,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -365,10 +365,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/TemplateResponseDocumentStaticFieldHyperlink.php b/sdks/php/src/Model/TemplateResponseDocumentStaticFieldHyperlink.php index 1b5626688..4114a5497 100644 --- a/sdks/php/src/Model/TemplateResponseDocumentStaticFieldHyperlink.php +++ b/sdks/php/src/Model/TemplateResponseDocumentStaticFieldHyperlink.php @@ -2,7 +2,7 @@ /** * TemplateResponseDocumentStaticFieldHyperlink * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -325,10 +325,10 @@ public function setType(string $type) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -336,12 +336,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -365,10 +365,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/TemplateResponseDocumentStaticFieldInitials.php b/sdks/php/src/Model/TemplateResponseDocumentStaticFieldInitials.php index 010bbfb4b..c441ece26 100644 --- a/sdks/php/src/Model/TemplateResponseDocumentStaticFieldInitials.php +++ b/sdks/php/src/Model/TemplateResponseDocumentStaticFieldInitials.php @@ -2,7 +2,7 @@ /** * TemplateResponseDocumentStaticFieldInitials * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -325,10 +325,10 @@ public function setType(string $type) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -336,12 +336,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -365,10 +365,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/TemplateResponseDocumentStaticFieldRadio.php b/sdks/php/src/Model/TemplateResponseDocumentStaticFieldRadio.php index 2791f7cb8..84267286f 100644 --- a/sdks/php/src/Model/TemplateResponseDocumentStaticFieldRadio.php +++ b/sdks/php/src/Model/TemplateResponseDocumentStaticFieldRadio.php @@ -2,7 +2,7 @@ /** * TemplateResponseDocumentStaticFieldRadio * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -325,10 +325,10 @@ public function setType(string $type) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -336,12 +336,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -365,10 +365,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/TemplateResponseDocumentStaticFieldSignature.php b/sdks/php/src/Model/TemplateResponseDocumentStaticFieldSignature.php index 93e8d34c9..909aeb082 100644 --- a/sdks/php/src/Model/TemplateResponseDocumentStaticFieldSignature.php +++ b/sdks/php/src/Model/TemplateResponseDocumentStaticFieldSignature.php @@ -2,7 +2,7 @@ /** * TemplateResponseDocumentStaticFieldSignature * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -325,10 +325,10 @@ public function setType(string $type) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -336,12 +336,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -365,10 +365,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/TemplateResponseDocumentStaticFieldText.php b/sdks/php/src/Model/TemplateResponseDocumentStaticFieldText.php index df03f7b44..5bdad1660 100644 --- a/sdks/php/src/Model/TemplateResponseDocumentStaticFieldText.php +++ b/sdks/php/src/Model/TemplateResponseDocumentStaticFieldText.php @@ -2,7 +2,7 @@ /** * TemplateResponseDocumentStaticFieldText * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -325,10 +325,10 @@ public function setType(string $type) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -336,12 +336,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -365,10 +365,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/TemplateResponseFieldAvgTextLength.php b/sdks/php/src/Model/TemplateResponseFieldAvgTextLength.php index 75a0943f0..cd3ceeea4 100644 --- a/sdks/php/src/Model/TemplateResponseFieldAvgTextLength.php +++ b/sdks/php/src/Model/TemplateResponseFieldAvgTextLength.php @@ -2,7 +2,7 @@ /** * TemplateResponseFieldAvgTextLength * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -360,10 +360,10 @@ public function setNumCharsPerLine(?int $num_chars_per_line) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -400,10 +400,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/TemplateResponseSignerRole.php b/sdks/php/src/Model/TemplateResponseSignerRole.php index f32dbadab..6a275286b 100644 --- a/sdks/php/src/Model/TemplateResponseSignerRole.php +++ b/sdks/php/src/Model/TemplateResponseSignerRole.php @@ -2,7 +2,7 @@ /** * TemplateResponseSignerRole * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -359,10 +359,10 @@ public function setOrder(?int $order) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -370,12 +370,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -399,10 +399,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/TemplateUpdateFilesRequest.php b/sdks/php/src/Model/TemplateUpdateFilesRequest.php index 0fea668d1..df004a845 100644 --- a/sdks/php/src/Model/TemplateUpdateFilesRequest.php +++ b/sdks/php/src/Model/TemplateUpdateFilesRequest.php @@ -2,7 +2,7 @@ /** * TemplateUpdateFilesRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -514,10 +514,10 @@ public function setTestMode(?bool $test_mode) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -525,12 +525,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -554,10 +554,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/TemplateUpdateFilesResponse.php b/sdks/php/src/Model/TemplateUpdateFilesResponse.php index 6cc46e033..6294ddd2b 100644 --- a/sdks/php/src/Model/TemplateUpdateFilesResponse.php +++ b/sdks/php/src/Model/TemplateUpdateFilesResponse.php @@ -2,7 +2,7 @@ /** * TemplateUpdateFilesResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -330,10 +330,10 @@ public function setTemplate(TemplateUpdateFilesResponseTemplate $template) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -341,12 +341,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -370,10 +370,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/TemplateUpdateFilesResponseTemplate.php b/sdks/php/src/Model/TemplateUpdateFilesResponseTemplate.php index 122928e90..538c8c6fe 100644 --- a/sdks/php/src/Model/TemplateUpdateFilesResponseTemplate.php +++ b/sdks/php/src/Model/TemplateUpdateFilesResponseTemplate.php @@ -2,7 +2,7 @@ /** * TemplateUpdateFilesResponseTemplate * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -362,10 +362,10 @@ public function setWarnings(?array $warnings) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -373,12 +373,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -402,10 +402,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/UnclaimedDraftCreateEmbeddedRequest.php b/sdks/php/src/Model/UnclaimedDraftCreateEmbeddedRequest.php index 2838ed208..2c50fc707 100644 --- a/sdks/php/src/Model/UnclaimedDraftCreateEmbeddedRequest.php +++ b/sdks/php/src/Model/UnclaimedDraftCreateEmbeddedRequest.php @@ -2,7 +2,7 @@ /** * UnclaimedDraftCreateEmbeddedRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -1618,10 +1618,10 @@ public function setExpiresAt(?int $expires_at) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -1629,12 +1629,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -1658,10 +1658,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/UnclaimedDraftCreateEmbeddedWithTemplateRequest.php b/sdks/php/src/Model/UnclaimedDraftCreateEmbeddedWithTemplateRequest.php index ced869bda..84ed2e16d 100644 --- a/sdks/php/src/Model/UnclaimedDraftCreateEmbeddedWithTemplateRequest.php +++ b/sdks/php/src/Model/UnclaimedDraftCreateEmbeddedWithTemplateRequest.php @@ -2,7 +2,7 @@ /** * UnclaimedDraftCreateEmbeddedWithTemplateRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -1348,10 +1348,10 @@ public function setAllowCcs(?bool $allow_ccs) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -1359,12 +1359,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -1388,10 +1388,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/UnclaimedDraftCreateRequest.php b/sdks/php/src/Model/UnclaimedDraftCreateRequest.php index 57d82c5b2..b3795d69c 100644 --- a/sdks/php/src/Model/UnclaimedDraftCreateRequest.php +++ b/sdks/php/src/Model/UnclaimedDraftCreateRequest.php @@ -2,7 +2,7 @@ /** * UnclaimedDraftCreateRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -1207,10 +1207,10 @@ public function setExpiresAt(?int $expires_at) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -1218,12 +1218,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -1247,10 +1247,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/UnclaimedDraftCreateResponse.php b/sdks/php/src/Model/UnclaimedDraftCreateResponse.php index 65ab8ad54..deb24bcb1 100644 --- a/sdks/php/src/Model/UnclaimedDraftCreateResponse.php +++ b/sdks/php/src/Model/UnclaimedDraftCreateResponse.php @@ -2,7 +2,7 @@ /** * UnclaimedDraftCreateResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -364,10 +364,10 @@ public function setWarnings(?array $warnings) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -375,12 +375,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -404,10 +404,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/UnclaimedDraftEditAndResendRequest.php b/sdks/php/src/Model/UnclaimedDraftEditAndResendRequest.php index c386152f6..beb412215 100644 --- a/sdks/php/src/Model/UnclaimedDraftEditAndResendRequest.php +++ b/sdks/php/src/Model/UnclaimedDraftEditAndResendRequest.php @@ -2,7 +2,7 @@ /** * UnclaimedDraftEditAndResendRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -568,10 +568,10 @@ public function setTestMode(?bool $test_mode) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -579,12 +579,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -608,10 +608,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/UnclaimedDraftResponse.php b/sdks/php/src/Model/UnclaimedDraftResponse.php index 634d99b8d..7e2f2b5f2 100644 --- a/sdks/php/src/Model/UnclaimedDraftResponse.php +++ b/sdks/php/src/Model/UnclaimedDraftResponse.php @@ -2,7 +2,7 @@ /** * UnclaimedDraftResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -524,10 +524,10 @@ public function setTestMode(?bool $test_mode) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -535,12 +535,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -564,10 +564,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/Model/WarningResponse.php b/sdks/php/src/Model/WarningResponse.php index cd95bc14c..2813e8f14 100644 --- a/sdks/php/src/Model/WarningResponse.php +++ b/sdks/php/src/Model/WarningResponse.php @@ -2,7 +2,7 @@ /** * WarningResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -368,10 +368,10 @@ public function setWarningName(string $warning_name) /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -379,12 +379,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param int|string $offset Offset * * @return mixed|null */ #[ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -408,10 +408,10 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param int|string $offset Offset */ #[ReturnTypeWillChange] - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/src/ObjectSerializer.php b/sdks/php/src/ObjectSerializer.php index f8022100b..573b3b9e8 100644 --- a/sdks/php/src/ObjectSerializer.php +++ b/sdks/php/src/ObjectSerializer.php @@ -2,7 +2,7 @@ /** * ObjectSerializer * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @see https://openapi-generator.tech @@ -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.12.0 + * Generator version: 7.26.0 */ /** @@ -253,7 +253,7 @@ public static function toQueryValue( } foreach ($arr as $k => $v) { - $prop = ($style === 'deepObject') ? $prop = "{$name}[{$k}]" : $k; + $prop = ($style === 'deepObject') ? "{$name}[{$k}]" : $k; if (is_array($v)) { $flattenArray($v, $prop, $result); @@ -642,7 +642,7 @@ public static function buildQuery(array $params, $encoding = PHP_QUERY_RFC3986): } } - return $qs ? (string)substr($qs, 0, -1) : ''; + return $qs ? substr($qs, 0, -1) : ''; } /** diff --git a/sdks/php/templates/ApiException.mustache b/sdks/php/templates/ApiException.mustache index 944d3c8a6..dc4ae0565 100644 --- a/sdks/php/templates/ApiException.mustache +++ b/sdks/php/templates/ApiException.mustache @@ -1,7 +1,7 @@ partial_header}} + /** * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/sdks/php/templates/Configuration.mustache b/sdks/php/templates/Configuration.mustache index 384dcfbcf..9f5a67717 100644 --- a/sdks/php/templates/Configuration.mustache +++ b/sdks/php/templates/Configuration.mustache @@ -1,7 +1,7 @@ partial_header}} + /** * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -20,7 +21,7 @@ namespace {{invokerPackage}}; /** * Configuration Class Doc Comment - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package {{invokerPackage}} @@ -126,6 +127,20 @@ class Configuration protected $payloadHook = null; {{/useCustomTemplateCode}} + /** + * Path to a certificate file, for mTLS + * + * @var string + */ + protected $certFile; + + /** + * Path to a key file, for mTLS + * + * @var string + */ + protected $keyFile; + /** * Constructor */ @@ -434,6 +449,49 @@ class Configuration return $this->tempFolderPath; } + /** + * Sets the certificate file path, for mTLS + * + * @return $this + */ + public function setCertFile($certFile) + { + $this->certFile = $certFile; + return $this; + } + + /** + * Gets the certificate file path, for mTLS + * + * @return string Certificate file path + */ + public function getCertFile() + { + return $this->certFile; + } + + /** + * Sets the certificate key path, for mTLS + * + * @return $this + */ + public function setKeyFile($keyFile) + { + $this->keyFile = $keyFile; + return $this; + } + + /** + * Gets the certificate key path, for mTLS + * + * @return string Certificate key path + */ + public function getKeyFile() + { + return $this->keyFile; + } + + /** * Gets the default configuration instance * diff --git a/sdks/php/templates/HeaderSelector.mustache b/sdks/php/templates/HeaderSelector.mustache index d5c284cfe..c009cb1f6 100644 --- a/sdks/php/templates/HeaderSelector.mustache +++ b/sdks/php/templates/HeaderSelector.mustache @@ -1,7 +1,7 @@ partial_header}} + /** * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/sdks/php/templates/ModelInterface.mustache b/sdks/php/templates/ModelInterface.mustache index 805db43f0..3e008e7ce 100644 --- a/sdks/php/templates/ModelInterface.mustache +++ b/sdks/php/templates/ModelInterface.mustache @@ -2,7 +2,7 @@ /** * ModelInterface * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package {{modelPackage}} @@ -11,6 +11,7 @@ */ {{>partial_header}} + /** * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/sdks/php/templates/ObjectSerializer.mustache b/sdks/php/templates/ObjectSerializer.mustache index 4437c693c..f7fa92cf3 100644 --- a/sdks/php/templates/ObjectSerializer.mustache +++ b/sdks/php/templates/ObjectSerializer.mustache @@ -2,7 +2,7 @@ /** * ObjectSerializer * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package {{invokerPackage}} @@ -11,6 +11,7 @@ */ {{>partial_header}} + /** * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -111,11 +112,11 @@ class ObjectSerializer return (string) $data; {{/useCustomTemplateCode}} } else { - foreach($data as $property => $value) { + foreach ($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } - return (object)$values; + return (object) $values; } else { return (string)$data; } @@ -147,7 +148,9 @@ class ObjectSerializer */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) return $timestamp; + if (!is_string($timestamp)) { + return $timestamp; + } return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -180,20 +183,20 @@ class ObjectSerializer */ private static function isEmptyValue($value, string $openApiType): bool { - # If empty() returns false, it is not empty regardless of its type. + // If empty() returns false, it is not empty regardless of its type. if (!empty($value)) { return false; } - # Null is always empty, as we cannot send a real "null" value in a query parameter. + // Null is always empty, as we cannot send a real "null" value in a query parameter. if ($value === null) { return true; } switch ($openApiType) { - # For numeric values, false and '' are considered empty. - # This comparison is safe for floating point values, since the previous call to empty() will - # filter out values that don't match 0. + // For numeric values, false and '' are considered empty. + // This comparison is safe for floating point values, since the previous call to empty() will + // filter out values that don't match 0. case 'int': case 'integer': return $value !== 0; @@ -202,16 +205,16 @@ class ObjectSerializer case 'float': return $value !== 0 && $value !== 0.0; - # For boolean values, '' is considered empty + // For boolean values, '' is considered empty case 'bool': case 'boolean': return !in_array($value, [false, 0], true); - # For string values, '' is considered empty. + // For string values, '' is considered empty. case 'string': return $value === ''; - # For all the other types, any value at this point can be considered empty. + // For all the other types, any value at this point can be considered empty. default: return true; } @@ -244,10 +247,10 @@ class ObjectSerializer bool $required = true ): array { - # Check if we should omit this parameter from the query. This should only happen when: - # - Parameter is NOT required; AND - # - its value is set to a value that is equivalent to "empty", depending on its OpenAPI type. For - # example, 0 as "int" or "boolean" is NOT an empty value. + // Check if we should omit this parameter from the query. This should only happen when: + // - Parameter is NOT required; AND + // - its value is set to a value that is equivalent to "empty", depending on its OpenAPI type. For + // example, 0 as "int" or "boolean" is NOT an empty value. if (self::isEmptyValue($value, $openApiType)) { if ($required) { return ["{$paramName}" => '']; @@ -256,8 +259,8 @@ class ObjectSerializer } } - # Handle DateTime objects in query - if($openApiType === "\\DateTime" && $value instanceof \DateTime) { + // Handle DateTime objects in query + if ($openApiType === "\\DateTime" && $value instanceof \DateTime) { return ["{$paramName}" => $value->format(self::$dateTimeFormat)]; } @@ -267,10 +270,12 @@ class ObjectSerializer // since \GuzzleHttp\Psr7\Query::build fails with nested arrays // need to flatten array first $flattenArray = function ($arr, $name, &$result = []) use (&$flattenArray, $style, $explode) { - if (!is_array($arr)) return $arr; + if (!is_array($arr)) { + return $arr; + } foreach ($arr as $k => $v) { - $prop = ($style === 'deepObject') ? $prop = "{$name}[{$k}]" : $k; + $prop = ($style === 'deepObject') ? "{$name}[{$k}]" : $k; if (is_array($v)) { $flattenArray($v, $prop, $result); @@ -340,6 +345,7 @@ class ObjectSerializer return self::toString($value); } +{{#useCustomTemplateCode}} /** * Take value and turn it into a string suitable for inclusion in @@ -358,6 +364,7 @@ class ObjectSerializer return self::toString($value); } } +{{/useCustomTemplateCode}} /** * Take value and turn it into a string suitable for inclusion in @@ -546,6 +553,12 @@ class ObjectSerializer if (method_exists($class, 'getAllowableEnumValues')) { if (!in_array($data, $class::getAllowableEnumValues(), true)) { + {{#enumUnknownDefaultCase}} + if (defined("$class::UNKNOWN_DEFAULT_OPEN_API")) { + return constant("$class::UNKNOWN_DEFAULT_OPEN_API"); + } + + {{/enumUnknownDefaultCase}} $imploded = implode("', '", $class::getAllowableEnumValues()); throw new \InvalidArgumentException("Invalid value for enum '$class', must be one of: '$imploded'"); } @@ -554,7 +567,7 @@ class ObjectSerializer $data = is_string($data) ? json_decode($data) : $data; if (is_array($data)) { - $data = (object)$data; + $data = (object) $data; } // If a discriminator is defined and points to a valid subclass, use it. @@ -626,20 +639,20 @@ class ObjectSerializer } /** - * Build a query string from an array of key value pairs. - * - * This function can use the return value of `parse()` to build a query - * string. This function does not modify the provided keys when an array is - * encountered (like `http_build_query()` would). - * - * The function is copied from https://github.com/guzzle/psr7/blob/a243f80a1ca7fe8ceed4deee17f12c1930efe662/src/Query.php#L59-L112 - * with a modification which is described in https://github.com/guzzle/psr7/pull/603 - * - * @param array $params Query string parameters. - * @param int|false $encoding Set to false to not encode, PHP_QUERY_RFC3986 - * to encode using RFC3986, or PHP_QUERY_RFC1738 - * to encode using RFC1738. - */ + * Build a query string from an array of key value pairs. + * + * This function can use the return value of `parse()` to build a query + * string. This function does not modify the provided keys when an array is + * encountered (like `http_build_query()` would). + * + * The function is copied from https://github.com/guzzle/psr7/blob/a243f80a1ca7fe8ceed4deee17f12c1930efe662/src/Query.php#L59-L112 + * with a modification which is described in https://github.com/guzzle/psr7/pull/603 + * + * @param array $params Query string parameters. + * @param int|false $encoding Set to false to not encode, PHP_QUERY_RFC3986 + * to encode using RFC3986, or PHP_QUERY_RFC1738 + * to encode using RFC1738. + */ public static function buildQuery(array $params, $encoding = PHP_QUERY_RFC3986): string { if (!$params) { @@ -684,7 +697,7 @@ class ObjectSerializer } } - return $qs ? (string) substr($qs, 0, -1) : ''; + return $qs ? substr($qs, 0, -1) : ''; } {{#useCustomTemplateCode}} diff --git a/sdks/php/templates/README.mustache b/sdks/php/templates/README.mustache index a0f14993d..7cc3e7607 100644 --- a/sdks/php/templates/README.mustache +++ b/sdks/php/templates/README.mustache @@ -52,8 +52,7 @@ this command. ### Requirements {{^useCustomTemplateCode}} -PHP 7.4 and later. -Should also work with PHP 8.0. +PHP 8.1 and later. {{/useCustomTemplateCode}} {{#useCustomTemplateCode}} PHP {{phpVersion}} and later. @@ -118,6 +117,7 @@ require_once(__DIR__ . '/vendor/autoload.php'); {{#apiInfo}}{{#apis}}{{#-first}}{{#operations}}{{#operation}}{{#-first}} {{> php_doc_auth_partial}} + $apiInstance = new {{invokerPackage}}\Api\{{classname}}( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. diff --git a/sdks/php/templates/api.mustache b/sdks/php/templates/api.mustache index 8cac61995..4d88aa16c 100644 --- a/sdks/php/templates/api.mustache +++ b/sdks/php/templates/api.mustache @@ -1,7 +1,7 @@ partial_header}} + /** * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -25,13 +26,15 @@ use GuzzleHttp\Exception\RequestException; use GuzzleHttp\Psr7\MultipartStream; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use {{invokerPackage}}\ApiException; use {{invokerPackage}}\Configuration; +use {{invokerPackage}}\FormDataProcessor; use {{invokerPackage}}\HeaderSelector; use {{invokerPackage}}\ObjectSerializer; {{#useCustomTemplateCode}} use {{invokerPackage}}\Model; -use Psr\Http\Message\ResponseInterface; {{/useCustomTemplateCode}} /** @@ -173,10 +176,10 @@ use Psr\Http\Message\ResponseInterface; {{/description}} * Example: https://github.com/hellosign/dropbox-sign-php/blob/main/examples/{{operationIdCamelCase}}Example.php * -{{#vendorExtensions.x-group-parameters}} +{{#exts.x-group-parameters}} * Note: the input parameter is an associative array with the keys listed as the parameter name below * -{{/vendorExtensions.x-group-parameters}} +{{/exts.x-group-parameters}} {{#servers}} {{#-first}} * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. @@ -198,7 +201,7 @@ use Psr\Http\Message\ResponseInterface; {{/-last}} {{/servers}} {{#allParams}} - * @param {{{dataType}}}{{^required}}|null{{/required}} ${{paramName}}{{#description}} {{.}}{{/description}}{{^description}} {{paramName}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} + * @param {{{dataType}}}{{#notRequiredOrIsNullable}}|null{{/notRequiredOrIsNullable}} ${{paramName}}{{#description}} {{.}}{{/description}}{{^description}} {{paramName}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} {{/allParams}} {{^useCustomTemplateCode}} {{#servers}} @@ -218,9 +221,9 @@ use Psr\Http\Message\ResponseInterface; {{/isDeprecated}} */ {{^useCustomTemplateCode}} - public function {{operationId}}({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}{{^required}} = {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}, {{/allParams}}{{#servers}}{{#-first}}?int $hostIndex = null, array $variables = [], {{/-first}}{{/servers}}string $contentType = self::contentTypes['{{{operationId}}}'][0]{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associative_array{{/vendorExtensions.x-group-parameters}}) + public function {{operationId}}({{^exts.x-group-parameters}}{{#allParams}}${{paramName}}{{^required}} = {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}, {{/allParams}}{{#servers}}{{#-first}}?int $hostIndex = null, array $variables = [], {{/-first}}{{/servers}}string $contentType = self::contentTypes['{{{operationId}}}'][0]{{/exts.x-group-parameters}}{{#exts.x-group-parameters}}$associative_array{{/exts.x-group-parameters}}) { - {{#returnType}}list($response) = {{/returnType}}$this->{{operationId}}WithHttpInfo({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}, {{/allParams}}{{#servers}}{{#-first}}$hostIndex, $variables, {{/-first}}{{/servers}}$contentType{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associative_array{{/vendorExtensions.x-group-parameters}});{{#returnType}} + {{#returnType}}list($response) = {{/returnType}}$this->{{operationId}}WithHttpInfo({{^exts.x-group-parameters}}{{#allParams}}${{paramName}}, {{/allParams}}{{#servers}}{{#-first}}$hostIndex, $variables, {{/-first}}{{/servers}}$contentType{{/exts.x-group-parameters}}{{#exts.x-group-parameters}}$associative_array{{/exts.x-group-parameters}});{{#returnType}} return $response;{{/returnType}} {{/useCustomTemplateCode}} {{#useCustomTemplateCode}} @@ -244,10 +247,10 @@ use Psr\Http\Message\ResponseInterface; {{/description}} * Example: https://github.com/hellosign/dropbox-sign-php/blob/main/examples/{{operationIdCamelCase}}Example.php * -{{#vendorExtensions.x-group-parameters}} +{{#exts.x-group-parameters}} * Note: the input parameter is an associative array with the keys listed as the parameter name below * -{{/vendorExtensions.x-group-parameters}} +{{/exts.x-group-parameters}} {{#servers}} {{#-first}} * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. @@ -269,7 +272,7 @@ use Psr\Http\Message\ResponseInterface; {{/-last}} {{/servers}} {{#allParams}} - * @param {{{dataType}}}{{^required}}|null{{/required}} ${{paramName}}{{#description}} {{.}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} + * @param {{{dataType}}}{{#notRequiredOrIsNullable}}|null{{/notRequiredOrIsNullable}} ${{paramName}}{{#description}} {{.}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} {{/allParams}} {{#servers}} {{#-first}} @@ -289,9 +292,9 @@ use Psr\Http\Message\ResponseInterface; * @deprecated {{/isDeprecated}} */ - public function {{operationId}}WithHttpInfo({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}{{^required}} = {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}, {{/allParams}}{{#servers}}{{#-first}}?int $hostIndex = null, array $variables = [], {{/-first}}{{/servers}}string $contentType = self::contentTypes['{{{operationId}}}'][0]{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associative_array{{/vendorExtensions.x-group-parameters}}) + public function {{operationId}}WithHttpInfo({{^exts.x-group-parameters}}{{#allParams}}${{paramName}}{{^required}} = {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}, {{/allParams}}{{#servers}}{{#-first}}?int $hostIndex = null, array $variables = [], {{/-first}}{{/servers}}string $contentType = self::contentTypes['{{{operationId}}}'][0]{{/exts.x-group-parameters}}{{#exts.x-group-parameters}}$associative_array{{/exts.x-group-parameters}}) { - $request = $this->{{operationId}}Request({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}, {{/allParams}}{{#servers}}{{#-first}}$hostIndex, $variables, {{/-first}}{{/servers}}$contentType{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associative_array{{/vendorExtensions.x-group-parameters}}); + $request = $this->{{operationId}}Request({{^exts.x-group-parameters}}{{#allParams}}${{paramName}}, {{/allParams}}{{#servers}}{{#-first}}$hostIndex, $variables, {{/-first}}{{/servers}}$contentType{{/exts.x-group-parameters}}{{#exts.x-group-parameters}}$associative_array{{/exts.x-group-parameters}}); try { $options = $this->createHttpClientOption(); @@ -338,38 +341,25 @@ use Psr\Http\Message\ResponseInterface; {{/-first}} {{#dataType}} {{^isRange}}{{^isWildcard}}case {{code}}:{{/isWildcard}}{{#isWildcard}}default:{{/isWildcard}} - if ('{{{dataType}}}' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('{{{dataType}}}' !== '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, '{{{dataType}}}', []), - $response->getStatusCode(), - $response->getHeaders() - ];{{/isRange}} + return $this->handleResponseWithDataType( + '{{{dataType}}}', + $request, + $response, + );{{/isRange}} {{/dataType}} {{#-last}} } {{/-last}} {{/responses}} + {{#responses}}{{#dataType}}{{#isRange}}{{^isWildcard}}if ($this->responseWithinRangeCode('{{code}}', $statusCode)) { + return $this->handleResponseWithDataType( + '{{{dataType}}}', + $request, + $response, + ); + }{{/isWildcard}}{{/isRange}}{{/dataType}}{{/responses}} + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -383,39 +373,16 @@ use Psr\Http\Message\ResponseInterface; ); } - $returnType = '{{{returnType}}}'; - 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() - ]; + return $this->handleResponseWithDataType( + '{{{returnType}}}', + $request, + $response, + ); {{/returnType}} {{^returnType}} return [null, $statusCode, $response->getHeaders()]; {{/returnType}} - } catch (ApiException $e) { {{#useCustomTemplateCode}} {{#responses}}{{#dataType}}{{#isRange}} @@ -433,10 +400,21 @@ use Psr\Http\Message\ResponseInterface; $e->getResponseHeaders() ); $e->setResponseObject($data); - break;{{/isRange}} + throw $e;{{/isRange}} {{/dataType}} {{/responses}} } + {{#responses}}{{#dataType}}{{#isRange}}{{^isWildcard}} + if ($this->responseWithinRangeCode('{{code}}', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '{{{dataType}}}', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + }{{/isWildcard}}{{/isRange}}{{/dataType}}{{/responses}} + throw $e; } } @@ -454,10 +432,10 @@ use Psr\Http\Message\ResponseInterface; {{/description}} * Example: https://github.com/hellosign/dropbox-sign-php/blob/main/examples/{{operationIdCamelCase}}Example.php * -{{#vendorExtensions.x-group-parameters}} +{{#exts.x-group-parameters}} * Note: the input parameter is an associative array with the keys listed as the parameter name below * -{{/vendorExtensions.x-group-parameters}} +{{/exts.x-group-parameters}} {{#servers}} {{#-first}} * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. @@ -479,7 +457,7 @@ use Psr\Http\Message\ResponseInterface; {{/-last}} {{/servers}} {{#allParams}} - * @param {{{dataType}}}{{^required}}|null{{/required}} ${{paramName}}{{#description}} {{.}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} + * @param {{{dataType}}}{{#notRequiredOrIsNullable}}|null{{/notRequiredOrIsNullable}} ${{paramName}}{{#description}} {{.}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} {{/allParams}} {{#servers}} {{#-first}} @@ -498,9 +476,9 @@ use Psr\Http\Message\ResponseInterface; * @deprecated {{/isDeprecated}} */ - public function {{operationId}}Async({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}{{^required}} = {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}, {{/allParams}}{{#servers}}{{#-first}}?int $hostIndex = null, array $variables = [], {{/-first}}{{/servers}}string $contentType = self::contentTypes['{{{operationId}}}'][0]{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associative_array{{/vendorExtensions.x-group-parameters}}) + public function {{operationId}}Async({{^exts.x-group-parameters}}{{#allParams}}${{paramName}}{{^required}} = {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}, {{/allParams}}{{#servers}}{{#-first}}?int $hostIndex = null, array $variables = [], {{/-first}}{{/servers}}string $contentType = self::contentTypes['{{{operationId}}}'][0]{{/exts.x-group-parameters}}{{#exts.x-group-parameters}}$associative_array{{/exts.x-group-parameters}}) { - return $this->{{operationId}}AsyncWithHttpInfo({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}, {{/allParams}}{{#servers}}{{#-first}}$hostIndex, $variables, {{/-first}}{{/servers}}$contentType{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associative_array{{/vendorExtensions.x-group-parameters}}) + return $this->{{operationId}}AsyncWithHttpInfo({{^exts.x-group-parameters}}{{#allParams}}${{paramName}}, {{/allParams}}{{#servers}}{{#-first}}$hostIndex, $variables, {{/-first}}{{/servers}}$contentType{{/exts.x-group-parameters}}{{#exts.x-group-parameters}}$associative_array{{/exts.x-group-parameters}}) ->then( function ($response) { return $response[0]; @@ -521,10 +499,10 @@ use Psr\Http\Message\ResponseInterface; {{/description}} * Example: https://github.com/hellosign/dropbox-sign-php/blob/main/examples/{{operationIdCamelCase}}Example.php * -{{#vendorExtensions.x-group-parameters}} +{{#exts.x-group-parameters}} * Note: the input parameter is an associative array with the keys listed as the parameter name below * -{{/vendorExtensions.x-group-parameters}} +{{/exts.x-group-parameters}} {{#servers}} {{#-first}} * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. @@ -546,7 +524,7 @@ use Psr\Http\Message\ResponseInterface; {{/-last}} {{/servers}} {{#allParams}} - * @param {{{dataType}}}{{^required}}|null{{/required}} ${{paramName}}{{#description}} {{.}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} + * @param {{{dataType}}}{{#notRequiredOrIsNullable}}|null{{/notRequiredOrIsNullable}} ${{paramName}}{{#description}} {{.}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} {{/allParams}} {{#servers}} {{#-first}} @@ -565,10 +543,10 @@ use Psr\Http\Message\ResponseInterface; * @deprecated {{/isDeprecated}} */ - public function {{operationId}}AsyncWithHttpInfo({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}{{^required}} = {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}, {{/allParams}}{{#servers}}{{#-first}}?int $hostIndex = null, array $variables = [], {{/-first}}{{/servers}}string $contentType = self::contentTypes['{{{operationId}}}'][0]{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associative_array{{/vendorExtensions.x-group-parameters}}) + public function {{operationId}}AsyncWithHttpInfo({{^exts.x-group-parameters}}{{#allParams}}${{paramName}}{{^required}} = {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}, {{/allParams}}{{#servers}}{{#-first}}?int $hostIndex = null, array $variables = [], {{/-first}}{{/servers}}string $contentType = self::contentTypes['{{{operationId}}}'][0]{{/exts.x-group-parameters}}{{#exts.x-group-parameters}}$associative_array{{/exts.x-group-parameters}}) { $returnType = '{{{returnType}}}'; - $request = $this->{{operationId}}Request({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}, {{/allParams}}{{#servers}}{{#-first}}$hostIndex, $variables, {{/-first}}{{/servers}}$contentType{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associative_array{{/vendorExtensions.x-group-parameters}}); + $request = $this->{{operationId}}Request({{^exts.x-group-parameters}}{{#allParams}}${{paramName}}, {{/allParams}}{{#servers}}{{#-first}}$hostIndex, $variables, {{/-first}}{{/servers}}$contentType{{/exts.x-group-parameters}}{{#exts.x-group-parameters}}$associative_array{{/exts.x-group-parameters}}); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -614,10 +592,10 @@ use Psr\Http\Message\ResponseInterface; /** * Create request for operation '{{{operationId}}}' * -{{#vendorExtensions.x-group-parameters}} +{{#exts.x-group-parameters}} * Note: the input parameter is an associative array with the keys listed as the parameter name below * -{{/vendorExtensions.x-group-parameters}} +{{/exts.x-group-parameters}} {{#servers}} {{#-first}} * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. @@ -639,7 +617,7 @@ use Psr\Http\Message\ResponseInterface; {{/-last}} {{/servers}} {{#allParams}} - * @param {{{dataType}}}{{^required}}|null{{/required}} ${{paramName}}{{#description}} {{.}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} + * @param {{{dataType}}}{{#notRequiredOrIsNullable}}|null{{/notRequiredOrIsNullable}} ${{paramName}}{{#description}} {{.}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} {{/allParams}} {{#servers}} {{#-first}} @@ -658,9 +636,9 @@ use Psr\Http\Message\ResponseInterface; * @deprecated {{/isDeprecated}} */ - public function {{operationId}}Request({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}{{^required}} = {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}, {{/allParams}}{{#servers}}{{#-first}}?int $hostIndex = null, array $variables = [], {{/-first}}{{/servers}}string $contentType = self::contentTypes['{{{operationId}}}'][0]{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associative_array{{/vendorExtensions.x-group-parameters}}) + public function {{operationId}}Request({{^exts.x-group-parameters}}{{#allParams}}${{paramName}}{{^required}} = {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}, {{/allParams}}{{#servers}}{{#-first}}?int $hostIndex = null, array $variables = [], {{/-first}}{{/servers}}string $contentType = self::contentTypes['{{{operationId}}}'][0]{{/exts.x-group-parameters}}{{#exts.x-group-parameters}}$associative_array{{/exts.x-group-parameters}}) { - {{#vendorExtensions.x-group-parameters}} + {{#exts.x-group-parameters}} // unbox the parameters from the associative array {{#allParams}} ${{paramName}} = array_key_exists('{{paramName}}', $associative_array) ? $associative_array['{{paramName}}'] : {{{defaultValue}}}{{^defaultValue}}null{{/defaultValue}}; @@ -669,7 +647,7 @@ use Psr\Http\Message\ResponseInterface; $variables = array_key_exists('variables', $associative_array) ? $associative_array['variables'] : []; {{/servers.0}} $contentType = $associative_array['contentType'] ?? self::contentTypes['{{{operationId}}}'][0]; - {{/vendorExtensions.x-group-parameters}}{{#allParams}} + {{/exts.x-group-parameters}}{{#allParams}} {{#required}} // verify the required parameter '{{paramName}}' is set if (${{paramName}} === null || (is_array(${{paramName}}) && count(${{paramName}}) === 0)) { @@ -765,7 +743,7 @@ use Psr\Http\Message\ResponseInterface; {{/collectionFormat}} if (${{paramName}} !== null) { $resourcePath = str_replace( - '{' . '{{baseName}}' . '}', + {{=<< >>=}}'{<>}'<<={{ }}=>>, ObjectSerializer::toPathValue(${{paramName}}), $resourcePath ); @@ -773,23 +751,19 @@ use Psr\Http\Message\ResponseInterface; {{/pathParams}} {{#formParams}} + {{#-first}} // form params - if (${{paramName}} !== null) { - {{#isFile}} - $multipart = true; - $formParams['{{baseName}}'] = []; - $paramFiles = is_array(${{paramName}}) ? ${{paramName}} : [${{paramName}}]; - foreach ($paramFiles as $paramFile) { - $formParams['{{baseName}}'][] = \GuzzleHttp\Psr7\Utils::tryFopen( - ObjectSerializer::toFormValue($paramFile), - 'rb' - ); - } - {{/isFile}} - {{^isFile}} - $formParams['{{baseName}}'] = ObjectSerializer::toFormValue(${{paramName}}); - {{/isFile}} - } + $formDataProcessor = new FormDataProcessor(); + + $formData = $formDataProcessor->prepare([ + {{/-first}} + '{{baseName}}' => ${{paramName}}, + {{#-last}} + ]); + + $formParams = $formDataProcessor->flatten($formData); + $multipart = $formDataProcessor->has_file; + {{/-last}} {{/formParams}} {{^useCustomTemplateCode}} @@ -818,7 +792,11 @@ use Psr\Http\Message\ResponseInterface; {{/useCustomTemplateCode}} if (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization(${{paramName}})); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization(${{paramName}}), JSON_THROW_ON_ERROR); + } catch (\JsonException $e) { + throw new \InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = ${{paramName}}; } @@ -858,7 +836,11 @@ use Psr\Http\Message\ResponseInterface; } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (\JsonException $e) { + throw new \InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -867,11 +849,13 @@ use Psr\Http\Message\ResponseInterface; {{#authMethods}} {{#isApiKey}} + {{^isKeyInCookie}} // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('{{keyParamName}}'); if ($apiKey !== null) { {{#isKeyInHeader}}$headers['{{keyParamName}}'] = $apiKey;{{/isKeyInHeader}}{{#isKeyInQuery}}$queryParams['{{keyParamName}}'] = $apiKey;{{/isKeyInQuery}} } + {{/isKeyInCookie}} {{/isApiKey}} {{#isBasic}} {{#isBasicBasic}} @@ -999,6 +983,14 @@ use Psr\Http\Message\ResponseInterface; } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } {{#useCustomTemplateCode}} @@ -1065,5 +1057,48 @@ use Psr\Http\Message\ResponseInterface; return true; } {{/useCustomTemplateCode}} + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response + ): array { + if ($dataType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== '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() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } {{/operations}} diff --git a/sdks/php/templates/api_doc.mustache b/sdks/php/templates/api_doc.mustache index 6a0b0fc04..79df0e6e1 100644 --- a/sdks/php/templates/api_doc.mustache +++ b/sdks/php/templates/api_doc.mustache @@ -1,6 +1,6 @@ -# {{invokerPackage}}\{{classname}}{{#description}} +# {{invokerPackage}}\{{classname}}{{#operationTagDescription}} -{{.}}{{/description}} +{{operationTagDescription}}{{/operationTagDescription}} {{^useCustomTemplateCode}} All URIs are relative to {{basePath}}, except if the operation defines another base path. @@ -48,20 +48,21 @@ All URIs are relative to {{basePath}}. require_once(__DIR__ . '/vendor/autoload.php'); {{> php_doc_auth_partial}} + $apiInstance = new {{invokerPackage}}\Api\{{classname}}( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(){{#hasAuthMethods}}, $config{{/hasAuthMethods}} ); -{{^vendorExtensions.x-group-parameters}} +{{^exts.x-group-parameters}} {{#allParams}}${{paramName}} = {{{example}}}; // {{{dataType}}}{{#description}} | {{{.}}}{{/description}} {{/allParams}}{{#servers}}{{#-first}} $hostIndex = 0; $variables = [{{#variables}} '{{{name}}}' => '{{{default}}}{{^default}}YOUR_VALUE{{/default}}',{{/variables}} ]; -{{/-first}}{{/servers}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}} +{{/-first}}{{/servers}}{{/exts.x-group-parameters}}{{#exts.x-group-parameters}} $associative_array = [ {{#allParams}} '{{paramName}}' => {{{example}}}, // {{{dataType}}}{{#description}} | {{{.}}}{{/description}} {{/allParams}} @@ -71,10 +72,10 @@ $associative_array = [ '{{{name}}}' => '{{{default}}}{{^default}}YOUR_VALUE{{/default}}',{{/variables}} ], {{/-first}}{{/servers}}]; -{{/vendorExtensions.x-group-parameters}} +{{/exts.x-group-parameters}} try { - {{#returnType}}$result = {{/returnType}}$apiInstance->{{{operationId}}}({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#servers}}{{#-first}}{{#allParams}}{{#-first}}, {{/-first}}{{/allParams}}$hostIndex, $variables{{/-first}}{{/servers}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associate_array{{/vendorExtensions.x-group-parameters}});{{#returnType}} + {{#returnType}}$result = {{/returnType}}$apiInstance->{{{operationId}}}({{^exts.x-group-parameters}}{{#allParams}}${{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#servers}}{{#-first}}{{#allParams}}{{#-first}}, {{/-first}}{{/allParams}}$hostIndex, $variables{{/-first}}{{/servers}}{{/exts.x-group-parameters}}{{#exts.x-group-parameters}}$associate_array{{/exts.x-group-parameters}});{{#returnType}} print_r($result);{{/returnType}} } catch (Exception $e) { echo 'Exception when calling {{classname}}->{{operationId}}: ', $e->getMessage(), PHP_EOL; @@ -87,7 +88,7 @@ REPLACE_ME_WITH_EXAMPLE_FOR__{{{operationId}}}_PHP_CODE ### Parameters -{{#vendorExtensions.x-group-parameters}} +{{#exts.x-group-parameters}} {{^useCustomTemplateCode}} Note: the input parameter is an associative array with the keys listed as the parameter names below. {{/useCustomTemplateCode}} @@ -95,7 +96,7 @@ Note: the input parameter is an associative array with the keys listed as the pa Note: the input parameter is an associative array with the keys listed as the parameter name below. {{/useCustomTemplateCode}} -{{/vendorExtensions.x-group-parameters}} +{{/exts.x-group-parameters}} {{^useCustomTemplateCode}} {{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}}| Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- |{{/-last}}{{/allParams}} diff --git a/sdks/php/templates/api_test.mustache b/sdks/php/templates/api_test.mustache index 0fc99231c..1bd6806e6 100644 --- a/sdks/php/templates/api_test.mustache +++ b/sdks/php/templates/api_test.mustache @@ -1,7 +1,7 @@ partial_header}} + /** * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -69,7 +70,7 @@ use PHPUnit\Framework\TestCase; * {{{summary}}}. * */ - public function test{{vendorExtensions.x-test-operation-id}}() + public function test{{exts.x-test-operation-id}}() { // TODO: implement self::markTestIncomplete('Not implemented'); diff --git a/sdks/php/templates/composer.mustache b/sdks/php/templates/composer.mustache index 5ca04c976..73f79ec40 100644 --- a/sdks/php/templates/composer.mustache +++ b/sdks/php/templates/composer.mustache @@ -39,7 +39,7 @@ } ], "require": { - "php": "^7.4 || ^8.0", + "php": "^8.1", "ext-curl": "*", "ext-json": "*", "ext-mbstring": "*", diff --git a/sdks/php/templates/libraries/psr-18/ApiException.mustache b/sdks/php/templates/libraries/psr-18/ApiException.mustache index 1b7d1a65a..f72339f4a 100644 --- a/sdks/php/templates/libraries/psr-18/ApiException.mustache +++ b/sdks/php/templates/libraries/psr-18/ApiException.mustache @@ -10,6 +10,7 @@ */ {{>partial_header}} + /** * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/sdks/php/templates/libraries/psr-18/DebugPlugin.mustache b/sdks/php/templates/libraries/psr-18/DebugPlugin.mustache index cf256a130..fd12920ed 100644 --- a/sdks/php/templates/libraries/psr-18/DebugPlugin.mustache +++ b/sdks/php/templates/libraries/psr-18/DebugPlugin.mustache @@ -10,6 +10,7 @@ */ {{>partial_header}} + /** * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/sdks/php/templates/libraries/psr-18/README.mustache b/sdks/php/templates/libraries/psr-18/README.mustache index 40a12d592..610ab3641 100644 --- a/sdks/php/templates/libraries/psr-18/README.mustache +++ b/sdks/php/templates/libraries/psr-18/README.mustache @@ -65,6 +65,7 @@ require_once(__DIR__ . '/vendor/autoload.php'); {{#apiInfo}}{{#apis}}{{#-first}}{{#operations}}{{#operation}}{{#-first}} {{> php_doc_auth_partial}} + $apiInstance = new {{invokerPackage}}\Api\{{classname}}( // If you want use custom http client, pass your client which implements `Psr\Http\Client\ClientInterface`. // This is optional, `Psr18ClientDiscovery` will be used to find http client. For instance `GuzzleHttp\Client` implements that interface diff --git a/sdks/php/templates/libraries/psr-18/api.mustache b/sdks/php/templates/libraries/psr-18/api.mustache index 7b286d94d..4bd8d16f9 100644 --- a/sdks/php/templates/libraries/psr-18/api.mustache +++ b/sdks/php/templates/libraries/psr-18/api.mustache @@ -10,6 +10,7 @@ */ {{>partial_header}} + /** * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -34,11 +35,13 @@ use {{invokerPackage}}\ApiException; use {{invokerPackage}}\Configuration; use {{invokerPackage}}\DebugPlugin; use {{invokerPackage}}\HeaderSelector; +use {{invokerPackage}}\FormDataProcessor; use {{invokerPackage}}\ObjectSerializer; use Psr\Http\Client\ClientExceptionInterface; use Psr\Http\Client\ClientInterface; use Psr\Http\Message\RequestFactoryInterface; use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\StreamFactoryInterface; use Psr\Http\Message\UriFactoryInterface; use Psr\Http\Message\UriInterface; @@ -175,10 +178,10 @@ use function sprintf; * {{.}} * {{/description}} -{{#vendorExtensions.x-group-parameters}} +{{#exts.x-group-parameters}} * Note: the input parameter is an associative array with the keys listed as the parameter name below * -{{/vendorExtensions.x-group-parameters}} +{{/exts.x-group-parameters}} {{#servers}} {{#-first}} * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. @@ -196,9 +199,9 @@ use function sprintf; * @throws \InvalidArgumentException * @return {{#returnType}}{{#responses}}{{#dataType}}{{^-first}}|{{/-first}}{{/dataType}}{{{dataType}}}{{/responses}}{{/returnType}}{{^returnType}}void{{/returnType}} */ - public function {{operationId}}({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}{{^required}} = {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associative_array{{/vendorExtensions.x-group-parameters}}) + public function {{operationId}}({{^exts.x-group-parameters}}{{#allParams}}${{paramName}}{{^required}} = {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{/exts.x-group-parameters}}{{#exts.x-group-parameters}}$associative_array{{/exts.x-group-parameters}}) { - {{#returnType}}list($response) = {{/returnType}}$this->{{operationId}}WithHttpInfo({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associative_array{{/vendorExtensions.x-group-parameters}});{{#returnType}} + {{#returnType}}list($response) = {{/returnType}}$this->{{operationId}}WithHttpInfo({{^exts.x-group-parameters}}{{#allParams}}${{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{/exts.x-group-parameters}}{{#exts.x-group-parameters}}$associative_array{{/exts.x-group-parameters}});{{#returnType}} return $response;{{/returnType}} } @@ -213,10 +216,10 @@ use function sprintf; * {{.}} * {{/description}} -{{#vendorExtensions.x-group-parameters}} +{{#exts.x-group-parameters}} * Note: the input parameter is an associative array with the keys listed as the parameter name below * -{{/vendorExtensions.x-group-parameters}} +{{/exts.x-group-parameters}} {{#servers}} {{#-first}} * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. @@ -234,9 +237,9 @@ use function sprintf; * @throws \InvalidArgumentException * @return array of {{#returnType}}{{#responses}}{{#dataType}}{{^-first}}|{{/-first}}{{/dataType}}{{{dataType}}}{{/responses}}{{/returnType}}{{^returnType}}null{{/returnType}}, HTTP status code, HTTP response headers (array of strings) */ - public function {{operationId}}WithHttpInfo({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}{{^required}} = {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associative_array{{/vendorExtensions.x-group-parameters}}) + public function {{operationId}}WithHttpInfo({{^exts.x-group-parameters}}{{#allParams}}${{paramName}}{{^required}} = {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{/exts.x-group-parameters}}{{#exts.x-group-parameters}}$associative_array{{/exts.x-group-parameters}}) { - $request = $this->{{operationId}}Request({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associative_array{{/vendorExtensions.x-group-parameters}}); + $request = $this->{{operationId}}Request({{^exts.x-group-parameters}}{{#allParams}}${{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{/exts.x-group-parameters}}{{#exts.x-group-parameters}}$associative_array{{/exts.x-group-parameters}}); try { try { @@ -263,6 +266,7 @@ use function sprintf; } $statusCode = $response->getStatusCode(); + {{#returnType}} {{#responses}} {{#-first}} @@ -270,57 +274,74 @@ use function sprintf; switch($statusCode) { {{/-first}} {{#dataType}} - {{^isWildcard}}case {{code}}:{{/isWildcard}}{{#isWildcard}}default:{{/isWildcard}} - if ('{{{dataType}}}' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '{{{dataType}}}', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + {{^isRange}}{{^isWildcard}}case {{code}}:{{/isWildcard}}{{#isWildcard}}default:{{/isWildcard}} + return $this->handleResponseWithDataType( + '{{{dataType}}}', + $request, + $response, + );{{/isRange}} {{/dataType}} {{#-last}} } {{/-last}} {{/responses}} - $returnType = '{{{returnType}}}'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); + {{#responses}}{{#dataType}}{{#isRange}}{{^isWildcard}}if ($this->responseWithinRangeCode('{{code}}', $statusCode)) { + return $this->handleResponseWithDataType( + '{{{dataType}}}', + $request, + $response, + ); + }{{/isWildcard}}{{/isRange}}{{/dataType}}{{/responses}} + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $request, + $response + ); } - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '{{{returnType}}}', + $request, + $response, + ); {{/returnType}} {{^returnType}} return [null, $statusCode, $response->getHeaders()]; {{/returnType}} - } catch (ApiException $e) { switch ($e->getCode()) { {{#responses}} {{#dataType}} - {{^isWildcard}}case {{code}}:{{/isWildcard}}{{#isWildcard}}default:{{/isWildcard}} + {{^isRange}}{{^isWildcard}}case {{code}}:{{/isWildcard}}{{#isWildcard}}default:{{/isWildcard}} $data = ObjectSerializer::deserialize( $e->getResponseBody(), '{{{dataType}}}', $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e;{{/isRange}} {{/dataType}} {{/responses}} } + {{#responses}}{{#dataType}}{{#isRange}}{{^isWildcard}} + if ($this->responseWithinRangeCode('{{code}}', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '{{{dataType}}}', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + }{{/isWildcard}}{{/isRange}}{{/dataType}}{{/responses}} + throw $e; } } @@ -336,10 +357,10 @@ use function sprintf; * {{.}} * {{/description}} -{{#vendorExtensions.x-group-parameters}} +{{#exts.x-group-parameters}} * Note: the input parameter is an associative array with the keys listed as the parameter name below * -{{/vendorExtensions.x-group-parameters}} +{{/exts.x-group-parameters}} {{#servers}} {{#-first}} * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. @@ -356,9 +377,9 @@ use function sprintf; * @throws \InvalidArgumentException * @return Promise */ - public function {{operationId}}Async({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}{{^required}} = {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associative_array{{/vendorExtensions.x-group-parameters}}) + public function {{operationId}}Async({{^exts.x-group-parameters}}{{#allParams}}${{paramName}}{{^required}} = {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{/exts.x-group-parameters}}{{#exts.x-group-parameters}}$associative_array{{/exts.x-group-parameters}}) { - return $this->{{operationId}}AsyncWithHttpInfo({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associative_array{{/vendorExtensions.x-group-parameters}}) + return $this->{{operationId}}AsyncWithHttpInfo({{^exts.x-group-parameters}}{{#allParams}}${{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{/exts.x-group-parameters}}{{#exts.x-group-parameters}}$associative_array{{/exts.x-group-parameters}}) ->then( function ($response) { return $response[0]; @@ -377,10 +398,10 @@ use function sprintf; * {{.}} * {{/description}} -{{#vendorExtensions.x-group-parameters}} +{{#exts.x-group-parameters}} * Note: the input parameter is an associative array with the keys listed as the parameter name below * -{{/vendorExtensions.x-group-parameters}} +{{/exts.x-group-parameters}} {{#servers}} {{#-first}} * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. @@ -397,10 +418,10 @@ use function sprintf; * @throws \InvalidArgumentException * @return Promise */ - public function {{operationId}}AsyncWithHttpInfo({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}{{^required}} = {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associative_array{{/vendorExtensions.x-group-parameters}}) + public function {{operationId}}AsyncWithHttpInfo({{^exts.x-group-parameters}}{{#allParams}}${{paramName}}{{^required}} = {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{/exts.x-group-parameters}}{{#exts.x-group-parameters}}$associative_array{{/exts.x-group-parameters}}) { $returnType = '{{{returnType}}}'; - $request = $this->{{operationId}}Request({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associative_array{{/vendorExtensions.x-group-parameters}}); + $request = $this->{{operationId}}Request({{^exts.x-group-parameters}}{{#allParams}}${{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{/exts.x-group-parameters}}{{#exts.x-group-parameters}}$associative_array{{/exts.x-group-parameters}}); return $this->httpAsyncClient->sendAsyncRequest($request) ->then( @@ -442,10 +463,10 @@ use function sprintf; /** * Create request for operation '{{{operationId}}}' * -{{#vendorExtensions.x-group-parameters}} +{{#exts.x-group-parameters}} * Note: the input parameter is an associative array with the keys listed as the parameter name below * -{{/vendorExtensions.x-group-parameters}} +{{/exts.x-group-parameters}} {{#servers}} {{#-first}} * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. @@ -462,15 +483,15 @@ use function sprintf; * @throws \InvalidArgumentException * @return RequestInterface */ - public function {{operationId}}Request({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}{{^required}} = {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associative_array{{/vendorExtensions.x-group-parameters}}) + public function {{operationId}}Request({{^exts.x-group-parameters}}{{#allParams}}${{paramName}}{{^required}} = {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{/exts.x-group-parameters}}{{#exts.x-group-parameters}}$associative_array{{/exts.x-group-parameters}}) { - {{#vendorExtensions.x-group-parameters}} + {{#exts.x-group-parameters}} // unbox the parameters from the associative array {{#allParams}} ${{paramName}} = array_key_exists('{{paramName}}', $associative_array) ? $associative_array['{{paramName}}'] : {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}; {{/allParams}} - {{/vendorExtensions.x-group-parameters}} + {{/exts.x-group-parameters}} {{#allParams}} {{#required}} // verify the required parameter '{{paramName}}' is set @@ -577,7 +598,7 @@ use function sprintf; {{/collectionFormat}} if (${{paramName}} !== null) { $resourcePath = str_replace( - '{' . '{{baseName}}' . '}', + {{=<< >>=}}'{<>}'<<={{ }}=>>, ObjectSerializer::toPathValue(${{paramName}}), $resourcePath ); @@ -585,23 +606,19 @@ use function sprintf; {{/pathParams}} {{#formParams}} + {{#-first}} // form params - if (${{paramName}} !== null) { - {{#isFile}} - $multipart = true; - $formParams['{{baseName}}'] = []; - $paramFiles = is_array(${{paramName}}) ? ${{paramName}} : [${{paramName}}]; - foreach ($paramFiles as $paramFile) { - $formParams['{{baseName}}'][] = \GuzzleHttp\Psr7\try_fopen( - ObjectSerializer::toFormValue($paramFile), - 'rb' - ); - } - {{/isFile}} - {{^isFile}} - $formParams['{{baseName}}'] = ObjectSerializer::toFormValue(${{paramName}}); - {{/isFile}} - } + $formDataProcessor = new FormDataProcessor(); + + $formData = $formDataProcessor->prepare([ + {{/-first}} + '{{baseName}}' => ${{paramName}}, + {{#-last}} + ]); + + $formParams = $formDataProcessor->flatten($formData); + $multipart = $formDataProcessor->has_file; + {{/-last}} {{/formParams}} $headers = $this->headerSelector->selectHeaders( @@ -769,5 +786,48 @@ use function sprintf; return $uri; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response + ): array { + if ($dataType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== '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() + ), + $request, + $response, + $exception + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } {{/operations}} diff --git a/sdks/php/templates/libraries/psr-18/api_doc.mustache b/sdks/php/templates/libraries/psr-18/api_doc.mustache index 3a794f7e5..3961eb23d 100644 --- a/sdks/php/templates/libraries/psr-18/api_doc.mustache +++ b/sdks/php/templates/libraries/psr-18/api_doc.mustache @@ -26,23 +26,24 @@ Method | HTTP request | Description require_once(__DIR__ . '/vendor/autoload.php'); {{> php_doc_auth_partial}} + $apiInstance = new {{invokerPackage}}\Api\{{classname}}( // If you want use custom http client, pass your client which implements `Psr\Http\Client\ClientInterface`. // This is optional, `Psr18ClientDiscovery` will be used to find http client. For instance `GuzzleHttp\Client` implements that interface new GuzzleHttp\Client(){{#hasAuthMethods}}, $config{{/hasAuthMethods}} ); -{{^vendorExtensions.x-group-parameters}} +{{^exts.x-group-parameters}} {{#allParams}}${{paramName}} = {{{example}}}; // {{{dataType}}}{{#description}} | {{{description}}}{{/description}} {{/allParams}} -{{/vendorExtensions.x-group-parameters}} -{{#vendorExtensions.x-group-parameters}} +{{/exts.x-group-parameters}} +{{#exts.x-group-parameters}} {{#allParams}}$associate_array['{{paramName}}'] = {{{example}}}; // {{{dataType}}}{{#description}} | {{{description}}}{{/description}} {{/allParams}} -{{/vendorExtensions.x-group-parameters}} +{{/exts.x-group-parameters}} try { - {{#returnType}}$result = {{/returnType}}$apiInstance->{{{operationId}}}({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associate_array{{/vendorExtensions.x-group-parameters}});{{#returnType}} + {{#returnType}}$result = {{/returnType}}$apiInstance->{{{operationId}}}({{^exts.x-group-parameters}}{{#allParams}}${{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{/exts.x-group-parameters}}{{#exts.x-group-parameters}}$associate_array{{/exts.x-group-parameters}});{{#returnType}} print_r($result);{{/returnType}} } catch (Exception $e) { echo 'Exception when calling {{classname}}->{{operationId}}: ', $e->getMessage(), PHP_EOL; @@ -51,10 +52,10 @@ try { ### Parameters -{{#vendorExtensions.x-group-parameters}} +{{#exts.x-group-parameters}} Note: the input parameter is an associative array with the keys listed as the parameter name below. -{{/vendorExtensions.x-group-parameters}} +{{/exts.x-group-parameters}} {{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}}Name | Type | Description | Notes ------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}} {{#allParams}} **{{paramName}}** | {{#isFile}}**{{{dataType}}}**{{/isFile}}{{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{^isFile}}[**{{{dataType}}}**](../Model/{{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{#defaultValue}} [default to {{defaultValue}}]{{/defaultValue}} diff --git a/sdks/php/templates/libraries/psr-18/composer.mustache b/sdks/php/templates/libraries/psr-18/composer.mustache index 7ef3e16b0..c1903bd45 100644 --- a/sdks/php/templates/libraries/psr-18/composer.mustache +++ b/sdks/php/templates/libraries/psr-18/composer.mustache @@ -1,7 +1,9 @@ { - "name": "{{gitUserId}}/{{gitRepoId}}", + {{#composerPackageName}} + "name": "{{{.}}}", + {{/composerPackageName}} {{#artifactVersion}} - "version": "{{artifactVersion}}", + "version": "{{{.}}}", {{/artifactVersion}} "description": "{{{appDescription}}}", "keywords": [ @@ -13,19 +15,19 @@ "rest", "api" ], - "homepage": "https://openapi-generator.tech", - "license": "unlicense", + "homepage": "{{{artifactUrl}}}", + "license": "{{{licenseName}}}", "authors": [ { - "name": "OpenAPI-Generator contributors", - "homepage": "https://openapi-generator.tech" + "name": "{{{developerOrganization}}}", + "homepage": "{{{developerOrganizationUrl}}}" } ], "config": { "sort-packages": true }, "require": { - "php": ">=7.2", + "php": "^8.1", "ext-curl": "*", "ext-json": "*", "ext-mbstring": "*", @@ -41,14 +43,14 @@ }, "require-dev": { "phpunit/phpunit": "^8.0 || ^9.0", - "friendsofphp/php-cs-fixer": "^2.12", + "friendsofphp/php-cs-fixer": "^3.5", "guzzlehttp/guzzle": "^7.0", "php-http/guzzle7-adapter": "^1.0" }, "autoload": { - "psr-4": { "{{escapedInvokerPackage}}\\" : "{{srcBasePath}}/" } + "psr-4": { "{{{escapedInvokerPackage}}}\\" : "{{{srcBasePath}}}/" } }, "autoload-dev": { - "psr-4": { "{{escapedInvokerPackage}}\\Test\\" : "{{testBasePath}}/" } + "psr-4": { "{{{escapedInvokerPackage}}}\\Test\\" : "{{{testBasePath}}}/" } } } diff --git a/sdks/php/templates/model.mustache b/sdks/php/templates/model.mustache index fe57ed7e5..edeaa7f8c 100644 --- a/sdks/php/templates/model.mustache +++ b/sdks/php/templates/model.mustache @@ -4,7 +4,7 @@ /** * {{classname}} * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package {{invokerPackage}} @@ -13,6 +13,7 @@ */ {{>partial_header}} + /** * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/sdks/php/templates/model_doc.mustache b/sdks/php/templates/model_doc.mustache index 935522686..f49e9fa51 100644 --- a/sdks/php/templates/model_doc.mustache +++ b/sdks/php/templates/model_doc.mustache @@ -1,4 +1,4 @@ -# {{#models}}{{#model}}# {{classname}} +{{#models}}{{#model}}# {{classname}} {{#useCustomTemplateCode}} {{unescapedDescription}} diff --git a/sdks/php/templates/model_generic.mustache b/sdks/php/templates/model_generic.mustache index 8838e1837..f3aee90b0 100644 --- a/sdks/php/templates/model_generic.mustache +++ b/sdks/php/templates/model_generic.mustache @@ -3,49 +3,49 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}}{{/parentSchema}}{{^par public const DISCRIMINATOR = {{#discriminator}}'{{discriminatorName}}'{{/discriminator}}{{^discriminator}}null{{/discriminator}}; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = '{{name}}'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ {{#vars}}'{{name}}' => '{{{dataType}}}'{{^-last}}, {{/-last}}{{/vars}} ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ {{#vars}}'{{name}}' => {{#dataFormat}}'{{{.}}}'{{/dataFormat}}{{^dataFormat}}null{{/dataFormat}}{{^-last}}, {{/-last}}{{/vars}} ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static array $openAPINullables = [ {{#vars}}'{{name}}' => {{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}}{{^-last}}, {{/-last}}{{/vars}} ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -290,19 +290,19 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}}{{/parentSchema}}{{^par {{/useCustomTemplateCode}} /** - * 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 $variableName - * @param array $fields + * 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 $variableName + * @param array $fields {{^useCustomTemplateCode}} - * @param mixed $defaultValue + * @param mixed $defaultValue {{/useCustomTemplateCode}} {{#useCustomTemplateCode}} -* @param string|int|object|array|mixed $defaultValue + * @param string|int|object|array|mixed $defaultValue {{/useCustomTemplateCode}} - */ + */ private function setIfExists(string $variableName, array $fields, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -328,8 +328,8 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}}{{/parentSchema}}{{^par {{#vars}} {{#required}} - if ($this->container['{{name}}'] === null) { - $invalidProperties[] = "'{{name}}' can't be null"; + if ($this->container['{{name}}'] === null{{#isNullable}} && !$this->isNullableSetToNull('{{name}}'){{/isNullable}}) { + $invalidProperties[] = "'{{name}}' {{^isNullable}}can't be null"{{/isNullable}}{{#isNullable}}is required"{{/isNullable}}; } {{/required}} {{#isEnum}} @@ -346,38 +346,40 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}}{{/parentSchema}}{{^par {{/isContainer}} {{/isEnum}} {{#hasValidation}} +{{#isString}} {{#maxLength}} - if ({{^required}}!is_null($this->container['{{name}}']) && {{/required}}(mb_strlen($this->container['{{name}}']) > {{maxLength}})) { + if ({{#notRequiredOrIsNullable}}!is_null($this->container['{{name}}']) && {{/notRequiredOrIsNullable}}(mb_strlen($this->container['{{name}}']) > {{maxLength}})) { $invalidProperties[] = "invalid value for '{{name}}', the character length must be smaller than or equal to {{{maxLength}}}."; } {{/maxLength}} {{#minLength}} - if ({{^required}}!is_null($this->container['{{name}}']) && {{/required}}(mb_strlen($this->container['{{name}}']) < {{minLength}})) { + if ({{#notRequiredOrIsNullable}}!is_null($this->container['{{name}}']) && {{/notRequiredOrIsNullable}}(mb_strlen($this->container['{{name}}']) < {{minLength}})) { $invalidProperties[] = "invalid value for '{{name}}', the character length must be bigger than or equal to {{{minLength}}}."; } {{/minLength}} +{{/isString}} {{#maximum}} - if ({{^required}}!is_null($this->container['{{name}}']) && {{/required}}($this->container['{{name}}'] >{{#exclusiveMaximum}}={{/exclusiveMaximum}} {{maximum}})) { + if ({{#notRequiredOrIsNullable}}!is_null($this->container['{{name}}']) && {{/notRequiredOrIsNullable}}($this->container['{{name}}'] >{{#exclusiveMaximum}}={{/exclusiveMaximum}} {{maximum}})) { $invalidProperties[] = "invalid value for '{{name}}', must be smaller than {{^exclusiveMaximum}}or equal to {{/exclusiveMaximum}}{{maximum}}."; } {{/maximum}} {{#minimum}} - if ({{^required}}!is_null($this->container['{{name}}']) && {{/required}}($this->container['{{name}}'] <{{#exclusiveMinimum}}={{/exclusiveMinimum}} {{minimum}})) { + if ({{#notRequiredOrIsNullable}}!is_null($this->container['{{name}}']) && {{/notRequiredOrIsNullable}}($this->container['{{name}}'] <{{#exclusiveMinimum}}={{/exclusiveMinimum}} {{minimum}})) { $invalidProperties[] = "invalid value for '{{name}}', must be bigger than {{^exclusiveMinimum}}or equal to {{/exclusiveMinimum}}{{minimum}}."; } {{/minimum}} {{#pattern}} - if ({{^required}}!is_null($this->container['{{name}}']) && {{/required}}!preg_match("{{{pattern}}}", $this->container['{{name}}'])) { + if ({{#notRequiredOrIsNullable}}!is_null($this->container['{{name}}']) && {{/notRequiredOrIsNullable}}!preg_match("{{{pattern}}}", $this->container['{{name}}'])) { $invalidProperties[] = "invalid value for '{{name}}', must be conform to the pattern {{{pattern}}}."; } {{/pattern}} {{#maxItems}} - if ({{^required}}!is_null($this->container['{{name}}']) && {{/required}}(count($this->container['{{name}}']) > {{maxItems}})) { + if ({{#notRequiredOrIsNullable}}!is_null($this->container['{{name}}']) && {{/notRequiredOrIsNullable}}(count($this->container['{{name}}']) > {{maxItems}})) { $invalidProperties[] = "invalid value for '{{name}}', number of items must be less than or equal to {{{maxItems}}}."; } @@ -409,7 +411,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}}{{/parentSchema}}{{^par /** * Gets {{name}} * - * @return {{{dataType}}}{{^required}}|null{{/required}} + * @return {{{dataType}}}{{#notRequiredOrIsNullable}}|null{{/notRequiredOrIsNullable}} {{#deprecated}} * @deprecated {{/deprecated}} @@ -422,7 +424,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}}{{/parentSchema}}{{^par /** * Sets {{name}} * - * @param {{{dataType}}}{{^required}}|null{{/required}} ${{name}}{{#description}} {{{.}}}{{/description}}{{^description}} {{{name}}}{{/description}} + * @param {{{dataType}}}{{#notRequiredOrIsNullable}}|null{{/notRequiredOrIsNullable}} ${{name}}{{#description}} {{{.}}}{{/description}}{{^description}} {{{name}}}{{/description}} * * @return self {{#deprecated}} @@ -478,6 +480,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}}{{/parentSchema}}{{^par {{/isContainer}} {{/isEnum}} {{#hasValidation}} +{{#isString}} {{#maxLength}} if ({{#isNullable}}!is_null(${{name}}) && {{/isNullable}}(mb_strlen(${{name}}) > {{maxLength}})) { throw new \InvalidArgumentException('invalid length for ${{name}} when calling {{classname}}.{{operationId}}, must be smaller than or equal to {{maxLength}}.'); @@ -487,6 +490,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}}{{/parentSchema}}{{^par throw new \InvalidArgumentException('invalid length for ${{name}} when calling {{classname}}.{{operationId}}, must be bigger than or equal to {{minLength}}.'); } {{/minLength}} +{{/isString}} {{#maximum}} if ({{#isNullable}}!is_null(${{name}}) && {{/isNullable}}(${{name}} >{{#exclusiveMaximum}}={{/exclusiveMaximum}} {{maximum}})) { throw new \InvalidArgumentException('invalid value for ${{name}} when calling {{classname}}.{{operationId}}, must be smaller than {{^exclusiveMaximum}}or equal to {{/exclusiveMaximum}}{{maximum}}.'); @@ -520,14 +524,14 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}}{{/parentSchema}}{{^par /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ {{#useCustomTemplateCode}} #[\ReturnTypeWillChange] {{/useCustomTemplateCode}} - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -535,12 +539,12 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}}{{/parentSchema}}{{^par /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -568,14 +572,14 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}}{{/parentSchema}}{{^par /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ {{#useCustomTemplateCode}} #[\ReturnTypeWillChange] {{/useCustomTemplateCode}} - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/sdks/php/templates/model_test.mustache b/sdks/php/templates/model_test.mustache index f1c46499b..f8b3a5abc 100644 --- a/sdks/php/templates/model_test.mustache +++ b/sdks/php/templates/model_test.mustache @@ -4,7 +4,7 @@ /** * {{classname}}Test * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package {{invokerPackage}} @@ -13,6 +13,7 @@ */ {{>partial_header}} + /** * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech