From deec368f50738e3ca01dfce32dda008c5ad78a34 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Wed, 4 Nov 2026 16:49:41 -0500 Subject: [PATCH] DX-3572 Update to Generator v7.27 --- .openapi-generator/VERSION | 2 +- README.md | 2 +- composer.json | 3 +- custom_templates/Configuration.mustache | 24 +- custom_templates/composer.mustache | 7 +- custom_templates/model_generic.mustache | 556 ------------------ openapitools.json | 2 +- src/Api/CallsApi.php | 131 +++-- src/Api/ConferencesApi.php | 201 +++++-- src/Api/EndpointsApi.php | 122 +++- src/Api/MFAApi.php | 72 ++- src/Api/MediaApi.php | 91 ++- src/Api/MessagesApi.php | 134 +++-- src/Api/MultiChannelApi.php | 34 +- src/Api/PhoneNumberLookupApi.php | 72 ++- src/Api/RecordingsApi.php | 217 +++++-- src/Api/StatisticsApi.php | 34 +- src/Api/TollFreeVerificationApi.php | 186 ++++-- src/Api/TranscriptionsApi.php | 72 ++- src/ApiException.php | 2 +- src/Configuration.php | 26 +- src/FormDataProcessor.php | 2 +- src/HeaderSelector.php | 2 +- src/Model/AccountStatistics.php | 2 +- src/Model/AdditionalDenialReason.php | 2 +- src/Model/Address.php | 2 +- src/Model/AnswerCallback.php | 2 +- src/Model/AnyOfInterface.php | 2 +- src/Model/AsyncLookupRequest.php | 2 +- src/Model/BlockedWebhook.php | 2 +- src/Model/BridgeCompleteCallback.php | 2 +- src/Model/BridgeTargetCompleteCallback.php | 2 +- src/Model/BrtcError.php | 2 +- src/Model/BrtcErrorResponse.php | 2 +- src/Model/BrtcErrorSource.php | 2 +- src/Model/BrtcLink.php | 2 +- src/Model/BusinessEntityTypeEnum.php | 2 +- src/Model/BusinessRegistrationTypeEnum.php | 2 +- src/Model/CallDirectionEnum.php | 2 +- src/Model/CallRecordingMetadata.php | 2 +- src/Model/CallState.php | 2 +- src/Model/CallStateEnum.php | 2 +- src/Model/CallTranscription.php | 2 +- .../CallTranscriptionDetectedLanguageEnum.php | 2 +- src/Model/CallTranscriptionMetadata.php | 2 +- src/Model/CallTranscriptionResponse.php | 2 +- src/Model/CallTranscriptionTrackEnum.php | 2 +- src/Model/Callback.php | 2 +- src/Model/CallbackMethodEnum.php | 2 +- src/Model/CardWidthEnum.php | 2 +- src/Model/CodeRequest.php | 2 +- src/Model/CompletedLookupStatusEnum.php | 2 +- src/Model/Conference.php | 2 +- src/Model/ConferenceCompletedCallback.php | 2 +- src/Model/ConferenceCreatedCallback.php | 2 +- src/Model/ConferenceMember.php | 2 +- src/Model/ConferenceMemberExitCallback.php | 2 +- src/Model/ConferenceMemberJoinCallback.php | 2 +- .../ConferenceRecordingAvailableCallback.php | 2 +- src/Model/ConferenceRecordingMetadata.php | 2 +- src/Model/ConferenceRedirectCallback.php | 2 +- src/Model/ConferenceStateEnum.php | 2 +- src/Model/Contact.php | 2 +- src/Model/CreateAsyncBulkLookupResponse.php | 2 +- .../CreateAsyncBulkLookupResponseData.php | 2 +- src/Model/CreateCall.php | 2 +- src/Model/CreateCallResponse.php | 2 +- src/Model/CreateEndpointRequestBase.php | 2 +- src/Model/CreateEndpointResponse.php | 2 +- src/Model/CreateEndpointResponseData.php | 2 +- src/Model/CreateMessageRequestError.php | 2 +- .../CreateMultiChannelMessageResponse.php | 2 +- src/Model/CreateSyncLookupResponse.php | 2 +- src/Model/CreateSyncLookupResponseData.php | 2 +- src/Model/CreateWebRtcConnectionRequest.php | 2 +- src/Model/DeactivationEventEnum.php | 2 +- src/Model/Device.php | 2 +- src/Model/DeviceStatusEnum.php | 2 +- src/Model/DisconnectCallback.php | 2 +- src/Model/Diversion.php | 2 +- src/Model/DtmfCallback.php | 2 +- src/Model/Endpoint.php | 2 +- src/Model/EndpointDirectionEnum.php | 2 +- src/Model/EndpointEvent.php | 2 +- src/Model/EndpointEventTypeEnum.php | 2 +- src/Model/EndpointResponse.php | 2 +- src/Model/EndpointStatusEnum.php | 2 +- src/Model/EndpointTypeEnum.php | 2 +- src/Model/Endpoints.php | 2 +- src/Model/ErrorObject.php | 2 +- src/Model/ErrorSource.php | 2 +- src/Model/FailureWebhook.php | 2 +- src/Model/FieldError.php | 2 +- src/Model/FileFormatEnum.php | 2 +- src/Model/GatherCallback.php | 2 +- src/Model/GetAsyncBulkLookupResponse.php | 2 +- src/Model/GetAsyncBulkLookupResponseData.php | 2 +- src/Model/InProgressLookupStatusEnum.php | 2 +- src/Model/InboundCallback.php | 2 +- src/Model/InboundCallbackMessage.php | 2 +- src/Model/InboundCallbackTypeEnum.php | 2 +- src/Model/InitiateCallback.php | 2 +- src/Model/LatestMessageDeliveryStatusEnum.php | 2 +- src/Model/LineTypeEnum.php | 2 +- src/Model/Link.php | 2 +- src/Model/LinkSchema.php | 2 +- src/Model/LinksObject.php | 2 +- src/Model/ListEndpointsResponse.php | 2 +- src/Model/ListMessageDirectionEnum.php | 2 +- src/Model/ListMessageItem.php | 2 +- src/Model/LookupErrorResponse.php | 2 +- src/Model/LookupErrorSchema.php | 2 +- src/Model/LookupErrorSchemaMeta.php | 2 +- src/Model/LookupResult.php | 2 +- .../MachineDetectionCompleteCallback.php | 2 +- src/Model/MachineDetectionConfiguration.php | 2 +- src/Model/MachineDetectionModeEnum.php | 2 +- src/Model/MachineDetectionResult.php | 2 +- src/Model/Media.php | 2 +- src/Model/Message.php | 2 +- src/Model/MessageDirectionEnum.php | 2 +- src/Model/MessageRequest.php | 2 +- src/Model/MessageStatusEnum.php | 2 +- src/Model/MessageTypeEnum.php | 2 +- src/Model/MessagesList.php | 2 +- src/Model/MessagingCodeResponse.php | 2 +- src/Model/MessagingRequestError.php | 2 +- src/Model/MfaForbiddenRequestError.php | 2 +- src/Model/MfaRequestError.php | 2 +- src/Model/MfaUnauthorizedRequestError.php | 2 +- src/Model/MmsMessageContent.php | 2 +- src/Model/MmsMessageContentFile.php | 2 +- src/Model/ModelInterface.php | 2 +- src/Model/MultiChannelAction.php | 2 +- src/Model/MultiChannelActionCalendarEvent.php | 2 +- .../MultiChannelChannelListMMSObject.php | 2 +- ...ltiChannelChannelListMMSResponseObject.php | 2 +- .../MultiChannelChannelListObjectBase.php | 2 +- .../MultiChannelChannelListOwnerObject.php | 2 +- .../MultiChannelChannelListRBMObject.php | 2 +- ...hannelChannelListRBMObjectAllOfContent.php | 2 +- ...ltiChannelChannelListRBMResponseObject.php | 2 +- .../MultiChannelChannelListRequestObject.php | 2 +- .../MultiChannelChannelListResponseObject.php | 2 +- .../MultiChannelChannelListSMSObject.php | 2 +- ...ltiChannelChannelListSMSResponseObject.php | 2 +- src/Model/MultiChannelError.php | 2 +- src/Model/MultiChannelMessageChannelEnum.php | 2 +- src/Model/MultiChannelMessageContent.php | 2 +- src/Model/MultiChannelMessageRequest.php | 2 +- src/Model/MultiChannelMessageResponseData.php | 2 +- src/Model/OneOfInterface.php | 2 +- src/Model/OptInWorkflow.php | 2 +- src/Model/Page.php | 2 +- src/Model/PageInfo.php | 2 +- src/Model/PriorityEnum.php | 2 +- src/Model/ProductTypeEnum.php | 2 +- src/Model/RbmActionBase.php | 2 +- src/Model/RbmActionDial.php | 2 +- src/Model/RbmActionOpenUrl.php | 2 +- src/Model/RbmActionTypeEnum.php | 2 +- src/Model/RbmActionViewLocation.php | 2 +- src/Model/RbmCardContent.php | 2 +- src/Model/RbmCardContentMedia.php | 2 +- src/Model/RbmLocationResponse.php | 2 +- src/Model/RbmMediaHeightEnum.php | 2 +- src/Model/RbmMessageCarouselCard.php | 2 +- src/Model/RbmMessageContentFile.php | 2 +- src/Model/RbmMessageContentRichCard.php | 2 +- src/Model/RbmMessageContentText.php | 2 +- src/Model/RbmMessageMedia.php | 2 +- src/Model/RbmOpenUrlEnum.php | 2 +- src/Model/RbmSession.php | 2 +- src/Model/RbmStandaloneCard.php | 2 +- src/Model/RbmSuggestionResponse.php | 2 +- src/Model/RbmWebViewEnum.php | 2 +- src/Model/RecordingAvailableCallback.php | 2 +- src/Model/RecordingCompleteCallback.php | 2 +- src/Model/RecordingStateEnum.php | 2 +- src/Model/RecordingTranscriptionClip.php | 2 +- src/Model/RecordingTranscriptionMetadata.php | 2 +- src/Model/RecordingTranscriptions.php | 2 +- src/Model/RedirectCallback.php | 2 +- src/Model/RedirectMethodEnum.php | 2 +- src/Model/ReferCallStatusEnum.php | 2 +- src/Model/ReferCompleteCallback.php | 2 +- src/Model/SipConnectionMetadata.php | 2 +- src/Model/SipCredentials.php | 2 +- src/Model/SmsMessageContent.php | 2 +- src/Model/StandaloneCardOrientationEnum.php | 2 +- src/Model/StatusCallback.php | 2 +- src/Model/StatusCallbackMessage.php | 2 +- src/Model/StatusCallbackTypeEnum.php | 2 +- src/Model/StirShaken.php | 2 +- src/Model/SyncLookupRequest.php | 2 +- src/Model/TelephoneNumber.php | 2 +- src/Model/TfvBasicAuthentication.php | 2 +- src/Model/TfvCallbackStatusEnum.php | 2 +- src/Model/TfvError.php | 2 +- src/Model/TfvStatus.php | 2 +- src/Model/TfvStatusEnum.php | 2 +- src/Model/TfvSubmissionInfo.php | 2 +- src/Model/TfvSubmissionWrapper.php | 2 +- src/Model/ThumbnailAlignmentEnum.php | 2 +- src/Model/TranscribeRecording.php | 2 +- src/Model/Transcription.php | 2 +- src/Model/TranscriptionAvailableCallback.php | 2 +- src/Model/TransferAnswerCallback.php | 2 +- src/Model/TransferCompleteCallback.php | 2 +- src/Model/TransferDisconnectCallback.php | 2 +- src/Model/UpdateCall.php | 2 +- src/Model/UpdateCallRecording.php | 2 +- src/Model/UpdateConference.php | 2 +- src/Model/UpdateConferenceMember.php | 2 +- src/Model/VerificationDenialWebhook.php | 2 +- src/Model/VerificationRequest.php | 2 +- src/Model/VerificationUpdateRequest.php | 2 +- src/Model/VerificationWebhook.php | 2 +- src/Model/VerifyCodeRequest.php | 2 +- src/Model/VerifyCodeResponse.php | 2 +- src/Model/VoiceApiError.php | 2 +- src/Model/VoiceCodeResponse.php | 2 +- src/Model/WebhookSubscription.php | 2 +- ...WebhookSubscriptionBasicAuthentication.php | 2 +- src/Model/WebhookSubscriptionError.php | 2 +- .../WebhookSubscriptionRequestSchema.php | 2 +- src/Model/WebhookSubscriptionTypeEnum.php | 2 +- src/Model/WebhookSubscriptionsListBody.php | 2 +- src/ObjectSerializer.php | 32 +- 229 files changed, 1294 insertions(+), 1142 deletions(-) delete mode 100644 custom_templates/model_generic.mustache diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index bc34d812..f6b1800f 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -7.25.0 +7.27.0 diff --git a/README.md b/README.md index 3ac4da26..719ef434 100644 --- a/README.md +++ b/README.md @@ -353,5 +353,5 @@ letstalk@bandwidth.com This PHP package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: `1.0.0` - - Generator version: `7.25.0` + - Generator version: `7.27.0` - Build package: `org.openapitools.codegen.languages.PhpNextgenClientCodegen` diff --git a/composer.json b/composer.json index 27d58978..f603c308 100644 --- a/composer.json +++ b/composer.json @@ -25,7 +25,8 @@ "ext-json": "*", "ext-mbstring": "*", "guzzlehttp/guzzle": "^7.4.5", - "guzzlehttp/psr7": "^2.0" + "guzzlehttp/psr7": "^2.0", + "psr/http-client": "^1.0" }, "require-dev": { "friendsofphp/php-cs-fixer": "^3.5", diff --git a/custom_templates/Configuration.mustache b/custom_templates/Configuration.mustache index bfbec30e..3de19399 100644 --- a/custom_templates/Configuration.mustache +++ b/custom_templates/Configuration.mustache @@ -191,14 +191,18 @@ class Configuration /** * Sets API key * - * @param string $apiKeyIdentifier API key identifier (authentication scheme) - * @param string $key API key or token + * @param string $apiKeyIdentifier API key identifier (authentication scheme) + * @param string|null $key API key or token * * @return $this */ - public function setApiKey(string $apiKeyIdentifier, string $key): static + public function setApiKey(string $apiKeyIdentifier, ?string $key): static { - $this->apiKeys[$apiKeyIdentifier] = $key; + if ($key === null) { + unset($this->apiKeys[$apiKeyIdentifier]); + } else { + $this->apiKeys[$apiKeyIdentifier] = $key; + } return $this; } @@ -217,14 +221,18 @@ class Configuration /** * Sets the prefix for API key (e.g. Bearer) * - * @param string $apiKeyIdentifier API key identifier (authentication scheme) - * @param string $prefix API key prefix, e.g. Bearer + * @param string $apiKeyIdentifier API key identifier (authentication scheme) + * @param string|null $prefix API key prefix, e.g. Bearer * * @return $this */ - public function setApiKeyPrefix(string $apiKeyIdentifier, string $prefix): static + public function setApiKeyPrefix(string $apiKeyIdentifier, ?string $prefix): static { - $this->apiKeyPrefixes[$apiKeyIdentifier] = $prefix; + if ($prefix === null) { + unset($this->apiKeyPrefixes[$apiKeyIdentifier]); + } else { + $this->apiKeyPrefixes[$apiKeyIdentifier] = $prefix; + } return $this; } diff --git a/custom_templates/composer.mustache b/custom_templates/composer.mustache index 4251d341..cec1d77c 100644 --- a/custom_templates/composer.mustache +++ b/custom_templates/composer.mustache @@ -1,5 +1,7 @@ { - "name": "bandwidth/sdk", + {{#composerPackageName}} + "name": "{{.}}", + {{/composerPackageName}} {{#artifactVersion}} "version": "{{.}}", {{/artifactVersion}} @@ -28,7 +30,8 @@ "ext-json": "*", "ext-mbstring": "*", "guzzlehttp/guzzle": "^7.4.5", - "guzzlehttp/psr7": "^2.0" + "guzzlehttp/psr7": "^2.0", + "psr/http-client": "^1.0" }, "require-dev": { "friendsofphp/php-cs-fixer": "^3.5", diff --git a/custom_templates/model_generic.mustache b/custom_templates/model_generic.mustache deleted file mode 100644 index 6d3d5cd8..00000000 --- a/custom_templates/model_generic.mustache +++ /dev/null @@ -1,556 +0,0 @@ -class {{classname}} {{#parentSchema}}extends {{{parent}}}{{/parentSchema}}{{^parentSchema}}implements ModelInterface, ArrayAccess, JsonSerializable{{/parentSchema}} -{ - public const DISCRIMINATOR = {{#discriminator}}'{{discriminatorName}}'{{/discriminator}}{{^discriminator}}null{{/discriminator}}; - - /** - * The original name of the model. - * - * @var string - */ - protected static string $openAPIModelName = '{{name}}'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var array - */ - protected static array $openAPITypes = [ - {{#vars}}'{{name}}' => '{{{dataType}}}'{{^-last}}, - {{/-last}}{{/vars}} - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var array - */ - protected static array $openAPIFormats = [ - {{#vars}}'{{name}}' => {{#dataFormat}}'{{{.}}}'{{/dataFormat}}{{^dataFormat}}null{{/dataFormat}}{{^-last}}, - {{/-last}}{{/vars}} - ]; - - /** - * Array of nullable properties. Used for (de)serialization - * - * @var array - */ - 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 array - */ - protected array $openAPINullablesSetToNull = []; - - /** - * {@inheritdoc} - */ - public static function openAPITypes(): array - { - return self::$openAPITypes{{#parentSchema}} + parent::openAPITypes(){{/parentSchema}}; - } - - /** - * {@inheritdoc} - */ - public static function openAPIFormats(): array - { - return self::$openAPIFormats{{#parentSchema}} + parent::openAPIFormats(){{/parentSchema}}; - } - - /** - * Array of nullable properties - * - * @return array - */ - protected static function openAPINullables(): array - { - return self::$openAPINullables{{#parentSchema}} + parent::openAPINullables(){{/parentSchema}}; - } - - /** - * Array of nullable field names deliberately set to null - * - * @return array - */ - private function getOpenAPINullablesSetToNull(): array - { - return $this->openAPINullablesSetToNull; - } - - /** - * Setter - Array of nullable field names deliberately set to null - * - * @param array $openAPINullablesSetToNull - */ - private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void - { - $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; - } - - /** - * {@inheritdoc} - */ - public static function isNullable(string $property): bool - { - return self::openAPINullables()[$property] ?? false; - } - - /** - * {@inheritdoc} - */ - public function isNullableSetToNull(string $property): bool - { - return in_array($property, $this->getOpenAPINullablesSetToNull(), true); - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var array - */ - protected static array $attributeMap = [ - {{#vars}}'{{name}}' => '{{baseName}}'{{^-last}}, - {{/-last}}{{/vars}} - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var array - */ - protected static array $setters = [ - {{#vars}}'{{name}}' => '{{setter}}'{{^-last}}, - {{/-last}}{{/vars}} - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var array - */ - protected static array $getters = [ - {{#vars}}'{{name}}' => '{{getter}}'{{^-last}}, - {{/-last}}{{/vars}} - ]; - - /** - * {@inheritdoc} - */ - public static function attributeMap(): array - { - return {{#parentSchema}}parent::attributeMap() + {{/parentSchema}}self::$attributeMap; - } - - /** - * {@inheritdoc} - */ - public static function setters(): array - { - return {{#parentSchema}}parent::setters() + {{/parentSchema}}self::$setters; - } - - /** - * {@inheritdoc} - */ - public static function getters(): array - { - return {{#parentSchema}}parent::getters() + {{/parentSchema}}self::$getters; - } - - /** - * {@inheritdoc} - */ - public function getModelName(): string - { - return self::$openAPIModelName; - } - -{{#discriminator}} -{{#discriminator.mappedModels}} - public const {{#lambda.uppercase}}{{discriminator.propertyName}}_{{#lambda.snakecase}}{{mappingName}}{{/lambda.snakecase}}{{/lambda.uppercase}} = '{{mappingName}}'; -{{/discriminator.mappedModels}} -{{/discriminator}} - {{#vars}} - {{#isEnum}} - {{^isDiscriminator}} - {{#allowableValues}} - {{#enumVars}} - public const {{enumName}}_{{{name}}} = {{{value}}}; - {{/enumVars}} - {{/allowableValues}} - {{/isDiscriminator}} - {{/isEnum}} - {{/vars}} - - {{#vars}} - {{#isEnum}} - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public static function {{getter}}AllowableValues() - { - return [ -{{#isDiscriminator}} -{{#discriminator.mappedModels}} - self::{{#lambda.uppercase}}{{discriminator.propertyName}}_{{#lambda.snakecase}}{{mappingName}}{{/lambda.snakecase}}{{/lambda.uppercase}},{{^-last}} -{{/-last}}{{/discriminator.mappedModels}} -{{/isDiscriminator}} -{{^isDiscriminator}} - {{#allowableValues}}{{#enumVars}}self::{{enumName}}_{{{name}}},{{^-last}} - {{/-last}}{{/enumVars}}{{/allowableValues}} -{{/isDiscriminator}} - ]; - } - - {{/isEnum}} - {{/vars}} - {{^parentSchema}} - /** - * Associative array for storing property values - * - * @var array - */ - protected array $container = []; - {{/parentSchema}} - - /** - * Constructor - * - * @param array $data Associated array of property values initializing the model - */ - public function __construct(?array $data = null) - { - {{#discriminator}} - // Initialize discriminator property with the model name. - $this->container['{{discriminatorName}}'] = static::$openAPIModelName; - - {{/discriminator}} - {{#parentSchema}} - parent::__construct($data); - - {{/parentSchema}} - {{#vars}} - $this->setIfExists('{{name}}', $data ?? [], {{#defaultValue}}{{{defaultValue}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}); - {{/vars}} - } - - /** - * 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 - * @param mixed $defaultValue - */ - private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void - { - if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { - $this->openAPINullablesSetToNull[] = $variableName; - } - - $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; - } - - /** - * {@inheritdoc} - */ - public function listInvalidProperties(): array - { - {{#parentSchema}} - $invalidProperties = parent::listInvalidProperties(); - {{/parentSchema}} - {{^parentSchema}} - $invalidProperties = []; - {{/parentSchema}} - - {{#vars}} - {{#required}} - if ($this->container['{{name}}'] === null{{#isNullable}} && !$this->isNullableSetToNull('{{name}}'){{/isNullable}}) { - $invalidProperties[] = "'{{name}}' {{^isNullable}}can't be null"{{/isNullable}}{{#isNullable}}is required"{{/isNullable}}; - } - {{/required}} - {{#isEnum}} - {{^isContainer}} - $allowedValues = self::{{getter}}AllowableValues(); - if (!is_null($this->container['{{name}}']) && !in_array($this->container['{{name}}'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for '{{name}}', must be one of '%s'", - $this->container['{{name}}'], - implode("', '", $allowedValues) - ); - } - - {{/isContainer}} - {{/isEnum}} - {{#hasValidation}} -{{#isString}} - {{#maxLength}} - if (!is_null($this->container['{{name}}']) && (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 (!is_null($this->container['{{name}}']) && (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 (!is_null($this->container['{{name}}']) && ($this->container['{{name}}'] >{{#exclusiveMaximum}}={{/exclusiveMaximum}} {{maximum}})) { - $invalidProperties[] = "invalid value for '{{name}}', must be smaller than {{^exclusiveMaximum}}or equal to {{/exclusiveMaximum}}{{maximum}}."; - } - - {{/maximum}} - {{#minimum}} - if (!is_null($this->container['{{name}}']) && ($this->container['{{name}}'] <{{#exclusiveMinimum}}={{/exclusiveMinimum}} {{minimum}})) { - $invalidProperties[] = "invalid value for '{{name}}', must be bigger than {{^exclusiveMinimum}}or equal to {{/exclusiveMinimum}}{{minimum}}."; - } - - {{/minimum}} - {{#pattern}} - if (!is_null($this->container['{{name}}']) && !preg_match("{{{pattern}}}", $this->container['{{name}}'])) { - $invalidProperties[] = "invalid value for '{{name}}', must be conform to the pattern {{{pattern}}}."; - } - - {{/pattern}} - {{#maxItems}} - if (!is_null($this->container['{{name}}']) && (count($this->container['{{name}}']) > {{maxItems}})) { - $invalidProperties[] = "invalid value for '{{name}}', number of items must be less than or equal to {{{maxItems}}}."; - } - - {{/maxItems}} - {{#minItems}} - if (!is_null($this->container['{{name}}']) && (count($this->container['{{name}}']) < {{minItems}})) { - $invalidProperties[] = "invalid value for '{{name}}', number of items must be greater than or equal to {{{minItems}}}."; - } - - {{/minItems}} - {{/hasValidation}} - {{/vars}} - return $invalidProperties; - } - - /** - * {@inheritdoc} - */ - public function valid(): bool - { - return count($this->listInvalidProperties()) === 0; - } - - {{#vars}} - - /** - * Gets {{name}} - * - * @return {{{exts.x-php-prop-doc-type}}} - {{#deprecated}} - * @deprecated - {{/deprecated}} - */ - public function {{getter}}(): {{exts.x-php-prop-type}} - { - return $this->container['{{name}}']; - } - - /** - * Sets {{name}} - * - * @param {{{exts.x-php-prop-doc-type}}} ${{name}}{{#description}} {{{.}}}{{/description}}{{^description}} {{{name}}}{{/description}} - * - * @return $this - {{#deprecated}} - * @deprecated - {{/deprecated}} - */ - public function {{setter}}({{exts.x-php-prop-type}} ${{name}}): static - { - {{#isNullable}} - if (is_null(${{name}})) { - array_push($this->openAPINullablesSetToNull, '{{name}}'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('{{name}}', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - {{/isNullable}} - {{^isNullable}} - if (is_null(${{name}})) { - throw new InvalidArgumentException('non-nullable {{name}} cannot be null'); - } - {{/isNullable}} - {{#isEnum}} - $allowedValues = self::{{getter}}AllowableValues(); - {{^isContainer}} - if ({{#isNullable}}!is_null(${{name}}) && {{/isNullable}}!in_array(${{{name}}}, $allowedValues, true)) { - {{#enumUnknownDefaultCase}} - ${{name}} = {{#allowableValues}}{{#enumVars}}{{#-last}}self::{{enumName}}_{{{name}}};{{/-last}}{{/enumVars}}{{/allowableValues}} - {{/enumUnknownDefaultCase}} - {{^enumUnknownDefaultCase}} - throw new InvalidArgumentException( - sprintf( - "Invalid value '%s' for '{{name}}', must be one of '%s'", - ${{{name}}}, - implode("', '", $allowedValues) - ) - ); - {{/enumUnknownDefaultCase}} - } - {{/isContainer}} - {{#isContainer}} - if ({{#isNullable}}!is_null(${{name}}) && {{/isNullable}}array_diff(${{{name}}}, $allowedValues)) { - throw new InvalidArgumentException( - sprintf( - "Invalid value for '{{name}}', must be one of '%s'", - implode("', '", $allowedValues) - ) - ); - } - {{/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}}.'); - }{{/maxLength}} - {{#minLength}} - if ({{#isNullable}}!is_null(${{name}}) && {{/isNullable}}(mb_strlen(${{name}}) < {{minLength}})) { - 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}}.'); - } - {{/maximum}} - {{#minimum}} - if ({{#isNullable}}!is_null(${{name}}) && {{/isNullable}}(${{name}} <{{#exclusiveMinimum}}={{/exclusiveMinimum}} {{minimum}})) { - throw new InvalidArgumentException('invalid value for ${{name}} when calling {{classname}}.{{operationId}}, must be bigger than {{^exclusiveMinimum}}or equal to {{/exclusiveMinimum}}{{minimum}}.'); - } - {{/minimum}} - {{#pattern}} - if ({{#isNullable}}!is_null(${{name}}) && {{/isNullable}}(!preg_match("{{{pattern}}}", ObjectSerializer::toString(${{name}})))) { - throw new InvalidArgumentException("invalid value for \${{name}} when calling {{classname}}.{{operationId}}, must conform to the pattern {{{pattern}}}."); - } - {{/pattern}} - {{#maxItems}} - if ({{#isNullable}}!is_null(${{name}}) && {{/isNullable}}(count(${{name}}) > {{maxItems}})) { - throw new InvalidArgumentException('invalid value for ${{name}} when calling {{classname}}.{{operationId}}, number of items must be less than or equal to {{maxItems}}.'); - }{{/maxItems}} - {{#minItems}} - if ({{#isNullable}}!is_null(${{name}}) && {{/isNullable}}(count(${{name}}) < {{minItems}})) { - throw new InvalidArgumentException('invalid length for ${{name}} when calling {{classname}}.{{operationId}}, number of items must be greater than or equal to {{minItems}}.'); - } - {{/minItems}} - {{/hasValidation}} - $this->container['{{name}}'] = ${{name}}; - - return $this; - } - {{/vars}} - /** - * Returns true if offset exists. False otherwise. - * - * @param int|string $offset Offset - * - * @return boolean - */ - public function offsetExists(mixed $offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param int|string $offset Offset - * - * @return mixed|null - */ - #[ReturnTypeWillChange] - public function offsetGet(mixed $offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|string|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet(mixed $offset, mixed $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param int|string $offset Offset - * - * @return void - */ - public function offsetUnset(mixed $offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - #[ReturnTypeWillChange] - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue(): string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} diff --git a/openapitools.json b/openapitools.json index 8dd0d745..9539aec7 100644 --- a/openapitools.json +++ b/openapitools.json @@ -2,6 +2,6 @@ "$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json", "spaces": 2, "generator-cli": { - "version": "7.25.0" + "version": "7.27.0" } } diff --git a/src/Api/CallsApi.php b/src/Api/CallsApi.php index 42fc7825..b6aa1a93 100644 --- a/src/Api/CallsApi.php +++ b/src/Api/CallsApi.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** @@ -30,11 +30,11 @@ use InvalidArgumentException; use GuzzleHttp\Client; use GuzzleHttp\ClientInterface; -use GuzzleHttp\Exception\ConnectException; use GuzzleHttp\Exception\RequestException; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Client\NetworkExceptionInterface; use Psr\Http\Message\RequestInterface; use Psr\Http\Message\ResponseInterface; use Bandwidth\ApiException; @@ -201,13 +201,14 @@ public function createCallWithHttpInfo( try { $response = $this->client->send($request, $options); } catch (RequestException $e) { + $eResponse = $this->getExceptionResponse($e); throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null + $eResponse?->getHeaders(), + $eResponse ? (string) $eResponse->getBody() : null ); - } catch (ConnectException $e) { + } catch (NetworkExceptionInterface $e) { throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), @@ -456,7 +457,15 @@ function ($response) use ($returnType) { ]; }, function ($exception) { - $response = $exception->getResponse(); + $response = $this->getExceptionResponse($exception); + if ($response === null) { + throw new ApiException( + "[{$exception->getCode()}] {$exception->getMessage()}", + (int) $exception->getCode(), + null, + null + ); + } $statusCode = $response->getStatusCode(); throw new ApiException( sprintf( @@ -605,7 +614,7 @@ public function createCallRequest( } $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $query = ObjectSerializer::buildQuery($queryParams); + $query = ObjectSerializer::buildQuery($queryParams, PHP_QUERY_RFC3986, $this->config); return new Request( 'POST', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), @@ -694,13 +703,14 @@ public function getCallStateWithHttpInfo( try { $response = $this->client->send($request, $options); } catch (RequestException $e) { + $eResponse = $this->getExceptionResponse($e); throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null + $eResponse?->getHeaders(), + $eResponse ? (string) $eResponse->getBody() : null ); - } catch (ConnectException $e) { + } catch (NetworkExceptionInterface $e) { throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), @@ -949,7 +959,15 @@ function ($response) use ($returnType) { ]; }, function ($exception) { - $response = $exception->getResponse(); + $response = $this->getExceptionResponse($exception); + if ($response === null) { + throw new ApiException( + "[{$exception->getCode()}] {$exception->getMessage()}", + (int) $exception->getCode(), + null, + null + ); + } $statusCode = $response->getStatusCode(); throw new ApiException( sprintf( @@ -1066,7 +1084,7 @@ public function getCallStateRequest( } $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $query = ObjectSerializer::buildQuery($queryParams); + $query = ObjectSerializer::buildQuery($queryParams, PHP_QUERY_RFC3986, $this->config); return new Request( 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), @@ -1179,13 +1197,14 @@ public function listCallsWithHttpInfo( try { $response = $this->client->send($request, $options); } catch (RequestException $e) { + $eResponse = $this->getExceptionResponse($e); throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null + $eResponse?->getHeaders(), + $eResponse ? (string) $eResponse->getBody() : null ); - } catch (ConnectException $e) { + } catch (NetworkExceptionInterface $e) { throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), @@ -1458,7 +1477,15 @@ function ($response) use ($returnType) { ]; }, function ($exception) { - $response = $exception->getResponse(); + $response = $this->getExceptionResponse($exception); + if ($response === null) { + throw new ApiException( + "[{$exception->getCode()}] {$exception->getMessage()}", + (int) $exception->getCode(), + null, + null + ); + } $statusCode = $response->getStatusCode(); throw new ApiException( sprintf( @@ -1536,7 +1563,8 @@ public function listCallsRequest( 'string', // openApiType 'form', // style true, // explode - false // required + false, // required + $this->config ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( @@ -1545,7 +1573,8 @@ public function listCallsRequest( 'string', // openApiType 'form', // style true, // explode - false // required + false, // required + $this->config ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( @@ -1554,7 +1583,8 @@ public function listCallsRequest( 'string', // openApiType 'form', // style true, // explode - false // required + false, // required + $this->config ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( @@ -1563,7 +1593,8 @@ public function listCallsRequest( 'string', // openApiType 'form', // style true, // explode - false // required + false, // required + $this->config ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( @@ -1572,7 +1603,8 @@ public function listCallsRequest( 'string', // openApiType 'form', // style true, // explode - false // required + false, // required + $this->config ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( @@ -1581,7 +1613,8 @@ public function listCallsRequest( 'integer', // openApiType 'form', // style true, // explode - false // required + false, // required + $this->config ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( @@ -1590,7 +1623,8 @@ public function listCallsRequest( 'string', // openApiType 'form', // style true, // explode - false // required + false, // required + $this->config ) ?? []); @@ -1642,7 +1676,7 @@ public function listCallsRequest( } $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $query = ObjectSerializer::buildQuery($queryParams); + $query = ObjectSerializer::buildQuery($queryParams, PHP_QUERY_RFC3986, $this->config); return new Request( 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), @@ -1735,13 +1769,14 @@ public function updateCallWithHttpInfo( try { $response = $this->client->send($request, $options); } catch (RequestException $e) { + $eResponse = $this->getExceptionResponse($e); throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null + $eResponse?->getHeaders(), + $eResponse ? (string) $eResponse->getBody() : null ); - } catch (ConnectException $e) { + } catch (NetworkExceptionInterface $e) { throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), @@ -1908,7 +1943,15 @@ function ($response) use ($returnType) { return [null, $response->getStatusCode(), $response->getHeaders()]; }, function ($exception) { - $response = $exception->getResponse(); + $response = $this->getExceptionResponse($exception); + if ($response === null) { + throw new ApiException( + "[{$exception->getCode()}] {$exception->getMessage()}", + (int) $exception->getCode(), + null, + null + ); + } $statusCode = $response->getStatusCode(); throw new ApiException( sprintf( @@ -2073,7 +2116,7 @@ public function updateCallRequest( } $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $query = ObjectSerializer::buildQuery($queryParams); + $query = ObjectSerializer::buildQuery($queryParams, PHP_QUERY_RFC3986, $this->config); return new Request( 'POST', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), @@ -2166,13 +2209,14 @@ public function updateCallBxmlWithHttpInfo( try { $response = $this->client->send($request, $options); } catch (RequestException $e) { + $eResponse = $this->getExceptionResponse($e); throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null + $eResponse?->getHeaders(), + $eResponse ? (string) $eResponse->getBody() : null ); - } catch (ConnectException $e) { + } catch (NetworkExceptionInterface $e) { throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), @@ -2339,7 +2383,15 @@ function ($response) use ($returnType) { return [null, $response->getStatusCode(), $response->getHeaders()]; }, function ($exception) { - $response = $exception->getResponse(); + $response = $this->getExceptionResponse($exception); + if ($response === null) { + throw new ApiException( + "[{$exception->getCode()}] {$exception->getMessage()}", + (int) $exception->getCode(), + null, + null + ); + } $statusCode = $response->getStatusCode(); throw new ApiException( sprintf( @@ -2504,7 +2556,7 @@ public function updateCallBxmlRequest( } $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $query = ObjectSerializer::buildQuery($queryParams); + $query = ObjectSerializer::buildQuery($queryParams, PHP_QUERY_RFC3986, $this->config); return new Request( 'PUT', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), @@ -2547,6 +2599,17 @@ protected function createHttpClientOption(): array return $options; } + /** + * Returns the response attached to a Guzzle exception, if there is one. + * + * Guzzle 7 exposes getResponse() on RequestException, while Guzzle 8 only + * exposes it on ResponseException and its subclasses. + */ + private function getExceptionResponse(\Throwable $exception): ?ResponseInterface + { + return method_exists($exception, 'getResponse') ? $exception->getResponse() : null; + } + private function handleResponseWithDataType( string $dataType, RequestInterface $request, diff --git a/src/Api/ConferencesApi.php b/src/Api/ConferencesApi.php index 5e0807cd..bd903728 100644 --- a/src/Api/ConferencesApi.php +++ b/src/Api/ConferencesApi.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** @@ -30,11 +30,11 @@ use InvalidArgumentException; use GuzzleHttp\Client; use GuzzleHttp\ClientInterface; -use GuzzleHttp\Exception\ConnectException; use GuzzleHttp\Exception\RequestException; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Client\NetworkExceptionInterface; use Psr\Http\Message\RequestInterface; use Psr\Http\Message\ResponseInterface; use Bandwidth\ApiException; @@ -217,13 +217,14 @@ public function downloadConferenceRecordingWithHttpInfo( try { $response = $this->client->send($request, $options); } catch (RequestException $e) { + $eResponse = $this->getExceptionResponse($e); throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null + $eResponse?->getHeaders(), + $eResponse ? (string) $eResponse->getBody() : null ); - } catch (ConnectException $e) { + } catch (NetworkExceptionInterface $e) { throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), @@ -476,7 +477,15 @@ function ($response) use ($returnType) { ]; }, function ($exception) { - $response = $exception->getResponse(); + $response = $this->getExceptionResponse($exception); + if ($response === null) { + throw new ApiException( + "[{$exception->getCode()}] {$exception->getMessage()}", + (int) $exception->getCode(), + null, + null + ); + } $statusCode = $response->getStatusCode(); throw new ApiException( sprintf( @@ -609,7 +618,7 @@ public function downloadConferenceRecordingRequest( } $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $query = ObjectSerializer::buildQuery($queryParams); + $query = ObjectSerializer::buildQuery($queryParams, PHP_QUERY_RFC3986, $this->config); return new Request( 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), @@ -698,13 +707,14 @@ public function getConferenceWithHttpInfo( try { $response = $this->client->send($request, $options); } catch (RequestException $e) { + $eResponse = $this->getExceptionResponse($e); throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null + $eResponse?->getHeaders(), + $eResponse ? (string) $eResponse->getBody() : null ); - } catch (ConnectException $e) { + } catch (NetworkExceptionInterface $e) { throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), @@ -953,7 +963,15 @@ function ($response) use ($returnType) { ]; }, function ($exception) { - $response = $exception->getResponse(); + $response = $this->getExceptionResponse($exception); + if ($response === null) { + throw new ApiException( + "[{$exception->getCode()}] {$exception->getMessage()}", + (int) $exception->getCode(), + null, + null + ); + } $statusCode = $response->getStatusCode(); throw new ApiException( sprintf( @@ -1070,7 +1088,7 @@ public function getConferenceRequest( } $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $query = ObjectSerializer::buildQuery($queryParams); + $query = ObjectSerializer::buildQuery($queryParams, PHP_QUERY_RFC3986, $this->config); return new Request( 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), @@ -1163,13 +1181,14 @@ public function getConferenceMemberWithHttpInfo( try { $response = $this->client->send($request, $options); } catch (RequestException $e) { + $eResponse = $this->getExceptionResponse($e); throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null + $eResponse?->getHeaders(), + $eResponse ? (string) $eResponse->getBody() : null ); - } catch (ConnectException $e) { + } catch (NetworkExceptionInterface $e) { throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), @@ -1422,7 +1441,15 @@ function ($response) use ($returnType) { ]; }, function ($exception) { - $response = $exception->getResponse(); + $response = $this->getExceptionResponse($exception); + if ($response === null) { + throw new ApiException( + "[{$exception->getCode()}] {$exception->getMessage()}", + (int) $exception->getCode(), + null, + null + ); + } $statusCode = $response->getStatusCode(); throw new ApiException( sprintf( @@ -1555,7 +1582,7 @@ public function getConferenceMemberRequest( } $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $query = ObjectSerializer::buildQuery($queryParams); + $query = ObjectSerializer::buildQuery($queryParams, PHP_QUERY_RFC3986, $this->config); return new Request( 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), @@ -1648,13 +1675,14 @@ public function getConferenceRecordingWithHttpInfo( try { $response = $this->client->send($request, $options); } catch (RequestException $e) { + $eResponse = $this->getExceptionResponse($e); throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null + $eResponse?->getHeaders(), + $eResponse ? (string) $eResponse->getBody() : null ); - } catch (ConnectException $e) { + } catch (NetworkExceptionInterface $e) { throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), @@ -1907,7 +1935,15 @@ function ($response) use ($returnType) { ]; }, function ($exception) { - $response = $exception->getResponse(); + $response = $this->getExceptionResponse($exception); + if ($response === null) { + throw new ApiException( + "[{$exception->getCode()}] {$exception->getMessage()}", + (int) $exception->getCode(), + null, + null + ); + } $statusCode = $response->getStatusCode(); throw new ApiException( sprintf( @@ -2040,7 +2076,7 @@ public function getConferenceRecordingRequest( } $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $query = ObjectSerializer::buildQuery($queryParams); + $query = ObjectSerializer::buildQuery($queryParams, PHP_QUERY_RFC3986, $this->config); return new Request( 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), @@ -2129,13 +2165,14 @@ public function listConferenceRecordingsWithHttpInfo( try { $response = $this->client->send($request, $options); } catch (RequestException $e) { + $eResponse = $this->getExceptionResponse($e); throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null + $eResponse?->getHeaders(), + $eResponse ? (string) $eResponse->getBody() : null ); - } catch (ConnectException $e) { + } catch (NetworkExceptionInterface $e) { throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), @@ -2384,7 +2421,15 @@ function ($response) use ($returnType) { ]; }, function ($exception) { - $response = $exception->getResponse(); + $response = $this->getExceptionResponse($exception); + if ($response === null) { + throw new ApiException( + "[{$exception->getCode()}] {$exception->getMessage()}", + (int) $exception->getCode(), + null, + null + ); + } $statusCode = $response->getStatusCode(); throw new ApiException( sprintf( @@ -2501,7 +2546,7 @@ public function listConferenceRecordingsRequest( } $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $query = ObjectSerializer::buildQuery($queryParams); + $query = ObjectSerializer::buildQuery($queryParams, PHP_QUERY_RFC3986, $this->config); return new Request( 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), @@ -2606,13 +2651,14 @@ public function listConferencesWithHttpInfo( try { $response = $this->client->send($request, $options); } catch (RequestException $e) { + $eResponse = $this->getExceptionResponse($e); throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null + $eResponse?->getHeaders(), + $eResponse ? (string) $eResponse->getBody() : null ); - } catch (ConnectException $e) { + } catch (NetworkExceptionInterface $e) { throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), @@ -2877,7 +2923,15 @@ function ($response) use ($returnType) { ]; }, function ($exception) { - $response = $exception->getResponse(); + $response = $this->getExceptionResponse($exception); + if ($response === null) { + throw new ApiException( + "[{$exception->getCode()}] {$exception->getMessage()}", + (int) $exception->getCode(), + null, + null + ); + } $statusCode = $response->getStatusCode(); throw new ApiException( sprintf( @@ -2951,7 +3005,8 @@ public function listConferencesRequest( 'string', // openApiType 'form', // style true, // explode - false // required + false, // required + $this->config ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( @@ -2960,7 +3015,8 @@ public function listConferencesRequest( 'string', // openApiType 'form', // style true, // explode - false // required + false, // required + $this->config ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( @@ -2969,7 +3025,8 @@ public function listConferencesRequest( 'string', // openApiType 'form', // style true, // explode - false // required + false, // required + $this->config ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( @@ -2978,7 +3035,8 @@ public function listConferencesRequest( 'integer', // openApiType 'form', // style true, // explode - false // required + false, // required + $this->config ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( @@ -2987,7 +3045,8 @@ public function listConferencesRequest( 'string', // openApiType 'form', // style true, // explode - false // required + false, // required + $this->config ) ?? []); @@ -3039,7 +3098,7 @@ public function listConferencesRequest( } $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $query = ObjectSerializer::buildQuery($queryParams); + $query = ObjectSerializer::buildQuery($queryParams, PHP_QUERY_RFC3986, $this->config); return new Request( 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), @@ -3132,13 +3191,14 @@ public function updateConferenceWithHttpInfo( try { $response = $this->client->send($request, $options); } catch (RequestException $e) { + $eResponse = $this->getExceptionResponse($e); throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null + $eResponse?->getHeaders(), + $eResponse ? (string) $eResponse->getBody() : null ); - } catch (ConnectException $e) { + } catch (NetworkExceptionInterface $e) { throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), @@ -3297,7 +3357,15 @@ function ($response) use ($returnType) { return [null, $response->getStatusCode(), $response->getHeaders()]; }, function ($exception) { - $response = $exception->getResponse(); + $response = $this->getExceptionResponse($exception); + if ($response === null) { + throw new ApiException( + "[{$exception->getCode()}] {$exception->getMessage()}", + (int) $exception->getCode(), + null, + null + ); + } $statusCode = $response->getStatusCode(); throw new ApiException( sprintf( @@ -3462,7 +3530,7 @@ public function updateConferenceRequest( } $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $query = ObjectSerializer::buildQuery($queryParams); + $query = ObjectSerializer::buildQuery($queryParams, PHP_QUERY_RFC3986, $this->config); return new Request( 'POST', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), @@ -3555,13 +3623,14 @@ public function updateConferenceBxmlWithHttpInfo( try { $response = $this->client->send($request, $options); } catch (RequestException $e) { + $eResponse = $this->getExceptionResponse($e); throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null + $eResponse?->getHeaders(), + $eResponse ? (string) $eResponse->getBody() : null ); - } catch (ConnectException $e) { + } catch (NetworkExceptionInterface $e) { throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), @@ -3720,7 +3789,15 @@ function ($response) use ($returnType) { return [null, $response->getStatusCode(), $response->getHeaders()]; }, function ($exception) { - $response = $exception->getResponse(); + $response = $this->getExceptionResponse($exception); + if ($response === null) { + throw new ApiException( + "[{$exception->getCode()}] {$exception->getMessage()}", + (int) $exception->getCode(), + null, + null + ); + } $statusCode = $response->getStatusCode(); throw new ApiException( sprintf( @@ -3885,7 +3962,7 @@ public function updateConferenceBxmlRequest( } $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $query = ObjectSerializer::buildQuery($queryParams); + $query = ObjectSerializer::buildQuery($queryParams, PHP_QUERY_RFC3986, $this->config); return new Request( 'PUT', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), @@ -3982,13 +4059,14 @@ public function updateConferenceMemberWithHttpInfo( try { $response = $this->client->send($request, $options); } catch (RequestException $e) { + $eResponse = $this->getExceptionResponse($e); throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null + $eResponse?->getHeaders(), + $eResponse ? (string) $eResponse->getBody() : null ); - } catch (ConnectException $e) { + } catch (NetworkExceptionInterface $e) { throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), @@ -4151,7 +4229,15 @@ function ($response) use ($returnType) { return [null, $response->getStatusCode(), $response->getHeaders()]; }, function ($exception) { - $response = $exception->getResponse(); + $response = $this->getExceptionResponse($exception); + if ($response === null) { + throw new ApiException( + "[{$exception->getCode()}] {$exception->getMessage()}", + (int) $exception->getCode(), + null, + null + ); + } $statusCode = $response->getStatusCode(); throw new ApiException( sprintf( @@ -4332,7 +4418,7 @@ public function updateConferenceMemberRequest( } $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $query = ObjectSerializer::buildQuery($queryParams); + $query = ObjectSerializer::buildQuery($queryParams, PHP_QUERY_RFC3986, $this->config); return new Request( 'PUT', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), @@ -4375,6 +4461,17 @@ protected function createHttpClientOption(): array return $options; } + /** + * Returns the response attached to a Guzzle exception, if there is one. + * + * Guzzle 7 exposes getResponse() on RequestException, while Guzzle 8 only + * exposes it on ResponseException and its subclasses. + */ + private function getExceptionResponse(\Throwable $exception): ?ResponseInterface + { + return method_exists($exception, 'getResponse') ? $exception->getResponse() : null; + } + private function handleResponseWithDataType( string $dataType, RequestInterface $request, diff --git a/src/Api/EndpointsApi.php b/src/Api/EndpointsApi.php index ec3bde9c..3b4d24f6 100644 --- a/src/Api/EndpointsApi.php +++ b/src/Api/EndpointsApi.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** @@ -30,11 +30,11 @@ use InvalidArgumentException; use GuzzleHttp\Client; use GuzzleHttp\ClientInterface; -use GuzzleHttp\Exception\ConnectException; use GuzzleHttp\Exception\RequestException; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Client\NetworkExceptionInterface; use Psr\Http\Message\RequestInterface; use Psr\Http\Message\ResponseInterface; use Bandwidth\ApiException; @@ -201,13 +201,14 @@ public function createEndpointWithHttpInfo( try { $response = $this->client->send($request, $options); } catch (RequestException $e) { + $eResponse = $this->getExceptionResponse($e); throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null + $eResponse?->getHeaders(), + $eResponse ? (string) $eResponse->getBody() : null ); - } catch (ConnectException $e) { + } catch (NetworkExceptionInterface $e) { throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), @@ -456,7 +457,15 @@ function ($response) use ($returnType) { ]; }, function ($exception) { - $response = $exception->getResponse(); + $response = $this->getExceptionResponse($exception); + if ($response === null) { + throw new ApiException( + "[{$exception->getCode()}] {$exception->getMessage()}", + (int) $exception->getCode(), + null, + null + ); + } $statusCode = $response->getStatusCode(); throw new ApiException( sprintf( @@ -605,7 +614,7 @@ public function createEndpointRequest( } $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $query = ObjectSerializer::buildQuery($queryParams); + $query = ObjectSerializer::buildQuery($queryParams, PHP_QUERY_RFC3986, $this->config); return new Request( 'POST', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), @@ -694,13 +703,14 @@ public function deleteEndpointWithHttpInfo( try { $response = $this->client->send($request, $options); } catch (RequestException $e) { + $eResponse = $this->getExceptionResponse($e); throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null + $eResponse?->getHeaders(), + $eResponse ? (string) $eResponse->getBody() : null ); - } catch (ConnectException $e) { + } catch (NetworkExceptionInterface $e) { throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), @@ -855,7 +865,15 @@ function ($response) use ($returnType) { return [null, $response->getStatusCode(), $response->getHeaders()]; }, function ($exception) { - $response = $exception->getResponse(); + $response = $this->getExceptionResponse($exception); + if ($response === null) { + throw new ApiException( + "[{$exception->getCode()}] {$exception->getMessage()}", + (int) $exception->getCode(), + null, + null + ); + } $statusCode = $response->getStatusCode(); throw new ApiException( sprintf( @@ -972,7 +990,7 @@ public function deleteEndpointRequest( } $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $query = ObjectSerializer::buildQuery($queryParams); + $query = ObjectSerializer::buildQuery($queryParams, PHP_QUERY_RFC3986, $this->config); return new Request( 'DELETE', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), @@ -1061,13 +1079,14 @@ public function getEndpointWithHttpInfo( try { $response = $this->client->send($request, $options); } catch (RequestException $e) { + $eResponse = $this->getExceptionResponse($e); throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null + $eResponse?->getHeaders(), + $eResponse ? (string) $eResponse->getBody() : null ); - } catch (ConnectException $e) { + } catch (NetworkExceptionInterface $e) { throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), @@ -1316,7 +1335,15 @@ function ($response) use ($returnType) { ]; }, function ($exception) { - $response = $exception->getResponse(); + $response = $this->getExceptionResponse($exception); + if ($response === null) { + throw new ApiException( + "[{$exception->getCode()}] {$exception->getMessage()}", + (int) $exception->getCode(), + null, + null + ); + } $statusCode = $response->getStatusCode(); throw new ApiException( sprintf( @@ -1433,7 +1460,7 @@ public function getEndpointRequest( } $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $query = ObjectSerializer::buildQuery($queryParams); + $query = ObjectSerializer::buildQuery($queryParams, PHP_QUERY_RFC3986, $this->config); return new Request( 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), @@ -1534,13 +1561,14 @@ public function listEndpointsWithHttpInfo( try { $response = $this->client->send($request, $options); } catch (RequestException $e) { + $eResponse = $this->getExceptionResponse($e); throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null + $eResponse?->getHeaders(), + $eResponse ? (string) $eResponse->getBody() : null ); - } catch (ConnectException $e) { + } catch (NetworkExceptionInterface $e) { throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), @@ -1801,7 +1829,15 @@ function ($response) use ($returnType) { ]; }, function ($exception) { - $response = $exception->getResponse(); + $response = $this->getExceptionResponse($exception); + if ($response === null) { + throw new ApiException( + "[{$exception->getCode()}] {$exception->getMessage()}", + (int) $exception->getCode(), + null, + null + ); + } $statusCode = $response->getStatusCode(); throw new ApiException( sprintf( @@ -1873,7 +1909,8 @@ public function listEndpointsRequest( 'EndpointTypeEnum', // openApiType 'form', // style true, // explode - false // required + false, // required + $this->config ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( @@ -1882,7 +1919,8 @@ public function listEndpointsRequest( 'EndpointStatusEnum', // openApiType 'form', // style true, // explode - false // required + false, // required + $this->config ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( @@ -1891,7 +1929,8 @@ public function listEndpointsRequest( 'string', // openApiType 'form', // style true, // explode - false // required + false, // required + $this->config ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( @@ -1900,7 +1939,8 @@ public function listEndpointsRequest( 'integer', // openApiType 'form', // style true, // explode - false // required + false, // required + $this->config ) ?? []); @@ -1952,7 +1992,7 @@ public function listEndpointsRequest( } $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $query = ObjectSerializer::buildQuery($queryParams); + $query = ObjectSerializer::buildQuery($queryParams, PHP_QUERY_RFC3986, $this->config); return new Request( 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), @@ -2045,13 +2085,14 @@ public function updateEndpointBxmlWithHttpInfo( try { $response = $this->client->send($request, $options); } catch (RequestException $e) { + $eResponse = $this->getExceptionResponse($e); throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null + $eResponse?->getHeaders(), + $eResponse ? (string) $eResponse->getBody() : null ); - } catch (ConnectException $e) { + } catch (NetworkExceptionInterface $e) { throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), @@ -2210,7 +2251,15 @@ function ($response) use ($returnType) { return [null, $response->getStatusCode(), $response->getHeaders()]; }, function ($exception) { - $response = $exception->getResponse(); + $response = $this->getExceptionResponse($exception); + if ($response === null) { + throw new ApiException( + "[{$exception->getCode()}] {$exception->getMessage()}", + (int) $exception->getCode(), + null, + null + ); + } $statusCode = $response->getStatusCode(); throw new ApiException( sprintf( @@ -2375,7 +2424,7 @@ public function updateEndpointBxmlRequest( } $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $query = ObjectSerializer::buildQuery($queryParams); + $query = ObjectSerializer::buildQuery($queryParams, PHP_QUERY_RFC3986, $this->config); return new Request( 'PUT', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), @@ -2418,6 +2467,17 @@ protected function createHttpClientOption(): array return $options; } + /** + * Returns the response attached to a Guzzle exception, if there is one. + * + * Guzzle 7 exposes getResponse() on RequestException, while Guzzle 8 only + * exposes it on ResponseException and its subclasses. + */ + private function getExceptionResponse(\Throwable $exception): ?ResponseInterface + { + return method_exists($exception, 'getResponse') ? $exception->getResponse() : null; + } + private function handleResponseWithDataType( string $dataType, RequestInterface $request, diff --git a/src/Api/MFAApi.php b/src/Api/MFAApi.php index ca834905..252f2d01 100644 --- a/src/Api/MFAApi.php +++ b/src/Api/MFAApi.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** @@ -30,11 +30,11 @@ use InvalidArgumentException; use GuzzleHttp\Client; use GuzzleHttp\ClientInterface; -use GuzzleHttp\Exception\ConnectException; use GuzzleHttp\Exception\RequestException; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Client\NetworkExceptionInterface; use Psr\Http\Message\RequestInterface; use Psr\Http\Message\ResponseInterface; use Bandwidth\ApiException; @@ -195,13 +195,14 @@ public function generateMessagingCodeWithHttpInfo( try { $response = $this->client->send($request, $options); } catch (RequestException $e) { + $eResponse = $this->getExceptionResponse($e); throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null + $eResponse?->getHeaders(), + $eResponse ? (string) $eResponse->getBody() : null ); - } catch (ConnectException $e) { + } catch (NetworkExceptionInterface $e) { throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), @@ -394,7 +395,15 @@ function ($response) use ($returnType) { ]; }, function ($exception) { - $response = $exception->getResponse(); + $response = $this->getExceptionResponse($exception); + if ($response === null) { + throw new ApiException( + "[{$exception->getCode()}] {$exception->getMessage()}", + (int) $exception->getCode(), + null, + null + ); + } $statusCode = $response->getStatusCode(); throw new ApiException( sprintf( @@ -543,7 +552,7 @@ public function generateMessagingCodeRequest( } $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $query = ObjectSerializer::buildQuery($queryParams); + $query = ObjectSerializer::buildQuery($queryParams, PHP_QUERY_RFC3986, $this->config); return new Request( 'POST', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), @@ -632,13 +641,14 @@ public function generateVoiceCodeWithHttpInfo( try { $response = $this->client->send($request, $options); } catch (RequestException $e) { + $eResponse = $this->getExceptionResponse($e); throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null + $eResponse?->getHeaders(), + $eResponse ? (string) $eResponse->getBody() : null ); - } catch (ConnectException $e) { + } catch (NetworkExceptionInterface $e) { throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), @@ -831,7 +841,15 @@ function ($response) use ($returnType) { ]; }, function ($exception) { - $response = $exception->getResponse(); + $response = $this->getExceptionResponse($exception); + if ($response === null) { + throw new ApiException( + "[{$exception->getCode()}] {$exception->getMessage()}", + (int) $exception->getCode(), + null, + null + ); + } $statusCode = $response->getStatusCode(); throw new ApiException( sprintf( @@ -980,7 +998,7 @@ public function generateVoiceCodeRequest( } $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $query = ObjectSerializer::buildQuery($queryParams); + $query = ObjectSerializer::buildQuery($queryParams, PHP_QUERY_RFC3986, $this->config); return new Request( 'POST', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), @@ -1069,13 +1087,14 @@ public function verifyCodeWithHttpInfo( try { $response = $this->client->send($request, $options); } catch (RequestException $e) { + $eResponse = $this->getExceptionResponse($e); throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null + $eResponse?->getHeaders(), + $eResponse ? (string) $eResponse->getBody() : null ); - } catch (ConnectException $e) { + } catch (NetworkExceptionInterface $e) { throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), @@ -1282,7 +1301,15 @@ function ($response) use ($returnType) { ]; }, function ($exception) { - $response = $exception->getResponse(); + $response = $this->getExceptionResponse($exception); + if ($response === null) { + throw new ApiException( + "[{$exception->getCode()}] {$exception->getMessage()}", + (int) $exception->getCode(), + null, + null + ); + } $statusCode = $response->getStatusCode(); throw new ApiException( sprintf( @@ -1431,7 +1458,7 @@ public function verifyCodeRequest( } $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $query = ObjectSerializer::buildQuery($queryParams); + $query = ObjectSerializer::buildQuery($queryParams, PHP_QUERY_RFC3986, $this->config); return new Request( 'POST', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), @@ -1474,6 +1501,17 @@ protected function createHttpClientOption(): array return $options; } + /** + * Returns the response attached to a Guzzle exception, if there is one. + * + * Guzzle 7 exposes getResponse() on RequestException, while Guzzle 8 only + * exposes it on ResponseException and its subclasses. + */ + private function getExceptionResponse(\Throwable $exception): ?ResponseInterface + { + return method_exists($exception, 'getResponse') ? $exception->getResponse() : null; + } + private function handleResponseWithDataType( string $dataType, RequestInterface $request, diff --git a/src/Api/MediaApi.php b/src/Api/MediaApi.php index 25860970..5afbff05 100644 --- a/src/Api/MediaApi.php +++ b/src/Api/MediaApi.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** @@ -30,11 +30,11 @@ use InvalidArgumentException; use GuzzleHttp\Client; use GuzzleHttp\ClientInterface; -use GuzzleHttp\Exception\ConnectException; use GuzzleHttp\Exception\RequestException; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Client\NetworkExceptionInterface; use Psr\Http\Message\RequestInterface; use Psr\Http\Message\ResponseInterface; use Bandwidth\ApiException; @@ -245,13 +245,14 @@ public function deleteMediaWithHttpInfo( try { $response = $this->client->send($request, $options); } catch (RequestException $e) { + $eResponse = $this->getExceptionResponse($e); throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null + $eResponse?->getHeaders(), + $eResponse ? (string) $eResponse->getBody() : null ); - } catch (ConnectException $e) { + } catch (NetworkExceptionInterface $e) { throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), @@ -406,7 +407,15 @@ function ($response) use ($returnType) { return [null, $response->getStatusCode(), $response->getHeaders()]; }, function ($exception) { - $response = $exception->getResponse(); + $response = $this->getExceptionResponse($exception); + if ($response === null) { + throw new ApiException( + "[{$exception->getCode()}] {$exception->getMessage()}", + (int) $exception->getCode(), + null, + null + ); + } $statusCode = $response->getStatusCode(); throw new ApiException( sprintf( @@ -523,7 +532,7 @@ public function deleteMediaRequest( } $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $query = ObjectSerializer::buildQuery($queryParams); + $query = ObjectSerializer::buildQuery($queryParams, PHP_QUERY_RFC3986, $this->config); return new Request( 'DELETE', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), @@ -612,13 +621,14 @@ public function getMediaWithHttpInfo( try { $response = $this->client->send($request, $options); } catch (RequestException $e) { + $eResponse = $this->getExceptionResponse($e); throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null + $eResponse?->getHeaders(), + $eResponse ? (string) $eResponse->getBody() : null ); - } catch (ConnectException $e) { + } catch (NetworkExceptionInterface $e) { throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), @@ -867,7 +877,15 @@ function ($response) use ($returnType) { ]; }, function ($exception) { - $response = $exception->getResponse(); + $response = $this->getExceptionResponse($exception); + if ($response === null) { + throw new ApiException( + "[{$exception->getCode()}] {$exception->getMessage()}", + (int) $exception->getCode(), + null, + null + ); + } $statusCode = $response->getStatusCode(); throw new ApiException( sprintf( @@ -984,7 +1002,7 @@ public function getMediaRequest( } $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $query = ObjectSerializer::buildQuery($queryParams); + $query = ObjectSerializer::buildQuery($queryParams, PHP_QUERY_RFC3986, $this->config); return new Request( 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), @@ -1073,13 +1091,14 @@ public function listMediaWithHttpInfo( try { $response = $this->client->send($request, $options); } catch (RequestException $e) { + $eResponse = $this->getExceptionResponse($e); throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null + $eResponse?->getHeaders(), + $eResponse ? (string) $eResponse->getBody() : null ); - } catch (ConnectException $e) { + } catch (NetworkExceptionInterface $e) { throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), @@ -1328,7 +1347,15 @@ function ($response) use ($returnType) { ]; }, function ($exception) { - $response = $exception->getResponse(); + $response = $this->getExceptionResponse($exception); + if ($response === null) { + throw new ApiException( + "[{$exception->getCode()}] {$exception->getMessage()}", + (int) $exception->getCode(), + null, + null + ); + } $statusCode = $response->getStatusCode(); throw new ApiException( sprintf( @@ -1435,7 +1462,7 @@ public function listMediaRequest( } $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $query = ObjectSerializer::buildQuery($queryParams); + $query = ObjectSerializer::buildQuery($queryParams, PHP_QUERY_RFC3986, $this->config); return new Request( 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), @@ -1536,13 +1563,14 @@ public function uploadMediaWithHttpInfo( try { $response = $this->client->send($request, $options); } catch (RequestException $e) { + $eResponse = $this->getExceptionResponse($e); throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null + $eResponse?->getHeaders(), + $eResponse ? (string) $eResponse->getBody() : null ); - } catch (ConnectException $e) { + } catch (NetworkExceptionInterface $e) { throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), @@ -1709,7 +1737,15 @@ function ($response) use ($returnType) { return [null, $response->getStatusCode(), $response->getHeaders()]; }, function ($exception) { - $response = $exception->getResponse(); + $response = $this->getExceptionResponse($exception); + if ($response === null) { + throw new ApiException( + "[{$exception->getCode()}] {$exception->getMessage()}", + (int) $exception->getCode(), + null, + null + ); + } $statusCode = $response->getStatusCode(); throw new ApiException( sprintf( @@ -1886,7 +1922,7 @@ public function uploadMediaRequest( } $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $query = ObjectSerializer::buildQuery($queryParams); + $query = ObjectSerializer::buildQuery($queryParams, PHP_QUERY_RFC3986, $this->config); return new Request( 'PUT', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), @@ -1929,6 +1965,17 @@ protected function createHttpClientOption(): array return $options; } + /** + * Returns the response attached to a Guzzle exception, if there is one. + * + * Guzzle 7 exposes getResponse() on RequestException, while Guzzle 8 only + * exposes it on ResponseException and its subclasses. + */ + private function getExceptionResponse(\Throwable $exception): ?ResponseInterface + { + return method_exists($exception, 'getResponse') ? $exception->getResponse() : null; + } + private function handleResponseWithDataType( string $dataType, RequestInterface $request, diff --git a/src/Api/MessagesApi.php b/src/Api/MessagesApi.php index 57062ff0..41f33ef3 100644 --- a/src/Api/MessagesApi.php +++ b/src/Api/MessagesApi.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** @@ -30,11 +30,11 @@ use InvalidArgumentException; use GuzzleHttp\Client; use GuzzleHttp\ClientInterface; -use GuzzleHttp\Exception\ConnectException; use GuzzleHttp\Exception\RequestException; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Client\NetworkExceptionInterface; use Psr\Http\Message\RequestInterface; use Psr\Http\Message\ResponseInterface; use Bandwidth\ApiException; @@ -192,13 +192,14 @@ public function createMessageWithHttpInfo( try { $response = $this->client->send($request, $options); } catch (RequestException $e) { + $eResponse = $this->getExceptionResponse($e); throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null + $eResponse?->getHeaders(), + $eResponse ? (string) $eResponse->getBody() : null ); - } catch (ConnectException $e) { + } catch (NetworkExceptionInterface $e) { throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), @@ -461,7 +462,15 @@ function ($response) use ($returnType) { ]; }, function ($exception) { - $response = $exception->getResponse(); + $response = $this->getExceptionResponse($exception); + if ($response === null) { + throw new ApiException( + "[{$exception->getCode()}] {$exception->getMessage()}", + (int) $exception->getCode(), + null, + null + ); + } $statusCode = $response->getStatusCode(); throw new ApiException( sprintf( @@ -610,7 +619,7 @@ public function createMessageRequest( } $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $query = ObjectSerializer::buildQuery($queryParams); + $query = ObjectSerializer::buildQuery($queryParams, PHP_QUERY_RFC3986, $this->config); return new Request( 'POST', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), @@ -803,13 +812,14 @@ public function listMessagesWithHttpInfo( try { $response = $this->client->send($request, $options); } catch (RequestException $e) { + $eResponse = $this->getExceptionResponse($e); throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null + $eResponse?->getHeaders(), + $eResponse ? (string) $eResponse->getBody() : null ); - } catch (ConnectException $e) { + } catch (NetworkExceptionInterface $e) { throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), @@ -1162,7 +1172,15 @@ function ($response) use ($returnType) { ]; }, function ($exception) { - $response = $exception->getResponse(); + $response = $this->getExceptionResponse($exception); + if ($response === null) { + throw new ApiException( + "[{$exception->getCode()}] {$exception->getMessage()}", + (int) $exception->getCode(), + null, + null + ); + } $statusCode = $response->getStatusCode(); throw new ApiException( sprintf( @@ -1274,7 +1292,8 @@ public function listMessagesRequest( 'string', // openApiType 'form', // style true, // explode - false // required + false, // required + $this->config ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( @@ -1283,7 +1302,8 @@ public function listMessagesRequest( 'string', // openApiType 'form', // style true, // explode - false // required + false, // required + $this->config ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( @@ -1292,7 +1312,8 @@ public function listMessagesRequest( 'string', // openApiType 'form', // style true, // explode - false // required + false, // required + $this->config ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( @@ -1301,7 +1322,8 @@ public function listMessagesRequest( 'MessageStatusEnum', // openApiType 'form', // style true, // explode - false // required + false, // required + $this->config ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( @@ -1310,7 +1332,8 @@ public function listMessagesRequest( 'ListMessageDirectionEnum', // openApiType 'form', // style true, // explode - false // required + false, // required + $this->config ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( @@ -1319,7 +1342,8 @@ public function listMessagesRequest( 'string', // openApiType 'form', // style true, // explode - false // required + false, // required + $this->config ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( @@ -1328,7 +1352,8 @@ public function listMessagesRequest( 'MessageTypeEnum', // openApiType 'form', // style true, // explode - false // required + false, // required + $this->config ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( @@ -1337,7 +1362,8 @@ public function listMessagesRequest( 'integer', // openApiType 'form', // style true, // explode - false // required + false, // required + $this->config ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( @@ -1346,7 +1372,8 @@ public function listMessagesRequest( 'string', // openApiType 'form', // style true, // explode - false // required + false, // required + $this->config ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( @@ -1355,7 +1382,8 @@ public function listMessagesRequest( 'string', // openApiType 'form', // style true, // explode - false // required + false, // required + $this->config ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( @@ -1364,7 +1392,8 @@ public function listMessagesRequest( 'string', // openApiType 'form', // style true, // explode - false // required + false, // required + $this->config ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( @@ -1373,7 +1402,8 @@ public function listMessagesRequest( 'integer', // openApiType 'form', // style true, // explode - false // required + false, // required + $this->config ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( @@ -1382,7 +1412,8 @@ public function listMessagesRequest( 'boolean', // openApiType 'form', // style true, // explode - false // required + false, // required + $this->config ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( @@ -1391,7 +1422,8 @@ public function listMessagesRequest( 'ProductTypeEnum', // openApiType 'form', // style true, // explode - false // required + false, // required + $this->config ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( @@ -1400,7 +1432,8 @@ public function listMessagesRequest( 'string', // openApiType 'form', // style true, // explode - false // required + false, // required + $this->config ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( @@ -1409,7 +1442,8 @@ public function listMessagesRequest( 'boolean', // openApiType 'form', // style true, // explode - false // required + false, // required + $this->config ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( @@ -1418,7 +1452,8 @@ public function listMessagesRequest( 'integer', // openApiType 'form', // style true, // explode - false // required + false, // required + $this->config ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( @@ -1427,7 +1462,8 @@ public function listMessagesRequest( 'string', // openApiType 'form', // style true, // explode - false // required + false, // required + $this->config ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( @@ -1436,7 +1472,8 @@ public function listMessagesRequest( 'string', // openApiType 'form', // style true, // explode - false // required + false, // required + $this->config ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( @@ -1445,7 +1482,8 @@ public function listMessagesRequest( 'integer', // openApiType 'form', // style true, // explode - false // required + false, // required + $this->config ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( @@ -1454,7 +1492,8 @@ public function listMessagesRequest( 'integer', // openApiType 'form', // style true, // explode - false // required + false, // required + $this->config ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( @@ -1463,7 +1502,8 @@ public function listMessagesRequest( 'integer', // openApiType 'form', // style true, // explode - false // required + false, // required + $this->config ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( @@ -1472,7 +1512,8 @@ public function listMessagesRequest( 'integer', // openApiType 'form', // style true, // explode - false // required + false, // required + $this->config ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( @@ -1481,7 +1522,8 @@ public function listMessagesRequest( 'string', // openApiType 'form', // style true, // explode - false // required + false, // required + $this->config ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( @@ -1490,7 +1532,8 @@ public function listMessagesRequest( 'string', // openApiType 'form', // style true, // explode - false // required + false, // required + $this->config ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( @@ -1499,7 +1542,8 @@ public function listMessagesRequest( 'integer', // openApiType 'form', // style true, // explode - false // required + false, // required + $this->config ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( @@ -1508,7 +1552,8 @@ public function listMessagesRequest( 'boolean', // openApiType 'form', // style true, // explode - false // required + false, // required + $this->config ) ?? []); @@ -1560,7 +1605,7 @@ public function listMessagesRequest( } $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $query = ObjectSerializer::buildQuery($queryParams); + $query = ObjectSerializer::buildQuery($queryParams, PHP_QUERY_RFC3986, $this->config); return new Request( 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), @@ -1603,6 +1648,17 @@ protected function createHttpClientOption(): array return $options; } + /** + * Returns the response attached to a Guzzle exception, if there is one. + * + * Guzzle 7 exposes getResponse() on RequestException, while Guzzle 8 only + * exposes it on ResponseException and its subclasses. + */ + private function getExceptionResponse(\Throwable $exception): ?ResponseInterface + { + return method_exists($exception, 'getResponse') ? $exception->getResponse() : null; + } + private function handleResponseWithDataType( string $dataType, RequestInterface $request, diff --git a/src/Api/MultiChannelApi.php b/src/Api/MultiChannelApi.php index 1b27a231..cfd4d055 100644 --- a/src/Api/MultiChannelApi.php +++ b/src/Api/MultiChannelApi.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** @@ -30,11 +30,11 @@ use InvalidArgumentException; use GuzzleHttp\Client; use GuzzleHttp\ClientInterface; -use GuzzleHttp\Exception\ConnectException; use GuzzleHttp\Exception\RequestException; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Client\NetworkExceptionInterface; use Psr\Http\Message\RequestInterface; use Psr\Http\Message\ResponseInterface; use Bandwidth\ApiException; @@ -189,13 +189,14 @@ public function createMultiChannelMessageWithHttpInfo( try { $response = $this->client->send($request, $options); } catch (RequestException $e) { + $eResponse = $this->getExceptionResponse($e); throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null + $eResponse?->getHeaders(), + $eResponse ? (string) $eResponse->getBody() : null ); - } catch (ConnectException $e) { + } catch (NetworkExceptionInterface $e) { throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), @@ -444,7 +445,15 @@ function ($response) use ($returnType) { ]; }, function ($exception) { - $response = $exception->getResponse(); + $response = $this->getExceptionResponse($exception); + if ($response === null) { + throw new ApiException( + "[{$exception->getCode()}] {$exception->getMessage()}", + (int) $exception->getCode(), + null, + null + ); + } $statusCode = $response->getStatusCode(); throw new ApiException( sprintf( @@ -593,7 +602,7 @@ public function createMultiChannelMessageRequest( } $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $query = ObjectSerializer::buildQuery($queryParams); + $query = ObjectSerializer::buildQuery($queryParams, PHP_QUERY_RFC3986, $this->config); return new Request( 'POST', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), @@ -636,6 +645,17 @@ protected function createHttpClientOption(): array return $options; } + /** + * Returns the response attached to a Guzzle exception, if there is one. + * + * Guzzle 7 exposes getResponse() on RequestException, while Guzzle 8 only + * exposes it on ResponseException and its subclasses. + */ + private function getExceptionResponse(\Throwable $exception): ?ResponseInterface + { + return method_exists($exception, 'getResponse') ? $exception->getResponse() : null; + } + private function handleResponseWithDataType( string $dataType, RequestInterface $request, diff --git a/src/Api/PhoneNumberLookupApi.php b/src/Api/PhoneNumberLookupApi.php index 4ef0ad92..ff2bdb3f 100644 --- a/src/Api/PhoneNumberLookupApi.php +++ b/src/Api/PhoneNumberLookupApi.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** @@ -30,11 +30,11 @@ use InvalidArgumentException; use GuzzleHttp\Client; use GuzzleHttp\ClientInterface; -use GuzzleHttp\Exception\ConnectException; use GuzzleHttp\Exception\RequestException; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Client\NetworkExceptionInterface; use Psr\Http\Message\RequestInterface; use Psr\Http\Message\ResponseInterface; use Bandwidth\ApiException; @@ -195,13 +195,14 @@ public function createAsyncBulkLookupWithHttpInfo( try { $response = $this->client->send($request, $options); } catch (RequestException $e) { + $eResponse = $this->getExceptionResponse($e); throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null + $eResponse?->getHeaders(), + $eResponse ? (string) $eResponse->getBody() : null ); - } catch (ConnectException $e) { + } catch (NetworkExceptionInterface $e) { throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), @@ -352,7 +353,15 @@ function ($response) use ($returnType) { ]; }, function ($exception) { - $response = $exception->getResponse(); + $response = $this->getExceptionResponse($exception); + if ($response === null) { + throw new ApiException( + "[{$exception->getCode()}] {$exception->getMessage()}", + (int) $exception->getCode(), + null, + null + ); + } $statusCode = $response->getStatusCode(); throw new ApiException( sprintf( @@ -501,7 +510,7 @@ public function createAsyncBulkLookupRequest( } $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $query = ObjectSerializer::buildQuery($queryParams); + $query = ObjectSerializer::buildQuery($queryParams, PHP_QUERY_RFC3986, $this->config); return new Request( 'POST', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), @@ -590,13 +599,14 @@ public function createSyncLookupWithHttpInfo( try { $response = $this->client->send($request, $options); } catch (RequestException $e) { + $eResponse = $this->getExceptionResponse($e); throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null + $eResponse?->getHeaders(), + $eResponse ? (string) $eResponse->getBody() : null ); - } catch (ConnectException $e) { + } catch (NetworkExceptionInterface $e) { throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), @@ -747,7 +757,15 @@ function ($response) use ($returnType) { ]; }, function ($exception) { - $response = $exception->getResponse(); + $response = $this->getExceptionResponse($exception); + if ($response === null) { + throw new ApiException( + "[{$exception->getCode()}] {$exception->getMessage()}", + (int) $exception->getCode(), + null, + null + ); + } $statusCode = $response->getStatusCode(); throw new ApiException( sprintf( @@ -896,7 +914,7 @@ public function createSyncLookupRequest( } $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $query = ObjectSerializer::buildQuery($queryParams); + $query = ObjectSerializer::buildQuery($queryParams, PHP_QUERY_RFC3986, $this->config); return new Request( 'POST', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), @@ -985,13 +1003,14 @@ public function getAsyncBulkLookupWithHttpInfo( try { $response = $this->client->send($request, $options); } catch (RequestException $e) { + $eResponse = $this->getExceptionResponse($e); throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null + $eResponse?->getHeaders(), + $eResponse ? (string) $eResponse->getBody() : null ); - } catch (ConnectException $e) { + } catch (NetworkExceptionInterface $e) { throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), @@ -1142,7 +1161,15 @@ function ($response) use ($returnType) { ]; }, function ($exception) { - $response = $exception->getResponse(); + $response = $this->getExceptionResponse($exception); + if ($response === null) { + throw new ApiException( + "[{$exception->getCode()}] {$exception->getMessage()}", + (int) $exception->getCode(), + null, + null + ); + } $statusCode = $response->getStatusCode(); throw new ApiException( sprintf( @@ -1259,7 +1286,7 @@ public function getAsyncBulkLookupRequest( } $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $query = ObjectSerializer::buildQuery($queryParams); + $query = ObjectSerializer::buildQuery($queryParams, PHP_QUERY_RFC3986, $this->config); return new Request( 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), @@ -1302,6 +1329,17 @@ protected function createHttpClientOption(): array return $options; } + /** + * Returns the response attached to a Guzzle exception, if there is one. + * + * Guzzle 7 exposes getResponse() on RequestException, while Guzzle 8 only + * exposes it on ResponseException and its subclasses. + */ + private function getExceptionResponse(\Throwable $exception): ?ResponseInterface + { + return method_exists($exception, 'getResponse') ? $exception->getResponse() : null; + } + private function handleResponseWithDataType( string $dataType, RequestInterface $request, diff --git a/src/Api/RecordingsApi.php b/src/Api/RecordingsApi.php index 9da7ac53..ff0379f0 100644 --- a/src/Api/RecordingsApi.php +++ b/src/Api/RecordingsApi.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** @@ -30,11 +30,11 @@ use InvalidArgumentException; use GuzzleHttp\Client; use GuzzleHttp\ClientInterface; -use GuzzleHttp\Exception\ConnectException; use GuzzleHttp\Exception\RequestException; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Client\NetworkExceptionInterface; use Psr\Http\Message\RequestInterface; use Psr\Http\Message\ResponseInterface; use Bandwidth\ApiException; @@ -220,13 +220,14 @@ public function deleteRecordingWithHttpInfo( try { $response = $this->client->send($request, $options); } catch (RequestException $e) { + $eResponse = $this->getExceptionResponse($e); throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null + $eResponse?->getHeaders(), + $eResponse ? (string) $eResponse->getBody() : null ); - } catch (ConnectException $e) { + } catch (NetworkExceptionInterface $e) { throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), @@ -385,7 +386,15 @@ function ($response) use ($returnType) { return [null, $response->getStatusCode(), $response->getHeaders()]; }, function ($exception) { - $response = $exception->getResponse(); + $response = $this->getExceptionResponse($exception); + if ($response === null) { + throw new ApiException( + "[{$exception->getCode()}] {$exception->getMessage()}", + (int) $exception->getCode(), + null, + null + ); + } $statusCode = $response->getStatusCode(); throw new ApiException( sprintf( @@ -518,7 +527,7 @@ public function deleteRecordingRequest( } $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $query = ObjectSerializer::buildQuery($queryParams); + $query = ObjectSerializer::buildQuery($queryParams, PHP_QUERY_RFC3986, $this->config); return new Request( 'DELETE', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), @@ -611,13 +620,14 @@ public function deleteRecordingMediaWithHttpInfo( try { $response = $this->client->send($request, $options); } catch (RequestException $e) { + $eResponse = $this->getExceptionResponse($e); throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null + $eResponse?->getHeaders(), + $eResponse ? (string) $eResponse->getBody() : null ); - } catch (ConnectException $e) { + } catch (NetworkExceptionInterface $e) { throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), @@ -776,7 +786,15 @@ function ($response) use ($returnType) { return [null, $response->getStatusCode(), $response->getHeaders()]; }, function ($exception) { - $response = $exception->getResponse(); + $response = $this->getExceptionResponse($exception); + if ($response === null) { + throw new ApiException( + "[{$exception->getCode()}] {$exception->getMessage()}", + (int) $exception->getCode(), + null, + null + ); + } $statusCode = $response->getStatusCode(); throw new ApiException( sprintf( @@ -909,7 +927,7 @@ public function deleteRecordingMediaRequest( } $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $query = ObjectSerializer::buildQuery($queryParams); + $query = ObjectSerializer::buildQuery($queryParams, PHP_QUERY_RFC3986, $this->config); return new Request( 'DELETE', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), @@ -1002,13 +1020,14 @@ public function deleteRecordingTranscriptionWithHttpInfo( try { $response = $this->client->send($request, $options); } catch (RequestException $e) { + $eResponse = $this->getExceptionResponse($e); throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null + $eResponse?->getHeaders(), + $eResponse ? (string) $eResponse->getBody() : null ); - } catch (ConnectException $e) { + } catch (NetworkExceptionInterface $e) { throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), @@ -1167,7 +1186,15 @@ function ($response) use ($returnType) { return [null, $response->getStatusCode(), $response->getHeaders()]; }, function ($exception) { - $response = $exception->getResponse(); + $response = $this->getExceptionResponse($exception); + if ($response === null) { + throw new ApiException( + "[{$exception->getCode()}] {$exception->getMessage()}", + (int) $exception->getCode(), + null, + null + ); + } $statusCode = $response->getStatusCode(); throw new ApiException( sprintf( @@ -1300,7 +1327,7 @@ public function deleteRecordingTranscriptionRequest( } $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $query = ObjectSerializer::buildQuery($queryParams); + $query = ObjectSerializer::buildQuery($queryParams, PHP_QUERY_RFC3986, $this->config); return new Request( 'DELETE', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), @@ -1393,13 +1420,14 @@ public function downloadCallRecordingWithHttpInfo( try { $response = $this->client->send($request, $options); } catch (RequestException $e) { + $eResponse = $this->getExceptionResponse($e); throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null + $eResponse?->getHeaders(), + $eResponse ? (string) $eResponse->getBody() : null ); - } catch (ConnectException $e) { + } catch (NetworkExceptionInterface $e) { throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), @@ -1652,7 +1680,15 @@ function ($response) use ($returnType) { ]; }, function ($exception) { - $response = $exception->getResponse(); + $response = $this->getExceptionResponse($exception); + if ($response === null) { + throw new ApiException( + "[{$exception->getCode()}] {$exception->getMessage()}", + (int) $exception->getCode(), + null, + null + ); + } $statusCode = $response->getStatusCode(); throw new ApiException( sprintf( @@ -1785,7 +1821,7 @@ public function downloadCallRecordingRequest( } $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $query = ObjectSerializer::buildQuery($queryParams); + $query = ObjectSerializer::buildQuery($queryParams, PHP_QUERY_RFC3986, $this->config); return new Request( 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), @@ -1878,13 +1914,14 @@ public function getCallRecordingWithHttpInfo( try { $response = $this->client->send($request, $options); } catch (RequestException $e) { + $eResponse = $this->getExceptionResponse($e); throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null + $eResponse?->getHeaders(), + $eResponse ? (string) $eResponse->getBody() : null ); - } catch (ConnectException $e) { + } catch (NetworkExceptionInterface $e) { throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), @@ -2137,7 +2174,15 @@ function ($response) use ($returnType) { ]; }, function ($exception) { - $response = $exception->getResponse(); + $response = $this->getExceptionResponse($exception); + if ($response === null) { + throw new ApiException( + "[{$exception->getCode()}] {$exception->getMessage()}", + (int) $exception->getCode(), + null, + null + ); + } $statusCode = $response->getStatusCode(); throw new ApiException( sprintf( @@ -2270,7 +2315,7 @@ public function getCallRecordingRequest( } $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $query = ObjectSerializer::buildQuery($queryParams); + $query = ObjectSerializer::buildQuery($queryParams, PHP_QUERY_RFC3986, $this->config); return new Request( 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), @@ -2363,13 +2408,14 @@ public function getRecordingTranscriptionWithHttpInfo( try { $response = $this->client->send($request, $options); } catch (RequestException $e) { + $eResponse = $this->getExceptionResponse($e); throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null + $eResponse?->getHeaders(), + $eResponse ? (string) $eResponse->getBody() : null ); - } catch (ConnectException $e) { + } catch (NetworkExceptionInterface $e) { throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), @@ -2622,7 +2668,15 @@ function ($response) use ($returnType) { ]; }, function ($exception) { - $response = $exception->getResponse(); + $response = $this->getExceptionResponse($exception); + if ($response === null) { + throw new ApiException( + "[{$exception->getCode()}] {$exception->getMessage()}", + (int) $exception->getCode(), + null, + null + ); + } $statusCode = $response->getStatusCode(); throw new ApiException( sprintf( @@ -2755,7 +2809,7 @@ public function getRecordingTranscriptionRequest( } $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $query = ObjectSerializer::buildQuery($queryParams); + $query = ObjectSerializer::buildQuery($queryParams, PHP_QUERY_RFC3986, $this->config); return new Request( 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), @@ -2856,13 +2910,14 @@ public function listAccountCallRecordingsWithHttpInfo( try { $response = $this->client->send($request, $options); } catch (RequestException $e) { + $eResponse = $this->getExceptionResponse($e); throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null + $eResponse?->getHeaders(), + $eResponse ? (string) $eResponse->getBody() : null ); - } catch (ConnectException $e) { + } catch (NetworkExceptionInterface $e) { throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), @@ -3123,7 +3178,15 @@ function ($response) use ($returnType) { ]; }, function ($exception) { - $response = $exception->getResponse(); + $response = $this->getExceptionResponse($exception); + if ($response === null) { + throw new ApiException( + "[{$exception->getCode()}] {$exception->getMessage()}", + (int) $exception->getCode(), + null, + null + ); + } $statusCode = $response->getStatusCode(); throw new ApiException( sprintf( @@ -3189,7 +3252,8 @@ public function listAccountCallRecordingsRequest( 'string', // openApiType 'form', // style true, // explode - false // required + false, // required + $this->config ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( @@ -3198,7 +3262,8 @@ public function listAccountCallRecordingsRequest( 'string', // openApiType 'form', // style true, // explode - false // required + false, // required + $this->config ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( @@ -3207,7 +3272,8 @@ public function listAccountCallRecordingsRequest( 'string', // openApiType 'form', // style true, // explode - false // required + false, // required + $this->config ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( @@ -3216,7 +3282,8 @@ public function listAccountCallRecordingsRequest( 'string', // openApiType 'form', // style true, // explode - false // required + false, // required + $this->config ) ?? []); @@ -3268,7 +3335,7 @@ public function listAccountCallRecordingsRequest( } $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $query = ObjectSerializer::buildQuery($queryParams); + $query = ObjectSerializer::buildQuery($queryParams, PHP_QUERY_RFC3986, $this->config); return new Request( 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), @@ -3357,13 +3424,14 @@ public function listCallRecordingsWithHttpInfo( try { $response = $this->client->send($request, $options); } catch (RequestException $e) { + $eResponse = $this->getExceptionResponse($e); throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null + $eResponse?->getHeaders(), + $eResponse ? (string) $eResponse->getBody() : null ); - } catch (ConnectException $e) { + } catch (NetworkExceptionInterface $e) { throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), @@ -3612,7 +3680,15 @@ function ($response) use ($returnType) { ]; }, function ($exception) { - $response = $exception->getResponse(); + $response = $this->getExceptionResponse($exception); + if ($response === null) { + throw new ApiException( + "[{$exception->getCode()}] {$exception->getMessage()}", + (int) $exception->getCode(), + null, + null + ); + } $statusCode = $response->getStatusCode(); throw new ApiException( sprintf( @@ -3729,7 +3805,7 @@ public function listCallRecordingsRequest( } $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $query = ObjectSerializer::buildQuery($queryParams); + $query = ObjectSerializer::buildQuery($queryParams, PHP_QUERY_RFC3986, $this->config); return new Request( 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), @@ -3826,13 +3902,14 @@ public function transcribeCallRecordingWithHttpInfo( try { $response = $this->client->send($request, $options); } catch (RequestException $e) { + $eResponse = $this->getExceptionResponse($e); throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null + $eResponse?->getHeaders(), + $eResponse ? (string) $eResponse->getBody() : null ); - } catch (ConnectException $e) { + } catch (NetworkExceptionInterface $e) { throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), @@ -3995,7 +4072,15 @@ function ($response) use ($returnType) { return [null, $response->getStatusCode(), $response->getHeaders()]; }, function ($exception) { - $response = $exception->getResponse(); + $response = $this->getExceptionResponse($exception); + if ($response === null) { + throw new ApiException( + "[{$exception->getCode()}] {$exception->getMessage()}", + (int) $exception->getCode(), + null, + null + ); + } $statusCode = $response->getStatusCode(); throw new ApiException( sprintf( @@ -4176,7 +4261,7 @@ public function transcribeCallRecordingRequest( } $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $query = ObjectSerializer::buildQuery($queryParams); + $query = ObjectSerializer::buildQuery($queryParams, PHP_QUERY_RFC3986, $this->config); return new Request( 'POST', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), @@ -4269,13 +4354,14 @@ public function updateCallRecordingStateWithHttpInfo( try { $response = $this->client->send($request, $options); } catch (RequestException $e) { + $eResponse = $this->getExceptionResponse($e); throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null + $eResponse?->getHeaders(), + $eResponse ? (string) $eResponse->getBody() : null ); - } catch (ConnectException $e) { + } catch (NetworkExceptionInterface $e) { throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), @@ -4434,7 +4520,15 @@ function ($response) use ($returnType) { return [null, $response->getStatusCode(), $response->getHeaders()]; }, function ($exception) { - $response = $exception->getResponse(); + $response = $this->getExceptionResponse($exception); + if ($response === null) { + throw new ApiException( + "[{$exception->getCode()}] {$exception->getMessage()}", + (int) $exception->getCode(), + null, + null + ); + } $statusCode = $response->getStatusCode(); throw new ApiException( sprintf( @@ -4599,7 +4693,7 @@ public function updateCallRecordingStateRequest( } $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $query = ObjectSerializer::buildQuery($queryParams); + $query = ObjectSerializer::buildQuery($queryParams, PHP_QUERY_RFC3986, $this->config); return new Request( 'PUT', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), @@ -4642,6 +4736,17 @@ protected function createHttpClientOption(): array return $options; } + /** + * Returns the response attached to a Guzzle exception, if there is one. + * + * Guzzle 7 exposes getResponse() on RequestException, while Guzzle 8 only + * exposes it on ResponseException and its subclasses. + */ + private function getExceptionResponse(\Throwable $exception): ?ResponseInterface + { + return method_exists($exception, 'getResponse') ? $exception->getResponse() : null; + } + private function handleResponseWithDataType( string $dataType, RequestInterface $request, diff --git a/src/Api/StatisticsApi.php b/src/Api/StatisticsApi.php index ab62871a..5ba375fe 100644 --- a/src/Api/StatisticsApi.php +++ b/src/Api/StatisticsApi.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** @@ -30,11 +30,11 @@ use InvalidArgumentException; use GuzzleHttp\Client; use GuzzleHttp\ClientInterface; -use GuzzleHttp\Exception\ConnectException; use GuzzleHttp\Exception\RequestException; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Client\NetworkExceptionInterface; use Psr\Http\Message\RequestInterface; use Psr\Http\Message\ResponseInterface; use Bandwidth\ApiException; @@ -185,13 +185,14 @@ public function getStatisticsWithHttpInfo( try { $response = $this->client->send($request, $options); } catch (RequestException $e) { + $eResponse = $this->getExceptionResponse($e); throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null + $eResponse?->getHeaders(), + $eResponse ? (string) $eResponse->getBody() : null ); - } catch (ConnectException $e) { + } catch (NetworkExceptionInterface $e) { throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), @@ -436,7 +437,15 @@ function ($response) use ($returnType) { ]; }, function ($exception) { - $response = $exception->getResponse(); + $response = $this->getExceptionResponse($exception); + if ($response === null) { + throw new ApiException( + "[{$exception->getCode()}] {$exception->getMessage()}", + (int) $exception->getCode(), + null, + null + ); + } $statusCode = $response->getStatusCode(); throw new ApiException( sprintf( @@ -537,7 +546,7 @@ public function getStatisticsRequest( } $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $query = ObjectSerializer::buildQuery($queryParams); + $query = ObjectSerializer::buildQuery($queryParams, PHP_QUERY_RFC3986, $this->config); return new Request( 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), @@ -580,6 +589,17 @@ protected function createHttpClientOption(): array return $options; } + /** + * Returns the response attached to a Guzzle exception, if there is one. + * + * Guzzle 7 exposes getResponse() on RequestException, while Guzzle 8 only + * exposes it on ResponseException and its subclasses. + */ + private function getExceptionResponse(\Throwable $exception): ?ResponseInterface + { + return method_exists($exception, 'getResponse') ? $exception->getResponse() : null; + } + private function handleResponseWithDataType( string $dataType, RequestInterface $request, diff --git a/src/Api/TollFreeVerificationApi.php b/src/Api/TollFreeVerificationApi.php index 90c8e7b3..2e72598f 100644 --- a/src/Api/TollFreeVerificationApi.php +++ b/src/Api/TollFreeVerificationApi.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** @@ -30,11 +30,11 @@ use InvalidArgumentException; use GuzzleHttp\Client; use GuzzleHttp\ClientInterface; -use GuzzleHttp\Exception\ConnectException; use GuzzleHttp\Exception\RequestException; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Client\NetworkExceptionInterface; use Psr\Http\Message\RequestInterface; use Psr\Http\Message\ResponseInterface; use Bandwidth\ApiException; @@ -213,13 +213,14 @@ public function createWebhookSubscriptionWithHttpInfo( try { $response = $this->client->send($request, $options); } catch (RequestException $e) { + $eResponse = $this->getExceptionResponse($e); throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null + $eResponse?->getHeaders(), + $eResponse ? (string) $eResponse->getBody() : null ); - } catch (ConnectException $e) { + } catch (NetworkExceptionInterface $e) { throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), @@ -468,7 +469,15 @@ function ($response) use ($returnType) { ]; }, function ($exception) { - $response = $exception->getResponse(); + $response = $this->getExceptionResponse($exception); + if ($response === null) { + throw new ApiException( + "[{$exception->getCode()}] {$exception->getMessage()}", + (int) $exception->getCode(), + null, + null + ); + } $statusCode = $response->getStatusCode(); throw new ApiException( sprintf( @@ -617,7 +626,7 @@ public function createWebhookSubscriptionRequest( } $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $query = ObjectSerializer::buildQuery($queryParams); + $query = ObjectSerializer::buildQuery($queryParams, PHP_QUERY_RFC3986, $this->config); return new Request( 'POST', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), @@ -706,13 +715,14 @@ public function deleteVerificationRequestWithHttpInfo( try { $response = $this->client->send($request, $options); } catch (RequestException $e) { + $eResponse = $this->getExceptionResponse($e); throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null + $eResponse?->getHeaders(), + $eResponse ? (string) $eResponse->getBody() : null ); - } catch (ConnectException $e) { + } catch (NetworkExceptionInterface $e) { throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), @@ -867,7 +877,15 @@ function ($response) use ($returnType) { return [null, $response->getStatusCode(), $response->getHeaders()]; }, function ($exception) { - $response = $exception->getResponse(); + $response = $this->getExceptionResponse($exception); + if ($response === null) { + throw new ApiException( + "[{$exception->getCode()}] {$exception->getMessage()}", + (int) $exception->getCode(), + null, + null + ); + } $statusCode = $response->getStatusCode(); throw new ApiException( sprintf( @@ -993,7 +1011,7 @@ public function deleteVerificationRequestRequest( } $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $query = ObjectSerializer::buildQuery($queryParams); + $query = ObjectSerializer::buildQuery($queryParams, PHP_QUERY_RFC3986, $this->config); return new Request( 'DELETE', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), @@ -1082,13 +1100,14 @@ public function deleteWebhookSubscriptionWithHttpInfo( try { $response = $this->client->send($request, $options); } catch (RequestException $e) { + $eResponse = $this->getExceptionResponse($e); throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null + $eResponse?->getHeaders(), + $eResponse ? (string) $eResponse->getBody() : null ); - } catch (ConnectException $e) { + } catch (NetworkExceptionInterface $e) { throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), @@ -1243,7 +1262,15 @@ function ($response) use ($returnType) { return [null, $response->getStatusCode(), $response->getHeaders()]; }, function ($exception) { - $response = $exception->getResponse(); + $response = $this->getExceptionResponse($exception); + if ($response === null) { + throw new ApiException( + "[{$exception->getCode()}] {$exception->getMessage()}", + (int) $exception->getCode(), + null, + null + ); + } $statusCode = $response->getStatusCode(); throw new ApiException( sprintf( @@ -1360,7 +1387,7 @@ public function deleteWebhookSubscriptionRequest( } $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $query = ObjectSerializer::buildQuery($queryParams); + $query = ObjectSerializer::buildQuery($queryParams, PHP_QUERY_RFC3986, $this->config); return new Request( 'DELETE', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), @@ -1449,13 +1476,14 @@ public function getTollFreeVerificationStatusWithHttpInfo( try { $response = $this->client->send($request, $options); } catch (RequestException $e) { + $eResponse = $this->getExceptionResponse($e); throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null + $eResponse?->getHeaders(), + $eResponse ? (string) $eResponse->getBody() : null ); - } catch (ConnectException $e) { + } catch (NetworkExceptionInterface $e) { throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), @@ -1704,7 +1732,15 @@ function ($response) use ($returnType) { ]; }, function ($exception) { - $response = $exception->getResponse(); + $response = $this->getExceptionResponse($exception); + if ($response === null) { + throw new ApiException( + "[{$exception->getCode()}] {$exception->getMessage()}", + (int) $exception->getCode(), + null, + null + ); + } $statusCode = $response->getStatusCode(); throw new ApiException( sprintf( @@ -1830,7 +1866,7 @@ public function getTollFreeVerificationStatusRequest( } $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $query = ObjectSerializer::buildQuery($queryParams); + $query = ObjectSerializer::buildQuery($queryParams, PHP_QUERY_RFC3986, $this->config); return new Request( 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), @@ -1911,13 +1947,14 @@ public function listTollFreeUseCasesWithHttpInfo( try { $response = $this->client->send($request, $options); } catch (RequestException $e) { + $eResponse = $this->getExceptionResponse($e); throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null + $eResponse?->getHeaders(), + $eResponse ? (string) $eResponse->getBody() : null ); - } catch (ConnectException $e) { + } catch (NetworkExceptionInterface $e) { throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), @@ -2158,7 +2195,15 @@ function ($response) use ($returnType) { ]; }, function ($exception) { - $response = $exception->getResponse(); + $response = $this->getExceptionResponse($exception); + if ($response === null) { + throw new ApiException( + "[{$exception->getCode()}] {$exception->getMessage()}", + (int) $exception->getCode(), + null, + null + ); + } $statusCode = $response->getStatusCode(); throw new ApiException( sprintf( @@ -2243,7 +2288,7 @@ public function listTollFreeUseCasesRequest( } $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $query = ObjectSerializer::buildQuery($queryParams); + $query = ObjectSerializer::buildQuery($queryParams, PHP_QUERY_RFC3986, $this->config); return new Request( 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), @@ -2328,13 +2373,14 @@ public function listWebhookSubscriptionsWithHttpInfo( try { $response = $this->client->send($request, $options); } catch (RequestException $e) { + $eResponse = $this->getExceptionResponse($e); throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null + $eResponse?->getHeaders(), + $eResponse ? (string) $eResponse->getBody() : null ); - } catch (ConnectException $e) { + } catch (NetworkExceptionInterface $e) { throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), @@ -2565,7 +2611,15 @@ function ($response) use ($returnType) { ]; }, function ($exception) { - $response = $exception->getResponse(); + $response = $this->getExceptionResponse($exception); + if ($response === null) { + throw new ApiException( + "[{$exception->getCode()}] {$exception->getMessage()}", + (int) $exception->getCode(), + null, + null + ); + } $statusCode = $response->getStatusCode(); throw new ApiException( sprintf( @@ -2666,7 +2720,7 @@ public function listWebhookSubscriptionsRequest( } $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $query = ObjectSerializer::buildQuery($queryParams); + $query = ObjectSerializer::buildQuery($queryParams, PHP_QUERY_RFC3986, $this->config); return new Request( 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), @@ -2755,13 +2809,14 @@ public function requestTollFreeVerificationWithHttpInfo( try { $response = $this->client->send($request, $options); } catch (RequestException $e) { + $eResponse = $this->getExceptionResponse($e); throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null + $eResponse?->getHeaders(), + $eResponse ? (string) $eResponse->getBody() : null ); - } catch (ConnectException $e) { + } catch (NetworkExceptionInterface $e) { throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), @@ -2916,7 +2971,15 @@ function ($response) use ($returnType) { return [null, $response->getStatusCode(), $response->getHeaders()]; }, function ($exception) { - $response = $exception->getResponse(); + $response = $this->getExceptionResponse($exception); + if ($response === null) { + throw new ApiException( + "[{$exception->getCode()}] {$exception->getMessage()}", + (int) $exception->getCode(), + null, + null + ); + } $statusCode = $response->getStatusCode(); throw new ApiException( sprintf( @@ -3065,7 +3128,7 @@ public function requestTollFreeVerificationRequest( } $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $query = ObjectSerializer::buildQuery($queryParams); + $query = ObjectSerializer::buildQuery($queryParams, PHP_QUERY_RFC3986, $this->config); return new Request( 'POST', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), @@ -3158,13 +3221,14 @@ public function updateTollFreeVerificationRequestWithHttpInfo( try { $response = $this->client->send($request, $options); } catch (RequestException $e) { + $eResponse = $this->getExceptionResponse($e); throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null + $eResponse?->getHeaders(), + $eResponse ? (string) $eResponse->getBody() : null ); - } catch (ConnectException $e) { + } catch (NetworkExceptionInterface $e) { throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), @@ -3331,7 +3395,15 @@ function ($response) use ($returnType) { return [null, $response->getStatusCode(), $response->getHeaders()]; }, function ($exception) { - $response = $exception->getResponse(); + $response = $this->getExceptionResponse($exception); + if ($response === null) { + throw new ApiException( + "[{$exception->getCode()}] {$exception->getMessage()}", + (int) $exception->getCode(), + null, + null + ); + } $statusCode = $response->getStatusCode(); throw new ApiException( sprintf( @@ -3505,7 +3577,7 @@ public function updateTollFreeVerificationRequestRequest( } $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $query = ObjectSerializer::buildQuery($queryParams); + $query = ObjectSerializer::buildQuery($queryParams, PHP_QUERY_RFC3986, $this->config); return new Request( 'PUT', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), @@ -3598,13 +3670,14 @@ public function updateWebhookSubscriptionWithHttpInfo( try { $response = $this->client->send($request, $options); } catch (RequestException $e) { + $eResponse = $this->getExceptionResponse($e); throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null + $eResponse?->getHeaders(), + $eResponse ? (string) $eResponse->getBody() : null ); - } catch (ConnectException $e) { + } catch (NetworkExceptionInterface $e) { throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), @@ -3857,7 +3930,15 @@ function ($response) use ($returnType) { ]; }, function ($exception) { - $response = $exception->getResponse(); + $response = $this->getExceptionResponse($exception); + if ($response === null) { + throw new ApiException( + "[{$exception->getCode()}] {$exception->getMessage()}", + (int) $exception->getCode(), + null, + null + ); + } $statusCode = $response->getStatusCode(); throw new ApiException( sprintf( @@ -4022,7 +4103,7 @@ public function updateWebhookSubscriptionRequest( } $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $query = ObjectSerializer::buildQuery($queryParams); + $query = ObjectSerializer::buildQuery($queryParams, PHP_QUERY_RFC3986, $this->config); return new Request( 'PUT', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), @@ -4065,6 +4146,17 @@ protected function createHttpClientOption(): array return $options; } + /** + * Returns the response attached to a Guzzle exception, if there is one. + * + * Guzzle 7 exposes getResponse() on RequestException, while Guzzle 8 only + * exposes it on ResponseException and its subclasses. + */ + private function getExceptionResponse(\Throwable $exception): ?ResponseInterface + { + return method_exists($exception, 'getResponse') ? $exception->getResponse() : null; + } + private function handleResponseWithDataType( string $dataType, RequestInterface $request, diff --git a/src/Api/TranscriptionsApi.php b/src/Api/TranscriptionsApi.php index 9bc97111..8cc1247e 100644 --- a/src/Api/TranscriptionsApi.php +++ b/src/Api/TranscriptionsApi.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** @@ -30,11 +30,11 @@ use InvalidArgumentException; use GuzzleHttp\Client; use GuzzleHttp\ClientInterface; -use GuzzleHttp\Exception\ConnectException; use GuzzleHttp\Exception\RequestException; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Client\NetworkExceptionInterface; use Psr\Http\Message\RequestInterface; use Psr\Http\Message\ResponseInterface; use Bandwidth\ApiException; @@ -199,13 +199,14 @@ public function deleteRealTimeTranscriptionWithHttpInfo( try { $response = $this->client->send($request, $options); } catch (RequestException $e) { + $eResponse = $this->getExceptionResponse($e); throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null + $eResponse?->getHeaders(), + $eResponse ? (string) $eResponse->getBody() : null ); - } catch (ConnectException $e) { + } catch (NetworkExceptionInterface $e) { throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), @@ -364,7 +365,15 @@ function ($response) use ($returnType) { return [null, $response->getStatusCode(), $response->getHeaders()]; }, function ($exception) { - $response = $exception->getResponse(); + $response = $this->getExceptionResponse($exception); + if ($response === null) { + throw new ApiException( + "[{$exception->getCode()}] {$exception->getMessage()}", + (int) $exception->getCode(), + null, + null + ); + } $statusCode = $response->getStatusCode(); throw new ApiException( sprintf( @@ -497,7 +506,7 @@ public function deleteRealTimeTranscriptionRequest( } $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $query = ObjectSerializer::buildQuery($queryParams); + $query = ObjectSerializer::buildQuery($queryParams, PHP_QUERY_RFC3986, $this->config); return new Request( 'DELETE', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), @@ -590,13 +599,14 @@ public function getRealTimeTranscriptionWithHttpInfo( try { $response = $this->client->send($request, $options); } catch (RequestException $e) { + $eResponse = $this->getExceptionResponse($e); throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null + $eResponse?->getHeaders(), + $eResponse ? (string) $eResponse->getBody() : null ); - } catch (ConnectException $e) { + } catch (NetworkExceptionInterface $e) { throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), @@ -849,7 +859,15 @@ function ($response) use ($returnType) { ]; }, function ($exception) { - $response = $exception->getResponse(); + $response = $this->getExceptionResponse($exception); + if ($response === null) { + throw new ApiException( + "[{$exception->getCode()}] {$exception->getMessage()}", + (int) $exception->getCode(), + null, + null + ); + } $statusCode = $response->getStatusCode(); throw new ApiException( sprintf( @@ -982,7 +1000,7 @@ public function getRealTimeTranscriptionRequest( } $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $query = ObjectSerializer::buildQuery($queryParams); + $query = ObjectSerializer::buildQuery($queryParams, PHP_QUERY_RFC3986, $this->config); return new Request( 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), @@ -1071,13 +1089,14 @@ public function listRealTimeTranscriptionsWithHttpInfo( try { $response = $this->client->send($request, $options); } catch (RequestException $e) { + $eResponse = $this->getExceptionResponse($e); throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null + $eResponse?->getHeaders(), + $eResponse ? (string) $eResponse->getBody() : null ); - } catch (ConnectException $e) { + } catch (NetworkExceptionInterface $e) { throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), @@ -1326,7 +1345,15 @@ function ($response) use ($returnType) { ]; }, function ($exception) { - $response = $exception->getResponse(); + $response = $this->getExceptionResponse($exception); + if ($response === null) { + throw new ApiException( + "[{$exception->getCode()}] {$exception->getMessage()}", + (int) $exception->getCode(), + null, + null + ); + } $statusCode = $response->getStatusCode(); throw new ApiException( sprintf( @@ -1443,7 +1470,7 @@ public function listRealTimeTranscriptionsRequest( } $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $query = ObjectSerializer::buildQuery($queryParams); + $query = ObjectSerializer::buildQuery($queryParams, PHP_QUERY_RFC3986, $this->config); return new Request( 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), @@ -1486,6 +1513,17 @@ protected function createHttpClientOption(): array return $options; } + /** + * Returns the response attached to a Guzzle exception, if there is one. + * + * Guzzle 7 exposes getResponse() on RequestException, while Guzzle 8 only + * exposes it on ResponseException and its subclasses. + */ + private function getExceptionResponse(\Throwable $exception): ?ResponseInterface + { + return method_exists($exception, 'getResponse') ? $exception->getResponse() : null; + } + private function handleResponseWithDataType( string $dataType, RequestInterface $request, diff --git a/src/ApiException.php b/src/ApiException.php index 7ddee49c..d5b5d75b 100644 --- a/src/ApiException.php +++ b/src/ApiException.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Configuration.php b/src/Configuration.php index efccc76f..33ab266c 100644 --- a/src/Configuration.php +++ b/src/Configuration.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** @@ -200,14 +200,18 @@ public function __construct() /** * Sets API key * - * @param string $apiKeyIdentifier API key identifier (authentication scheme) - * @param string $key API key or token + * @param string $apiKeyIdentifier API key identifier (authentication scheme) + * @param string|null $key API key or token * * @return $this */ - public function setApiKey(string $apiKeyIdentifier, string $key): static + public function setApiKey(string $apiKeyIdentifier, ?string $key): static { - $this->apiKeys[$apiKeyIdentifier] = $key; + if ($key === null) { + unset($this->apiKeys[$apiKeyIdentifier]); + } else { + $this->apiKeys[$apiKeyIdentifier] = $key; + } return $this; } @@ -226,14 +230,18 @@ public function getApiKey(string $apiKeyIdentifier): ?string /** * Sets the prefix for API key (e.g. Bearer) * - * @param string $apiKeyIdentifier API key identifier (authentication scheme) - * @param string $prefix API key prefix, e.g. Bearer + * @param string $apiKeyIdentifier API key identifier (authentication scheme) + * @param string|null $prefix API key prefix, e.g. Bearer * * @return $this */ - public function setApiKeyPrefix(string $apiKeyIdentifier, string $prefix): static + public function setApiKeyPrefix(string $apiKeyIdentifier, ?string $prefix): static { - $this->apiKeyPrefixes[$apiKeyIdentifier] = $prefix; + if ($prefix === null) { + unset($this->apiKeyPrefixes[$apiKeyIdentifier]); + } else { + $this->apiKeyPrefixes[$apiKeyIdentifier] = $prefix; + } return $this; } diff --git a/src/FormDataProcessor.php b/src/FormDataProcessor.php index ea8e8995..da8e26ad 100644 --- a/src/FormDataProcessor.php +++ b/src/FormDataProcessor.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/HeaderSelector.php b/src/HeaderSelector.php index b5ca03f2..938464ef 100644 --- a/src/HeaderSelector.php +++ b/src/HeaderSelector.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/AccountStatistics.php b/src/Model/AccountStatistics.php index b8f1511f..b91f30be 100644 --- a/src/Model/AccountStatistics.php +++ b/src/Model/AccountStatistics.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/AdditionalDenialReason.php b/src/Model/AdditionalDenialReason.php index 1d77c85c..62940814 100644 --- a/src/Model/AdditionalDenialReason.php +++ b/src/Model/AdditionalDenialReason.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/Address.php b/src/Model/Address.php index ed99fc2d..2d127ca5 100644 --- a/src/Model/Address.php +++ b/src/Model/Address.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/AnswerCallback.php b/src/Model/AnswerCallback.php index b4b61adf..ba1c278d 100644 --- a/src/Model/AnswerCallback.php +++ b/src/Model/AnswerCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/AnyOfInterface.php b/src/Model/AnyOfInterface.php index 763f7e9f..a9e34517 100644 --- a/src/Model/AnyOfInterface.php +++ b/src/Model/AnyOfInterface.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/AsyncLookupRequest.php b/src/Model/AsyncLookupRequest.php index 95977865..daf11f93 100644 --- a/src/Model/AsyncLookupRequest.php +++ b/src/Model/AsyncLookupRequest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/BlockedWebhook.php b/src/Model/BlockedWebhook.php index 31e2ecf7..07d50146 100644 --- a/src/Model/BlockedWebhook.php +++ b/src/Model/BlockedWebhook.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/BridgeCompleteCallback.php b/src/Model/BridgeCompleteCallback.php index 60e8c05f..babaa766 100644 --- a/src/Model/BridgeCompleteCallback.php +++ b/src/Model/BridgeCompleteCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/BridgeTargetCompleteCallback.php b/src/Model/BridgeTargetCompleteCallback.php index 9ed8b67f..5727f9f5 100644 --- a/src/Model/BridgeTargetCompleteCallback.php +++ b/src/Model/BridgeTargetCompleteCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/BrtcError.php b/src/Model/BrtcError.php index 2ba0b928..6cc75d65 100644 --- a/src/Model/BrtcError.php +++ b/src/Model/BrtcError.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/BrtcErrorResponse.php b/src/Model/BrtcErrorResponse.php index cd0f4e65..ffe79ced 100644 --- a/src/Model/BrtcErrorResponse.php +++ b/src/Model/BrtcErrorResponse.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/BrtcErrorSource.php b/src/Model/BrtcErrorSource.php index e78a8fd7..8b2a4dd7 100644 --- a/src/Model/BrtcErrorSource.php +++ b/src/Model/BrtcErrorSource.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/BrtcLink.php b/src/Model/BrtcLink.php index dca3a58f..f95d4cc8 100644 --- a/src/Model/BrtcLink.php +++ b/src/Model/BrtcLink.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/BusinessEntityTypeEnum.php b/src/Model/BusinessEntityTypeEnum.php index 0ef8f688..bf70726c 100644 --- a/src/Model/BusinessEntityTypeEnum.php +++ b/src/Model/BusinessEntityTypeEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/BusinessRegistrationTypeEnum.php b/src/Model/BusinessRegistrationTypeEnum.php index 5ebeedc2..70f0d178 100644 --- a/src/Model/BusinessRegistrationTypeEnum.php +++ b/src/Model/BusinessRegistrationTypeEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/CallDirectionEnum.php b/src/Model/CallDirectionEnum.php index 1480c341..c4ac2b2f 100644 --- a/src/Model/CallDirectionEnum.php +++ b/src/Model/CallDirectionEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/CallRecordingMetadata.php b/src/Model/CallRecordingMetadata.php index f32de9e4..5b458e0d 100644 --- a/src/Model/CallRecordingMetadata.php +++ b/src/Model/CallRecordingMetadata.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/CallState.php b/src/Model/CallState.php index 2e02a3ad..40ad956b 100644 --- a/src/Model/CallState.php +++ b/src/Model/CallState.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/CallStateEnum.php b/src/Model/CallStateEnum.php index 676e6bed..ab550401 100644 --- a/src/Model/CallStateEnum.php +++ b/src/Model/CallStateEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/CallTranscription.php b/src/Model/CallTranscription.php index 09b601bc..082bdcde 100644 --- a/src/Model/CallTranscription.php +++ b/src/Model/CallTranscription.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/CallTranscriptionDetectedLanguageEnum.php b/src/Model/CallTranscriptionDetectedLanguageEnum.php index 4d1676c3..006042fd 100644 --- a/src/Model/CallTranscriptionDetectedLanguageEnum.php +++ b/src/Model/CallTranscriptionDetectedLanguageEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/CallTranscriptionMetadata.php b/src/Model/CallTranscriptionMetadata.php index 256b2e3f..c6c7b33f 100644 --- a/src/Model/CallTranscriptionMetadata.php +++ b/src/Model/CallTranscriptionMetadata.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/CallTranscriptionResponse.php b/src/Model/CallTranscriptionResponse.php index 1641db4f..b48520f3 100644 --- a/src/Model/CallTranscriptionResponse.php +++ b/src/Model/CallTranscriptionResponse.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/CallTranscriptionTrackEnum.php b/src/Model/CallTranscriptionTrackEnum.php index d8d6afd6..0fa1bced 100644 --- a/src/Model/CallTranscriptionTrackEnum.php +++ b/src/Model/CallTranscriptionTrackEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/Callback.php b/src/Model/Callback.php index f4bf0aae..2cfaba14 100644 --- a/src/Model/Callback.php +++ b/src/Model/Callback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/CallbackMethodEnum.php b/src/Model/CallbackMethodEnum.php index d30884e1..94c11127 100644 --- a/src/Model/CallbackMethodEnum.php +++ b/src/Model/CallbackMethodEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/CardWidthEnum.php b/src/Model/CardWidthEnum.php index f07570ca..c5d29018 100644 --- a/src/Model/CardWidthEnum.php +++ b/src/Model/CardWidthEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/CodeRequest.php b/src/Model/CodeRequest.php index c493823f..dabc2d9d 100644 --- a/src/Model/CodeRequest.php +++ b/src/Model/CodeRequest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/CompletedLookupStatusEnum.php b/src/Model/CompletedLookupStatusEnum.php index a5d7f396..b99644cc 100644 --- a/src/Model/CompletedLookupStatusEnum.php +++ b/src/Model/CompletedLookupStatusEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/Conference.php b/src/Model/Conference.php index 12a3cc54..02ca8867 100644 --- a/src/Model/Conference.php +++ b/src/Model/Conference.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/ConferenceCompletedCallback.php b/src/Model/ConferenceCompletedCallback.php index 5fcd4042..30a9244a 100644 --- a/src/Model/ConferenceCompletedCallback.php +++ b/src/Model/ConferenceCompletedCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/ConferenceCreatedCallback.php b/src/Model/ConferenceCreatedCallback.php index 16ad6006..7110a8f2 100644 --- a/src/Model/ConferenceCreatedCallback.php +++ b/src/Model/ConferenceCreatedCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/ConferenceMember.php b/src/Model/ConferenceMember.php index 8597d3d8..b476e2ed 100644 --- a/src/Model/ConferenceMember.php +++ b/src/Model/ConferenceMember.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/ConferenceMemberExitCallback.php b/src/Model/ConferenceMemberExitCallback.php index adc4fe5a..1ea480d5 100644 --- a/src/Model/ConferenceMemberExitCallback.php +++ b/src/Model/ConferenceMemberExitCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/ConferenceMemberJoinCallback.php b/src/Model/ConferenceMemberJoinCallback.php index 0ab6da36..747d7b87 100644 --- a/src/Model/ConferenceMemberJoinCallback.php +++ b/src/Model/ConferenceMemberJoinCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/ConferenceRecordingAvailableCallback.php b/src/Model/ConferenceRecordingAvailableCallback.php index 41354068..63fcc4d4 100644 --- a/src/Model/ConferenceRecordingAvailableCallback.php +++ b/src/Model/ConferenceRecordingAvailableCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/ConferenceRecordingMetadata.php b/src/Model/ConferenceRecordingMetadata.php index 2800e586..624ba70b 100644 --- a/src/Model/ConferenceRecordingMetadata.php +++ b/src/Model/ConferenceRecordingMetadata.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/ConferenceRedirectCallback.php b/src/Model/ConferenceRedirectCallback.php index eaaa4e9f..9df1f606 100644 --- a/src/Model/ConferenceRedirectCallback.php +++ b/src/Model/ConferenceRedirectCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/ConferenceStateEnum.php b/src/Model/ConferenceStateEnum.php index b7c7b2c4..8c5c1942 100644 --- a/src/Model/ConferenceStateEnum.php +++ b/src/Model/ConferenceStateEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/Contact.php b/src/Model/Contact.php index 2bfca2f9..ae13f6d7 100644 --- a/src/Model/Contact.php +++ b/src/Model/Contact.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/CreateAsyncBulkLookupResponse.php b/src/Model/CreateAsyncBulkLookupResponse.php index 35feaa52..399a97ce 100644 --- a/src/Model/CreateAsyncBulkLookupResponse.php +++ b/src/Model/CreateAsyncBulkLookupResponse.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/CreateAsyncBulkLookupResponseData.php b/src/Model/CreateAsyncBulkLookupResponseData.php index 13af4dec..4051a4e0 100644 --- a/src/Model/CreateAsyncBulkLookupResponseData.php +++ b/src/Model/CreateAsyncBulkLookupResponseData.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/CreateCall.php b/src/Model/CreateCall.php index b0e001f2..18099411 100644 --- a/src/Model/CreateCall.php +++ b/src/Model/CreateCall.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/CreateCallResponse.php b/src/Model/CreateCallResponse.php index 6780e34e..8afc7377 100644 --- a/src/Model/CreateCallResponse.php +++ b/src/Model/CreateCallResponse.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/CreateEndpointRequestBase.php b/src/Model/CreateEndpointRequestBase.php index 50160e34..dac7cadb 100644 --- a/src/Model/CreateEndpointRequestBase.php +++ b/src/Model/CreateEndpointRequestBase.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/CreateEndpointResponse.php b/src/Model/CreateEndpointResponse.php index ecf91b43..14c90d3c 100644 --- a/src/Model/CreateEndpointResponse.php +++ b/src/Model/CreateEndpointResponse.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/CreateEndpointResponseData.php b/src/Model/CreateEndpointResponseData.php index 4e6064da..71f11b66 100644 --- a/src/Model/CreateEndpointResponseData.php +++ b/src/Model/CreateEndpointResponseData.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/CreateMessageRequestError.php b/src/Model/CreateMessageRequestError.php index 437330c2..c38a1619 100644 --- a/src/Model/CreateMessageRequestError.php +++ b/src/Model/CreateMessageRequestError.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/CreateMultiChannelMessageResponse.php b/src/Model/CreateMultiChannelMessageResponse.php index dd8bd1a8..15b8389c 100644 --- a/src/Model/CreateMultiChannelMessageResponse.php +++ b/src/Model/CreateMultiChannelMessageResponse.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/CreateSyncLookupResponse.php b/src/Model/CreateSyncLookupResponse.php index 57928842..ae4cdf7a 100644 --- a/src/Model/CreateSyncLookupResponse.php +++ b/src/Model/CreateSyncLookupResponse.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/CreateSyncLookupResponseData.php b/src/Model/CreateSyncLookupResponseData.php index 9f5d3a24..cba9b775 100644 --- a/src/Model/CreateSyncLookupResponseData.php +++ b/src/Model/CreateSyncLookupResponseData.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/CreateWebRtcConnectionRequest.php b/src/Model/CreateWebRtcConnectionRequest.php index 40deedfc..43b6e7ef 100644 --- a/src/Model/CreateWebRtcConnectionRequest.php +++ b/src/Model/CreateWebRtcConnectionRequest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/DeactivationEventEnum.php b/src/Model/DeactivationEventEnum.php index c391a7c0..6cc5f668 100644 --- a/src/Model/DeactivationEventEnum.php +++ b/src/Model/DeactivationEventEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/Device.php b/src/Model/Device.php index c1197973..c69e3e23 100644 --- a/src/Model/Device.php +++ b/src/Model/Device.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/DeviceStatusEnum.php b/src/Model/DeviceStatusEnum.php index 0e24921e..cd4d88de 100644 --- a/src/Model/DeviceStatusEnum.php +++ b/src/Model/DeviceStatusEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/DisconnectCallback.php b/src/Model/DisconnectCallback.php index 05887b79..39dafd75 100644 --- a/src/Model/DisconnectCallback.php +++ b/src/Model/DisconnectCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/Diversion.php b/src/Model/Diversion.php index 7b4c48d4..80ee4389 100644 --- a/src/Model/Diversion.php +++ b/src/Model/Diversion.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/DtmfCallback.php b/src/Model/DtmfCallback.php index e869f632..4a34b855 100644 --- a/src/Model/DtmfCallback.php +++ b/src/Model/DtmfCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/Endpoint.php b/src/Model/Endpoint.php index 6a6d8458..d6ba1af9 100644 --- a/src/Model/Endpoint.php +++ b/src/Model/Endpoint.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/EndpointDirectionEnum.php b/src/Model/EndpointDirectionEnum.php index a287b288..74e48980 100644 --- a/src/Model/EndpointDirectionEnum.php +++ b/src/Model/EndpointDirectionEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/EndpointEvent.php b/src/Model/EndpointEvent.php index 2876aa9f..e03dad63 100644 --- a/src/Model/EndpointEvent.php +++ b/src/Model/EndpointEvent.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/EndpointEventTypeEnum.php b/src/Model/EndpointEventTypeEnum.php index f3e28543..1fc08757 100644 --- a/src/Model/EndpointEventTypeEnum.php +++ b/src/Model/EndpointEventTypeEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/EndpointResponse.php b/src/Model/EndpointResponse.php index fd7cdeca..b427154e 100644 --- a/src/Model/EndpointResponse.php +++ b/src/Model/EndpointResponse.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/EndpointStatusEnum.php b/src/Model/EndpointStatusEnum.php index 34156893..829c417b 100644 --- a/src/Model/EndpointStatusEnum.php +++ b/src/Model/EndpointStatusEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/EndpointTypeEnum.php b/src/Model/EndpointTypeEnum.php index f26eed1b..cf4bd84c 100644 --- a/src/Model/EndpointTypeEnum.php +++ b/src/Model/EndpointTypeEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/Endpoints.php b/src/Model/Endpoints.php index 52706408..082ade54 100644 --- a/src/Model/Endpoints.php +++ b/src/Model/Endpoints.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/ErrorObject.php b/src/Model/ErrorObject.php index 2a78b712..5b4b10a4 100644 --- a/src/Model/ErrorObject.php +++ b/src/Model/ErrorObject.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/ErrorSource.php b/src/Model/ErrorSource.php index e8307626..2a8ca6f1 100644 --- a/src/Model/ErrorSource.php +++ b/src/Model/ErrorSource.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/FailureWebhook.php b/src/Model/FailureWebhook.php index d1cfda77..e3f65670 100644 --- a/src/Model/FailureWebhook.php +++ b/src/Model/FailureWebhook.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/FieldError.php b/src/Model/FieldError.php index cd9adc48..dcf7a60c 100644 --- a/src/Model/FieldError.php +++ b/src/Model/FieldError.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/FileFormatEnum.php b/src/Model/FileFormatEnum.php index 65046bb9..2691dcbb 100644 --- a/src/Model/FileFormatEnum.php +++ b/src/Model/FileFormatEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/GatherCallback.php b/src/Model/GatherCallback.php index 12db7555..46297151 100644 --- a/src/Model/GatherCallback.php +++ b/src/Model/GatherCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/GetAsyncBulkLookupResponse.php b/src/Model/GetAsyncBulkLookupResponse.php index 92cf16e0..be74afbd 100644 --- a/src/Model/GetAsyncBulkLookupResponse.php +++ b/src/Model/GetAsyncBulkLookupResponse.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/GetAsyncBulkLookupResponseData.php b/src/Model/GetAsyncBulkLookupResponseData.php index 0d3cf887..0e9ed708 100644 --- a/src/Model/GetAsyncBulkLookupResponseData.php +++ b/src/Model/GetAsyncBulkLookupResponseData.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/InProgressLookupStatusEnum.php b/src/Model/InProgressLookupStatusEnum.php index 893ec79f..1850b4ca 100644 --- a/src/Model/InProgressLookupStatusEnum.php +++ b/src/Model/InProgressLookupStatusEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/InboundCallback.php b/src/Model/InboundCallback.php index 52171cb7..3794d54f 100644 --- a/src/Model/InboundCallback.php +++ b/src/Model/InboundCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/InboundCallbackMessage.php b/src/Model/InboundCallbackMessage.php index d0395321..c542f86c 100644 --- a/src/Model/InboundCallbackMessage.php +++ b/src/Model/InboundCallbackMessage.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/InboundCallbackTypeEnum.php b/src/Model/InboundCallbackTypeEnum.php index d936cc38..c6d614c7 100644 --- a/src/Model/InboundCallbackTypeEnum.php +++ b/src/Model/InboundCallbackTypeEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/InitiateCallback.php b/src/Model/InitiateCallback.php index c052fd83..31b12dc6 100644 --- a/src/Model/InitiateCallback.php +++ b/src/Model/InitiateCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/LatestMessageDeliveryStatusEnum.php b/src/Model/LatestMessageDeliveryStatusEnum.php index 8ea60994..c9fccf84 100644 --- a/src/Model/LatestMessageDeliveryStatusEnum.php +++ b/src/Model/LatestMessageDeliveryStatusEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/LineTypeEnum.php b/src/Model/LineTypeEnum.php index ef1267c0..ecf39ed7 100644 --- a/src/Model/LineTypeEnum.php +++ b/src/Model/LineTypeEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/Link.php b/src/Model/Link.php index a287f36d..febd625c 100644 --- a/src/Model/Link.php +++ b/src/Model/Link.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/LinkSchema.php b/src/Model/LinkSchema.php index 06db5c1a..2be2e8f1 100644 --- a/src/Model/LinkSchema.php +++ b/src/Model/LinkSchema.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/LinksObject.php b/src/Model/LinksObject.php index b6a14870..89ba3eb0 100644 --- a/src/Model/LinksObject.php +++ b/src/Model/LinksObject.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/ListEndpointsResponse.php b/src/Model/ListEndpointsResponse.php index 3c02a7a1..b6a90593 100644 --- a/src/Model/ListEndpointsResponse.php +++ b/src/Model/ListEndpointsResponse.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/ListMessageDirectionEnum.php b/src/Model/ListMessageDirectionEnum.php index b8c8b117..a1ad1c16 100644 --- a/src/Model/ListMessageDirectionEnum.php +++ b/src/Model/ListMessageDirectionEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/ListMessageItem.php b/src/Model/ListMessageItem.php index 3fe40015..52529539 100644 --- a/src/Model/ListMessageItem.php +++ b/src/Model/ListMessageItem.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/LookupErrorResponse.php b/src/Model/LookupErrorResponse.php index 38fe4eef..975c3286 100644 --- a/src/Model/LookupErrorResponse.php +++ b/src/Model/LookupErrorResponse.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/LookupErrorSchema.php b/src/Model/LookupErrorSchema.php index 7192fafe..60e5978c 100644 --- a/src/Model/LookupErrorSchema.php +++ b/src/Model/LookupErrorSchema.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/LookupErrorSchemaMeta.php b/src/Model/LookupErrorSchemaMeta.php index bb9ad8d0..56f64ddb 100644 --- a/src/Model/LookupErrorSchemaMeta.php +++ b/src/Model/LookupErrorSchemaMeta.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/LookupResult.php b/src/Model/LookupResult.php index c020971d..b84c6a7f 100644 --- a/src/Model/LookupResult.php +++ b/src/Model/LookupResult.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/MachineDetectionCompleteCallback.php b/src/Model/MachineDetectionCompleteCallback.php index 8ac67eec..5a0553f8 100644 --- a/src/Model/MachineDetectionCompleteCallback.php +++ b/src/Model/MachineDetectionCompleteCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/MachineDetectionConfiguration.php b/src/Model/MachineDetectionConfiguration.php index 18fc0e8b..fc310012 100644 --- a/src/Model/MachineDetectionConfiguration.php +++ b/src/Model/MachineDetectionConfiguration.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/MachineDetectionModeEnum.php b/src/Model/MachineDetectionModeEnum.php index d74e693f..fcda0916 100644 --- a/src/Model/MachineDetectionModeEnum.php +++ b/src/Model/MachineDetectionModeEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/MachineDetectionResult.php b/src/Model/MachineDetectionResult.php index 267329c9..8785f55f 100644 --- a/src/Model/MachineDetectionResult.php +++ b/src/Model/MachineDetectionResult.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/Media.php b/src/Model/Media.php index 8a9eefc4..8933e2cb 100644 --- a/src/Model/Media.php +++ b/src/Model/Media.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/Message.php b/src/Model/Message.php index c2eddc79..c60a7d3e 100644 --- a/src/Model/Message.php +++ b/src/Model/Message.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/MessageDirectionEnum.php b/src/Model/MessageDirectionEnum.php index 117ddf26..ca71bc03 100644 --- a/src/Model/MessageDirectionEnum.php +++ b/src/Model/MessageDirectionEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/MessageRequest.php b/src/Model/MessageRequest.php index b8fbf90e..0eeb6fb6 100644 --- a/src/Model/MessageRequest.php +++ b/src/Model/MessageRequest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/MessageStatusEnum.php b/src/Model/MessageStatusEnum.php index aeb83039..83ab2ccf 100644 --- a/src/Model/MessageStatusEnum.php +++ b/src/Model/MessageStatusEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/MessageTypeEnum.php b/src/Model/MessageTypeEnum.php index 970ce65c..66390aa0 100644 --- a/src/Model/MessageTypeEnum.php +++ b/src/Model/MessageTypeEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/MessagesList.php b/src/Model/MessagesList.php index 5edbe71a..e0a95b6a 100644 --- a/src/Model/MessagesList.php +++ b/src/Model/MessagesList.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/MessagingCodeResponse.php b/src/Model/MessagingCodeResponse.php index bbbb5d29..78ae1f5d 100644 --- a/src/Model/MessagingCodeResponse.php +++ b/src/Model/MessagingCodeResponse.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/MessagingRequestError.php b/src/Model/MessagingRequestError.php index 14e445f2..942706b1 100644 --- a/src/Model/MessagingRequestError.php +++ b/src/Model/MessagingRequestError.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/MfaForbiddenRequestError.php b/src/Model/MfaForbiddenRequestError.php index 4a410060..3a4f5c38 100644 --- a/src/Model/MfaForbiddenRequestError.php +++ b/src/Model/MfaForbiddenRequestError.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/MfaRequestError.php b/src/Model/MfaRequestError.php index 1576fbe0..d4e6a939 100644 --- a/src/Model/MfaRequestError.php +++ b/src/Model/MfaRequestError.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/MfaUnauthorizedRequestError.php b/src/Model/MfaUnauthorizedRequestError.php index dcf8d674..33000d7d 100644 --- a/src/Model/MfaUnauthorizedRequestError.php +++ b/src/Model/MfaUnauthorizedRequestError.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/MmsMessageContent.php b/src/Model/MmsMessageContent.php index 014a2854..3ed4099a 100644 --- a/src/Model/MmsMessageContent.php +++ b/src/Model/MmsMessageContent.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/MmsMessageContentFile.php b/src/Model/MmsMessageContentFile.php index da7c234d..a5a1abeb 100644 --- a/src/Model/MmsMessageContentFile.php +++ b/src/Model/MmsMessageContentFile.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/ModelInterface.php b/src/Model/ModelInterface.php index 4344f631..c6223885 100644 --- a/src/Model/ModelInterface.php +++ b/src/Model/ModelInterface.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/MultiChannelAction.php b/src/Model/MultiChannelAction.php index ad0942e1..46765847 100644 --- a/src/Model/MultiChannelAction.php +++ b/src/Model/MultiChannelAction.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/MultiChannelActionCalendarEvent.php b/src/Model/MultiChannelActionCalendarEvent.php index d6483ea1..8cf033df 100644 --- a/src/Model/MultiChannelActionCalendarEvent.php +++ b/src/Model/MultiChannelActionCalendarEvent.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/MultiChannelChannelListMMSObject.php b/src/Model/MultiChannelChannelListMMSObject.php index d29f5381..69e41141 100644 --- a/src/Model/MultiChannelChannelListMMSObject.php +++ b/src/Model/MultiChannelChannelListMMSObject.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/MultiChannelChannelListMMSResponseObject.php b/src/Model/MultiChannelChannelListMMSResponseObject.php index 171990c7..d6af1c7e 100644 --- a/src/Model/MultiChannelChannelListMMSResponseObject.php +++ b/src/Model/MultiChannelChannelListMMSResponseObject.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/MultiChannelChannelListObjectBase.php b/src/Model/MultiChannelChannelListObjectBase.php index 34b86296..66aa3adc 100644 --- a/src/Model/MultiChannelChannelListObjectBase.php +++ b/src/Model/MultiChannelChannelListObjectBase.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/MultiChannelChannelListOwnerObject.php b/src/Model/MultiChannelChannelListOwnerObject.php index 6ffa55ca..f8160671 100644 --- a/src/Model/MultiChannelChannelListOwnerObject.php +++ b/src/Model/MultiChannelChannelListOwnerObject.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/MultiChannelChannelListRBMObject.php b/src/Model/MultiChannelChannelListRBMObject.php index d4b341ad..23acd460 100644 --- a/src/Model/MultiChannelChannelListRBMObject.php +++ b/src/Model/MultiChannelChannelListRBMObject.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/MultiChannelChannelListRBMObjectAllOfContent.php b/src/Model/MultiChannelChannelListRBMObjectAllOfContent.php index ddee0ca0..e5929a76 100644 --- a/src/Model/MultiChannelChannelListRBMObjectAllOfContent.php +++ b/src/Model/MultiChannelChannelListRBMObjectAllOfContent.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/MultiChannelChannelListRBMResponseObject.php b/src/Model/MultiChannelChannelListRBMResponseObject.php index f6053b0b..0125eed8 100644 --- a/src/Model/MultiChannelChannelListRBMResponseObject.php +++ b/src/Model/MultiChannelChannelListRBMResponseObject.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/MultiChannelChannelListRequestObject.php b/src/Model/MultiChannelChannelListRequestObject.php index 2f429a9d..c149f8f4 100644 --- a/src/Model/MultiChannelChannelListRequestObject.php +++ b/src/Model/MultiChannelChannelListRequestObject.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/MultiChannelChannelListResponseObject.php b/src/Model/MultiChannelChannelListResponseObject.php index f02ad828..b48f68b1 100644 --- a/src/Model/MultiChannelChannelListResponseObject.php +++ b/src/Model/MultiChannelChannelListResponseObject.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/MultiChannelChannelListSMSObject.php b/src/Model/MultiChannelChannelListSMSObject.php index 44557927..96bf2137 100644 --- a/src/Model/MultiChannelChannelListSMSObject.php +++ b/src/Model/MultiChannelChannelListSMSObject.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/MultiChannelChannelListSMSResponseObject.php b/src/Model/MultiChannelChannelListSMSResponseObject.php index 7079a17d..06fa7a2a 100644 --- a/src/Model/MultiChannelChannelListSMSResponseObject.php +++ b/src/Model/MultiChannelChannelListSMSResponseObject.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/MultiChannelError.php b/src/Model/MultiChannelError.php index 71bff87c..9f301a89 100644 --- a/src/Model/MultiChannelError.php +++ b/src/Model/MultiChannelError.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/MultiChannelMessageChannelEnum.php b/src/Model/MultiChannelMessageChannelEnum.php index 51e128f8..bf8333e6 100644 --- a/src/Model/MultiChannelMessageChannelEnum.php +++ b/src/Model/MultiChannelMessageChannelEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/MultiChannelMessageContent.php b/src/Model/MultiChannelMessageContent.php index d6e67626..f555b318 100644 --- a/src/Model/MultiChannelMessageContent.php +++ b/src/Model/MultiChannelMessageContent.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/MultiChannelMessageRequest.php b/src/Model/MultiChannelMessageRequest.php index 4664be4b..516dc652 100644 --- a/src/Model/MultiChannelMessageRequest.php +++ b/src/Model/MultiChannelMessageRequest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/MultiChannelMessageResponseData.php b/src/Model/MultiChannelMessageResponseData.php index c42a9c90..4349dcae 100644 --- a/src/Model/MultiChannelMessageResponseData.php +++ b/src/Model/MultiChannelMessageResponseData.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/OneOfInterface.php b/src/Model/OneOfInterface.php index 8998af40..eb9c6930 100644 --- a/src/Model/OneOfInterface.php +++ b/src/Model/OneOfInterface.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/OptInWorkflow.php b/src/Model/OptInWorkflow.php index edab2dbd..78e67db4 100644 --- a/src/Model/OptInWorkflow.php +++ b/src/Model/OptInWorkflow.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/Page.php b/src/Model/Page.php index 17ce2ac1..3c3538de 100644 --- a/src/Model/Page.php +++ b/src/Model/Page.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/PageInfo.php b/src/Model/PageInfo.php index 7261321e..2f0a460f 100644 --- a/src/Model/PageInfo.php +++ b/src/Model/PageInfo.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/PriorityEnum.php b/src/Model/PriorityEnum.php index 02191f08..3a95a2a4 100644 --- a/src/Model/PriorityEnum.php +++ b/src/Model/PriorityEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/ProductTypeEnum.php b/src/Model/ProductTypeEnum.php index 4e93817a..135fce00 100644 --- a/src/Model/ProductTypeEnum.php +++ b/src/Model/ProductTypeEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/RbmActionBase.php b/src/Model/RbmActionBase.php index d0cae684..f6d44a18 100644 --- a/src/Model/RbmActionBase.php +++ b/src/Model/RbmActionBase.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/RbmActionDial.php b/src/Model/RbmActionDial.php index 47967bb5..21c0b464 100644 --- a/src/Model/RbmActionDial.php +++ b/src/Model/RbmActionDial.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/RbmActionOpenUrl.php b/src/Model/RbmActionOpenUrl.php index 716fc40f..9be87543 100644 --- a/src/Model/RbmActionOpenUrl.php +++ b/src/Model/RbmActionOpenUrl.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/RbmActionTypeEnum.php b/src/Model/RbmActionTypeEnum.php index 4b87580d..5e040012 100644 --- a/src/Model/RbmActionTypeEnum.php +++ b/src/Model/RbmActionTypeEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/RbmActionViewLocation.php b/src/Model/RbmActionViewLocation.php index 39a95275..6858b377 100644 --- a/src/Model/RbmActionViewLocation.php +++ b/src/Model/RbmActionViewLocation.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/RbmCardContent.php b/src/Model/RbmCardContent.php index 9812f56f..6d57febc 100644 --- a/src/Model/RbmCardContent.php +++ b/src/Model/RbmCardContent.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/RbmCardContentMedia.php b/src/Model/RbmCardContentMedia.php index 4d216ad2..8e7ddf4c 100644 --- a/src/Model/RbmCardContentMedia.php +++ b/src/Model/RbmCardContentMedia.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/RbmLocationResponse.php b/src/Model/RbmLocationResponse.php index 1146cbba..8f2c9ba4 100644 --- a/src/Model/RbmLocationResponse.php +++ b/src/Model/RbmLocationResponse.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/RbmMediaHeightEnum.php b/src/Model/RbmMediaHeightEnum.php index f9a622f3..70c47628 100644 --- a/src/Model/RbmMediaHeightEnum.php +++ b/src/Model/RbmMediaHeightEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/RbmMessageCarouselCard.php b/src/Model/RbmMessageCarouselCard.php index 8aae102c..25016886 100644 --- a/src/Model/RbmMessageCarouselCard.php +++ b/src/Model/RbmMessageCarouselCard.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/RbmMessageContentFile.php b/src/Model/RbmMessageContentFile.php index 3146ff91..f041bfbc 100644 --- a/src/Model/RbmMessageContentFile.php +++ b/src/Model/RbmMessageContentFile.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/RbmMessageContentRichCard.php b/src/Model/RbmMessageContentRichCard.php index 1b17fb81..287dcbb0 100644 --- a/src/Model/RbmMessageContentRichCard.php +++ b/src/Model/RbmMessageContentRichCard.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/RbmMessageContentText.php b/src/Model/RbmMessageContentText.php index 426321b3..33a6537e 100644 --- a/src/Model/RbmMessageContentText.php +++ b/src/Model/RbmMessageContentText.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/RbmMessageMedia.php b/src/Model/RbmMessageMedia.php index f4c648e5..73c603cf 100644 --- a/src/Model/RbmMessageMedia.php +++ b/src/Model/RbmMessageMedia.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/RbmOpenUrlEnum.php b/src/Model/RbmOpenUrlEnum.php index bcf028a7..c3b13fba 100644 --- a/src/Model/RbmOpenUrlEnum.php +++ b/src/Model/RbmOpenUrlEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/RbmSession.php b/src/Model/RbmSession.php index bf7e1cb6..2263d959 100644 --- a/src/Model/RbmSession.php +++ b/src/Model/RbmSession.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/RbmStandaloneCard.php b/src/Model/RbmStandaloneCard.php index 9e19bf21..fb9fe478 100644 --- a/src/Model/RbmStandaloneCard.php +++ b/src/Model/RbmStandaloneCard.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/RbmSuggestionResponse.php b/src/Model/RbmSuggestionResponse.php index a7d3861e..cd1e30c8 100644 --- a/src/Model/RbmSuggestionResponse.php +++ b/src/Model/RbmSuggestionResponse.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/RbmWebViewEnum.php b/src/Model/RbmWebViewEnum.php index b3e33e31..f8fa4508 100644 --- a/src/Model/RbmWebViewEnum.php +++ b/src/Model/RbmWebViewEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/RecordingAvailableCallback.php b/src/Model/RecordingAvailableCallback.php index 1b0dfdd7..c3ccfafa 100644 --- a/src/Model/RecordingAvailableCallback.php +++ b/src/Model/RecordingAvailableCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/RecordingCompleteCallback.php b/src/Model/RecordingCompleteCallback.php index 27cd9670..0813988c 100644 --- a/src/Model/RecordingCompleteCallback.php +++ b/src/Model/RecordingCompleteCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/RecordingStateEnum.php b/src/Model/RecordingStateEnum.php index ce24ee14..1a1c1180 100644 --- a/src/Model/RecordingStateEnum.php +++ b/src/Model/RecordingStateEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/RecordingTranscriptionClip.php b/src/Model/RecordingTranscriptionClip.php index ad21e256..677933df 100644 --- a/src/Model/RecordingTranscriptionClip.php +++ b/src/Model/RecordingTranscriptionClip.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/RecordingTranscriptionMetadata.php b/src/Model/RecordingTranscriptionMetadata.php index f0dc07f3..8f2de9b8 100644 --- a/src/Model/RecordingTranscriptionMetadata.php +++ b/src/Model/RecordingTranscriptionMetadata.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/RecordingTranscriptions.php b/src/Model/RecordingTranscriptions.php index b60559f6..d9284848 100644 --- a/src/Model/RecordingTranscriptions.php +++ b/src/Model/RecordingTranscriptions.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/RedirectCallback.php b/src/Model/RedirectCallback.php index c00af22b..4c25a8d6 100644 --- a/src/Model/RedirectCallback.php +++ b/src/Model/RedirectCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/RedirectMethodEnum.php b/src/Model/RedirectMethodEnum.php index a9016fc0..a66b51fb 100644 --- a/src/Model/RedirectMethodEnum.php +++ b/src/Model/RedirectMethodEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/ReferCallStatusEnum.php b/src/Model/ReferCallStatusEnum.php index ef865fc8..80e2700f 100644 --- a/src/Model/ReferCallStatusEnum.php +++ b/src/Model/ReferCallStatusEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/ReferCompleteCallback.php b/src/Model/ReferCompleteCallback.php index 7fe89059..b0ceec31 100644 --- a/src/Model/ReferCompleteCallback.php +++ b/src/Model/ReferCompleteCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/SipConnectionMetadata.php b/src/Model/SipConnectionMetadata.php index 1c99a780..006fee13 100644 --- a/src/Model/SipConnectionMetadata.php +++ b/src/Model/SipConnectionMetadata.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/SipCredentials.php b/src/Model/SipCredentials.php index 8321d18f..5ec2859c 100644 --- a/src/Model/SipCredentials.php +++ b/src/Model/SipCredentials.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/SmsMessageContent.php b/src/Model/SmsMessageContent.php index c9518bec..3090f9ea 100644 --- a/src/Model/SmsMessageContent.php +++ b/src/Model/SmsMessageContent.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/StandaloneCardOrientationEnum.php b/src/Model/StandaloneCardOrientationEnum.php index 89cb0571..98b63e3a 100644 --- a/src/Model/StandaloneCardOrientationEnum.php +++ b/src/Model/StandaloneCardOrientationEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/StatusCallback.php b/src/Model/StatusCallback.php index b0de4eb6..3278b41e 100644 --- a/src/Model/StatusCallback.php +++ b/src/Model/StatusCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/StatusCallbackMessage.php b/src/Model/StatusCallbackMessage.php index 75a5d1cc..87a9a674 100644 --- a/src/Model/StatusCallbackMessage.php +++ b/src/Model/StatusCallbackMessage.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/StatusCallbackTypeEnum.php b/src/Model/StatusCallbackTypeEnum.php index 56e7ff6f..db0339ce 100644 --- a/src/Model/StatusCallbackTypeEnum.php +++ b/src/Model/StatusCallbackTypeEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/StirShaken.php b/src/Model/StirShaken.php index 1c0946a0..028552d8 100644 --- a/src/Model/StirShaken.php +++ b/src/Model/StirShaken.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/SyncLookupRequest.php b/src/Model/SyncLookupRequest.php index 273a3d3e..12d164e4 100644 --- a/src/Model/SyncLookupRequest.php +++ b/src/Model/SyncLookupRequest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/TelephoneNumber.php b/src/Model/TelephoneNumber.php index d7561109..04a3dd97 100644 --- a/src/Model/TelephoneNumber.php +++ b/src/Model/TelephoneNumber.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/TfvBasicAuthentication.php b/src/Model/TfvBasicAuthentication.php index 148d96d5..345c284c 100644 --- a/src/Model/TfvBasicAuthentication.php +++ b/src/Model/TfvBasicAuthentication.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/TfvCallbackStatusEnum.php b/src/Model/TfvCallbackStatusEnum.php index a487e8bf..f389ba73 100644 --- a/src/Model/TfvCallbackStatusEnum.php +++ b/src/Model/TfvCallbackStatusEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/TfvError.php b/src/Model/TfvError.php index 23f5511c..37c0a340 100644 --- a/src/Model/TfvError.php +++ b/src/Model/TfvError.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/TfvStatus.php b/src/Model/TfvStatus.php index 617dd0a9..ac5d42fb 100644 --- a/src/Model/TfvStatus.php +++ b/src/Model/TfvStatus.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/TfvStatusEnum.php b/src/Model/TfvStatusEnum.php index e0c6a976..be38058a 100644 --- a/src/Model/TfvStatusEnum.php +++ b/src/Model/TfvStatusEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/TfvSubmissionInfo.php b/src/Model/TfvSubmissionInfo.php index 7192c4d6..8a2aa695 100644 --- a/src/Model/TfvSubmissionInfo.php +++ b/src/Model/TfvSubmissionInfo.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/TfvSubmissionWrapper.php b/src/Model/TfvSubmissionWrapper.php index fcf571b0..3b030d61 100644 --- a/src/Model/TfvSubmissionWrapper.php +++ b/src/Model/TfvSubmissionWrapper.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/ThumbnailAlignmentEnum.php b/src/Model/ThumbnailAlignmentEnum.php index d229dd88..00b7976c 100644 --- a/src/Model/ThumbnailAlignmentEnum.php +++ b/src/Model/ThumbnailAlignmentEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/TranscribeRecording.php b/src/Model/TranscribeRecording.php index 2985c213..a7ed09f9 100644 --- a/src/Model/TranscribeRecording.php +++ b/src/Model/TranscribeRecording.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/Transcription.php b/src/Model/Transcription.php index 366e03bd..d8b82075 100644 --- a/src/Model/Transcription.php +++ b/src/Model/Transcription.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/TranscriptionAvailableCallback.php b/src/Model/TranscriptionAvailableCallback.php index 1f7e21f4..7b27f25e 100644 --- a/src/Model/TranscriptionAvailableCallback.php +++ b/src/Model/TranscriptionAvailableCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/TransferAnswerCallback.php b/src/Model/TransferAnswerCallback.php index a54c2661..602ee32a 100644 --- a/src/Model/TransferAnswerCallback.php +++ b/src/Model/TransferAnswerCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/TransferCompleteCallback.php b/src/Model/TransferCompleteCallback.php index b59615b6..06157c1e 100644 --- a/src/Model/TransferCompleteCallback.php +++ b/src/Model/TransferCompleteCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/TransferDisconnectCallback.php b/src/Model/TransferDisconnectCallback.php index 0a87effb..78c40609 100644 --- a/src/Model/TransferDisconnectCallback.php +++ b/src/Model/TransferDisconnectCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/UpdateCall.php b/src/Model/UpdateCall.php index 2ced54a4..b00dfe2a 100644 --- a/src/Model/UpdateCall.php +++ b/src/Model/UpdateCall.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/UpdateCallRecording.php b/src/Model/UpdateCallRecording.php index d67764b6..d8b32bda 100644 --- a/src/Model/UpdateCallRecording.php +++ b/src/Model/UpdateCallRecording.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/UpdateConference.php b/src/Model/UpdateConference.php index 5a6bfd35..40fb636c 100644 --- a/src/Model/UpdateConference.php +++ b/src/Model/UpdateConference.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/UpdateConferenceMember.php b/src/Model/UpdateConferenceMember.php index 6ab5eda2..35212b9e 100644 --- a/src/Model/UpdateConferenceMember.php +++ b/src/Model/UpdateConferenceMember.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/VerificationDenialWebhook.php b/src/Model/VerificationDenialWebhook.php index 1523294b..0287c397 100644 --- a/src/Model/VerificationDenialWebhook.php +++ b/src/Model/VerificationDenialWebhook.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/VerificationRequest.php b/src/Model/VerificationRequest.php index d54c3016..caffb746 100644 --- a/src/Model/VerificationRequest.php +++ b/src/Model/VerificationRequest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/VerificationUpdateRequest.php b/src/Model/VerificationUpdateRequest.php index 48db0bfd..348a8ecd 100644 --- a/src/Model/VerificationUpdateRequest.php +++ b/src/Model/VerificationUpdateRequest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/VerificationWebhook.php b/src/Model/VerificationWebhook.php index b0198d31..9a08fd54 100644 --- a/src/Model/VerificationWebhook.php +++ b/src/Model/VerificationWebhook.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/VerifyCodeRequest.php b/src/Model/VerifyCodeRequest.php index 92dd0201..654bd029 100644 --- a/src/Model/VerifyCodeRequest.php +++ b/src/Model/VerifyCodeRequest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/VerifyCodeResponse.php b/src/Model/VerifyCodeResponse.php index bc1912cd..db58663a 100644 --- a/src/Model/VerifyCodeResponse.php +++ b/src/Model/VerifyCodeResponse.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/VoiceApiError.php b/src/Model/VoiceApiError.php index 21a91202..8699cfd8 100644 --- a/src/Model/VoiceApiError.php +++ b/src/Model/VoiceApiError.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/VoiceCodeResponse.php b/src/Model/VoiceCodeResponse.php index 03a8a651..611158bb 100644 --- a/src/Model/VoiceCodeResponse.php +++ b/src/Model/VoiceCodeResponse.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/WebhookSubscription.php b/src/Model/WebhookSubscription.php index 8e4d166d..7eae8dd5 100644 --- a/src/Model/WebhookSubscription.php +++ b/src/Model/WebhookSubscription.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/WebhookSubscriptionBasicAuthentication.php b/src/Model/WebhookSubscriptionBasicAuthentication.php index 97999e6a..e8bfc809 100644 --- a/src/Model/WebhookSubscriptionBasicAuthentication.php +++ b/src/Model/WebhookSubscriptionBasicAuthentication.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/WebhookSubscriptionError.php b/src/Model/WebhookSubscriptionError.php index 86ea132f..0199ccbb 100644 --- a/src/Model/WebhookSubscriptionError.php +++ b/src/Model/WebhookSubscriptionError.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/WebhookSubscriptionRequestSchema.php b/src/Model/WebhookSubscriptionRequestSchema.php index bccbace0..89ed5ebd 100644 --- a/src/Model/WebhookSubscriptionRequestSchema.php +++ b/src/Model/WebhookSubscriptionRequestSchema.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/WebhookSubscriptionTypeEnum.php b/src/Model/WebhookSubscriptionTypeEnum.php index 378459f1..33b503f0 100644 --- a/src/Model/WebhookSubscriptionTypeEnum.php +++ b/src/Model/WebhookSubscriptionTypeEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/Model/WebhookSubscriptionsListBody.php b/src/Model/WebhookSubscriptionsListBody.php index f7f80d97..dcd4f289 100644 --- a/src/Model/WebhookSubscriptionsListBody.php +++ b/src/Model/WebhookSubscriptionsListBody.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** diff --git a/src/ObjectSerializer.php b/src/ObjectSerializer.php index 0984d24d..0192af14 100644 --- a/src/ObjectSerializer.php +++ b/src/ObjectSerializer.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0 + * Generator version: 7.27.0 */ /** @@ -242,6 +242,8 @@ private static function toArrayRecursive(mixed $data): mixed * @param string $style Parameter serialization style * @param bool $explode Parameter explode option * @param bool $required Whether query param is required or not + * @param Configuration|null $config Configuration that defines the format of boolean values, + * the default configuration is used if null * * @return array */ @@ -251,7 +253,8 @@ public static function toQueryValue( string $openApiType = 'string', string $style = 'form', bool $explode = true, - bool $required = true + bool $required = true, + ?Configuration $config = null ): array { // Check if we should omit this parameter from the query. This should only happen when: @@ -325,7 +328,15 @@ public static function toQueryValue( } if ('boolean' === $openApiType && is_bool($value)) { - $value = self::convertBoolToQueryStringFormat($value); + $value = self::convertBoolToQueryStringFormat($value, $config); + } + + if (!$explode) { + // serializeCollection() would implode booleans into "1" or "", so convert them first + $value = array_map( + fn (mixed $v): mixed => is_bool($v) ? self::convertBoolToQueryStringFormat($v, $config) : $v, + (array) $value + ); } // handle style in serializeCollection @@ -338,12 +349,15 @@ public static function toQueryValue( * Convert boolean value to format for query string. * * @param bool $value Boolean value + * @param Configuration|null $config Configuration that defines the format, + * the default configuration is used if null * * @return int|string Boolean value in format */ - public static function convertBoolToQueryStringFormat(bool $value): int|string + public static function convertBoolToQueryStringFormat(bool $value, ?Configuration $config = null): int|string { - if (Configuration::BOOLEAN_FORMAT_STRING == Configuration::getDefaultConfiguration()->getBooleanFormatForQueryString()) { + $config ??= Configuration::getDefaultConfiguration(); + if (Configuration::BOOLEAN_FORMAT_STRING == $config->getBooleanFormatForQueryString()) { return $value ? 'true' : 'false'; } @@ -725,8 +739,10 @@ private static function deserializeAnyOf(mixed $data, string $class, ?array $htt * @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. + * @param Configuration|null $config Configuration that defines the format of boolean values, + * the default configuration is used if null */ - public static function buildQuery(array $params, $encoding = PHP_QUERY_RFC3986): string + public static function buildQuery(array $params, $encoding = PHP_QUERY_RFC3986, ?Configuration $config = null): string { if (!$params) { return ''; @@ -744,9 +760,7 @@ public static function buildQuery(array $params, $encoding = PHP_QUERY_RFC3986): throw new \InvalidArgumentException('Invalid type'); } - $castBool = Configuration::BOOLEAN_FORMAT_INT == Configuration::getDefaultConfiguration()->getBooleanFormatForQueryString() - ? function ($v) { return (int) $v; } - : function ($v) { return $v ? 'true' : 'false'; }; + $castBool = fn (bool $v): int|string => self::convertBoolToQueryStringFormat($v, $config); $qs = ''; foreach ($params as $k => $v) {