diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index bc34d81..f6b1800 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 3ac4da2..719ef43 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 27d5897..f603c30 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 bfbec30..3de1939 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 4251d34..cec1d77 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 6d3d5cd..0000000 --- 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 8dd0d74..9539aec 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 42fc782..b6aa1a9 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 5e0807c..bd90372 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 ec3bde9..3b4d24f 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 ca83490..252f2d0 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 2586097..5afbff0 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 57062ff..41f33ef 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 1b27a23..cfd4d05 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 4ef0ad9..ff2bdb3 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 9da7ac5..ff0379f 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 ab62871..5ba375f 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 90c8e7b..2e72598 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 9bc9711..8cc1247 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 7ddee49..d5b5d75 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 efccc76..33ab266 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 ea8e899..da8e26a 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 b5ca03f..938464e 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 b8f1511..b91f30b 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 1d77c85..6294081 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 ed99fc2..2d127ca 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 b4b61ad..ba1c278 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 763f7e9..a9e3451 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 9597786..daf11f9 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 31e2ecf..07d5014 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 60e8c05..babaa76 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 9ed8b67..5727f9f 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 2ba0b92..6cc75d6 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 cd0f4e6..ffe79ce 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 e78a8fd..8b2a4dd 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 dca3a58..f95d4cc 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 0ef8f68..bf70726 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 5ebeedc..70f0d17 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 1480c34..c4ac2b2 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 f32de9e..5b458e0 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 2e02a3a..40ad956 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 676e6be..ab55040 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 09b601b..082bdcd 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 4d1676c..006042f 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 256b2e3..c6c7b33 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 1641db4..b48520f 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 d8d6afd..0fa1bce 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 f4bf0aa..2cfaba1 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 d30884e..94c1112 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 f07570c..c5d2901 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 c493823..dabc2d9 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 a5d7f39..b99644c 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 12a3cc5..02ca886 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 5fcd404..30a9244 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 16ad600..7110a8f 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 8597d3d..b476e2e 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 adc4fe5..1ea480d 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 0ab6da3..747d7b8 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 4135406..63fcc4d 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 2800e58..624ba70 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 eaaa4e9..9df1f60 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 b7c7b2c..8c5c194 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 2bfca2f..ae13f6d 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 35feaa5..399a97c 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 13af4de..4051a4e 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 b0e001f..1809941 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 6780e34..8afc737 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 50160e3..dac7cad 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 ecf91b4..14c90d3 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 4e6064d..71f11b6 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 437330c..c38a161 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 dd8bd1a..15b8389 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 5792884..ae4cdf7 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 9f5d3a2..cba9b77 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 40deedf..43b6e7e 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 c391a7c..6cc5f66 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 c119797..c69e3e2 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 0e24921..cd4d88d 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 05887b7..39dafd7 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 7b4c48d..80ee438 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 e869f63..4a34b85 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 6a6d845..d6ba1af 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 a287b28..74e4898 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 2876aa9..e03dad6 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 f3e2854..1fc0875 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 fd7cdec..b427154 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 3415689..829c417 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 f26eed1..cf4bd84 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 5270640..082ade5 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 2a78b71..5b4b10a 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 e830762..2a8ca6f 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 d1cfda7..e3f6567 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 cd9adc4..dcf7a60 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 65046bb..2691dcb 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 12db755..4629715 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 92cf16e..be74afb 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 0d3cf88..0e9ed70 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 893ec79..1850b4c 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 52171cb..3794d54 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 d039532..c542f86 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 d936cc3..c6d614c 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 c052fd8..31b12dc 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 8ea6099..c9fccf8 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 ef1267c..ecf39ed 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 a287f36..febd625 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 06db5c1..2be2e8f 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 b6a1487..89ba3eb 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 3c02a7a..b6a9059 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 b8c8b11..a1ad1c1 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 3fe4001..5252953 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 38fe4ee..975c328 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 7192faf..60e5978 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 bb9ad8d..56f64dd 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 c020971..b84c6a7 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 8ac67ee..5a0553f 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 18fc0e8..fc31001 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 d74e693..fcda091 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 267329c..8785f55 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 8a9eefc..8933e2c 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 c2eddc7..c60a7d3 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 117ddf2..ca71bc0 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 b8fbf90..0eeb6fb 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 aeb8303..83ab2cc 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 970ce65..66390aa 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 5edbe71..e0a95b6 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 bbbb5d2..78ae1f5 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 14e445f..942706b 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 4a41006..3a4f5c3 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 1576fbe..d4e6a93 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 dcf8d67..33000d7 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 014a285..3ed4099 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 da7c234..a5a1abe 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 4344f63..c622388 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 ad0942e..4676584 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 d6483ea..8cf033d 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 d29f538..69e4114 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 171990c..d6af1c7 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 34b8629..66aa3ad 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 6ffa55c..f816067 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 d4b341a..23acd46 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 ddee0ca..e5929a7 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 f6053b0..0125eed 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 2f429a9..c149f8f 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 f02ad82..b48f68b 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 4455792..96bf213 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 7079a17..06fa7a2 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 71bff87..9f301a8 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 51e128f..bf8333e 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 d6e6762..f555b31 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 4664be4..516dc65 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 c42a9c9..4349dca 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 8998af4..eb9c693 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 edab2db..78e67db 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 17ce2ac..3c3538d 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 7261321..2f0a460 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 02191f0..3a95a2a 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 4e93817..135fce0 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 d0cae68..f6d44a1 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 47967bb..21c0b46 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 716fc40..9be8754 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 4b87580..5e04001 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 39a9527..6858b37 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 9812f56..6d57feb 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 4d216ad..8e7ddf4 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 1146cbb..8f2c9ba 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 f9a622f..70c4762 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 8aae102..2501688 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 3146ff9..f041bfb 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 1b17fb8..287dcbb 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 426321b..33a6537 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 f4c648e..73c603c 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 bcf028a..c3b13fb 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 bf7e1cb..2263d95 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 9e19bf2..fb9fe47 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 a7d3861..cd1e30c 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 b3e33e3..f8fa450 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 1b0dfdd..c3ccfaf 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 27cd967..0813988 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 ce24ee1..1a1c118 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 ad21e25..677933d 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 f0dc07f..8f2de9b 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 b60559f..d928484 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 c00af22..4c25a8d 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 a9016fc..a66b51f 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 ef865fc..80e2700 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 7fe8905..b0ceec3 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 1c99a78..006fee1 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 8321d18..5ec2859 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 c9518be..3090f9e 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 89cb057..98b63e3 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 b0de4eb..3278b41 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 75a5d1c..87a9a67 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 56e7ff6..db0339c 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 1c0946a..028552d 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 273a3d3..12d164e 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 d756110..04a3dd9 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 148d96d..345c284 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 a487e8b..f389ba7 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 23f5511..37c0a34 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 617dd0a..ac5d42f 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 e0c6a97..be38058 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 7192c4d..8a2aa69 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 fcf571b..3b030d6 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 d229dd8..00b7976 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 2985c21..a7ed09f 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 366e03b..d8b8207 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 1f7e21f..7b27f25 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 a54c266..602ee32 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 b59615b..06157c1 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 0a87eff..78c4060 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 2ced54a..b00dfe2 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 d67764b..d8b32bd 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 5a6bfd3..40fb636 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 6ab5eda..35212b9 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 1523294..0287c39 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 d54c301..caffb74 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 48db0bf..348a8ec 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 b0198d3..9a08fd5 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 92dd020..654bd02 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 bc1912c..db58663 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 21a9120..8699cfd 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 03a8a65..611158b 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 8e4d166..7eae8dd 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 97999e6..e8bfc80 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 86ea132..0199ccb 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 bccbace..89ed5eb 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 378459f..33b503f 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 f7f80d9..dcd4f28 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 0984d24..0192af1 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) {